mlsanityData to 7 Oct 2026

Great Memory, Shallow Reasoning: Limits of kNN-LMs

arXiv 2408.11815 ↗First posted 21 Aug 2024cs.CL cs.AIcited by 8

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

  1. 2018BERT: Pre-training of Deep Bidirectional Transformers for Language Understandingcited by 40,204
  2. 2023Llama 2: Open Foundation and Fine-Tuned Chat Modelscited by 12,865
  3. 2021Training Verifiers to Solve Math Word Problemscited by 9,743
  4. 2020Retrieval-Augmented Generation for Knowledge-Intensive NLP Taskscited by 9,160
  5. 2020Measuring Massive Multitask Language Understandingcited by 7,768
  6. 2020Scaling Laws for Neural Language Modelscited by 6,411
  7. 2018Think you have Solved Question Answering? Try ARC, the AI2 Reasoning Challengecited by 4,710
  8. 2019HellaSwag: Can a Machine Really Finish Your Sentence?cited by 4,018
  9. 2020Dense Passage Retrieval for Open-Domain Question Answeringcited by 3,779
  10. 2018HotpotQA: A Dataset for Diverse, Explainable Multi-hop Question Answeringcited by 3,686
  11. 2016Pointer Sentinel Mixture Modelscited by 2,992
  12. 2017Billion-scale similarity search with GPUscited by 2,477
18 more
  1. 2015Character-level Convolutional Networks for Text Classificationcited by 2,293
  2. 2018Deep contextualized word representationscited by 2,285
  3. 2020REALM: Retrieval-Augmented Language Model Pre-Trainingcited by 2,126
  4. 2018Can a Suit of Armor Conduct Electricity? A New Dataset for Open Book Question Answeringcited by 2,114
  5. 2022Challenging BIG-Bench Tasks and Whether Chain-of-Thought Can Solve Themcited by 1,767
  6. 2021Improving language models by retrieving from trillions of tokenscited by 1,278
  7. 2019DROP: A Reading Comprehension Benchmark Requiring Discrete Reasoning Over Paragraphscited by 883
  8. 2019Generalization through Memorization: Nearest Neighbor Language Modelscited by 788
  9. 2016Ups and Downs: Modeling the Visual Evolution of Fashion Trends with One-Class Collaborative Filteringcited by 517
  10. 2023LeanDojo: Theorem Proving with Retrieval-Augmented Language Modelscited by 414
  11. 2021Surface Form Competition: Why the Highest Probability Answer Isn't Always Rightcited by 256
  12. 2020Nearest Neighbor Machine Translationcited by 209
  13. 2024Reliable, Adaptable, and Attributable Language Models with Retrievalcited by 73
  14. 2023SILO Language Models: Isolating Legal Risk In a Nonparametric Datastorecited by 71
  15. 2023MathPile: A Billion-Token-Scale Pretraining Corpus for Mathcited by 67
  16. 2022Neuro-Symbolic Language Modeling with Automaton-augmented Retrievalcited by 60
  17. 2023Retrieval-augmented Generation to Improve Math Question-Answering: Trade-offs Between Groundedness and Human Preferencecited by 37
  18. 2022Can Retriever-Augmented Language Models Reason? The Blame Game Between the Retriever and the Language Modelcited by 32

Built on by

Cited by year (2026 to 7 Oct)

Citing papers per year: 2024: 1; 2025: 4; 2026: 3.

8 papers.

Similar, not cited

Close in wording, no citation either way

  1. 2025Long-Tail Crisis in Nearest Neighbor Language Models
  2. 2023Why do Nearest Neighbor Language Models Work?
  3. 2022kNN-Prompt: Nearest Neighbor Zero-Shot Inference
  4. 2022When Not to Trust Language Models: Investigating Effectiveness of Parametric and Non-Parametric Memories
  5. 2025Optimising Language Models for Downstream Tasks: A Post-Training Perspective
  6. 2026Are LLM-Based Retrievers Worth Their Cost? An Empirical Study of Efficiency, Robustness, and Reasoning Overhead
  7. 2024Teaching Smaller Language Models To Generalise To Unseen Compositional Questions (Full Thesis)
  8. 2025Demystifying the Roles of LLM Layers in Retrieval, Knowledge, and Reasoning