Case & CodeA FIELD GUIDE TO AI
Start learning
Beginner

Long short-term memory (LSTM)

In plain words

A model that reads a sequence while controlling which information to keep or replace.

The fuller definition

A recurrent neural network architecture with gates that control what information is retained, updated, and exposed as a sequence is processed.

How it fits together
  1. Read

    Process a token

  2. Gate

    Update retained information

  3. Continue

    Carry state forward

A simplified relationship, not a screenshot or a complete design.

A concrete example

An LSTM processes a sentence token by token while updating its state.

The distinction that matters

LSTMs were designed to preserve information across longer sequences; transformers offer different attention and parallel-training mechanisms.

Related terms

Where it is taught

What actually happens when you ask AI a question?

Source and further reading

Hochreiter & Schmidhuber · Long Short-Term Memory (Neural Computation, 1997)

The definition and example are written for this library. The link gives background, official documentation or legal authority as labelled. Legal scope depends on the jurisdiction and current text; product features depend on release and settings.

Lessons, terms, practical guides and sources ESC