Provable Long-Range Benefits of Next-Token Prediction

Xinyuan Cao, Santosh S. Vempala
12/8/2025
cs.LGcs.AIstat.ML

No confident code implementation found for this paper.

Abstract

Why do modern language models, trained to do well on next-word prediction, appear to generate coherent documents and capture long-range structure? Here we show that next-token prediction is provably powerful for learning longer-range structure, even with common neural network architectures. Specifically, we prove that optimizing next-token prediction over a Recurrent Neural Network (RNN) yields a model that closely approximates the training distribution: for held-out documents sampled from the training distribution, no algorithm of bounded description length limited to examining the next $k$ tokens, for any $k$, can distinguish between $k$ consecutive tokens of such documents and $k$ tokens generated by the learned language model following the same prefix. We provide polynomial bounds (in $k$, independent of the document length) on the model size needed to achieve such $k$-token indistinguishability, offering a complexity-theoretic explanation for the long-range coherence observed in practice.

View on arXivView PDF

Code Implementations

No confident code match yet

We couldn't find an author-owned or strongly-evidenced community implementation for this paper. Any repos shown below are weak matches — verify before relying on them.

No code implementations found yet.

Know of an implementation? Let us know in the comments below!

Similar Papers

Cite this paper

@article{cao2025provable,
  title  = {Provable Long-Range Benefits of Next-Token Prediction},
  author = {Xinyuan Cao and Santosh S. Vempala},
  year   = {2025},
  eprint = {2512.07818},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2512.07818v1}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2512.07818.svg)](https://codeofpaper.com/paper/2512.07818)

Discussion