arXiv · 2611.40496
Exact theory of next-token prediction
Abstract
The next-token prediction ability of self-attention-based transformer is studied by using statistical mechanics and random matrix theory. Our study constructs an exact theory of free energy, state equation, and test-error scaling behavior in both finite and infinite context-length settings. In particular, a double descent phenomenon is revealed for zero-temperature learning, suggesting that the data load and the context length are coupled. In the presence of infinite context length, the errors are exactly those of deterministic ridge shrinkage. Theory predicts all single-instance learning of finite but large token dimension.
Explore related subjects
Keep this discovery
Explore connections, maps & timelines
Mengyao An, Haiping Huang. 2026-11-30. Exact theory of next-token prediction. https://searcharxiv.org/abs/2611.40496
Citations retain the original authors and DOI and include this site’s record URL. If this discovery service contributed to your research, you can also cite Search arXiv by Indiciae: BibTeX · RIS.