mlsanityData to 14 Oct 2026

Grokking of Hierarchical Structure in Vanilla Transformers

arXiv 2305.18741 ↗First posted 30 May 2023cs.CLcited by 53

Not on the map. Why?

Abstract (arXiv)

For humans, language production and comprehension is sensitive to the hierarchical structure of sentences. In natural language processing, past work has questioned how effectively neural sequence models like transformers capture this hierarchical structure when generalizing to structurally novel inputs. We show that transformer language models can learn to generalize hierarchically after training for extremely long periods -- far beyond the point when in-domain accuracy has saturated. We call this phenomenon structural grokking. On multiple datasets, structural grokking exhibits inverted U-shaped scaling in model depth: intermediate-depth models generalize better than both very deep and very shallow transformers. When analyzing the relationship between model-internal properties and grokking, we find that optimal depth for grokking can be identified using the tree-structuredness metric of citetmurty2023projections. Overall, our work provides strong evidence that, with extended training, vanilla transformers discover and use hierarchical structure.

Key facts. Cited by 53 papers in the map (data through 14 Oct 2026). Builds on 15 of its 24 references that are in the map. First posted on arXiv 30 May 2023.

Builds on

15 of 24 references.

References · 15

  1. 2017Attention Is All You Needcited by 60,361
  2. 2017The Implicit Bias of Gradient Descent on Separable Datacited by 655
  3. 2022Grokking: Generalization Beyond Overfitting on Small Algorithmic Datasetscited by 629
  4. 2015Improved Semantic Representations From Tree-Structured Long Short-Term Memory Networkscited by 306
  5. 2019Theoretical Limitations of Self-Attention in Neural Sequence Modelscited by 288
  6. 2016Using the Output Embedding to Improve Language Modelscited by 272
  7. 2022Omnigrok: Grokking Beyond Algorithmic Datacited by 146
  8. 2021Saturated Transformers are Constant-Depth Threshold Circuitscited by 139
  9. 2021The Devil is in the Detail: Simple Tricks Improve Systematic Generalization of Transformerscited by 117
  10. 2020Does syntax need to grow on trees? Sources of hierarchical inductive bias in sequence-to-sequence networkscited by 72
  11. 2018The Importance of Being Recurrent for Modeling Hierarchical Structurecited by 42
  12. 2022Characterizing Intrinsic Compositionality in Transformers with Tree Projectionscited by 41
3 more
  1. 2020Effects of Parameter Norm Growth During Transformer Training: Inductive Bias from Gradient Descentcited by 40
  2. 2022Coloring the Blank Slate: Pre-training Imparts a Hierarchical Inductive Bias to Sequence-to-sequence Modelscited by 28
  3. 2021Transformers Generalize Linearlycited by 19

Built on by

Cited by year (2026 to 14 Oct)

Citing papers per year: 2023: 9; 2024: 20; 2025: 12; 2026: 12.

53 papers.

Sort:

By area:

  1. 2023Sudden Drops in the Loss: Syntax Acquisition, Phase Transitions, and Simplicity Bias in MLMscited by 124
  2. 2024On Memorization of Large Language Models in Logical Reasoningcited by 117
  3. 2024Grokked Transformers are Implicit Reasoners: A Mechanistic Journey to the Edge of Generalizationcited by 79
  4. 2023Towards a Mechanistic Interpretation of Multi-Step Reasoning Capabilities of Language Modelscited by 50
  5. 2023Interpretability Illusions in the Generalization of Simplified Modelscited by 25
  6. 2024Mechanistic?cited by 25
  7. 2024Learning Syntax Without Planting Trees: Understanding Hierarchical Generalization in Transformerscited by 24
  8. 2024Implicit Geometry of Next-token Prediction: From Language Sparsity Patterns to Model Representationscited by 24
  9. 2024A Philosophical Introduction to Language Models -- Part I: Continuity With Classic Debatescited by 23
  10. 2024Learned feature representations are biased by complexity, learning order, position, and morecited by 23
  11. 2024Self-attention Networks Localize When QK-eigenspectrum Concentratescited by 19
  12. 2023Stack Attention: Improving the Ability of Transformers to Model Hierarchical Patternscited by 17
