Long short-term memory
Written by GPT-6 Luna from the web 18 of 57 sentences cited
An AI wrote this article, and it can be wrong.
Long short-term memory (LSTM) is a recurrent neural network architecture that uses gated memory cells to process sequences and learn which information to retain, update or discard over time. It was designed to address a difficulty in training recurrent networks: signals used to adjust their parameters can weaken as they pass backward through long sequences, making distant relationships hard to learn.1
LSTMs became important in sequence-processing tasks including speech recognition, handwriting recognition and machine translation. Their gated design helped recurrent networks learn dependencies across longer intervals, while their step-by-step computation made them harder to parallelize than later architectures such as Transformers. Transformers subsequently became prominent in language processing, but recurrent and state-space approaches continue to be studied for sequence modeling.234
Origins and development
Sepp Hochreiter and Jürgen Schmidhuber introduced LSTM in a 1997 paper in Neural Computation. They proposed it as a gradient-based method for learning over long time intervals, motivated by the difficulty of training ordinary recurrent networks when error signals decay during learning. The paper reported experiments in which LSTM learned tasks involving time lags of more than 1,000 discrete steps.1
The architecture has changed since its introduction. In work published in 2000, Felix Gers, Schmidhuber and Fred Cummins addressed a problem with processing continuous input streams: without clear points at which to reset memory, a cell’s state could grow and the network could fail. They introduced the forget gate, which lets a cell learn when to clear stored information. The familiar arrangement of input, forget and output gates therefore developed after the original proposal.5
Architecture
An LSTM processes an input sequence one step at a time. At each step, it receives the current input and information passed forward from the preceding step. Its internal memory includes a cell state, which carries information through the sequence, and a hidden state, which serves as the cell’s output and is passed to later computation. The gates are learned components that regulate the flow of information into, through and out of the cell.6
In the commonly used form, the input gate controls how much new information enters the cell state; the forget gate controls how much of the previous state remains; and the output gate controls how much of the cell state contributes to the hidden state. These gates typically use sigmoid functions, whose outputs range between zero and one, to regulate information flow. Their values depend on the current input and earlier network activity.6
This design gives the network a learned way to preserve information across multiple steps rather than relying only on repeatedly transformed hidden activations. A gate can allow information to pass with little change, limit an update or suppress information that is no longer useful. The cell does not automatically preserve every detail for an arbitrarily long time: what it retains depends on the learned parameters, the sequence and the gate activations.16
Learning and variants
LSTMs are commonly trained using backpropagation through time, a method that applies backpropagation across the unrolled sequence of recurrent computations. The original design aimed to improve the transmission of learning signals across long intervals. Its memory cells and gates made long-range learning more tractable, but did not remove the need to train the network on data or guarantee that it would learn every dependency in a sequence.1
Researchers have proposed numerous LSTM variations, altering the gates, connections or cell computations. A large-scale empirical comparison of eight variants across speech recognition, handwriting recognition and music modeling found no variant that significantly outperformed the standard LSTM overall in those experiments. It also found the forget gate and the cell’s output activation function to be important components. These results apply to the variants and tasks evaluated in that study, not to every possible use of LSTM.7
LSTMs can also be made bidirectional: two recurrent networks process a sequence in opposite directions, allowing a representation to incorporate context from both earlier and later positions. This is useful when the whole sequence is available before an output is produced, as in some recognition tasks. It is not directly suitable for tasks that must respond in real time without access to future inputs.8
Applications
Speech and handwriting recognition were prominent areas of LSTM research. In a 2013 study, Alex Graves, Abdel-rahman Mohamed and Geoffrey Hinton reported a 17.7% test error on the TIMIT phoneme-recognition benchmark using deep LSTM recurrent networks. The result showed the potential of combining LSTM’s sequence processing with multiple network layers; it was a benchmark result, not a general measure of performance across speech-recognition systems.9
LSTMs were also used in sequence-to-sequence systems, in which a model maps an input sequence to an output sequence. In 2014, Ilya Sutskever, Oriol Vinyals and Quoc V. Le described an encoder–decoder system using deep LSTMs for machine translation. On the WMT 2014 English-to-French task, their model achieved a BLEU score of 34.8 on the test set, with a penalty for out-of-vocabulary words. The paper also reported that reversing the source sentence improved the model’s performance in its experiments.10
LSTMs have also been applied to time-series forecasting, language modeling and other tasks where order and changes over time matter. Their use in deployed speech systems illustrates that the architecture could be adapted to practical computing constraints: a Google Research account in 2015 described using LSTM recurrent networks for Google Voice transcription, while a separate Google Research publication described a compressed LSTM speech-recognition system designed to run faster than real time on a Nexus 5 smartphone. These examples document particular systems, rather than establishing how widely LSTM is used today.1112
Strengths and limitations
A central strength of LSTM is its ability to carry information through a sequence using an explicit cell state and learned gates. This can help with dependencies that span more steps than a basic recurrent network can readily learn. LSTMs also process inputs in order, a structure that can suit sequential data and tasks that produce an output as new observations arrive.16
The same sequential structure creates a computational limitation. Because each step depends on the preceding step’s computation, a standard LSTM cannot calculate all sequence positions in parallel in the same way as a model that processes them independently. The 2017 Transformer paper identified this constraint as a barrier to parallelizing training across positions and proposed an attention-based architecture without recurrence.13
The gated design also adds parameters and computation compared with a basic recurrent unit, and the architecture still requires choices about its size, training and use. Its memory state is a finite learned representation, not a complete record of the past. As a result, the usefulness of an LSTM depends on the data and task; its ability to retain information does not by itself ensure accurate predictions or effective learning over every sequence length.17
Later role
The Transformer, introduced in 2017, shifted much sequence-modeling research toward architectures based on attention rather than recurrent processing. Its authors reported improved results and greater parallelizability than the recurrent and convolutional systems compared in their machine-translation experiments. The change was especially consequential for language processing, where Transformers became central to many later systems.3
LSTM nevertheless remains part of the broader history and continuing study of recurrent neural networks. A 2025 review describes renewed research into recurrent models alongside Transformers and state-space models, particularly in connection with long sequences and computational efficiency. This does not mean that LSTM has replaced Transformers in language modeling; it indicates that recurrent processing remains one approach among several being investigated for sequence data.4
References
13 sourcesA Critical Review of Recurrent Neural Networks for Sequence Learningarxiv.orgMay 29, 2015
7181 attention is all you needproceedings.neurips.cc· cited 2×
Back to recurrent processing at the crossroad of transformers and state-space models - Nature Machine Intelligencenature.comMay 15, 2025· cited 2×
LSTM: A Search Space Odysseyarxiv.orgMar 13, 2015· cited 2×
Towards End-To-End Speech Recognition with Recurrent Neural Networksproceedings.mlr.pressJun 18, 2014
The neural networks behind Google Voice transcriptionresearch.googleAug 11, 2015
Personalized Speech Recognition On Mobile Devicesresearch.google