Token embeddings violate the manifold hypothesis
Michael Robinson, Sourya Dey, Tony Chiang
TL;DR
This work interrogates the assumption that LLM token embeddings lie on a low-dimensional manifold by introducing a fiber bundle hypothesis and two hypothesis tests. The authors develop a rigorous framework linking ball-volume growth to geometric structure, showing that token spaces often exhibit non-manifold or non-fiber-bundle behavior, and that singularities can persist under typical context windows. Through synthetic datasets and four open-source LLMs (GPT2, Llemma7B, Mistral7B, Pythia6.9B), they demonstrate systematic rejections of manifold structure and, in several cases, fiber-bundle structure, with larger-radius neighborhoods revealing stronger deviations. These findings imply inherent irregularities in token topology that can affect prompt stability and semantic interpretation, highlighting the limitations of assuming smooth token spaces in LLM analysis and prompting new lines of inquiry into tokenization and model behavior.
Abstract
A full understanding of the behavior of a large language model (LLM) requires our grasp of its input token space. If this space differs from our assumptions, our comprehension of and conclusions about the LLM will likely be flawed. We elucidate the structure of the token embeddings both empirically and theoretically. We present a novel statistical test assuming that the neighborhood around each token has a relatively flat and smooth structure as the null hypothesis. Failing to reject the null is uninformative, but rejecting it at a specific token $ψ$ implies an irregularity in the token subspace in a $ψ$-neighborhood, $B(ψ)$. The structure assumed in the null is a generalization of a manifold with boundary called a \emph{smooth fiber bundle} (which can be split into two spatial regimes -- small and large radius), so we denote our new hypothesis test as the ``fiber bundle hypothesis.'' By running our test over several open-source LLMs, each with unique token embeddings, we find that the null is frequently rejected, and so the evidence suggests that the token subspace is not a fiber bundle and hence also not a manifold. As a consequence of our findings, when an LLM is presented with two semantically equivalent prompts, if one prompt contains a token implicated by our test, the response to that prompt will likely exhibit less stability than the other.
