mlsanityData to 7 Oct 2026

Learning Syntax Without Planting Trees: Understanding Hierarchical Generalization in Transformers

arXiv 2404.16367 ↗First posted 25 Apr 2024cs.CL cs.LGcited by 24

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

  1. 2017Attention Is All You Needcited by 59,932
  2. 2018BERT: Pre-training of Deep Bidirectional Transformers for Language Understandingcited by 40,204
  3. 2014Adam: A Method for Stochastic Optimizationcited by 36,960
  4. 2020Language Models are Few-Shot Learnerscited by 32,199
  5. 2014Learning Phrase Representations using RNN Encoder-Decoder for Statistical Machine Translationcited by 4,016
  6. 2014Sequence to Sequence Learning with Neural Networkscited by 2,974
  7. 2016Understanding intermediate layers using linear classifier probescited by 1,279
  8. 2019Analyzing Multi-Head Self-Attention: Specialized Heads Do the Heavy Lifting, the Rest Can Be Prunedcited by 844
  9. 2023Progress measures for grokking via mechanistic interpretabilitycited by 822
  10. 2019Unified Language Model Pre-training for Natural Language Understanding and Generationcited by 668
  11. 2022Grokking: Generalization Beyond Overfitting on Small Algorithmic Datasetscited by 599
  12. 2017Learning Sparse Neural Networks through L0 Regularizationcited by 571
27 more
  1. 2019What do you learn from context? Probing for sentence structure in contextualized word representationscited by 436
  2. 2021Transformers Can Do Bayesian Inferencecited by 338
  3. 2022Towards Understanding Grokking: An Effective Theory of Representation Learningcited by 229
  4. 2018Deep learning generalizes because the parameter-function map is biased towards simple functionscited by 180
  5. 2023Clever Hans or Neural Theory of Mind? Stress Testing Social Reasoning in Large Language Modelscited by 161
  6. 2018Dissecting Contextual Word Embeddings: Architecture and Representationcited by 146
  7. 2023Sudden Drops in the Loss: Syntax Acquisition, Phase Transitions, and Simplicity Bias in MLMscited by 121
  8. 2019Open Sesame: Getting Inside BERT's Linguistic Knowledgecited by 119
  9. 2020Perturbed Masking: Parameter-free Probing for Analyzing and Interpreting BERTcited by 109
  10. 2023Explaining grokking through circuit efficiencycited by 105
  11. 2018Tree-to-tree Neural Networks for Program Translationcited by 93
  12. 2022The Slingshot Mechanism: An Empirical Study of Adaptive Optimizers and the Grokking Phenomenoncited by 90
  13. 2023Physics of Language Models: Part 1, Learning Hierarchical Language Structurescited by 83
  14. 2023A Tale of Two Circuits: Grokking as Competition of Sparse and Dense Subnetworkscited by 78
  15. 2020Does syntax need to grow on trees? Sources of hierarchical inductive bias in sequence-to-sequence networkscited by 72
  16. 2022A fine-grained comparison of pragmatic language understanding in humans and language modelscited by 69
  17. 2022Simplicity Bias in Transformers and their Ability to Learn Sparse Boolean Functionscited by 68
  18. 2023Grokking of Hierarchical Structure in Vanilla Transformerscited by 53
  19. 2022Characterizing Intrinsic Compositionality in Transformers with Tree Projectionscited by 40
  20. 2018Revisiting the poverty of the stimulus: hierarchical generalization without a hierarchical bias in recurrent neural networkscited by 33
  21. 2022Coloring the Blank Slate: Pre-training Imparts a Hierarchical Inductive Bias to Sequence-to-sequence Modelscited by 28
  22. 2023How to Plant Trees in Language Models: Data and Architectural Effects on the Emergence of Syntactic Inductive Biasescited by 23
  23. 2023In-context Learning Generalizes, But Not Always Robustly: The Case of Syntaxcited by 22
  24. 2021Transformers Generalize Linearlycited by 19
  25. 2017Improved Neural Machine Translation with a Syntax-Aware Encoder and Decodercited by 16
  26. 2024The Heuristic Core: Understanding Subnetwork Generalization in Pretrained Language Modelscited by 9
  27. 2023MAGNIFICo: Evaluating the In-Context Learning Ability of Large Language Models to Generalize to Novel Interpretationscited by 7

Built on by

Cited by year (2026 to 7 Oct)

Citing papers per year: 2024: 2; 2025: 10; 2026: 12.

24 papers.

Sort:

By area:

  1. 2025How Linguistics Learned to Stop Worrying and Love the Language Modelscited by 50
  2. 2024Scaling of Search and Learning: A Roadmap to Reproduce o1 from Reinforcement Learning Perspectivecited by 49
  3. 2024Towards a theory of how the structure of language is acquired by deep neural networkscited by 38
  4. 2025Analyzing the Inner Workings of Transformers in Compositional Generalizationcited by 6
  5. 2025When Does Metadata Conditioning (NOT) Work for Language Model Pre-Training? A Study with Context-Free Grammarscited by 2
  6. 2026Structure Before Collapse: Transient semantic geometry in next-token predictioncited by 2
  7. 2025Bearing Syntactic Fruit with Stack-Augmented Neural Networkscited by 1
  8. 2026The Grammar of Transformers: A Systematic Review of Interpretability Research on Syntactic Knowledge in Language Modelscited by 1
  9. 2026A Unified Assessment of the Poverty of the Stimulus Argument for Neural Language Modelscited by 1
  10. 2025Exploring Compositional Generalization (in COGS/ReCOGS_pos) by Transformers using Restricted Access Sequence Processing (RASP)cited by 0
  11. 2025Do Syntactic Categories Help in Developmentally Motivated Curriculum Learning for Language Models?cited by 0
  12. 2025Language models as tools for investigating the distinction between possible and impossible natural languagescited by 0
12 more
  1. 2025Large language models have learned to use languagecited by 0
  2. 2025Large language models are not about natural languagecited by 0
  3. 2025Linguists should learn to love speech-based deep learning modelscited by 0
  4. 2026Are Language Models Models?cited by 0
  5. 2026Across the Levels of Analysis: Explaining Predictive Processing in Humans Requires More Than Machine-Estimated Probabilitiescited by 0
  6. 2026You Can't Fight in Here! This is BBS!cited by 0
  7. 2026Not-So-Strange Love: Language Models and Generative Linguistic Theories are More Compatible than They Appearcited by 0
  8. 2026Large Language Models as Modal Models in Linguisticscited by 0
  9. 2026Syntax vs. Semantics: How Transformers Learn Deep Dependenciescited by 0
  10. 2026Patterns of Priming in Production: Lexical, Semantic and Structural Alignment in Language Model Generationcited by 0
  11. 2026A retrospective analysis on the use of LLMs to study infant syntax learningcited by 0
  12. 2026Neural Language Models Learn the Contextual Distributions of Dependency Structures: a statistical learning theory to compositionalitycited by 0