Great Memory, Shallow Reasoning: Limits of kNN-LMs
On the map: LLM reasoning → Reasoning benchmarks and evaluation
Abstract (arXiv)
K-nearest neighbor language models (kNN-LMs), which integrate retrieval with next-word prediction, have demonstrated strong performance in language modeling as well as downstream NLP benchmarks. These results have led researchers to argue that models trained on poor quality or outdated data could perform well by employing a kNN extension that has access to a higher-quality datastore. In this work, we ask whether this improved ability to recall information really translates into downstream abilities. We extensively evaluate kNN-LMs on a diverse set of tasks, ranging from sentiment classification and commonsense reasoning to multi-hop reasoning. Results show that kNN-LMs excel at memory-intensive tasks, where utilizing the patterns in the input is sufficient for determining the output, but struggle with reasoning tasks that require integrating multiple pieces of information to derive new knowledge. We further demonstrate through oracle experiments and qualitative analysis that even with perfect retrieval, kNN-LMs still fail to determine the correct answers, placing an upper bound on their reasoning performance. Code and datastores are released at https://github.com/GSYfate/knnlm-limits/.
Key facts. Cited by 8 papers in the map (data through 7 Oct 2026). Placed in Reasoning benchmarks and evaluation, one of 17 directions in LLM reasoning. Builds on 30 of its 50 references that are in the map. First posted on arXiv 21 Aug 2024.
Builds on
30 of 50 references.
References · 30
- 2018BERT: Pre-training of Deep Bidirectional Transformers for Language Understandingcited by 40,204
- 2023Llama 2: Open Foundation and Fine-Tuned Chat Modelscited by 12,865
- 2021Training Verifiers to Solve Math Word Problemscited by 9,743
- 2020Retrieval-Augmented Generation for Knowledge-Intensive NLP Taskscited by 9,160
- 2020Measuring Massive Multitask Language Understandingcited by 7,768
- 2020Scaling Laws for Neural Language Modelscited by 6,411
- 2018Think you have Solved Question Answering? Try ARC, the AI2 Reasoning Challengecited by 4,710
- 2019HellaSwag: Can a Machine Really Finish Your Sentence?cited by 4,018
- 2020Dense Passage Retrieval for Open-Domain Question Answeringcited by 3,779
- 2018HotpotQA: A Dataset for Diverse, Explainable Multi-hop Question Answeringcited by 3,686
- 2016Pointer Sentinel Mixture Modelscited by 2,992
- 2017Billion-scale similarity search with GPUscited by 2,477
18 more
- 2015Character-level Convolutional Networks for Text Classificationcited by 2,293
- 2018Deep contextualized word representationscited by 2,285
- 2020REALM: Retrieval-Augmented Language Model Pre-Trainingcited by 2,126
- 2018Can a Suit of Armor Conduct Electricity? A New Dataset for Open Book Question Answeringcited by 2,114
- 2022Challenging BIG-Bench Tasks and Whether Chain-of-Thought Can Solve Themcited by 1,767
- 2021Improving language models by retrieving from trillions of tokenscited by 1,278
- 2019DROP: A Reading Comprehension Benchmark Requiring Discrete Reasoning Over Paragraphscited by 883
- 2019Generalization through Memorization: Nearest Neighbor Language Modelscited by 788
- 2016Ups and Downs: Modeling the Visual Evolution of Fashion Trends with One-Class Collaborative Filteringcited by 517
- 2023LeanDojo: Theorem Proving with Retrieval-Augmented Language Modelscited by 414
- 2021Surface Form Competition: Why the Highest Probability Answer Isn't Always Rightcited by 256
- 2020Nearest Neighbor Machine Translationcited by 209
- 2024Reliable, Adaptable, and Attributable Language Models with Retrievalcited by 73
- 2023SILO Language Models: Isolating Legal Risk In a Nonparametric Datastorecited by 71
- 2023MathPile: A Billion-Token-Scale Pretraining Corpus for Mathcited by 67
- 2022Neuro-Symbolic Language Modeling with Automaton-augmented Retrievalcited by 60
- 2023Retrieval-augmented Generation to Improve Math Question-Answering: Trade-offs Between Groundedness and Human Preferencecited by 37
- 2022Can Retriever-Augmented Language Models Reason? The Blame Game Between the Retriever and the Language Modelcited by 32
Built on by
Citing papers per year: 2024: 1; 2025: 4; 2026: 3.
8 papers.
- 2025AutoSchemaKG: Autonomous Knowledge Graph Construction through Dynamic Schema Induction from Web-Scale Corporacited by 23
- 2025MLP Memory: A Retriever-Pretrained Memory for Large Language Modelscited by 19
- 2025Memory Decoder: A Pretrained, Plug-and-Play Memory for Large Language Modelscited by 16
- 2025Frustratingly Simple Retrieval Improves Challenging, Reasoning-Intensive Benchmarkscited by 8
- 2026ReasonCACHE: Teaching LLMs To Reason Without Weight Updatescited by 3
- 2024Interpretable Next-token Prediction via the Generalized Induction Headcited by 2
- 2026RAG over Thinking Traces Can Improve Reasoning Taskscited by 2
- 2026Repeated Shared Access Enables Grokking, but Edit Propagation Depends on an Addressable Memorycited by 0
- 2026Repeated Shared Access Enables Grokking, but Edit Propagation Depends on an Addressable Memory17 Jun 2026
- 2026RAG over Thinking Traces Can Improve Reasoning Tasks5 May 2026
- 2026ReasonCACHE: Teaching LLMs To Reason Without Weight Updates2 Feb 2026
- 2025Memory Decoder: A Pretrained, Plug-and-Play Memory for Large Language Models13 Aug 2025
- 2025MLP Memory: A Retriever-Pretrained Memory for Large Language Models3 Aug 2025
- 2025Frustratingly Simple Retrieval Improves Challenging, Reasoning-Intensive Benchmarks2 Jul 2025
- 2025AutoSchemaKG: Autonomous Knowledge Graph Construction through Dynamic Schema Induction from Web-Scale Corpora29 May 2025
- 2024Interpretable Next-token Prediction via the Generalized Induction Head31 Oct 2024
Similar, not cited
Close in wording, no citation either way
- 2025Long-Tail Crisis in Nearest Neighbor Language Models
- 2023Why do Nearest Neighbor Language Models Work?
- 2022kNN-Prompt: Nearest Neighbor Zero-Shot Inference
- 2022When Not to Trust Language Models: Investigating Effectiveness of Parametric and Non-Parametric Memories
- 2025Optimising Language Models for Downstream Tasks: A Post-Training Perspective
- 2026Are LLM-Based Retrievers Worth Their Cost? An Empirical Study of Efficiency, Robustness, and Reasoning Overhead
- 2024Teaching Smaller Language Models To Generalise To Unseen Compositional Questions (Full Thesis)
- 2025Demystifying the Roles of LLM Layers in Retrieval, Knowledge, and Reasoning