An LSTM is a recurrent network with gates that decide what to keep, forget and output, giving it much better memory over long sequences than a plain RNN.
An LSTM is a recurrent network with gates that decide what to keep, what to discard, and what to pass on. The gates are what give it usable memory across long sequences.
A plain RNN overwrites its memory at every step. An LSTM maintains a separate cell state that information can travel along largely untouched, so something from step one can still matter at step five hundred.
Think of it like this. Think of a notebook alongside your working memory. Most of what happens gets forgotten, and you deliberately write down the few things worth keeping. The gates are the decision about what gets written.
An LSTM has three gates and a separate cell state. A GRU merges these into two gates, which trains faster and usually performs comparably.