Towards a theory of how the structure of language is acquired by deep neural networks
Abstract
How much data is required to learn the structure of a language via next-token prediction? We study this question for synthetic datasets generated via a Probabilistic Context-Free Grammar (PCFG)-a tree-like generative model that captures many of the hierarchical structures found in natural languages. We determine token-token correlations analytically in our model and show that they can be used to build a representation of the grammar's hidden variables, the longer the range the deeper the variable. In addition, a finite training set limits the resolution of correlations to an effective range, whose size grows with that of the training set. As a result, a Language Model trained with increasingly many examples can build a deeper representation of the grammar's structure, thus reaching good performance despite the high dimensionality of the problem. We conjecture that the relationship between training set size and effective range of correlations holds beyond our synthetic datasets. In particular, our conjecture predicts how the scaling law for the test loss behaviour with training set size depends on the length of the context window, which we confirm empirically in Shakespeare's plays and Wikipedia articles.
Ask Lune
Know this paper in minutes, not an afternoon.
Lune can read every page of it and the top-tier papers that cite it, and gives you its claims, its evidence and its limits, each one cited to the paper it comes from. No skimming, no AI slop.
19 top-tier papers have cited it since. Know what they found before your reviewers do.
Lune can draw on
the full paper · the top-tier papers that cite it · related work
Free to start. No credit card required.
Lineage
- Are Emergent Abilities of Large Language Models a Mirage? cites Language Models are Few-Shot Learners
- Emergence and scaling laws in SGD learning of shallow neural networks cites The Benefits of Reusing Batches for Gradient Descent in Two-Layer Networks: Breaking the Curse of Information and Leap Exponents
- Emergence and scaling laws in SGD learning of shallow neural networks cites A Dynamical Model of Neural Scaling Laws
- Symmetries in language statistics shape the geometry of model representations cites A distributional simplicity bias in the learning dynamics of transformers
Cited by top-tier papers19
- Emergence and scaling laws in SGD learning of shallow neural networksYunwei Ren, Eshaan Nichani, Denny Wu, Jason D. LeeNeurIPS 2025 · 33 citations
- A distributional simplicity bias in the learning dynamics of transformersRiccardo Rende, Federica Gerace, Alessandro Laio, Sebastian GoldtNeurIPS 2024 · 30 citations
- Symmetries in language statistics shape the geometry of model representationsDhruva Karkada, Daniel Korchinski, Andres Nava, Matthieu Wyart et al.ICML 2026 · 15 citations
- Predicting Kernel Regression Learning Curves from Only Raw Data StatisticsDhruva Karkada, Joseph Turnbull, Yuxi Liu, James B SimonICLR 2026 · 6 citations
- Unraveling Syntax: Language Modeling and the Substructure of GrammarsLaura Ying Schulz, Daniel Mitropolsky, Tomaso A PoggioICML 2026 · 5 citations
Builds on10
- Language Models are Few-Shot LearnersTom B. Brown, Benjamin Mann, Nick Ryder, Melanie Subbiah et al.NeurIPS 2020 · 64,255 citations
- Are Emergent Abilities of Large Language Models a Mirage?Rylan Schaeffer, Brando Miranda, Sanmi KoyejoNeurIPS 2023 · 796 citations
- A Dynamical Model of Neural Scaling LawsBlake Bordelon, Alexander B. Atanasov, Cengiz PehlevanICML 2024 · 84 citations
- The Benefits of Reusing Batches for Gradient Descent in Two-Layer Networks: Breaking the Curse of Information and Leap ExponentsYatin Dandi, Emanuele Troiani, Luca Arnaboldi, Luca Pesce et al.ICML 2024 · 41 citations
- A distributional simplicity bias in the learning dynamics of transformersRiccardo Rende, Federica Gerace, Alessandro Laio, Sebastian GoldtNeurIPS 2024 · 30 citations
Related papers
- How Transformers Represent Hierarchies: A Local-to-Global MechanismZhiling Zhou, Tianhao Wang, Zhuoran YangICML 2026
- Deep networks learn to parse uniform-depth context-free languages from local statisticsJack T. Parley, Francesco Cagnetta, Matthieu WyartICML 2026 · 4 citations
- Deriving Neural Scaling Laws from the Statistics of Natural LanguageFrancesco Cagnetta, Allan Raventos, Surya Ganguli, Matthieu WyartICML 2026
- Learning curves theory for hierarchically compositional data with power-law distributed featuresFrancesco Cagnetta, Hyunmo Kang, Matthieu WyartICML 2025
- Provable Long-Range Benefits of Next-Token PredictionXinyuan Cao, Santosh S. VempalaSTOC 2026
