bioRxivNeurosciencePreprint
Large language models implicitly learn to straighten neural sentence trajectories to construct a predictive representation of natural language
Abstract
Predicting upcoming events is critical to our ability to effectively interact with our environment and conspecifics. In natural language processing, transformer models, which are trained on next-word prediction, appear to construct a general-purpose representation of language that can support diverse downstream tasks. However, we still lack an understanding of how a predictive objective shapes such representations. Inspired by recent work in vision neuroscience Henaff et al. (2019), here we test a hypothesis about predictive representations of autoregressive transformer models. In particular, we test whether the neural trajectory of a sequence of words in a sentence becomes progressively more straight as it passes through the layers of the network. The key insight behind this hypothesis is that straighter trajectories should facilitate prediction via linear extrapolation. We quantify straightness using a 1-dimensional curvature metric, and present four findings in support of the trajectory straightening hypothesis: i) In trained models, the curvature progressively decreases from the first to the middle layers of the network. ii) Models that perform better on the next-word prediction objective, including larger models and models trained on larger datasets, exhibit greater decreases in curvature, suggesting that this improved ability to straighten sentence neural trajectories may be the underlying driver of better language modeling performance. iii) Given the same linguistic context, the sequences that are generated by the model have lower curvature than the ground truth (the actual continuations observed in a language corpus), suggesting that the model favors straighter trajectories for making predictions. iv) A consistent relationship holds between the average curvature and the average surprisal of sentences in the middle layers of models, such that sentences with straighter neural trajectories also have lower surprisal. Importantly, untrained models dont exhibit these behaviors. In tandem, these results support the trajectory straightening hypothesis and provide a possible mechanism for how the geometry of the internal representations of autoregressive models supports next word prediction.
- research focus: benchmarking
- research focus: differential expression
- research focus: gene regulatory network inference
- approach: statistical model
- approach: machine learning (classical)
- Citations
- 2
Reproducibility ledger
Nobody has reported trying to reproduce this paper yet. Did you replicate an experiment or run the code? Your report saves the next lab a week.
Sign in to file a reproducibility report.
Related papers
- The human language processing system straightens natural speech
Jiaming Xu, Tien Dung Nguyen, … Robbe L. T. Goris·bioRxiv·Jul 2, 2026
- Thinking ahead: prediction in context as a keystone of language in humans and machines
Ariel Goldstein, Zaid Zada, … Uri Hasson·bioRxiv·Dec 2, 2020
- The neural architecture of language: Integrative modeling converges on predictive processing
Martin Schrimpf, Idan Blank, … Evelina G. Fedorenko·Proceedings of the National Academy of SciencesPeer-reviewed·Nov 4, 2021
- Driving and suppressing the human language network using large language models
Greta Tuckute, Aalok Sathe, … Evelina G. Fedorenko·Nature Human BehaviourPeer-reviewed·Jan 3, 2024
- Artificial neural network language models predict human brain responses to language even after a developmentally realistic amount of training
Eghbal A. Hosseini, Martin Schrimpf, … Evelina G. Fedorenko·Neurobiology of LanguagePeer-reviewed·Jan 1, 2024
- Predicting speech from a cortical hierarchy of event-based timescales
Lea‐Maria Schmitt, Julia Erb, … Jonas Obleser·Science AdvancesPeer-reviewed·Dec 3, 2021