Test-Time Training with Next-Token Prediction

Xuan Ouyang, Zefan Cai, Junjie Hu


Abstract
Next-token prediction is the self-supervised signal that trains language models, and every observed prompt token provides the same signal at test time. We study whether this signal can define the inner-loop objective for test-time training (TTT) in pretrained long-context language models. Existing in-place TTT methods store prompt information in fast weights, but they train each write to match a learned shortcut target: an internal pattern that may be easy to predict, yet is not the trajectory the model uses to form its next-token distribution. We introduce Test-Time Training with Next-Token Prediction (TTT-NTP), a drop-in fast-weight adaptation method for pretrained LLMs that instead supervises updates using the model’s own next contextual hidden state. This makes each local write follow the same causal computation that supports next-token prediction, without aggregating over a neighborhood of positions: the value target is a pointwise linear projection of a single next-position contextual state. Across four backbones from three model families, Llama-3.1-8B, Mistral-7B-v0.3, Qwen3-4B, and Qwen3-0.6B, TTT-NTP is the only method that consistently improves RULER Full-13 over the released backbone, by 2.9 to 4.1 points, while aggregate commonsense and knowledge performance is preserved. Our code is publicly available at https://github.com/yancyou/TTT-NTP.
Anthology ID:
2026.findings-emnlp.936
Volume:
Findings of the Association for Computational Linguistics: EMNLP 2026
Month:
October
Year:
2026
Address:
Budapest, Hungary
Editors:
Hung-Yi Lee, Sunipa Dev, Jessy Li, Desmond Elliott
Venue:
Findings
SIG:
SIGDAT
Publisher:
Association for Computational Linguistics
Note:
Pages:
19750–19764
Language:
URL:
https://aclanthology.org/2026.findings-emnlp.936/
DOI:
Bibkey:
Cite (ACL):
Xuan Ouyang, Zefan Cai, and Junjie Hu. 2026. Test-Time Training with Next-Token Prediction. In Findings of the Association for Computational Linguistics: EMNLP 2026, pages 19750–19764, Budapest, Hungary. Association for Computational Linguistics.
Cite (Informal):
Test-Time Training with Next-Token Prediction (Ouyang et al., Findings 2026)
Copy Citation:
PDF:
https://aclanthology.org/2026.findings-emnlp.936.pdf