In a vanilla recurrent neural network, what is the hidden state?
Show the answer and explanation
Correct answer: C, A vector recomputed at each time step from the current input and the previous hidden state, summarizing the past.
Explanation RNN & LSTM
The hidden state hₜ is the RNN's running memory. At each step it is recomputed from the current input and the previous hidden state, for example hₜ = tanh(Wₓₕ xₜ + Wₕₕ hₜ₋₁ + b). It therefore carries a summary of everything the network has read so far, and it can feed an output layer at every step.
Why the other descriptions are wrong:
- A vector that never changes could not carry information about the sequence; only the initial state h₀ is a fixed (often zero) vector.
- The weight matrices are shared across all time steps and are not changed by the forward pass; they change only when the optimizer updates them.
- A hidden state exists at every step, not just the last one. Many-to-one tasks use only the final state, but the earlier ones are still computed.
Interview tip: write the recurrence hₜ = f(xₜ, hₜ₋₁) and stress weight sharing across time; that is what lets one RNN handle sequences of any length.