Learning Syntax Without Planting Trees: Understanding Hierarchical Generalization in Transformers
Not on the map. Why?
Abstract (arXiv)
Transformers trained on natural language data have been shown to learn its hierarchical structure and generalize to sentences with unseen syntactic structures without explicitly encoding any structural bias. In this work, we investigate sources of inductive bias in transformer models and their training that could cause such generalization behavior to emerge. We extensively experiment with transformer models trained on multiple synthetic datasets and with different training objectives and show that while other objectives e.g. sequence-to-sequence modeling, prefix language modeling, often failed to lead to hierarchical generalization, models trained with the language modeling objective consistently learned to generalize hierarchically. We then conduct pruning experiments to study how transformers trained with the language modeling objective encode hierarchical structure. When pruned, we find joint existence of subnetworks within the model with different generalization behaviors (subnetworks corresponding to hierarchical structure and linear order). Finally, we take a Bayesian perspective to further uncover transformers' preference for hierarchical generalization: We establish a correlation between whether transformers generalize hierarchically on a dataset and whether the simplest explanation of that dataset is provided by a hierarchical grammar compared to regular grammars exhibiting linear generalization.
Key facts. Cited by 24 papers in the map (data through 7 Oct 2026). Builds on 39 of its 62 references that are in the map. First posted on arXiv 25 Apr 2024.
Builds on
39 of 62 references.
References · 39
- 2017Attention Is All You Needcited by 59,932
- 2018BERT: Pre-training of Deep Bidirectional Transformers for Language Understandingcited by 40,204
- 2014Adam: A Method for Stochastic Optimizationcited by 36,960
- 2020Language Models are Few-Shot Learnerscited by 32,199
- 2014Learning Phrase Representations using RNN Encoder-Decoder for Statistical Machine Translationcited by 4,016
- 2014Sequence to Sequence Learning with Neural Networkscited by 2,974
- 2016Understanding intermediate layers using linear classifier probescited by 1,279
- 2019Analyzing Multi-Head Self-Attention: Specialized Heads Do the Heavy Lifting, the Rest Can Be Prunedcited by 844
- 2023Progress measures for grokking via mechanistic interpretabilitycited by 822
- 2019Unified Language Model Pre-training for Natural Language Understanding and Generationcited by 668
- 2022Grokking: Generalization Beyond Overfitting on Small Algorithmic Datasetscited by 599
- 2017Learning Sparse Neural Networks through L0 Regularizationcited by 571
27 more
- 2019What do you learn from context? Probing for sentence structure in contextualized word representationscited by 436
- 2021Transformers Can Do Bayesian Inferencecited by 338
- 2022Towards Understanding Grokking: An Effective Theory of Representation Learningcited by 229
- 2018Deep learning generalizes because the parameter-function map is biased towards simple functionscited by 180
- 2023Clever Hans or Neural Theory of Mind? Stress Testing Social Reasoning in Large Language Modelscited by 161
- 2018Dissecting Contextual Word Embeddings: Architecture and Representationcited by 146
- 2023Sudden Drops in the Loss: Syntax Acquisition, Phase Transitions, and Simplicity Bias in MLMscited by 121
- 2019Open Sesame: Getting Inside BERT's Linguistic Knowledgecited by 119
- 2020Perturbed Masking: Parameter-free Probing for Analyzing and Interpreting BERTcited by 109
- 2023Explaining grokking through circuit efficiencycited by 105
- 2018Tree-to-tree Neural Networks for Program Translationcited by 93
- 2022The Slingshot Mechanism: An Empirical Study of Adaptive Optimizers and the Grokking Phenomenoncited by 90
- 2023Physics of Language Models: Part 1, Learning Hierarchical Language Structurescited by 83
- 2023A Tale of Two Circuits: Grokking as Competition of Sparse and Dense Subnetworkscited by 78
- 2020Does syntax need to grow on trees? Sources of hierarchical inductive bias in sequence-to-sequence networkscited by 72
- 2022A fine-grained comparison of pragmatic language understanding in humans and language modelscited by 69
- 2022Simplicity Bias in Transformers and their Ability to Learn Sparse Boolean Functionscited by 68
- 2023Grokking of Hierarchical Structure in Vanilla Transformerscited by 53
- 2022Characterizing Intrinsic Compositionality in Transformers with Tree Projectionscited by 40
- 2018Revisiting the poverty of the stimulus: hierarchical generalization without a hierarchical bias in recurrent neural networkscited by 33
- 2022Coloring the Blank Slate: Pre-training Imparts a Hierarchical Inductive Bias to Sequence-to-sequence Modelscited by 28
- 2023How to Plant Trees in Language Models: Data and Architectural Effects on the Emergence of Syntactic Inductive Biasescited by 23
- 2023In-context Learning Generalizes, But Not Always Robustly: The Case of Syntaxcited by 22
- 2021Transformers Generalize Linearlycited by 19
- 2017Improved Neural Machine Translation with a Syntax-Aware Encoder and Decodercited by 16
- 2024The Heuristic Core: Understanding Subnetwork Generalization in Pretrained Language Modelscited by 9
- 2023MAGNIFICo: Evaluating the In-Context Learning Ability of Large Language Models to Generalize to Novel Interpretationscited by 7
Built on by
Citing papers per year: 2024: 2; 2025: 10; 2026: 12.
24 papers.
Sort:
By area:
- 2025How Linguistics Learned to Stop Worrying and Love the Language Modelscited by 50
- 2024Scaling of Search and Learning: A Roadmap to Reproduce o1 from Reinforcement Learning Perspectivecited by 49
- 2024Towards a theory of how the structure of language is acquired by deep neural networkscited by 38
- 2025Analyzing the Inner Workings of Transformers in Compositional Generalizationcited by 6
- 2025When Does Metadata Conditioning (NOT) Work for Language Model Pre-Training? A Study with Context-Free Grammarscited by 2
- 2026Structure Before Collapse: Transient semantic geometry in next-token predictioncited by 2
- 2025Bearing Syntactic Fruit with Stack-Augmented Neural Networkscited by 1
- 2026The Grammar of Transformers: A Systematic Review of Interpretability Research on Syntactic Knowledge in Language Modelscited by 1
- 2026A Unified Assessment of the Poverty of the Stimulus Argument for Neural Language Modelscited by 1
- 2025Exploring Compositional Generalization (in COGS/ReCOGS_pos) by Transformers using Restricted Access Sequence Processing (RASP)cited by 0
- 2025Do Syntactic Categories Help in Developmentally Motivated Curriculum Learning for Language Models?cited by 0
- 2025Language models as tools for investigating the distinction between possible and impossible natural languagescited by 0
12 more
- 2025Large language models have learned to use languagecited by 0
- 2025Large language models are not about natural languagecited by 0
- 2025Linguists should learn to love speech-based deep learning modelscited by 0
- 2026Are Language Models Models?cited by 0
- 2026Across the Levels of Analysis: Explaining Predictive Processing in Humans Requires More Than Machine-Estimated Probabilitiescited by 0
- 2026You Can't Fight in Here! This is BBS!cited by 0
- 2026Not-So-Strange Love: Language Models and Generative Linguistic Theories are More Compatible than They Appearcited by 0
- 2026Large Language Models as Modal Models in Linguisticscited by 0
- 2026Syntax vs. Semantics: How Transformers Learn Deep Dependenciescited by 0
- 2026Patterns of Priming in Production: Lexical, Semantic and Structural Alignment in Language Model Generationcited by 0
- 2026A retrospective analysis on the use of LLMs to study infant syntax learningcited by 0
- 2026Neural Language Models Learn the Contextual Distributions of Dependency Structures: a statistical learning theory to compositionalitycited by 0
- 2026Neural Language Models Learn the Contextual Distributions of Dependency Structures: a statistical learning theory to compositionality28 Sep 2026
- 2026A retrospective analysis on the use of LLMs to study infant syntax learning22 Sep 2026
- 2026Patterns of Priming in Production: Lexical, Semantic and Structural Alignment in Language Model Generation3 Sep 2026
- 2026Syntax vs. Semantics: How Transformers Learn Deep Dependencies26 Jun 2026
- 2026Structure Before Collapse: Transient semantic geometry in next-token prediction25 Jun 2026
- 2026Large Language Models as Modal Models in Linguistics9 Jun 2026
- 2026Not-So-Strange Love: Language Models and Generative Linguistic Theories are More Compatible than They Appear11 May 2026
- 2026You Can't Fight in Here! This is BBS!10 Apr 2026
- 2026Across the Levels of Analysis: Explaining Predictive Processing in Humans Requires More Than Machine-Estimated Probabilities10 Apr 2026
- 2026A Unified Assessment of the Poverty of the Stimulus Argument for Neural Language Models10 Feb 2026
- 2026Are Language Models Models?15 Jan 2026
- 2026The Grammar of Transformers: A Systematic Review of Interpretability Research on Syntactic Knowledge in Language Models9 Jan 2026
12 more
- 2025Linguists should learn to love speech-based deep learning models16 Dec 2025
- 2025Large language models are not about natural language15 Dec 2025
- 2025Large language models have learned to use language13 Dec 2025
- 2025Language models as tools for investigating the distinction between possible and impossible natural languages10 Dec 2025
- 2025Do Syntactic Categories Help in Developmentally Motivated Curriculum Learning for Language Models?11 Nov 2025
- 2025Bearing Syntactic Fruit with Stack-Augmented Neural Networks5 Nov 2025
- 2025When Does Metadata Conditioning (NOT) Work for Language Model Pre-Training? A Study with Context-Free Grammars24 Apr 2025
- 2025Exploring Compositional Generalization (in COGS/ReCOGS_pos) by Transformers using Restricted Access Sequence Processing (RASP)21 Apr 2025
- 2025Analyzing the Inner Workings of Transformers in Compositional Generalization21 Feb 2025
- 2025How Linguistics Learned to Stop Worrying and Love the Language Models28 Jan 2025
- 2024Scaling of Search and Learning: A Roadmap to Reproduce o1 from Reinforcement Learning Perspective18 Dec 2024
- 2024Towards a theory of how the structure of language is acquired by deep neural networks28 May 2024
- 2025How Linguistics Learned to Stop Worrying and Love the Language Modelscited by 50
- 2024Towards a theory of how the structure of language is acquired by deep neural networkscited by 38
- 2025Analyzing the Inner Workings of Transformers in Compositional Generalizationcited by 6
- 2025When Does Metadata Conditioning (NOT) Work for Language Model Pre-Training? A Study with Context-Free Grammarscited by 2
- 2026Structure Before Collapse: Transient semantic geometry in next-token predictioncited by 2
- 2025Bearing Syntactic Fruit with Stack-Augmented Neural Networkscited by 1
- 2026The Grammar of Transformers: A Systematic Review of Interpretability Research on Syntactic Knowledge in Language Modelscited by 1
- 2026A Unified Assessment of the Poverty of the Stimulus Argument for Neural Language Modelscited by 1
- 2025Exploring Compositional Generalization (in COGS/ReCOGS_pos) by Transformers using Restricted Access Sequence Processing (RASP)cited by 0
- 2025Do Syntactic Categories Help in Developmentally Motivated Curriculum Learning for Language Models?cited by 0
- 2025Language models as tools for investigating the distinction between possible and impossible natural languagescited by 0
- 2025Large language models have learned to use languagecited by 0
12 most cited of 23 All 23 (JSON)
- 2026Neural Language Models Learn the Contextual Distributions of Dependency Structures: a statistical learning theory to compositionality28 Sep 2026
- 2026A retrospective analysis on the use of LLMs to study infant syntax learning22 Sep 2026
- 2026Patterns of Priming in Production: Lexical, Semantic and Structural Alignment in Language Model Generation3 Sep 2026
- 2026Syntax vs. Semantics: How Transformers Learn Deep Dependencies26 Jun 2026
- 2026Structure Before Collapse: Transient semantic geometry in next-token prediction25 Jun 2026
- 2026Large Language Models as Modal Models in Linguistics9 Jun 2026
- 2026Not-So-Strange Love: Language Models and Generative Linguistic Theories are More Compatible than They Appear11 May 2026
- 2026You Can't Fight in Here! This is BBS!10 Apr 2026
- 2026Across the Levels of Analysis: Explaining Predictive Processing in Humans Requires More Than Machine-Estimated Probabilities10 Apr 2026
- 2026A Unified Assessment of the Poverty of the Stimulus Argument for Neural Language Models10 Feb 2026
- 2026Are Language Models Models?15 Jan 2026
- 2026The Grammar of Transformers: A Systematic Review of Interpretability Research on Syntactic Knowledge in Language Models9 Jan 2026
12 newest of 23 All 23 (JSON)