mlsanityData to 7 Oct 2026

Grokked Transformers are Implicit Reasoners: A Mechanistic Journey to the Edge of Generalization

arXiv 2405.15071 ↗First posted 23 May 2024cs.CLcited by 78

On the map: LLM reasoning → Reasoning benchmarks and evaluation

Abstract (arXiv)

We study whether transformers can learn to implicitly reason over parametric knowledge, a skill that even the most capable language models struggle with. Focusing on two representative reasoning types, composition and comparison, we consistently find that transformers can learn implicit reasoning, but only through grokking, i.e., extended training far beyond overfitting. The levels of generalization also vary across reasoning types: when faced with out-of-distribution examples, transformers fail to systematically generalize for composition but succeed for comparison. We delve into the model's internals throughout training, conducting analytical experiments that reveal: 1) the mechanism behind grokking, such as the formation of the generalizing circuit and its relation to the relative efficiency of generalizing and memorizing circuits, and 2) the connection between systematicity and the configuration of the generalizing circuit. Our findings guide data and training setup to better induce implicit reasoning and suggest potential improvements to the transformer architecture, such as encouraging cross-layer knowledge sharing. Furthermore, we demonstrate that for a challenging reasoning task with a large search space, GPT-4-Turbo and Gemini-1.5-Pro based on non-parametric memory fail badly regardless of prompting styles or retrieval augmentation, while a fully grokked transformer can achieve near-perfect accuracy, showcasing the power of parametric memory for complex reasoning.

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

Builds on

61 of 76 references.

Closest ancestors · 4

Same direction, newest first

  1. 2024Quiet-STaR: Language Models Can Teach Themselves to Think Before Speaking14 Mar
  2. 2024Understanding Reasoning Ability of Language Models From the Perspective of Reasoning Paths Aggregation5 Feb
  3. 2022Towards Reasoning in Large Language Models: A Survey20 Dec
  4. 2022Measuring and Narrowing the Compositionality Gap in Language Models7 Oct

Other references · 57

  1. 2017Attention Is All You Needcited by 59,932
  2. 2019PyTorch: An Imperative Style, High-Performance Deep Learning Librarycited by 20,160
  3. 2023GPT-4 Technical Reportcited by 18,132
  4. 2022Chain-of-Thought Prompting Elicits Reasoning in Large Language Modelscited by 12,302
  5. 2020Retrieval-Augmented Generation for Knowledge-Intensive NLP Taskscited by 9,160
  6. 2024Gemini 1.5: Unlocking multimodal understanding across millions of tokens of contextcited by 3,175
  7. 2022Locating and Editing Factual Associations in GPTcited by 2,609
  8. 2020REALM: Retrieval-Augmented Language Model Pre-Trainingcited by 2,126
  9. 2021Improving language models by retrieving from trillions of tokenscited by 1,278
  10. 2021Scaling Language Models: Methods, Analysis & Insights from Training Gophercited by 1,199
  11. 2022Interpretability in the Wild: a Circuit for Indirect Object Identification in GPT-2 smallcited by 1,130
  12. 2022STaR: Bootstrapping Reasoning With Reasoningcited by 895
