A law of next-token prediction in large language models

Large language models (LLMs) have been widely employed across various application domains, yet their black-box nature poses significant challenges to understanding how these models process input data internally to make predictions. In this paper, we introduce a precise and quantitative law that governs the learning of contextualized token embeddings through intermediate layers in pretrained LLMs for next-token prediction. Our findings reveal that each layer contributes equally to enhancing prediction accuracy, from the lowest to the highest layer-a universal phenomenon observed across a diverse array of open-source LLMs, irrespective of their architectures or pretraining data. We demonstrate that this law offers different perspectives and actionable insights to inform and guide practices in LLM development and applications, including model scaling, pretraining tasks, and interpretation.

Authors

Institutions

Publication Details

Journal
Physical review. E
Published
2025-09-24
DOI
https://doi.org/10.1103/5rn3-49lc
Citations
1
Primary Topic
Topic Modeling
Type
article
Field-Weighted Citation Impact
2.48
Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
article

A law of next-token prediction in large language models

Weijie Su, Hangfeng He
1 citations
Physical review. E
Topic Modeling
2.48
article

A law of next-token prediction in large language models

Weijie Su, Hangfeng He
article en
1 citations

Abstract

Large language models (LLMs) have been widely employed across various application domains, yet their black-box nature poses significant challenges to understanding how these models process input data internally to make predictions. In this paper, we introduce a precise and quantitative law that governs the learning of contextualized token embeddings through intermediate layers in pretrained LLMs for next-token prediction. Our findings reveal that each layer contributes equally to enhancing prediction accuracy, from the lowest to the highest layer-a universal phenomenon observed across a diverse array of open-source LLMs, irrespective of their architectures or pretraining data. We demonstrate that this law offers different perspectives and actionable insights to inform and guide practices in LLM development and applications, including model scaling, pretraining tasks, and interpretation.

Physical review. EVol. 112(3)
California University of Pennsylvania (US), University of Rochester (US)
Openalex Percentile: Top 8%
Topic Modeling
2.48
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.