Skip to content
— CH. 1 · INTRODUCTION —

Long short-term memory

~6 min read · Ch. 1 of 6
6 sections
  • Long short-term memory, or LSTM, is a piece of artificial intelligence architecture that solved a problem researchers had been stuck on for decades. In the early 1990s, a graduate student in Germany named Sepp Hochreiter was staring at a fundamental flaw in how neural networks learn. When these networks tried to find patterns across long stretches of information, something broke. The learning signal simply vanished before it could travel back through time. Hochreiter's 1991 diploma thesis laid out the problem with unusual precision, and his supervisor, Jürgen Schmidhuber, considered the work highly significant. What followed was a design that became one of the most widely deployed architectures in the history of machine learning. By 2017, Facebook was using LSTM to perform roughly 4.5 billion automatic translations every single day. How did a piece of university research become the engine behind Google Translate, Apple's Siri, Amazon's Alexa, and a record-breaking handwriting recognition system? The answers lie in a cell, three gates, and the elegant notion of a memory that knows when to forget.

  • Classic recurrent neural networks could, in theory, track long-range dependencies in sequences. In practice, training them was a different matter. When a network is trained through a technique called backpropagation, error signals travel backward through each time step. Across long sequences, those signals could shrink toward zero, which effectively stopped the network from learning anything about events far back in time. Hochreiter's 1991 German diploma thesis was the first rigorous analysis of exactly why this happened. The culprit was arithmetic: very small numbers compounding multiplicatively across many steps caused the gradient to simply vanish. His supervisor, Schmidhuber, recognized the thesis as unusually significant for work at that level. The two researchers continued collaborating, and an early version of their proposed solution appeared in a 1995 technical report before being presented at the NIPS 1996 conference. The full paper that became the standard reference was published in 1997 in the journal Neural Computation. That paper introduced what they called the Constant Error Carousel, or CEC, a mechanism that allowed error signals to flow backward without attenuation. That insight sits at the core of the LSTM cell to this day.

  • Felix Gers, Jürgen Schmidhuber, and Fred Cummins added the piece that made the architecture practical. In 1999, they introduced the forget gate, sometimes called the keep gate, which gave the network the ability to reset its own internal state. Before this addition, the original LSTM had no mechanism for actively discarding information it no longer needed. The forget gate maps the previous state and the current input to a value between 0 and 1. A value of 1 means the information is fully retained; a value of 0 means it is discarded. The same team added peephole connections in 2000, allowing each gate to look directly at the cell's internal state rather than only at its output. The sentence-level example the original researchers used to illustrate the design is clarifying: an LSTM processing "Dave, as a result of his controversial claims, is now a pariah" can remember the grammatical gender and number of the subject Dave long enough to correctly associate it with the pronoun his, then discard that information once the verb is appears, because it is no longer needed. The three gates, input, output, and forget, each assign a value between 0 and 1 to each piece of information, regulating what enters, what persists, and what gets released to the next layer.

  • In 2009, an LSTM trained by a technique called Connectionist Temporal Classification entered the ICDAR connected handwriting recognition competition. Three models were submitted by a team led by Alex Graves. One of the three was the most accurate model in the entire competition; another was the fastest. It was the first time a recurrent neural network won an international competition of that kind. CTC itself had been introduced three years earlier, in 2006, when Graves, Fernandez, Gomez, and Schmidhuber published the error function as a way to achieve simultaneous alignment and recognition of sequences. In 2013, Alex Graves, Abdel-rahman Mohamed, and Geoffrey Hinton used LSTM networks as a major component of a system that achieved a record 17.7% phoneme error rate on the TIMIT natural speech dataset. The TIMIT dataset is a classic benchmark in speech research, and the phoneme error rate of 17.7% represented a new floor at the time. The same CTC training method that powered handwriting recognition would later be the mechanism Google chose when it deployed LSTM for speech recognition on Google Voice, cutting transcription errors by 49%.

  • Google began using LSTM trained by CTC for speech recognition on Google Voice in 2015. The same year, Srivastava, Greff, and Schmidhuber used LSTM principles to design the Highway network, a feedforward architecture with hundreds of layers and the deepest networks built to that point. In 2016, Google deployed LSTM inside the Allo conversation app to suggest messages to users, and released the Google Neural Machine Translation system for Google Translate, which used LSTMs to reduce translation errors by 60%. That same year, Apple announced at its Worldwide Developers Conference that it would use LSTM for the QuickType keyboard on iPhone and for Siri. Amazon's Polly system, which generates the voice behind Alexa, used a bidirectional LSTM for its text-to-speech conversion. Microsoft reported reaching 94.9% recognition accuracy on the Switchboard corpus, a demanding benchmark incorporating a vocabulary of 165,000 words, using what it called dialog session-based long-short-term memory. By 2018, OpenAI had trained an LSTM using policy gradients to beat human players in Dota 2 and to control a robot hand capable of manipulating physical objects with precision that had not been achieved before. DeepMind followed in 2019 by using a policy-gradient-trained LSTM to excel at Starcraft II.

  • In 2005, Graves and Schmidhuber published bidirectional LSTM alongside the full backpropagation-through-time formulation, allowing networks to process sequences in both temporal directions. In 2014, Kyunghyun Cho and others published a simplified variant called the Gated Recurrent Unit, or GRU, which condensed the forget gate LSTM into a leaner design. In 2017, researchers from Michigan State University, IBM Research, and Cornell University presented a time-aware variant called T-LSTM at the Knowledge Discovery and Data Mining conference; that version performed better than standard LSTM on certain datasets where the time intervals between measurements are irregular. In 2020, Kaplan and McCandlish compared the scaling behavior of LSTM and Transformer architectures in language modeling, finding that Transformers scale more efficiently than LSTM on text data. Sepp Hochreiter, the researcher whose 1991 diploma thesis started the whole lineage, later led a team that published a modern upgrade called xLSTM. The architecture contains two block types: one called mLSTM, which is parallelizable in the same way as the Transformer, and another called sLSTM, which preserves the state-tracking capability that has always been the architecture's core advantage.

