TL;DR
Deep inside Mamba models, the very first token in a sequence acts like a gravitational anchor, exponentially pulling the representations of all subsequent tokens toward itself as data flows through the layers. By developing a new mathematical framework to track these complex trajectories, the authors prove why tokens cluster together and uncover the first theoretical and empirical evidence of "attention sinks" in state-space models.
What Problem Does This Paper Address?
If you want to understand what a deep neural network is actually doing, a great approach is to treat its layers as steps in time and watch how token representations evolve—a field known as token dynamics.
For Transformers, we have a solid grasp of token dynamics. That’s largely because the softmax function in self-attention forces token interactions to be governed by neat, positive scalar numbers, allowing mathematicians to borrow established tools from cooperative dynamical systems.
Mamba—a wildly popular State-Space Model (SSM) that rivals Transformers without the quadratic compute cost—is a mathematical wilderness by comparison. Instead of friendly positive scalars, Mamba’s selective state-space (S6) layers govern token interactions using full matrices that offer zero guarantees of positivity or definiteness. Because of this, every standard mathematical tool used to analyze Transformers completely breaks down. Until now, how tokens behave, stabilize, or cluster in deep Mamba architectures has remained a theoretical blind spot.
Methods
To tame Mamba’s matrix-valued interactions, the authors take a continuous-time view of the architecture, treating layer-by-layer progression as smooth trajectories flowing across a high-dimensional unit sphere. That spherical surface isn't just a convenient math trick; it directly mirrors the Root Mean Square (RMS) normalization used in real-world Mamba implementations, which divides tokens by their Euclidean norm to prevent numerical overflow.
Because standard positivity tools fail here, the authors invent a two-part analytical framework:
- A High-Dimensional Invariant Box: They construct a mathematical "box" for the interaction variables.
- A Sharp Exit-Time Argument: Using uniqueness properties of ordinary differential equations, they prove that token trajectories starting inside this positive box can never escape it.
Together, these techniques recover an effective form of sign-definiteness. The authors first solve this for simplified, time-independent parameters, and then generalize the math to realistic, time-dependent regimes where model parameters change across layers.
Datasets
Not discussed in the paper. (The authors validate their theoretical proofs using numerical simulations on synthetic random vectors sampled uniformly on a sphere, simplified shared-weight Mamba-2 blocks processing batches of 64 sequences, and internal hidden-attention analyses of the pretrained Falcon-Mamba-7B model, without specifying a particular text evaluation dataset in the main text.)
Key Insights and Ideas
- The Privilege of the First Token: Because Mamba processes sequences causally (left to right), the first token interacts only with itself. Its trajectory ignores the rest of the prompt and reliably converges toward discrete attractors—specifically, the coordinate unit vectors ($\pm e_d$, meaning vectors with a $1$ or $-1$ in one slot and $0$s everywhere else).
- Exponential Gravitation: Downstream tokens don't wander freely. Once the first token locks onto a direction, it exerts an attracting force on every token that follows, pulling them exponentially fast toward its own limit point (or its exact opposite, creating at most two dominant clusters).
- Attention Sinks Without Attention: In Transformers, researchers famously noticed that models dump massive amounts of attention onto the very first token, regardless of its semantic meaning—an "attention sink." This paper shows that Mamba does the exact same thing through its hidden state-space matrices, proving that attention sinks aren't a quirk of softmax, but a fundamental dynamical property of causal sequence models.
Key Results
- Pinpointing the Attractors: In continuous-time simulations of 100 random initializations on a 3D sphere, 94% of first-token trajectories converged cleanly to a coordinate unit vector ($\pm e_d$).
- Discrete Model Validation: In simplified Mamba-2 blocks with shared weights across 300 layers, over 80% of first tokens converged to a "1-element" state (having only a single non-near-zero coordinate above a $1 \times 10^{-4}$ threshold), matching the continuous-time math.
- Sinks in Falcon-Mamba-7B: By adapting an attention-sink metric (sampling 200 channels per layer out of 4096, with a sink threshold of $\varepsilon = 0.3$), the authors tracked hidden token interactions across Falcon-Mamba-7B's 64 layers. In Layer 1, attention is spread out; by Layer 60, nearly all tokens concentrate disproportionately on the first token. Across layers, the first token's sink score climbs steadily to ~80%, averaging over 35% across the whole model—dwarfing every other token position.
Limitations and Future Work
The authors note that their mathematical framework relies on taking the continuous-time limit (treating discrete layers as smooth differential equations) and looking at asymptotic behavior (what happens as depth approaches infinity). Bridging the gap between these clean, infinite-depth continuous equations and the messy reality of finite, discrete, large-scale Mamba architectures—complete with causal convolutions, MLPs, and non-shared weights—remains an open challenge for future work.
Summary updated