38 more
  1. 2025Hidden Breakthroughs in Language Model Trainingcited by 15
  2. 2025Latent learning: episodic memory complements parametric learning by enabling flexible reuse of experiencescited by 15
  3. 2024Towards Empirical Interpretation of Internal Circuits and Properties in Grokked Transformers on Modular Polynomialscited by 14
  4. 2023Grokking Beyond Neural Networks: An Empirical Exploration with Model Complexitycited by 13
  5. 2024Beyond Scaling Laws: Understanding Transformer Performance with Associative Memorycited by 12
  6. 2024Generalizations across filler-gap dependencies in neural language modelscited by 12
  7. 2024Delving into the Reversal Curse: How Far Can Large Language Models Generalize?cited by 11
  8. 2024The Heuristic Core: Understanding Subnetwork Generalization in Pretrained Language Modelscited by 10
  9. 2024Sometimes I am a Tree: Data Drives Unstable Hierarchical Generalizationcited by 10
  10. 2026Why Larger Models Learn More: Effects of Capacity, Interference, and Rare-Task Retentioncited by 10
  11. 2024Theoretical Insights into Fine-Tuning Attention Mechanism: Generalization and Optimizationcited by 9
  12. 2025Can Interpretation Predict Behavior on Unseen Data?cited by 8
  13. 2025Flatness is Necessary, Neural Collapse is Not: Rethinking Generalization via Grokkingcited by 8
  14. 2025Random Scaling of Emergent Capabilitiescited by 7
  15. 2026Early-Warning Signals of Grokking via Loss-Landscape Geometrycited by 7
  16. 2023Bridging Lottery Ticket and Grokking: Understanding Grokking from Inner Structure of Networkscited by 6
  17. 2024HDT: Hierarchical Document Transformercited by 6
  18. 2025Enhancing Transformers for Generalizable First-Order Logical Entailmentcited by 6
  19. 2023On the effect of curriculum learning with developmental data for grammar acquisitioncited by 5
  20. 2024Philosophy of Cognitive Science in the Age of Deep Learningcited by 5
  21. 2023The semantic landscape paradigm for neural networkscited by 4
  22. 2024The Fine Line: Navigating Large Language Model Pretraining with Down-streaming Capability Analysiscited by 4
  23. 2023ChapGTP, ILLC's Attempt at Raising a BabyLM: Improving Data Efficiency by Automatic Task Formationcited by 3
  24. 2024Sneaking Syntax into Transformer Language Models with Tree Regularizationcited by 3
  25. 2025Not All Explanations for Deep Learning Phenomena Are Equally Valuablecited by 3
  26. 2024Rule Extrapolation in Language Models: A Study of Compositional Generalization on OOD Promptscited by 2
  27. 2025Egalitarian Gradient Descent: A Simple Approach to Accelerated Grokkingcited by 2
  28. 2026Dissociating Decodability and Causal Use in Bracket-Sequence Transformerscited by 2
  29. 2025The Structural Sources of Verb Meaning Revisited: Large Language Models Display Syntactic Bootstrappingcited by 1
  30. 2025Bearing Syntactic Fruit with Stack-Augmented Neural Networkscited by 1
  31. 2026Is Grokking Worthwhile? Functional Analysis and Transferability of Generalization Circuits in Transformerscited by 1
  32. 2026The Grammar of Transformers: A Systematic Review of Interpretability Research on Syntactic Knowledge in Language Modelscited by 1
  33. 2026A Unified Assessment of the Poverty of the Stimulus Argument for Neural Language Modelscited by 1
  34. 2026Grokking as Structural Inference: Transformers Need Bayesian Lottery Ticketscited by 1
  35. 2026A Pre-Training Analogue of Grokking in Language Models: Tracing Delayed Grammatical Generalizationcited by 1
  36. 2026Natural Ungrokking: Asymmetric Control of Which Rules Survive Pretrainingcited by 1
  37. 2026Developmental approach reveals the statistical learning of Neural Language Models: Transformers generalize from the most abstract statistical patternscited by 1
  38. 2025Exploring Compositional Generalization (in COGS/ReCOGS_pos) by Transformers using Restricted Access Sequence Processing (RASP)cited by 0

50 most cited of 53 All 53 (JSON)