TL;DR
Inside a standard large language model, internal hidden vectors drift into weird, abstract spaces that don't actually match the words in its vocabulary—making the model a frustrating black box. This paper introduces Geometric Embedding Mixture (GEM), a lightweight pre-training tweak that forces a model's internal thoughts to physically sit in the geometric center of the words it is about to predict. Not only does this let us read the model's mind layer-by-layer without extra tools, it actually makes the model smarter, slashing uncertainty by up to 53%.
What Problem Does This Paper Address?
When an LLM processes a sentence, tokens start as vocabulary vectors, pass through dozens of transformer layers as "hidden states," and finally get scored against the vocabulary again to pick the next word. Intuitively, you might think these hidden states and vocabulary words live in the same geometric universe.
In standard transformers, they don’t. Hidden states often clump into narrow, distorted cones (a problem called anisotropy) or drift into completely separate mathematical manifolds. Because of this mismatch, if you try to peek inside a middle layer to see what the model is "thinking" using its own vocabulary head, you mostly get gibberish. Researchers usually work around this post-hoc by training auxiliary "probes" (like the Tuned Lens) to translate intermediate states into words. But probes create a philosophical headache: are you observing what the model actually knows, or just what your probe learned as a shortcut? Instead of building better flashlights for dark boxes, the authors ask: can we build the box out of glass from day one?
Methods
The authors propose a "what you predict is what you are" constraint during pre-training called GEM. Alongside standard next-token cross-entropy loss, they add a geometric alignment penalty right after the final normalization layer.
Here is how it works:
- Standard forward pass: The model computes next-token probabilities as usual.
- Mixture target (New): Instead of summing over the entire vocabulary (which is slow), GEM grabs the top-$k$ ($k=8$) most probable next tokens, renormalizes their probabilities, and computes their probability-weighted average vector ($\mu_t$). Geometrically, this target sits inside the convex hull—the bounding shape—of those plausible words.
- Alignment loss (New): An $L_2$ loss pulls the final hidden state ($\tilde{h}_t$) toward $\mu_t$. Crucially, gradients are stopped through the probabilities so the model aligns its geometry rather than gaming its predictions, while vocabulary embeddings themselves gently cluster toward $\tilde{h}_t$.
They also introduce Loupe (Causal Tuned Lens) for evaluation—a probe trained not just to guess the final output, but to generate an embedding mixture that can literally replace a layer's hidden state mid-flight without breaking the rest of the forward pass.
Datasets
- Pre-training: Models (135M to 1.7B parameters, SmolLM2 architecture) were trained on 5B to 20B tokens sampled from FineWeb-Edu.
- Evaluation: Predictive uncertainty and zero-shot reasoning were tested on LAMBADA, WikiText, PIQA, HellaSwag, Winogrande, ARC (Easy & Challenge), and BoolQ. Embedding geometry was evaluated using the Google analogy dataset and BATS 3.0 (keeping single-token words). No new datasets were introduced.
Key Insights and Ideas
- Minimizing "Free Energy": GEM isn't just a neat geometric heuristic. Viewed through the lens of Energy-Based Models (and Hopfield networks), pulling $\tilde{h}_t$ toward $\mu_t$ is mathematically equivalent to minimizing the statistical free energy of the output distribution, nudging representations into stable, low-energy valleys.
- Implicit Semantic Clustering: Because co-probable next words usually share a concept (e.g., after "My phone number is 6", the top candidates are all digits), pulling them toward a shared hidden state naturally organizes the vocabulary into tight, clean semantic neighborhoods.
- Global Space Consistency: Because residual connections add each layer's output onto the original token embeddings, locking the final layer to the vocabulary space prevents "space mixing" across the entire network. Every intermediate layer stays anchored to a single, readable manifold.
Key Results
Imposing strict geometric rules didn't bottleneck the models—it helped them generalize:
- Better Language Modeling: GEM reduced perplexity across all scales—by up to 53.1% on LAMBADA (285.7 down to 134.0 at 135M; 46.88 down to 26.23 at 1.7B) and 15.9% on WikiText. Zero-shot reasoning accuracy rose by an average of 1.5% to 2.6% across scales.
- Crisp Geometry & Analogies: GEM improved global isotropy and increased semantic cluster separation by up to $4\times$. On classic
king - man + woman = queenvector arithmetic (Google analogies), the 360M GEM model hit 71.2% accuracy compared to just 18.0% for the baseline—even beating the official SmolLM2-360M trained on trillions more tokens (56.9%).
- Native Interpretability: Decoding raw intermediate layers directly with the untuned language head yielded much higher accuracy than baselines (e.g., 25.2% vs. 11.8% average at 135M). In causal substitution tests—swapping a layer's hidden state with its decoded word mixture—GEM preserved the model's final answer far more faithfully across every layer and probe.
Limitations and Future Work
- Compute Scale on Largest Model: While the 135M–760M models met compute-optimal Chinchilla token ratios ($20\times$ parameters), the 1.7B model was slightly undertrained at ~12 tokens per parameter (20B tokens).
- Not Complete Transparency Yet: While GEM makes raw intermediate states vastly more readable at the vocabulary level, the authors candidly note that trained probes still achieve higher causal faithfulness—meaning auxiliary tools are still needed to fully capture internal computations.
- Future Directions: The authors suggest this coherent geometric structure could be a vital stepping stone for steering model behavior and monitoring internal trajectories to catch hallucinations before they happen.
Summary updated