mlsanityData to 7 Oct 2026

On Memorization of Large Language Models in Logical Reasoning

arXiv 2410.23123 ↗First posted 30 Oct 2024cs.CLcited by 114

On the map: LLM reasoning → Reasoning benchmarks and evaluation

Abstract (arXiv)

Large language models (LLMs) achieve good performance on challenging reasoning benchmarks, yet could also make basic reasoning mistakes. This contrasting behavior is puzzling when it comes to understanding the mechanisms behind LLMs' reasoning capabilities. One hypothesis is that the increasingly high and nearly saturated performance on common reasoning benchmarks could be due to the memorization of similar problems. In this paper, we systematically investigate this hypothesis with a quantitative measurement of memorization in reasoning tasks, using a dynamically generated logical reasoning benchmark based on Knights and Knaves (K&K) puzzles. We find that LLMs could interpolate and memorize the training puzzles (achieving near-perfect accuracy) after fine-tuning, yet they struggle with slight variations of these puzzles. On the other hand, we show that while fine-tuning leads to heavy memorization, it also consistently improves generalization performance. Through in-depth analyses with perturbation tests, cross difficulty-level transferability, probing model internals, and fine-tuning with wrong answers, we establish that LLMs develop reasoning skills on K&K puzzles alongside memorization. Finally, our analysis based on a per-sample memorization score sheds light on how LLMs switch between reasoning and memorization when solving logical puzzles. Our code and data are available at https://memkklogic.github.io.

Key facts. Cited by 114 papers in the map (data through 7 Oct 2026). Placed in Reasoning benchmarks and evaluation, one of 17 directions in LLM reasoning. Builds on 70 of its 88 references that are in the map. First posted on arXiv 30 Oct 2024.

Builds on

70 of 88 references.

Closest ancestors · 10

Same direction, newest first

  1. 2024Liar, Liar, Logical Mire: A Benchmark for Suppositional Reasoning in Large Language Models18 Jun
  2. 2024A Peek into Token Bias: Large Language Models Are Not Yet Genuine Reasoners16 Jun
  3. 2024LogicBench: Towards Systematic Evaluation of Logical Reasoning Ability of Large Language Models23 Apr
  4. 2024Puzzle Solving using Reasoning of Large Language Models: A Survey17 Feb
  5. 2023MR-GSM8K: A Meta-Reasoning Benchmark for Large Language Model Evaluation28 Dec
  6. 2023Rethinking Benchmark and Contamination for Language Models with Rephrased Samples8 Nov
  7. 2023Reasoning or Reciting? Exploring the Capabilities and Limitations of Language Models Through Counterfactual Tasks5 Jul
  8. 2023BoardgameQA: A Dataset for Natural Language Reasoning with Contradictory Information13 Jun
  9. 2023Logic-LM: Empowering Large Language Models with Symbolic Solvers for Faithful Logical Reasoning20 May
  10. 2022Language Models Are Greedy Reasoners: A Systematic Formal Analysis of Chain-of-Thought3 Oct

Other references · 60

  1. 2022Chain-of-Thought Prompting Elicits Reasoning in Large Language Modelscited by 12,302
  2. 2022Self-Consistency Improves Chain of Thought Reasoning in Language Modelscited by 5,601
  3. 2022Scaling Instruction-Finetuned Language Modelscited by 2,997
  4. 2020The Pile: An 800GB Dataset of Diverse Text for Language Modelingcited by 2,346
  5. 2020Extracting Training Data from Large Language Modelscited by 2,144
  6. 2024LiveCodeBench: Holistic and Contamination Free Evaluation of Large Language Models for Codecited by 1,906
  7. 2021Calibrate Before Use: Improving Few-Shot Performance of Language Modelscited by 1,371
  8. 2022STaR: Bootstrapping Reasoning With Reasoningcited by 895
  9. 2019Adversarial NLI: A New Benchmark for Natural Language Understandingcited by 798
  10. 2022Quantifying Memorization Across Neural Language Modelscited by 755
  11. 2023Distilling Step-by-Step! Outperforming Larger Language Models with Less Training Data and Smaller Model Sizescited by 710
  12. 2021Deduplicating Training Data Makes Language Models Bettercited by 705
