The structure of the token space for large language models
Michael Robinson, Sourya Dey, Shauna Sweet

TL;DR
This paper investigates the geometric structure of token spaces in large language models, revealing they form stratified manifolds with negative curvature, which correlates with model fluency and behavior.
Contribution
It introduces methods to estimate the dimension and Ricci curvature of token subspaces, demonstrating their stratified manifold structure in several open-source models.
Findings
Token subspace is a stratified manifold, not a smooth manifold.
Ricci curvature is significantly negative on individual strata.
Dimension and curvature correlate with model fluency.
Abstract
Large language models encode the correlational structure present in natural language by fitting segments of utterances (tokens) into a high dimensional ambient latent space upon which the models then operate. We assert that in order to develop a foundational, first-principles understanding of the behavior and limitations of large language models, it is crucial to understand the topological and geometric structure of this token subspace. In this article, we present estimators for the dimension and Ricci scalar curvature of the token subspace, and apply it to three open source large language models of moderate size: GPT2, LLEMMA7B, and MISTRAL7B. In all three models, using these measurements, we find that the token subspace is not a manifold, but is instead a stratified manifold, where on each of the individual strata, the Ricci curvature is significantly negative. We additionally find…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Taxonomy
TopicsNatural Language Processing Techniques
