Reproduce “Exact theory of next-token prediction” on OpenResearch

Run Claude Code, Codex or any coding agent as a research agent: literature, hypotheses and experiments on your laptop, cluster or cloud GPUs.

Universal app for Apple silicon and Intel. Requires macOS 11 or later.

About this paper

Mengyao An, Haiping Huang

The authors develop an exact high-dimensional theory of next-token prediction in a simplified single-head linear self-attention teacher–student model. Using Gaussian token contexts, a data-dependent Gram matrix, random-matrix theory, and statistical mechanics, they derive prediction errors and study finite-context and extensive-context regimes. In the zero-temperature finite-context setting, test error diverges theoretically at αN=1; finite-dimensional experiments reproduce the peak pattern, not the divergence.

Summary by alphaXiv.

Tip: change arxiv.org to autoarxiv.org in any arXiv abstract link to open the paper here.