Geometry of Semantics in Next-Token Prediction: How Optimization Implicitly Organizes Linguistic Representations
Yize Zhao, Christos Thrampoulidis
TL;DR
The paper investigates how next-token prediction optimization intrinsically organizes linguistic semantics in word and context representations, revealing that learned geometry aligns with the singular value decomposition of a centered data-sparsity matrix.By introducing an unconstrained features model (NTP-UFM) and an orthant-based clustering approach, it shows that latent semantic concepts are encoded in the signs and magnitudes of SVD factors and can be extracted as interpretable categories through sign-pattern combinations.The authors demonstrate both theoretically and empirically that concepts associated with larger singular values are learned earlier, yielding a coarse-to-fine semantic emergence, and validate these insights on synthetic data and multiple pretrained models across languages and architectures.This work connects classical distributional semantics with neural-collapse geometry, providing a principled optimization-based explanation for semantic organization and offering a practical method for discovering interpretable semantics from language-model representations.
Abstract
We investigate how next-token prediction (NTP) optimization leads language models to extract and organize semantic structure from text. Our analysis, based on a tractable mathematical model and controlled synthetic data, reveals that NTP implicitly guides models to factor a centered support matrix encoding context-to-next-token co-occurrence patterns via singular value decomposition (SVD). While models never explicitly construct this matrix, learned word and context embeddings converge to its SVD factors, with singular vectors encoding latent semantic concepts through their sign patterns. We demonstrate that concepts corresponding to larger singular values are learned earlier during training, yielding a natural semantic hierarchy where broad categories emerge before fine-grained ones. This insight motivates orthant-based clustering, a method that combines concept signs to identify interpretable semantic categories. We validate our findings on synthetic datasets and pretrained language models, recovering diverse semantic structures such as grammatical categories, named entity types, and topical distinctions (medical, entertainment). Our work bridges classical distributional semantics and neural collapse geometry, characterizing how gradient-based optimization implicitly determines both the matrix representation and factorization method that encode semantic structure.
