AI and the World's Hard Problems · Theoretical computer science · arXiv · 2026-11-24
Grammar Sparsity Sets How Transformers Learn Random Languages

The authors train transformers on a synthetic hierarchical grammar with random production rules and study how they learn language. On depth-two grammars, sparsity determines both the order and speed of learning: dense grammars are learned one level at a time with a plateau between stages that widens with vocabulary size V, while sparse grammars are learned all at once at a rate scaling as the square root of V.