Characterizing Verbatim Short-Term Memory in Neural Language Models
Not on the map. Why?
Abstract (arXiv)
When a language model is trained to predict natural language sequences, its prediction at each moment depends on a representation of prior context. What kind of information about the prior context can language models retrieve? We tested whether language models could retrieve the exact words that occurred previously in a text. In our paradigm, language models (transformers and an LSTM) processed English text in which a list of nouns occurred twice. We operationalized retrieval as the reduction in surprisal from the first to the second list. We found that the transformers retrieved both the identity and ordering of nouns from the first list. Further, the transformers' retrieval was markedly enhanced when they were trained on a larger corpus and with greater model depth. Lastly, their ability to index prior tokens was dependent on learned attention patterns. In contrast, the LSTM exhibited less precise retrieval, which was limited to list-initial tokens and to short intervening texts. The LSTM's retrieval was not sensitive to the order of nouns and it improved when the list was semantically coherent. We conclude that transformers implemented something akin to a working memory system that could flexibly retrieve individual token representations across arbitrary delays; conversely, the LSTM maintained a coarser and more rapidly-decaying semantic gist of prior tokens, weighted toward the earliest items.
Key facts. Cited by 8 papers in the map (data through 7 Oct 2026). Builds on 28 of its 42 references that are in the map. First posted on arXiv 24 Oct 2022.
Builds on
28 of 42 references.
References · 28
- 2017Attention Is All You Needcited by 59,932
- 2018BERT: Pre-training of Deep Bidirectional Transformers for Language Understandingcited by 40,204
- 2020Language Models are Few-Shot Learnerscited by 32,199
- 2019Exploring the Limits of Transfer Learning with a Unified Text-to-Text Transformercited by 14,491
- 2020Scaling Laws for Neural Language Modelscited by 6,411
- 2014Neural Machine Translation by Jointly Learning to Align and Translatecited by 4,530
- 2016Pointer Sentinel Mixture Modelscited by 2,992
- 2019The Curious Case of Neural Text Degenerationcited by 2,881
- 2022In-context Learning and Induction Headscited by 930
- 2020Efficient Transformers: A Surveycited by 784
- 2021Linear Transformers Are Secretly Fast Weight Programmerscited by 471
- 2014Memory Networkscited by 354
16 more
- 2016Assessing the Ability of LSTMs to Learn Syntax-Sensitive Dependenciescited by 350
- 2018Targeted Syntactic Evaluation of Language Modelscited by 239
- 2016Incorporating Copying Mechanism in Sequence-to-Sequence Learningcited by 217
- 2018Colorless green recurrent networks dream hierarchicallycited by 210
- 2017Regularizing and Optimizing LSTM Language Modelscited by 205
- 2016Using Fast Weights to Attend to the Recent Pastcited by 161
- 2019Neural Language Models as Psycholinguistic Subjects: Representations of Syntactic Statecited by 137
- 2018Sharp Nearby, Fuzzy Far Away: How Neural Language Models Use Contextcited by 113
- 2020Syntactic Structure from Deep Learningcited by 99
- 2019The emergence of number and syntax units in LSTM language modelscited by 92
- 2015Learning to Transduce with Unbounded Memorycited by 54
- 2021What Context Features Can Transformer Language Models Use?cited by 49
- 2017Cognitive Psychology for Deep Neural Networks: A Shape Bias Case Studycited by 46
- 2020Mechanisms for Handling Nested Dependencies in Neural-Network Language Models and Humanscited by 42
- 2018RNNs as psycholinguistic subjects: Syntactic state and grammatical dependencycited by 23
- 2020Multi-scale Transformer Language Modelscited by 12
Built on by
Citing papers per year: 2023: 3; 2024: 0; 2025: 3; 2026: 2.
8 papers.
- 2023Language Model Behavior: A Comprehensive Surveycited by 92
- 2025Between Circuits and Chomsky: Pre-pretraining on Formal Languages Imparts Linguistic Biasescited by 36
- 2023Transformer Working Memory Enables Regular Language Reasoning and Natural Language Length Extrapolationcited by 13
- 2023Humans and language models diverge when predicting repeating textcited by 12
- 2025To model human linguistic prediction, make LLMs less superhumancited by 11
- 2025Human-like fleeting memory improves language learning but impairs reading time prediction in transformer language modelscited by 3
- 2026Simulating Human Memory with Language Modelscited by 2
- 2026Synthetic Pre-pretraining Survives Scale, but Not as a Grammatical Priorcited by 0
- 2026Synthetic Pre-pretraining Survives Scale, but Not as a Grammatical Prior30 Sep 2026
- 2026Simulating Human Memory with Language Models25 May 2026
- 2025To model human linguistic prediction, make LLMs less superhuman1 Oct 2025
- 2025Human-like fleeting memory improves language learning but impairs reading time prediction in transformer language models7 Aug 2025
- 2025Between Circuits and Chomsky: Pre-pretraining on Formal Languages Imparts Linguistic Biases26 Feb 2025
- 2023Humans and language models diverge when predicting repeating text10 Oct 2023
- 2023Transformer Working Memory Enables Regular Language Reasoning and Natural Language Length Extrapolation5 May 2023
- 2023Language Model Behavior: A Comprehensive Survey20 Mar 2023