38 more
  1. 2019Designing and Interpreting Probes with Control Taskscited by 608
  2. 2022Grokking: Generalization Beyond Overfitting on Small Algorithmic Datasetscited by 599
  3. 2024GSM-Symbolic: Understanding the Limitations of Mathematical Reasoning in Large Language Modelscited by 533
  4. 2023DecodingTrust: A Comprehensive Assessment of Trustworthiness in GPT Modelscited by 505
  5. 2023Faith and Fate: Limits of Transformers on Compositionalitycited by 496
  6. 2018What you can cram into a single vector: Probing sentence embeddings for linguistic propertiescited by 452
  7. 2024The Instruction Hierarchy: Training LLMs to Prioritize Privileged Instructionscited by 441
  8. 2023Detecting Pretraining Data from Large Language Modelscited by 375
  9. 2022Large Language Models Are Reasoning Teacherscited by 318
  10. 2022Large Language Models are Better Reasoners with Self-Verificationcited by 304
  11. 2023Analyzing Leakage of Personally Identifiable Information in Language Modelscited by 278
  12. 2020Transformers as Soft Reasoners over Languagecited by 265
  13. 2021Deep learning: a statistical viewpointcited by 239
  14. 2022Data Contamination: From Memorization to Exploitationcited by 234
  15. 2022Towards Understanding Grokking: An Effective Theory of Representation Learningcited by 229
  16. 2021Adversarial GLUE: A Multi-Task Benchmark for Robustness Evaluation of Language Modelscited by 227
  17. 2023Proving Test Set Contamination in Black Box Language Modelscited by 227
  18. 2024From Explicit CoT to Implicit CoT: Learning to Internalize CoT Step by Stepcited by 225
  19. 2024Leak, Cheat, Repeat: Data Contamination and Evaluation Malpractices in Closed-Source LLMscited by 224
  20. 2024Assessing the Brittleness of Safety Alignment via Pruning and Low-Rank Modificationscited by 220
  21. 2022Memorization Without Overfitting: Analyzing the Training Dynamics of Large Language Modelscited by 218
  22. 2016Fine-grained Analysis of Sentence Embeddings Using Auxiliary Prediction Taskscited by 216
  23. 2022Leveraging Large Language Models for Multiple Choice Question Answeringcited by 199
  24. 2024A Careful Examination of Large Language Model Performance on Grade School Arithmeticcited by 188
  25. 2024A Mechanistic Understanding of Alignment Algorithms: A Case Study on DPO and Toxicitycited by 179
  26. 2023Implicit Chain of Thought Reasoning via Knowledge Distillationcited by 165
  27. 2023Emergent and Predictable Memorization in Large Language Modelscited by 147
  28. 2021Fit without fear: remarkable mathematical phenomena of deep learning through the prism of interpolationcited by 130
  29. 2019Harmless interpolation of noisy data in regressioncited by 121
  30. 2023Copyright Violations and Large Language Modelscited by 108
  31. 2024Physics of Language Models: Part 2.1, Grade-School Math and the Hidden Reasoning Processcited by 107
  32. 2023The CoT Collection: Improving Zero-shot and Few-shot Learning of Language Models via Chain-of-Thought Fine-Tuningcited by 106
  33. 2024Benchmarking Benchmark Leakage in Large Language Modelscited by 102
  34. 2018Overfitting or perfect fitting? Risk bounds for classification and regression rules that interpolatecited by 99
  35. 2024Functional Benchmarks for Robust Evaluation of Reasoning Performance, and the Reasoning Gapcited by 79
  36. 2024Premise Order Matters in Reasoning with Large Language Modelscited by 71
  37. 2024Alice in Wonderland: Simple Tasks Showing Complete Reasoning Breakdown in State-Of-the-Art Large Language Modelscited by 67
  38. 2024ConceptMix: A Compositional Image Generation Benchmark with Controllable Difficultycited by 60

50 most cited of 60 All 60 (JSON)

Built on by

Cited by year (2026 to 7 Oct)

Citing papers per year: 2024: 2; 2025: 79; 2026: 33.

114 papers.

Sort:

By area:

  1. 2025Towards Reasoning Era: A Survey of Long Chain-of-Thought for Reasoning Large Language Modelscited by 381
  2. 2025ZebraLogic: On the Scaling Limits of LLMs for Logical Reasoningcited by 186
  3. 2025MATH-Perturb: Benchmarking LLMs' Math Reasoning Abilities against Hard Perturbationscited by 88
  4. 2025AceReason-Nemotron: Advancing Math and Code Reasoning through Reinforcement Learningcited by 85
  5. 2025Segment Policy Optimization: Effective Segment-Level Credit Assignment in RL for Large Language Modelscited by 75
  6. 2025Can Large Reasoning Models Self-Train?cited by 66
  7. 2025LLM-SRBench: A New Benchmark for Scientific Equation Discovery with Large Language Modelscited by 61
  8. 2025Blending Supervised and Reinforcement Fine-Tuning with Prefix Samplingcited by 57
  9. 2025Understanding Aha Moments: from External Observations to Internal Mechanismscited by 48
  10. 2025SynLogic: Synthesizing Verifiable Reasoning Data at Scale for Learning Logical Reasoning and Beyondcited by 47
  11. 2025DUMP: Automated Distribution-Level Curriculum Learning for RL-based LLM Post-trainingcited by 45
  12. 2025Do Not Let Low-Probability Tokens Over-Dominate in RL for LLMscited by 43
