Write the vanilla RNN update equation and explain why it struggles with long sequences.
easyAnswer
- .
- Repeatedly multiplying by during BPTT causes gradients to vanish (spectral norm < 1) or explode (> 1) over long sequences.
- LSTMs / GRUs introduce gated additive updates to preserve gradients across time; transformers skip recurrence entirely and use attention.
Check yourself — multiple choice
- · only
- ; repeated multiplications cause vanish/explode
- RNNs have no gradients
- Vanilla RNNs use attention
Vanilla RNN: repeated multiplication → gradient problems on long sequences.
#rnn#fundamentals
Practise Deep Learning
214 interview questions in this topic.
Related questions
- ReLU vs sigmoid vs GELU — when do you use each?
- Why did transformers replace RNNs for sequence modeling?
- In one sentence, what is backpropagation?
- State the universal approximation theorem in one sentence and its practical caveat.
- Why does stacking linear layers without nonlinearity collapse to a single linear layer?
- Depth vs width — which do you scale first?