38 more
  1. 2023Progress measures for grokking via mechanistic interpretabilitycited by 822
  2. 2024Medusa: Simple LLM Inference Acceleration Framework with Multiple Decoding Headscited by 821
  3. 2020A Primer in BERTology: What we know about how BERT workscited by 807
  4. 2017The Implicit Bias of Gradient Descent on Separable Datacited by 649
  5. 2018Universal Transformerscited by 613
  6. 2022Grokking: Generalization Beyond Overfitting on Small Algorithmic Datasetscited by 599
  7. 2023Eliciting Latent Predictions from Transformers with the Tuned Lenscited by 579
  8. 2022Transformer Feed-Forward Layers Build Predictions by Promoting Concepts in the Vocabulary Spacecited by 522
  9. 2023Faith and Fate: Limits of Transformers on Compositionalitycited by 496
  10. 2023Towards Best Practices of Activation Patching in Language Models: Metrics and Methodscited by 328
  11. 2023Towards Revealing the Mystery behind Chain of Thought: A Theoretical Perspectivecited by 293
  12. 2023MQuAKE: Assessing Knowledge Editing in Language Models via Multi-Hop Questionscited by 292
  13. 2022Transformers Learn Shortcuts to Automatacited by 260
  14. 2024Chain of Thought Empowers Transformers to Solve Inherently Serial Problemscited by 256
  15. 2023The Unlocking Spell on Base LLMs: Rethinking Alignment via In-Context Learningcited by 251
  16. 2022Transformer Memory as a Differentiable Search Indexcited by 242
  17. 2022Towards Understanding Grokking: An Effective Theory of Representation Learningcited by 229
  18. 2022Memorization Without Overfitting: Analyzing the Training Dynamics of Large Language Modelscited by 218
  19. 2023How does GPT-2 compute greater-than?: Interpreting mathematical abilities in a pre-trained language modelcited by 199
  20. 2024Data Engineering for Scaling Language Models to 128K Contextcited by 183
  21. 2023Implicit Chain of Thought Reasoning via Knowledge Distillationcited by 165
  22. 2024Do Large Language Models Latently Perform Multi-Hop Reasoning?cited by 165
  23. 2019oLMpics -- On what Language Model Pre-training Capturescited by 161
  24. 2022Omnigrok: Grokking Beyond Algorithmic Datacited by 142
  25. 2023Physics of Language Models: Part 3.2, Knowledge Manipulationcited by 142
  26. 2023Future Lens: Anticipating Subsequent Tokens from a Single Hidden Statecited by 116
  27. 2022Training Language Models with Memory Augmentationcited by 112
  28. 2022Block-Recurrent Transformerscited by 107
  29. 2023Explaining grokking through circuit efficiencycited by 105
  30. 2023Why think step by step? Reasoning emerges from the locality of experiencecited by 103
  31. 2023How do Language Models Bind Entities in Context?cited by 102
  32. 2022The Slingshot Mechanism: An Empirical Study of Adaptive Optimizers and the Grokking Phenomenoncited by 90
  33. 2024A Primer on the Inner Workings of Transformer-based Language Modelscited by 83
  34. 2023A Tale of Two Circuits: Grokking as Competition of Sparse and Dense Subnetworkscited by 78
  35. 2022Iteratively Prompt Pre-trained Language Models for Chain of Thoughtcited by 75
  36. 2022Recitation-Augmented Language Modelscited by 65
  37. 2023Grokking of Hierarchical Structure in Vanilla Transformerscited by 53
  38. 2023Unifying Grokking and Double Descentcited by 49

50 most cited of 57 All 57 (JSON)

Built on by

Cited by year (2026 to 7 Oct)

Citing papers per year: 2024: 23; 2025: 41; 2026: 14.

78 papers.

Sort:

By area:

  1. 2024A Practical Review of Mechanistic Interpretability for Transformer-Based Language Modelscited by 113
  2. 2025Model Organisms for Emergent Misalignmentcited by 84
  3. 2024Formal Mathematical Reasoning: A New Frontier in AIcited by 80
  4. 2024Hopping Too Late: Exploring the Limitations of Large Language Models on Multi-Hop Queriescited by 78
  5. 2025Reasoning by Superposition: A Theoretical Perspective on Chain of Continuous Thoughtcited by 73
  6. 2025A Survey on Latent Reasoningcited by 71
  7. 2024Knowledge Mechanisms in Large Language Models: A Survey and Perspectivecited by 50
  8. 2024Disentangling Memory and Reasoning Ability in Large Language Modelscited by 43
  9. 2025Implicit Reasoning in Large Language Models: A Comprehensive Surveycited by 42
  10. 2024Procedural Knowledge in Pretraining Drives Reasoning in Large Language Modelscited by 41
  11. 2025Beyond Semantics: The Unreasonable Effectiveness of Reasonless Intermediate Tokenscited by 41
  12. 2024Out-of-distribution generalization via composition: a lens through induction heads in Transformerscited by 28
