Grokking of Hierarchical Structure in Vanilla Transformers
Open accessThe DOI matches its Crossref record; 20 of the 20 references it cites were found in a registry or an index.
Abstract
For humans, language production and comprehension are 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 indomain accuracy has saturated.We call this phenomenon structural grokking.On multiple datasets, structural grokking exhibits inverted U-shaped scaling in model depth: intermediatedepth 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 Murty et al. (2023).Overall, our work provides strong evidence that, with extended training, vanilla transformers discover and use hierarchical structure.
Overview
The claims and statistics of this paper haven’t been checked yet.
Free: it reads the open-access text and checks the first 5 claims that cite a source we can check. Create a free account to check every claim.
Integrity signals
Registry
Cites
Statistics
Verification
Claims the paper makes
The claims and statistics of this paper haven’t been checked yet.
Free: it reads the open-access text and checks the first 5 claims that cite a source we can check. Create a free account to check every claim.
Claims other papers make about this one
Each is checked against this paper’s own text: does it say what the citing paper says it does?
The source backs part of the claim, not all of it — or backs it for a different population, condition or comparison.
In the citing paper
“confirms the hierarchical nature of information processing in Transformer LLMs [57, 58].”
From WISE: Rethinking the Knowledge Memory for Lifelong Model Editing of Large Language Models (2024) · cites this paper as [58]
Experimental — accuracy not yet measured
Self-check
Percentages, sums and reported differences re-computed from the paper’s own numbers.
The self-check needs the paper’s full text.
Citations
Cites
Vaswani, A., Shazeer, N., Parmar, N., Uszkoreit, J., Jones, L., Gomez, A. N., Kaiser, L., & Polosukhin, I. (2017) · arXiv · doi:10.48550/arxiv.1706.03762 · Cited by 120,404
Exploiting Generative AI to Scale up Intelligent Tutoring Systems
Jakubův, J., Chvalovský, K., Goertzel, Z., Kaliszyk, C., Olšák, M., Piotrowski, B., Schulz, S., Suda, M., & Urban, J. (2023) · DROPS (Schloss Dagstuhl – Leibniz Center for Informatics) · doi:10.4230/lipics.itp.2023.19 · Cited by 76,658
Improved Semantic Representations From Tree-Structured Long Short-Term Memory Networks
Tai, K. S., Socher, R., & Manning, C. D. (2015) · Proceedings of the 53rd Annual Meeting of the Association for Computational Linguistics and the 7th International Joint Conference on Natural Language Processing (Volume 1: Long Papers) · doi:10.3115/v1/p15-1150 · Cited by 3,081
Self-citationTraining Compute-Optimal Large Language Models
Hoffmann, J., Borgeaud, S., Mensch, A., Buchatskaya, E., Cai, T., Rutherford, E., Casas, D. D. L., Hendricks, L. A., Welbl, J., Clark, A., et al. (2022) · Advances in Neural Information Processing Systems 35 · doi:10.52202/068431-2176 · Cited by 932
Training Compute-Optimal Large Language Models
Hoffmann, J., Borgeaud, S., Mensch, A., Buchatskaya, E., Cai, T., Rutherford, E., Casas, D. D. L., Hendricks, L. A., Welbl, J., Clark, A., et al. (2022) · arXiv · doi:10.48550/arxiv.2203.15556 · Cited by 929
The Implicit Bias of Gradient Descent on Separable DataPreprint
Soudry, D., Hoffer, E., Nacson, M. S., Gunasekar, S., & Srebro, N. (2017) · arXiv (Cornell University) · doi:10.48550/arxiv.1710.10345 · Cited by 829
Using the Output Embedding to Improve Language Models
Press, O., & Wolf, L. (2017) · Proceedings of the 15th Conference of the European Chapter of the Association for Computational Linguistics: Volume 2, Short Papers · doi:10.18653/v1/e17-2025 · Cited by 596
Procedure for quantitatively comparing the syntactic coverage of English grammars
Klavans, J., Liberman, M., Marcus, M., Roukos, S., Santorini, B., Strzalkowski, T., Abney, S., Flickenger, S., Gdaniec, C., Grishman, C., et al. (1991) · Proceedings of the workshop on Speech and Natural Language - HLT '91 · doi:10.3115/112405.112467 · Cited by 432
Structure Dependence in Grammar Formation
Crain, S., & Nakayama, M. (1987) · Language · doi:10.2307/415004 · Cited by 402
Theoretical Limitations of Self-Attention in Neural Sequence Models
Hahn, M. (2020) · Transactions of the Association for Computational Linguistics · doi:10.1162/tacl_a_00306 · Cited by 165
Research works printed but not linked: 2
- Noam Chomsky. 1965. Aspects of the Theory of Syntax. The MIT Press, Cambridge.
- Shikhar Murty, Pratyusha Sharma, Jacob Andreas, and Christopher D Manning. 2023. Characterizing intrin- sic compositionality in transformers with tree projec- tions. In The Eleventh International Conference on Learning Representations.
Cited by
Faith and Fate: Limits of Transformers on Compositionality
Dziri, N., Lu, X., Sclar, M., Li, X. (., Jiang, L., Lin, B. Y., Welleck, S., West, P., Bhagavatula, C., Bras, R. L., et al. (2023) · Advances in Neural Information Processing Systems 36 · doi:10.52202/075280-3081 · Cited by 335
On Memorization of Large Language Models in Logical ReasoningPreprint
Xie, C., Huang, Y., Zhang, C., Yu, D., Chen, X., Lin, B. Y., Li, B., Ghazi, B., & Kumar, R. (2024) · arXiv · doi:10.48550/arxiv.2410.23123 · Cited by 136
Faith and Fate: Limits of Transformers on Compositionality
Dziri, N., Lu, X., Sclar, M., Li, X. L., Jiang, L., Lin, B. Y., West, P., Bhagavatula, C., Bras, R. L., Hwang, J. D., et al. (2023) · arXiv · Cited by 124
How linguistics learned to stop worrying and love the language models
Futrell, R., & Mahowald, K. (2025) · Behavioral and Brain Sciences · doi:10.1017/s0140525x2510112x · Cited by 104
Grokked Transformers are Implicit Reasoners: A Mechanistic Journey to the Edge of GeneralizationPreprint
Wang, B., Yue, X., Su, Y., & Sun, H. (2024) · arXiv.org · doi:10.48550/arxiv.2405.15071 · Cited by 103
Metadata
- Authors
- Murty, S., Sharma, P., Andreas, J., & Manning, C.
- Affiliations
- MIT Computer Science and Artificial Intelligence Laboratory (US)
- Venue
- Proceedings of the 61st Annual Meeting of the Association for Computational Linguistics (Volume 2: Short Papers)
- Published
- 2023
- Pages
- 439-448
- ISSN
- 0736-587X (ISSN-L)
- OpenAlex
- W4385571966
- Cited by
- 12
- References
- 18
- Citations by year
- 2026: 1 · 2025: 5 · 2024: 3 · 2023: 3
- FWCI
- 2.13
- Type
- conference paper
- Language
- en
- Open access
- hybrid
- doi.org
- Licence
- cc-by
- Locations
- Proceedings of the conference - Association for Computational Linguistics. Meeting (publishedVersion, cc-by)
- arXiv (Cornell University) (submittedVersion, cc-by)
- arXiv (Cornell University) (cc-by)
- Topics
- Physical Sciences › Computer Science › Artificial Intelligence › Topic Modeling
- Physical Sciences › Computer Science › Artificial Intelligence › Natural Language Processing Techniques
- Social Sciences › Arts and Humanities › Language and Linguistics › Syntax, Semantics, Linguistic Variation
- Keywords
- hierarchy, transformer models, structural generalization, model depth, language models, sentence structure
About these checks
Registry, retraction, Cites and statistics results are computed, not judged, with one exception: a printed reference that no index lists is read once by a model before it counts as a citation error. Claims are extracted by a model and kept only when their quote appears verbatim in the text; each cited source is then checked, with a model’s help, for whether it says what the claim relies on. Those verdicts can be wrong — read the claim’s quote and the cited source before relying on one.
Statistics and arithmetic are recomputed, not judged.
Confidence bands are shown only for fields calibrated on our annotated test set. None is calibrated yet, so no band is shown.
What counts as a claim ›How we measure confidence ›How we check this ›
Are you an author, or do you see a problem with this page? Request a review
How to cite
Cite CoChat for the checks on this page, and the paper for its own findings.
- This page
- CoChat. (2026). Citation check: Grokking of Hierarchical Structure in Vanilla Transformers. https://app.cochat.ai/papers/10.18653/v1/2023.acl-short.38
- The paper
- Murty, S., Sharma, P., Andreas, J., & Manning, C. (2023). Grokking of Hierarchical Structure in Vanilla Transformers. Proceedings of the 61st Annual Meeting of the Association for Computational Linguistics (Volume 2: Short Papers). https://doi.org/10.18653/v1/2023.acl-short.38
Data sources
Bibliographic data: Semantic Scholar, OpenAlex, Crossref.
Contains information from the Semantic Scholar Academic Graph Datasets, made available under the ODC Attribution License (ODC-BY 1.0).
Semantic Scholar’s data is described in: Kinney, R., et al. (2023). The Semantic Scholar Open Data Platform. arXiv:2301.10140.