38 more
  1. 2025RLVE: Scaling Up Reinforcement Learning for Language Models with Adaptive Verifiable Environmentscited by 43
  2. 2025Recent Advances in Large Langauge Model Benchmarks against Data Contamination: From Static to Dynamic Evaluationcited by 38
  3. 2025The Avengers: A Simple Recipe for Uniting Smaller Language Models to Challenge Proprietary Giantscited by 37
  4. 2026LLMRouterBench: A Massive Benchmark and Unified Framework for LLM Routingcited by 35
  5. 2025One-shot Entropy Minimizationcited by 32
  6. 2026Reinforcement-aware Knowledge Distillation for LLM Reasoningcited by 29
  7. 2025Shorten After You're Right: Lazy Length Penalties for Reasoning RLcited by 25
  8. 2025Is It Thinking or Cheating? Detecting Implicit Reward Hacking by Measuring Reasoning Effortcited by 25
  9. 2025The Reasoning-Memorization Interplay in Language Models Is Mediated by a Single Directioncited by 21
  10. 2025Interleaved Reasoning for Large Language Models via Reinforcement Learningcited by 21
  11. 2025Language Mixing in Reasoning Language Models: Patterns, Impact, and Internal Causescited by 20
  12. 2025Dissecting Logical Reasoning in LLMs: A Fine-Grained Evaluation and Supervision Studycited by 17
  13. 2025ABench-Physics: Benchmarking Physical Reasoning in LLMs via High-Difficulty and Dynamic Physics Problemscited by 17
  14. 2025Can One Domain Help Others? A Data-Centric Study on Multi-Domain Reasoning via Reinforcement Learningcited by 17
  15. 2025DRPO: Efficient Reasoning via Decoupled Reward Policy Optimizationcited by 16
  16. 2025Data Mixing Can Induce Phase Transitions in Knowledge Acquisitioncited by 15
  17. 2025Proximal Supervised Fine-Tuningcited by 15
  18. 2025OCCULT: Evaluating Large Language Models for Offensive Cyber Operation Capabilitiescited by 12
  19. 2025General Intelligence Requires Reward-based Pretrainingcited by 12
  20. 2025Trust Region Preference Approximation: A simple and stable reinforcement learning algorithm for LLM reasoningcited by 12
  21. 2025Learning to Refine: Self-Refinement of Parallel Reasoning in LLMscited by 12
  22. 2024Beyond Math: Stories as a Testbed for Memorization-Constrained Reasoning in LLMscited by 11
  23. 2026Rethinking Generalization in Reasoning SFT: A Conditional Analysis on Optimization, Data, and Model Capabilitycited by 11
  24. 2025OBLIVIATE: Robust and Practical Machine Unlearning for Large Language Modelscited by 9
  25. 2025ProtoReasoning: Prototypes as the Foundation for Generalizable Reasoning in LLMscited by 9
  26. 2025Infinite Sampling: Efficient and Stable Grouped RL Training for Large Language Modelscited by 9
  27. 2025The Landscape of Memorization in LLMs: Mechanisms, Measurement, and Mitigationcited by 9
  28. 2025ToTRL: Unlock LLM Tree-of-Thoughts Reasoning Potential through Puzzles Solvingcited by 8
  29. 2025Behavior Injection: Preparing Language Models for Reinforcement Learningcited by 8
  30. 2025SV-TrustEval-C: Evaluating Structure and Semantic Reasoning in Large Language Models for Source Code Vulnerability Analysiscited by 8
  31. 2025C2GSPG: Confidence-calibrated Group Sequence Policy Gradient towards Self-aware Reasoningcited by 8
  32. 2025Debunk the Myth of SFT Generalizationcited by 8
  33. 2025HoarePrompt: Structural Reasoning About Program Correctness in Natural Languagecited by 7
  34. 2025A Simple "Motivation" Can Enhance Reinforcement Finetuning of Large Reasoning Modelscited by 7
  35. 2025Memorize or Generalize? Evaluating LLM Code Generation with Code Rewritingcited by 6
  36. 2025ParaPO: Aligning Language Models to Reduce Verbatim Reproduction of Pre-training Datacited by 6
  37. 2025SLR: Automated Synthesis for Scalable Logical Reasoningcited by 6
  38. 2025Thinking Beyond Tokens: From Brain-Inspired Intelligence to Cognitive Foundations for Artificial General Intelligence and its Societal Impactcited by 6

50 most cited of 114 All 114 (JSON)

Similar, not cited

Close in wording, no citation either way

  1. 2025Advancing Reasoning in Large Language Models: Promising Methods and Approaches
  2. 2025Unveiling Over-Memorization in Finetuning LLMs for Reasoning Tasks
  3. 2024Disentangling Memory and Reasoning Ability in Large Language Models
  4. 2026MemoReason: Evaluating the Effect of Parametric Memory on Contextual Reasoning in LLMs
  5. 2025Stop Overthinking: A Survey on Efficient Reasoning for Large Language Models
  6. 2026Unlocking the Working Memory of Large Language Models for Latent Reasoning
  7. 2025Beyond Chains of Thought: Benchmarking Latent-Space Reasoning Abilities in Large Language Models
  8. 2025Exploring the Hidden Reasoning Process of Large Language Models by Misleading Them