38 more
  1. 2024Do Large Language Models Perform Latent Multi-Hop Reasoning without Exploiting Shortcuts?cited by 26
  2. 2025RL Grokking Recipe: How Does RL Unlock and Transfer New Algorithms in LLMs?cited by 23
  3. 2025The Reasoning-Memorization Interplay in Language Models Is Mediated by a Single Directioncited by 21
  4. 2025How Do LLMs Perform Two-Hop Reasoning in Context?cited by 20
  5. 2025Complexity Control Facilitates Reasoning-Based Compositional Generalization in Transformerscited by 19
  6. 2024MIRAGE: Evaluating and Explaining Inductive Reasoning Process in Language Modelscited by 17
  7. 2024Do LLMs Really Think Step-by-step In Implicit Reasoning?cited by 16
  8. 2024Understanding the Language Model to Solve the Symbolic Multi-Step Reasoning Problem from the Perspective of Buffer Mechanismcited by 15
  9. 2024Lessons from Studying Two-Hop Latent Reasoningcited by 15
  10. 2024Understanding the Interplay between Parametric and Contextual Knowledge for Large Language Modelscited by 14
  11. 2025Provable Scaling Laws of Feature Emergence from Learning Dynamics of Grokkingcited by 14
  12. 2024Extractive Structures Learned in Pretraining Enable Generalization on Finetuned Factscited by 13
  13. 2025Is the Reversal Curse a Binding Problem? Uncovering Limitations of Transformers from a Basic Generalization Failurecited by 13
  14. 2025Let Me Grok for You: Accelerating Grokking via Embedding Transfer from a Weaker Modelcited by 13
  15. 2025Grokking in the Wild: Data Augmentation for Real-World Multi-Hop Reasoning with Transformerscited by 12
  16. 2025Universal Reasoning Modelcited by 11
  17. 2025Evaluating the Systematic Reasoning Abilities of Large Language Models through Graph Coloringcited by 10
  18. 2025Grokking in LLM Pretraining? Monitor Memorization-to-Generalization without Testcited by 10
  19. 2026Do Latent-CoT Models Think Step-by-Step? A Mechanistic Study on Sequential Reasoning Taskscited by 10
  20. 2025Performative Thinking? The Brittle Correlation Between CoT Length and Problem Complexitycited by 9
  21. 2024Can Transformers Do Enumerative Geometry?cited by 8
  22. 2025Atomic Skills are the Prerequisite: When Reinforcement Learning Synthesizes Compositional Reasoning, and When It Only Amplifiescited by 8
  23. 2025Can LLMs Reconcile Knowledge Conflicts in Counterfactual Reasoningcited by 7
  24. 2025How Do Language Models Compose Functions?cited by 7
  25. 2025Towards Understanding and Improving Refusal in Compressed Models via Mechanistic Interpretabilitycited by 6
  26. 2025A Mathematical Philosophy of Explanations in Mechanistic Interpretability -- The Strange Science Part I.icited by 6
  27. 2024Language Models "Grok" to Copycited by 5
  28. 2025CryptoX : Compositional Reasoning Evaluation of Large Language Modelscited by 5
  29. 2025Optimizing Multi-Hop Document Retrieval Through Intermediate Representationscited by 5
  30. 2025Reason to Rote: Rethinking Memorization in Reasoningcited by 5
  31. 2025All for One: LLMs Solve Mental Math at the Last Token With Information Transferred From Other Tokenscited by 5
  32. 2024Quantum Hamiltonian Embedding of Images for Data Reuploading Classifierscited by 4
  33. 2024Implicit Reasoning in Deep Time Series Forecastingcited by 4
  34. 2025Memorizing is Not Enough: Deep Knowledge Injection Through Reasoningcited by 4
  35. 2025Too Big to Think: Capacity, Memorization, and Generalization in Pre-Trained Transformerscited by 4
  36. 2025AlignSAE: Concept-Aligned Sparse Autoencoderscited by 4
  37. 2026Model Capacity Determines Grokking through Competing Memorisation and Generalisation Speedscited by 4
  38. 2026DiscoLoop: Looping Discrete Embeddings and Continuous Hidden States for Multi-hop Reasoningcited by 4

50 most cited of 78 All 78 (JSON)

Similar, not cited

Close in wording, no citation either way

  1. 2026Loop, Think, & Generalize: Implicit Reasoning in Recurrent-Depth Transformers
  2. 2026Is Grokking Worthwhile? Functional Analysis and Transferability of Generalization Circuits in Transformers
  3. 2025How do Transformers Learn Implicit Reasoning?
  4. 2025Are Transformers Able to Reason by Connecting Separated Knowledge in Training Data?
  5. 2025Implicit Reasoning in Transformers is Reasoning through Shortcuts
  6. 2024Reasoning in Transformers -- Mitigating Spurious Correlations and Reasoning Shortcuts
  7. 2026To See the Unseen: on the Generalization Ability of Transformers in Symbolic Reasoning
  8. 2022Achieving and Understanding Out-of-Distribution Generalization in Systematic Reasoning in Small-Scale Transformers