mlsanityData to 7 Oct 2026

Characterizing Verbatim Short-Term Memory in Neural Language Models

arXiv 2210.13569 ↗First posted 24 Oct 2022cs.CLcited by 8

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

  1. 2017Attention Is All You Needcited by 59,932
  2. 2018BERT: Pre-training of Deep Bidirectional Transformers for Language Understandingcited by 40,204
  3. 2020Language Models are Few-Shot Learnerscited by 32,199
  4. 2019Exploring the Limits of Transfer Learning with a Unified Text-to-Text Transformercited by 14,491
  5. 2020Scaling Laws for Neural Language Modelscited by 6,411
  6. 2014Neural Machine Translation by Jointly Learning to Align and Translatecited by 4,530
  7. 2016Pointer Sentinel Mixture Modelscited by 2,992
  8. 2019The Curious Case of Neural Text Degenerationcited by 2,881
  9. 2022In-context Learning and Induction Headscited by 930
  10. 2020Efficient Transformers: A Surveycited by 784
  11. 2021Linear Transformers Are Secretly Fast Weight Programmerscited by 471
  12. 2014Memory Networkscited by 354
16 more
  1. 2016Assessing the Ability of LSTMs to Learn Syntax-Sensitive Dependenciescited by 350
  2. 2018Targeted Syntactic Evaluation of Language Modelscited by 239
  3. 2016Incorporating Copying Mechanism in Sequence-to-Sequence Learningcited by 217
  4. 2018Colorless green recurrent networks dream hierarchicallycited by 210
  5. 2017Regularizing and Optimizing LSTM Language Modelscited by 205
  6. 2016Using Fast Weights to Attend to the Recent Pastcited by 161
  7. 2019Neural Language Models as Psycholinguistic Subjects: Representations of Syntactic Statecited by 137
  8. 2018Sharp Nearby, Fuzzy Far Away: How Neural Language Models Use Contextcited by 113
  9. 2020Syntactic Structure from Deep Learningcited by 99
  10. 2019The emergence of number and syntax units in LSTM language modelscited by 92
  11. 2015Learning to Transduce with Unbounded Memorycited by 54
  12. 2021What Context Features Can Transformer Language Models Use?cited by 49
  13. 2017Cognitive Psychology for Deep Neural Networks: A Shape Bias Case Studycited by 46
  14. 2020Mechanisms for Handling Nested Dependencies in Neural-Network Language Models and Humanscited by 42
  15. 2018RNNs as psycholinguistic subjects: Syntactic state and grammatical dependencycited by 23
  16. 2020Multi-scale Transformer Language Modelscited by 12

Built on by

Cited by year (2026 to 7 Oct)

Citing papers per year: 2023: 3; 2024: 0; 2025: 3; 2026: 2.

8 papers.