Trajectory Geometry of Transformer Representations Across Layers
This paper introduces a probe-free, geometric framework for mechanistic interpretability that characterizes transformer representations as discrete trajectories across layers, revealing universal three-phase dynamics and demonstrating how curvature, convergence, and bifurcation encode computational complexity, semantic similarity, and ambiguity across diverse model families.
Original paper licensed under CC BY 4.0 (http://creativecommons.org/licenses/by/4.0/). This is an AI-generated explanation of the paper below. It is not written or endorsed by the authors. For technical accuracy, refer to the original paper. Read full disclaimer
Imagine a Transformer AI (like the ones that power chatbots) not as a black box that magically turns text into answers, but as a hiker walking through a vast, invisible landscape.
This paper proposes a new way to watch that hiker. Instead of stopping at every step to ask, "What specific word are you thinking of right now?" (which is how most researchers usually work), the authors decided to map the entire path the hiker takes from the start of the trail to the finish. They call this path a "trajectory."
Here is what they discovered about the shape of that path, using simple analogies:
1. The "Magnet" Effect (Semantic Convergence)
The Analogy: Imagine you drop three different colored balls (representing three different sentences about "dogs") into a funnel. At the top, they are far apart. As they fall, they get pulled toward the center of the funnel until they all clump together in a tight pile at the bottom.
The Finding: The researchers found that when the AI processes sentences with similar meanings, their internal "paths" start far apart but gradually curve toward the same spot in the middle and late stages of the network. They call these spots "attractors." It's as if the AI has a built-in magnet that pulls similar ideas together as it thinks deeper.
2. The "Winding Road" vs. The "Straight Line" (Curvature)
The Analogy: Think of two drivers.
- Driver A is just changing the color of their car (e.g., "The cat" vs. "The dog"). They drive in a perfectly straight, boring line.
- Driver B is solving a complex puzzle or doing a math problem. They have to swerve, turn sharply, and navigate a winding, twisty road to get to the answer.
The Finding: The paper found that "winding roads" (high curvature) happen when the AI is doing hard reasoning or analogies. "Straight lines" (low curvature) happen when the AI is just making small surface-level changes to words. The "twistiness" of the path is a direct measure of how hard the AI is thinking.
3. The "Fork in the Road" (Disambiguation)
The Analogy: Imagine a hiker standing at a fork in the road. At first, they are just standing at the base of the fork, unsure which way to go. As they take a few steps, they slowly commit to the left path, and the distance between the "left path" and the "right path" grows wider and wider until they are miles apart.
The Finding: When the AI encounters a word with two meanings (like "bank" of a river vs. a "bank" for money), the two possible meanings start at the exact same spot. But as the AI processes the sentence, the path splits. About 20–25% of the way through the network, the paths begin to separate clearly, and by the end, they are completely distinct. The AI doesn't decide instantly; it slowly commits to one meaning as it travels down the path.
4. The Three Stages of the Journey (Three-Phase Structure)
The Analogy: The journey isn't random; it always happens in three distinct chapters, no matter which AI model is used:
- Chapter 1: The Map (Encoding): The hiker looks at the terrain and figures out where they are. The path changes direction quickly.
- Chapter 2: The Trek (Elaboration): The hiker walks steadily through the middle of the forest. This is where the "magnet" effect and the "winding roads" for hard problems happen. The path is stable but doing the heavy lifting.
- Chapter 3: The Destination (Output Prep): The hiker sees the finish line and adjusts their stride to get ready to stop. The path changes direction one last time to prepare the final answer.
How They Know This is Real
The authors didn't just guess. They ran "control experiments" to make sure they weren't seeing things that didn't exist:
- If they scrambled the order of the layers (like shuffling the chapters of a book), the patterns disappeared.
- If they used a model with random, untrained weights (like a hiker with no map), the patterns vanished.
- If they randomly assigned meanings to words, the "magnet" effect went away.
The Bottom Line
This paper argues that we can understand how AI thinks by looking at the geometry of its journey. We don't need to stop and ask the AI what it's thinking at every step. Instead, we can just watch the shape of its path:
- Straight lines = Easy tasks.
- Twisty roads = Hard thinking.
- Clumping paths = Similar ideas coming together.
- Splitting paths = Choosing between meanings.
It's a new lens that lets us see the "flow" of intelligence without needing to install any extra tools or ask the AI to explain itself.
Drowning in papers in your field?
Get daily digests of the most novel papers matching your research keywords — with technical summaries, in your language.