Grammar Sparsity Sets How Transformers Learn Random Languages
Edgar Andres Hernandez Moreno, Francesco Cagnetta
Key points
From the paper's conclusion- We study language acquisition by transformers trained on the Random Language Model: a synthetic hierarchical grammar with random production rules, whose sparsity is controlled by a single parameter and whose conditional entropies are known exactly.
Abstract
We study language acquisition by transformers trained on the Random Language Model: a synthetic hierarchical grammar with random production rules, whose sparsity is controlled by a single parameter and whose conditional entropies are known exactly. On depth-two grammars, we find that sparsity sets both the order and the speed of learning. Dense grammars are learnt one level at a time: a token is predicted from its sibling after $t\propto V$ steps and from the full context only after $t\propto V^{3}$, so the two stages are separated by a plateau that widens with $V$. Sparse grammars are learnt all at once, at $t\propto\sqrt V$, with a smaller exponent than even the first stage of a dense one. The exponents $1$ and $1/2$ already appear at depth one, where we derive them for a linear model trained with Adam.
Read the paper
Discussion
Science Skim's AI key points, plus readers' public thoughts
Readers' thoughts
No reader thoughts yet.
Related papers
- The Emergence and Sparsification of a Syntactic CircuitarXiv · 2026
- Transformers Learn Two Competing Sorting Algorithms, and Only One Length-GeneralizesarXiv · 2026
- Training Dynamics of Transformers on Unbounded Inputs: Attention Learning Can Lag Output Layer LearningarXiv · 2026
- What's in a Tree ? Hierarchical $n$-gram models as controlled approximators of languagearXiv · 2026
- Two Timescales of Forgetting in Fine-tuning of Language Models: Fast Behavioral Suppression and Slow Representational DriftarXiv · 2026
- Stagewise and interpretable emergence of inside-outside computation in Transformer-based language modelsarXiv · 2026