Explain the four gates of an LSTM.
mediumAnswer
- (1) Forget gate : what to remove from cell state.
- (2) Input gate i = σ(...) and candidate : what to add.
- (3) Cell update: .
- (4) Output gate o = σ(...) and .
- The additive cell-state update lets gradients flow across many timesteps without vanishing.
- Introduced by Hochreiter & Schmidhuber 1997.
Check yourself — multiple choice
- LSTM has one gate
- Forget/Input/Candidate/Output; additive cell-state update ·· preserves gradients
- LSTM has no cell state
- Only one gate matters
LSTM: 4 gates + additive cell update → gradient highway across time.
#rnn#lstm
Practise Deep Learning
214 interview questions in this topic.
Related questions
- GRU vs LSTM — how are they different in practice?
- Why did transformers replace RNNs for sequence modeling?
- When is orthogonal weight initialization useful?
- What causes exploding gradients and how do you handle them?
- Why is BatchNorm awkward in RNNs?
- Write the vanilla RNN update equation and explain why it struggles with long sequences.