Skip to content

AI Glossary · Concepts

What is Long short-term memory?

Long short-term memory

Long short-term memory (LSTM) is a type of recurrent neural network that can remember important information across long sequences, such as earlier words in a sentence, by using gates that decide what to keep and what to forget.

Also known as: LSTM

· Chain of Thought

  • 2 sources

A recurrent neural network reads data one step at a time, like reading a sentence word by word, and carries a running memory forward. Plain recurrent networks tend to lose track of things that happened many steps earlier. An LSTM adds a separate memory track plus “gates,” small learned switches that decide what to write into memory, what to erase and what to read out. That lets it connect “The keys that I left on the kitchen table this morning” with “are” many words later.

LSTMs were introduced by Sepp Hochreiter and Jürgen Schmidhuber in 1997. Through the mid-2010s they powered speech recognition, handwriting recognition and early neural machine translation.

Why it matters

Transformers have since replaced LSTMs in most language models, because attention handles long context better and trains faster on modern hardware. LSTMs are still useful history for understanding why transformers mattered, and they remain in use for some time-series and on-device tasks.

No published Chain of Thought episode discusses LSTMs directly yet, so this entry relies on the sources below.

Recurrent neural network is the broader family. Attention mechanism is the idea that displaced LSTMs in language models.

Sources