Lune

STOC2026Top-tier venue

Provable Long-Range Benefits of Next-Token Prediction

Xinyuan Cao, Santosh S. Vempala

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 commonly used neural network architectures. Specifically, we prove that optimizing next-token prediction over a Recurrent Neural Network 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.

Ask Lune

Know this paper in minutes, not an afternoon.

Lune can read every page of it and the top-tier papers that cite it, and gives you its claims, its evidence and its limits, each one cited to the paper it comes from. No skimming, no AI slop.

Questions to start from

Lune can draw on

the full paper · related work

Get the answer

Free to start. No credit card required.

Lineage

  • Measuring Massive Multitask Language Understanding cites Language Models are Few-Shot Learners
  • The Pitfalls of Next-Token Prediction cites Training language models to follow instructions with human feedback
  • The Pitfalls of Next-Token Prediction cites Faith and Fate: Limits of Transformers on Compositionality
  • Training language models to follow instructions with human feedback cites Language Models are Few-Shot Learners
  • Faith and Fate: Limits of Transformers on Compositionality cites Language Models are Few-Shot Learners
Builds onCited byLeft to right by year; the more cited, the higher.

Builds on16

  1. Language Models are Few-Shot LearnersTom B. Brown, Benjamin Mann, Nick Ryder, Melanie Subbiah et al.NeurIPS 2020 · 64,255 citations
  2. Training language models to follow instructions with human feedbackLong Ouyang, Jeffrey Wu, Xu Jiang, Diogo Almeida et al.NeurIPS 2022 · 24,707 citations
  3. Measuring Massive Multitask Language UnderstandingDan Hendrycks, Collin Burns, Steven Basart, Andy Zou et al.ICLR 2021 · 7,905 citations
  4. Faith and Fate: Limits of Transformers on CompositionalityNouha Dziri, Ximing Lu, Melanie Sclar, Xiang Lorraine Li et al.NeurIPS 2023 · 728 citations
  5. The Pitfalls of Next-Token PredictionGregor Bachmann, Vaishnavh NagarajanICML 2024 · 163 citations

Related papers

  1. Auto-Regressive Next-Token Predictors are Universal LearnersEran MalachICML 2024 · 65 citations
  2. Coherence boosting: When your pretrained language model is not paying enough attentionNikolay Malkin, Zhen Wang, Nebojsa JojicACL 2022 · 45 citations
  3. Fractal Patterns May Illuminate the Success of Next-Token PredictionIbrahim M. Alabdulmohsin, Vinh Q. Tran, Mostafa DehghaniNeurIPS 2024 · 8 citations
  4. Towards a theory of how the structure of language is acquired by deep neural networksFrancesco Cagnetta, Matthieu WyartNeurIPS 2024 · 33 citations
  5. The Role of Sparsity for Length Generalization in LLMsNoah Golowich, Samy Jelassi, David Brandfonbrener, Sham M. Kakade et al.ICML 2025
Dusk over the sea between two cliffs drawn in fine vertical lines