Beyond Memorization: The Challenge of Random Memory Access in Language Models
Not on the map. Why?
Abstract (arXiv)
Recent developments in Language Models (LMs) have shown their effectiveness in NLP tasks, particularly in knowledge-intensive tasks. However, the mechanisms underlying knowledge storage and memory access within their parameters remain elusive. In this paper, we investigate whether a generative LM (e.g., GPT-2) is able to access its memory sequentially or randomly. Through carefully-designed synthetic tasks, covering the scenarios of full recitation, selective recitation and grounded question answering, we reveal that LMs manage to sequentially access their memory while encountering challenges in randomly accessing memorized content. We find that techniques including recitation and permutation improve the random memory access capability of LMs. Furthermore, by applying this intervention to realistic scenarios of open-domain question answering, we validate that enhancing random access by recitation leads to notable improvements in question answering. The code to reproduce our experiments can be found at https://github.com/sail-sg/lm-random-memory-access.
Key facts. Cited by 8 papers in the map (data through 7 Oct 2026). Builds on 41 of its 64 references that are in the map. First posted on arXiv 12 Mar 2024.
Builds on
41 of 64 references.
References · 41
- 2017Attention Is All You Needcited by 59,932
- 2020Language Models are Few-Shot Learnerscited by 32,199
- 2022Training language models to follow instructions with human feedbackcited by 15,712
- 2020Retrieval-Augmented Generation for Knowledge-Intensive NLP Taskscited by 9,160
- 2016SQuAD: 100,000+ Questions for Machine Comprehension of Textcited by 4,115
- 2020Dense Passage Retrieval for Open-Domain Question Answeringcited by 3,779
- 2018HotpotQA: A Dataset for Diverse, Explainable Multi-hop Question Answeringcited by 3,686
- 2022DreamBooth: Fine Tuning Text-to-Image Diffusion Models for Subject-Driven Generationcited by 3,286
- 2022Locating and Editing Factual Associations in GPTcited by 2,609
- 2020Extracting Training Data from Large Language Modelscited by 2,144
- 2019Language Models as Knowledge Bases?cited by 1,922
- 2023MemGPT: Towards LLMs as Operating Systemscited by 1,295
29 more
- 2022When Not to Trust Language Models: Investigating Effectiveness of Parametric and Non-Parametric Memoriescited by 1,103
- 2023LIMA: Less Is More for Alignmentcited by 1,080
- 2023REPLUG: Retrieval-Augmented Black-Box Language Modelscited by 786
- 2020KILT: a Benchmark for Knowledge Intensive Language Taskscited by 571
- 2020How Can We Know When Language Models Know? On the Calibration of Language Models for Question Answeringcited by 439
- 2023The Reversal Curse: LLMs trained on "A is B" fail to learn "B is A"cited by 399
- 2022Generate rather than Retrieve: Large Language Models are Strong Context Generatorscited by 296
- 2023Physics of Language Models: Part 3.1, Knowledge Storage and Extractioncited by 264
- 2022Transformer Memory as a Differentiable Search Indexcited by 242
- 2023Large Language Models as Commonsense Knowledge for Large-Scale Task Planningcited by 231
- 2022Are Large Pre-Trained Language Models Leaking Your Personal Information?cited by 195
- 2023Fine-Tuning or Retrieval? Comparing Knowledge Injection in LLMscited by 175
- 2022A Review on Language Models as Knowledge Basescited by 156
- 2023Physics of Language Models: Part 3.2, Knowledge Manipulationcited by 142
- 2022Autoregressive Search Engines: Generating Substrings as Document Identifierscited by 112
- 2020Language Models as Knowledge Bases: On Entity Representations, Storage Capacity, and Paraphrased Queriescited by 107
- 2021Knowledgeable or Educated Guess? Revisiting Language Models as Knowledge Basescited by 107
- 2022A Neural Corpus Indexer for Document Retrievalcited by 107
- 2024RAG vs Fine-tuning: Pipelines, Tradeoffs, and a Case Study on Agriculturecited by 80
- 2019Inducing Relational Knowledge from BERTcited by 75
- 2021Can Generative Pre-trained Language Models Serve as Knowledge Bases for Closed-book QA?cited by 62
- 2022Bridging the Gap Between Indexing and Retrieval for Differentiable Search Index with Query Generationcited by 47
- 2023How Does Generative Retrieval Scale to Millions of Passages?cited by 47
- 2023Scalable and Effective Generative Information Retrievalcited by 38
- 2023LLM as OS, Agents as Apps: Envisioning AIOS, Agents and the AIOS-Agent Ecosystemcited by 35
- 2023Give Me the Facts! A Survey on Factual Knowledge Probing in Pre-trained Language Modelscited by 32
- 2023Large Language Models are Built-in Autoregressive Search Enginescited by 26
- 2023TOME: A Two-stage Approach for Model-based Retrievalcited by 21
- 2023GLEN: Generative Retrieval via Lexical Index Learningcited by 17
Built on by
Citing papers per year: 2024: 1; 2025: 6; 2026: 1.
8 papers.
- 2024Everything is Editable: Extend Knowledge Editing to Unstructured Data in Large Language Modelscited by 18
- 2025From Style to Facts: Mapping the Boundaries of Knowledge Injection with Finetuningcited by 7
- 2025Large Language Models Penetration in Scholarly Writing and Peer Reviewcited by 6
- 2025A Review of Incorporating Psychological Theories in LLMscited by 5
- 2025Memorizing is Not Enough: Deep Knowledge Injection Through Reasoningcited by 4
- 2025Distributional Semantics Tracing: A Framework for Explaining Hallucinations in Large Language Modelscited by 3
- 2025Out-of-Context Reasoning in Large Language Modelscited by 2
- 2026How LoRA Remembers? A Parametric Memory Law for LLM Finetuningcited by 2
- 2026How LoRA Remembers? A Parametric Memory Law for LLM Finetuning28 May 2026
- 2025Distributional Semantics Tracing: A Framework for Explaining Hallucinations in Large Language Models7 Oct 2025
- 2025Memorizing is Not Enough: Deep Knowledge Injection Through Reasoning1 Apr 2025
- 2025A Review of Incorporating Psychological Theories in LLMs28 Mar 2025
- 2025Out-of-Context Reasoning in Large Language Models13 Mar 2025
- 2025From Style to Facts: Mapping the Boundaries of Knowledge Injection with Finetuning7 Mar 2025
- 2025Large Language Models Penetration in Scholarly Writing and Peer Review16 Feb 2025
- 2024Everything is Editable: Extend Knowledge Editing to Unstructured Data in Large Language Models24 May 2024