Continue Browsing

Common questions

Who invented long short-term memory (LSTM)?

LSTM was developed by Sepp Hochreiter and Jürgen Schmidhuber. Hochreiter analyzed the vanishing gradient problem in his 1991 German diploma thesis, and the two researchers published the foundational LSTM paper in 1997 in the journal Neural Computation. Felix Gers, Schmidhuber, and Fred Cummins later added the forget gate in 1999.

What problem does LSTM solve in neural networks?

LSTM addresses the vanishing gradient problem that affects classic recurrent neural networks during training. When error signals are backpropagated through many time steps, they tend toward zero, preventing the network from learning long-range dependencies. LSTM's Constant Error Carousel allows gradients to flow backward with little to no attenuation.

What are the three gates in an LSTM unit?

An LSTM unit contains an input gate, an output gate, and a forget gate. Each gate assigns a value between 0 and 1 to regulate information flow: the forget gate discards outdated information, the input gate decides what new information to store, and the output gate controls what information is passed to the next layer.

When did Google start using LSTM for speech recognition?

Google began using LSTM trained by Connectionist Temporal Classification for speech recognition on Google Voice in 2015. The deployment cut transcription errors by 49% according to the official blog post.

What real-world applications use long short-term memory networks?

LSTM powers a wide range of applications including speech recognition (Google Voice, Siri), machine translation (Google Translate, which reduced translation errors by 60% using LSTM), text-to-speech (Amazon Polly and Alexa), handwriting recognition, drug design, financial forecasting, and reinforcement learning in video games such as Dota 2 and Starcraft II.

What is the difference between LSTM and GRU?

