Step through an LSTM cell — watch the forget gate clear old memory, the input gate write new values, and the output gate produce the hidden state.
Gated Memory Cell
LSTM solves vanishing gradients via multiplicative gates (forget, input, output) controlling information flow through a persistent cell state.