The Gated Recurrent Unit (GRU), published by Kyunghyun Cho and others in 2014, is a simplified variant of the forget gate LSTM architecture. GRU consolidates the LSTM's separate input and forget gates into a more compact design, reducing the number of learned parameters while preserving similar sequence-modeling capabilities.

All sources

81 references cited across the entry

  1. 1journalLSTM can solve hard long time lag problemsSepp Hochreiter et al. — MIT Press — 1996-12-03
  2. 2journalLSTM Fully Convolutional Networks for Time Series ClassificationFazle Karim et al. — 2018
  3. 4arxivConstructing Long Short-Term Memory based Deep Recurrent Neural Networks for Large Vocabulary Speech RecognitionXiangang Li et al. — 2014-10-15
  4. 5arxivGoogle's Neural Machine Translation System: Bridging the Gap between Human and Machine TranslationYonghui Wu et al. — 2016-09-26
  5. 7arxivThe Speed Submission to DIHARD II: Contributions & Lessons LearnedMd Sahidullah et al. — 2019-11-06
  6. 8newsLearning DexterityJuly 30, 2018
  7. 12arxivForecasting Energy Consumption using Recurrent Neural Networks: A Comparative AnalysisAbhishek Maity et al. — 23 January 2026
  8. 13bookDeep Learning ArchitecturesOvidiu Calin — Springer Nature — 14 February 2020
  9. 14citationThe emergence of number and syntax unitsYair Lakretz et al. — Association for Computational Linguistics — 2019
  10. 15journalLearning to Forget: Continual Prediction with LSTMFelix A. Gers — 2000
  11. 16journalConvolutional LSTM Network: A Machine Learning Approach for Precipitation NowcastingXingjian Shi — 2015
  12. 17bookA Field Guide to Dynamical Recurrent Neural Networks.S. Hochreiter et al. — IEEE Press — 2001
  13. 18journalSequence labelling in structured domains with hierarchical recurrent neural networksSantiago Fernández et al. — 2007
  14. 19journalConnectionist temporal classification: Labelling unsegmented sequence data with recurrent neural networksAlex Graves et al. — 2006
  15. 20book2006 IEEE/RSJ International Conference on Intelligent Robots and SystemsH. Mayer et al. — October 2006
  16. 22journalFramewise phoneme classification with bidirectional LSTM and other neural network architecturesA. Graves et al. — 2005
  17. 23journalAn Application of Recurrent Neural Networks to Discriminative Keyword SpottingS. Fernández et al. — Springer-Verlag — 9 September 2007
  18. 24book2013 IEEE International Conference on Acoustics, Speech and Signal ProcessingAlex Graves et al. — 2013
  19. 27bookArtificial Neural Networks — ICANN 2002Douglas Eck et al. — Springer, Berlin, Heidelberg — 2002-08-28
  20. 28journalLearning nonregular languages: A comparison of simple recurrent networks and LSTMJ. Schmidhuber et al. — 2002
  21. 30journalKalman filters improve LSTM network performance in problems unsolvable by traditional recurrent netsJ. A. Perez-Ortiz et al. — 2003
  22. 31journalUnconstrained Online Handwriting Recognition with Recurrent Neural NetworksA. Graves et al. — Curran Associates Inc. — 3 December 2007
  23. 32book2nd International Workshop on Human Behavior Understanding (HBU)M. Baccouche et al. — Springer — 2011
  24. 33arxivVideo-based Sign Language Recognition without Temporal SegmentationJie Huang et al. — 2018-01-30
  25. 34journalFast model-based protein homology detection without alignmentS. Hochreiter et al. — 2007
  26. 35journalBidirectional Long Short-Term Memory Networks for predicting the subcellular localization of eukaryotic proteinsT. Thireou et al. — 2007
  27. 36journalLong Short Term Memory Networks for Anomaly Detection in Time SeriesPankaj Malhotra et al. — April 2015
  28. 37bookAdvanced Information Systems EngineeringN. Tax et al. — 2017
  29. 39arxivData Recombination for Neural Semantic ParsingRobin Jia et al. — 2016
  30. 41conference2018 25th IEEE International Conference on Image Processing (ICIP)Xuhuan Duan et al. — 25th IEEE International Conference on Image Processing (ICIP) — 2018
  31. 42conferenceNeural networks trained with WiFi traces to predict airport passenger behaviorF. Orsini et al. — IEEE — 2019
  32. 43journalLSTM network: A deep learning approach for Short-term traffic forecastZ. Zhao et al. — 2017
  33. 44journalGenerative Recurrent Networks for De Novo Drug Design.Gupta A, Müller AT, Huisman BJH, Fuchs JA, Schneider P, Schneider G — 2018
  34. 45journalForeign Exchange Currency Rate Prediction using a GRU-LSTM Hybrid NetworkMd. Saiful Islam et al. — 2020-10-26
  35. 47newsThe neural networks behind Google Voice transcriptionFrançoise Beaufays — August 11, 2015
  36. 48newsGoogle voice search: faster and more accurateHaşim Sak et al. — September 24, 2015
  37. 50newsChat Smarter with AlloPranav Khaitan — May 18, 2016
  38. 53webApple's Machines Can Learn TooAmir Efrati — June 13, 2016
  39. 57journalSiri On-Device Deep Learning-Guided Unit Selection Text-to-Speech SystemTim Capes et al. — ISCA — 2017-08-20
  40. 59book2018 IEEE International Conference on Acoustics, Speech and Signal Processing (ICASSP)W. Xiong et al. — IEEE — April 2018
  41. 60journalA Focused Backpropagation Algorithm for Temporal Pattern RecognitionMike Mozer — 1989
  42. 61thesisUntersuchungen zu dynamischen neuronalen NetzenSepp Hochreiter — Technical University of Munich, Institute of Computer Science — 1991
  43. 62arxivAnnotated History of Modern AI and Deep LearningJuergen Schmidhuber — 2022
  44. 63journalLong short-term memorySepp Hochreiter — 1997
  45. 64journalLSTM: A Search Space OdysseyKlaus Greff et al. — 2015
  46. 65book9th International Conference on Artificial Neural Networks: ICANN '99Felix Gers et al. — 1999
  47. 66arxivLearning Phrase Representations using RNN Encoder-Decoder for Statistical Machine TranslationKyunghyun Cho et al. — 2014
  48. 67arxivHighway NetworksRupesh Kumar Srivastava et al. — 2 May 2015
  49. 68conferenceTraining Very Deep NetworksRupesh K Srivastava et al. — MIT Press — December 2015
  50. 70conference2016 IEEE Conference on Computer Vision and Pattern Recognition (CVPR)Kaiming He et al. — IEEE — 2016
  51. 71arxivxLSTM: Extended Long Short-Term MemoryMaximilian Beck et al. — 2024-05-07
  52. 72citationNX-AI/xlstmNXAI — 2024-06-04
  53. 73bookArtificial Neural Networks — ICANN 2001S. Hochreiter et al. — 2001
  54. 74conferenceBiologically Plausible Speech Recognition with LSTM Neural Nets.Alex Graves et al. — 2004
  55. 75arxivDeep Learning: Our Miraculous Year 1990-1991Schmidhuber, Juergen — 10 May 2021
  56. 77journalEvolving memory cell structures for sequence learningJustin Bayer et al. — 2009
  57. 78journalA Novel Connectionist System for Unconstrained Handwriting RecognitionA. Graves et al. — May 2009
  58. 79book2009 10th International Conference on Document Analysis and RecognitionVolker Märgner et al. — July 2009
  59. 80bookProceedings of the 23rd ACM SIGKDD International Conference on Knowledge Discovery and Data MiningInci M. Baytas et al. — Association for Computing Machinery — 2017-08-04
  60. 81arxivScaling Laws for Neural Language ModelsJared Kaplan et al. — 2020