Manuscript Offprint
arXiv:2611.08303First-Token Attraction in Mamba Dynamics
Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.
Abstract
We study token dynamics in deep Mamba models, with a particular focus on the attracting role of the first token. Unlike attention mechanisms, where token interactions are governed by positive scalar coefficients, Mamba dynamics involve full matrix-valued interaction coefficients with no positivity or definiteness guarantees. This structural difference makes Mamba dynamics substantially harder to analyze and prevents the direct application of existing techniques for attention-based models. To overcome this challenge, we introduce a new analytical framework based on a high-dimensional invariant box and a sharp exit-time argument, which together recover an effective form of sign-definiteness. Using this framework, we characterize the possible limit points of token trajectories and prove explicit exponential convergence rates. Our analysis reveals that the first token has privileged dynamics: its limiting direction attracts subsequent tokens, inducing token clustering and attention-sink phenomena in deep Mamba models. We further show that this attraction mechanism extends to broader sequence dynamics, including state-space models, causal attention, and classical time-series models. Experiments on Falcon-Mamba-7B validate our predictions, showing that concentration on the first token increases with depth and dominates in later layers.
1 Introduction
Modern sequence modeling has been dominated by transformers, while state space models (SSMs) have emerged as an important alternative. Transformers have set the standard for representation learning, yet their quadratic complexity with respect to sequence length poses challenges for efficiency and scalability [77]. In parallel, SSMs have reemerged as powerful alternatives that combine principles of recurrence and convolution with ideas from classical control theory [34]. Recent innovations in parameterization and implementation have made SSMs substantially more efficient [25, 26, 24, 29, 45, 36, 63, 72], enabling them to capture long-range dependencies effectively [23, 58] and to excel in benchmark tasks such as the Long Range Arena [74]. Beyond efficiency, these models have demonstrated strong empirical performance in domains as varied as audio, speech, and vision [21, 54, 70].
*Co-first authors
†Co-last authors. Correspondence to: q0004349@sjtu.edu.cn & ntv22@bath.ac.uk.
40th Conference on Neural Information Processing Systems (NeurIPS 2026).
Within this line of development, the Mamba architecture has emerged as a selective SSM with striking empirical results. Its distinctive component, the selective state-space (S6) layer, introduces input-dependent parameters that grant the model content awareness [22]. This design has proven effective across a wide spectrum of applications, including language modeling [67, 41], vision and video analysis [48, 89, 85, 42], medical imaging [50, 80], tabular data [5], reinforcement learning [64], 3D perception [46], graph learning [79], and even N-dimensional sequence modeling [44]. The breadth of these successes has been linked to Mamba's ability to generate highly adaptive and expressive representations across modalities [68, 65, 84, 89].
The study of token dynamics—the evolution of token representations within a model—has proven to be a powerful framework for understanding transformers, offering insights into equilibrium structures, stability properties, and clustering phenomena. In contrast, the token dynamics of selective SSMs have received little attention, despite the strong empirical performance of architectures such as Mamba.
- We construct a new theoretical framework based on a high-dimensional invariant box for the Mamba dynamics and establish a sharp exit-time argument to determine when token trajectories remain confined to this domain. This framework overcomes the difficulties arising in previous approaches for attention settings.
- We characterize the set of limit points of token trajectories in Mamba models and establish explicit exponential convergence rates (Theorems 3.5, 3.3, 3.6 and 3.9). Our theoretical analysis further demonstrates that the first token exerts an attracting influence on the remaining tokens, a phenomenon that we empirically validate.
- We demonstrate a practical implication of our theoretical results to offer a principled explanation of the attention sink effect in Mamba models via the attraction of the first token.
To validate our theoretical findings and their applications, we conduct extensive experiments by visualizing attention concentration in Falcon-Mamba-7B across different depths. These experimental results confirm the predictive accuracy of our analysis and underscore its practical benefits in real-world scenarios.
Mamba dynamics is far more complicated than causal attention dynamics. Indeed, while our work is inspired by the recent analysis of Transformer dynamics in [35], the mathematical structure of Mamba is much more complex. In the attention setting, the effective interaction coefficients are positive scalars as they are normalized via softmax. The positivity of these interaction coefficients ensures sign-definiteness and enables the use of powerful tools from monotone and cooperative dynamical systems. In contrast, for Mamba, the effective interaction coefficients are full matrices with no positivity or definiteness guarantees. This lack of sign-definiteness is not a minor technical inconvenience; it is an intrinsic structural feature of practical Mamba architectures and invalidates essentially all positivity-based techniques that underpin the current theory of attention dynamics. As a consequence, techniques used for analyzing causal attention dynamics, including hemisphere-based Lyapunov methods [3] and Shub-type genericity arguments [35], completely fail in this architecture.
Our new analytical framework. To overcome the above challenge, we develop a new analytical framework based on a high-dimensional invariant box for the dynamical system governing the continuous-time limit of Mamba, together with a sharp exit-time argument that recovers effective sign-definiteness and determines when token trajectories remain confined to this domain. Within this framework, we characterize all possible token limit points and derive explicit exponential convergence rates toward them. This analysis yields a theoretical explanation for a widely observed empirical phenomenon: the limit point of the first token exerts an attracting influence on subsequent tokens, thereby inducing clustering and attention-sink phenomena. Finally, we extend our analysis of this attracting effect to a broad class of autoregressive sequence models, including state-space models, causal Transformers, and classical time-series models.
Organization. Section 2 derives a dynamical system over the unit sphere arising from the continuous-time limit of Mamba. Section 3 analyzes the limitations of the first token and proves its attraction effect on subsequent tokens. Section 4.1 validates the theory in practical Mamba settings, while Section 5 applies the results to predict attention-sink phenomena in Mamba models.
2 Mamba Dynamics as a Flow Map on Sphere
2.1 Background – S6 layer
The building block of a selective state-space (Mamba) model is a Mamba block (see [13]). At the heart of the Mamba block is the S6 layer, which plays a key role in the success of deep Mamba models.
S6 layer. Formally, an S6 layer is defined as a function that maps a sequence of tokens to another sequence of tokens (with the same number of channels ). In this context, each vector (or ) represents a token/word, while the whole sequence (or ) is called a prompt/sentence.
For each , the -th channel output is determined recurrently from the corresponding -th channel input via a sequence of hidden states as follows:
for . Here, the matrices , , and are input-dependent and time-varying, determined by
where is the step size function at the -th channel and is defined for each by
The hidden positive coefficients , and the step size vectors for , as well as the input and output matrices , are learnable from input data.
By eliminating the hidden states in system (1) and recall that , we obtain the following form (see also [7]):
where and as well as
In our context, the matrix , which we will refer to as the input-output matrix, plays an essential role in characterizing the dynamical properties of tokens.
2.2 Mamba Dynamic as Flow Map on Sphere
All practical implementations of Mamba models incorporate normalization [8], most commonly realized as root mean square (RMS) normalization [87]. In this approach, the sequence of tokens at each layer is normalized by dividing each token by its Euclidean norm. This operation enhances stability by preventing divergence, thereby reducing rounding errors and avoiding numerical overflow. Consequently, the resulting dynamics can be viewed as evolving on the unit sphere throughout.
Follow the framework of [35], a Mamba model including S6 layer and RMS normalization with skip connection can then be viewed as a flow map on of the dynamical system
where
- for each , the map is the projection onto the tangent space at of the sphere and it is defined by for each ;
• the coefficient is an diagonal matrix with
- the step size function at the -th channel is defined by , for each .
2.3 Mamba Interaction Coefficients Are More Complex Than Those in Causal Attention
In our continuous-time view for both Mamba and attention define dynamics, each is a linear combination of earlier tokens with interaction coefficients. For attention, the interaction coefficients are positive scalars as they are normalized by softmax. These positive scalar interaction coefficients makes the system comparatively structured and amenable to existing analysis (see [35]).
In contrast, the interaction coefficients of Mamba are far more complicated than those in the causal attention setting. Indeed, the Mamba interaction coefficients are which are given in equation (8) are full matrices with no positivity or definiteness guarantees. As a consequence, almost all tools and conclusions from the attention setting, including hemisphere-based Lyapunov methods [3] and Shub-type genericity arguments [35], break down.
3 Theoretical Results for Mamba Dynamic
Our goal is to study the dynamical properties of tokens in the internal representations of deep Mamba models. In the continuous-time limit, this amounts to analyzing the solution trajectories of the system (6) and characterizing the limiting set . In this section, we focus on a simplified Mamba setting in which the model parameters are assumed to be time-independent. An extension to the time-dependent parameter regime is discussed in Section 3.3. Intuitively, we will prove the following:
Observation 3.1. (i) The first token has privileged dynamics: its trajectory determines a discrete set of possible limit points, primarily the coordinate unit vectors , which serve as attractors (Theorems 3.3 and 3.5). Here, is the coordinate unit vector with 1 at the d-th coordinate and 0 elsewhere.
(ii) Subsequent tokens with are strongly influenced by the first token, often exponentially converging toward the same attractor, thereby creating clusters of tokens in the final layers (see Theorem 3.6 and Proposition 3.7 for the time-independent parameter setting and Theorem 3.9 for a time-dependent analogue).
The study of the convergence of all tokens based on the dynamical system (6) without any additional assumption on the model parameters is challenging. To make the proofs feasible while still maintaining the generality practicality of our theoretical findings, we will first assume that all parameters
and are time-independent in Sections 3.1 and 3.2. Next, a generalization into the case of time-dependent parameters will be presented in Section 3.3. All proofs can be found in Appendix.
These theoretical observations will be empirically validate using practical Mamba architectures, considering both the continuous-time setting (in Subsection 4.1) and the discrete-time setting (in Subsection 4.2).
3.1 Possible Limit Points of the First Token
Let us consider the differential equation governing the trajectory of the first token, which is the first equation in the dynamical system (6), given by
where
A limit point must be an equilibrium point. We will determine the set of equilibrium points of differential equation (9) in the following proposition.
Proposition 3.2 (All possible equilibrium points of the first token). A vector is an equilibrium of equation (9) if and only if it belongs to one of the following types:
Type 1. , where for each subset , we denote by .
Type 2. , which is the null space of the quadratic surface defined by .
If is definite, then and Type 2 equilibria do not exist. If, furthermore, the columns of are linearly independent, then the Type 1 equilibria collapse to exactly two antipodal points , where is the unique unit vector in the union .
Not every equilibrium point is stable, and therefore not every equilibrium point can arise as a limit point. Even for the first token, analyzing stability near equilibria in order to characterize the limit points of equation (9) is delicate and technically involved. This difficulty already appears in the two-dimensional case D = 2: depending on the initial data, the first token may converge to different limiting states, as we see in the following theorem.
Theorem 3.3 (All possible limit points of the first token in two dimensions). Assume that and let be a solution of differential equation (9). Assume further that
(i) with or ;
(ii) .
In this case, the circle intersects the line at two antipodal points, say . Then exists and belongs to the set
Remark 3.4 (Possible limit points of the first token in practical setting). Theorem 3.5 indicates that the first token converges to either of the coordinate unit vectors . In contrast, Theorem 3.3 reveals additional possible limit points, which are difficult to detect in simulations with randomly chosen model parameters. In practice, even when the assumptions of Theorems 3.5 and 3.3 do not strictly hold, we still observe that the first token typically converges to one of the coordinate unit vectors (see Figure 1 below).
We leave the proof of the above proposition, as well as the study of the stability of these equilibrium points, to Appendix B.1.1. The following theorem proves that the first token likely converges to a limit point of the form for some .
Theorem 3.5 (First token likely converges to in general). Let be a solution of differential equation (9). Assume that the symmetric part of is positive definite, and for each such that . Suppose that there exists such that
for every . Then
where the sign is .
3.2 All Other Tokens are Attracted by the First Token
Different from the first token, the problem of characterizing the possible limits points of the other token is far more challenge. In this subsection, to make the proofs feasible while still maintaining the generality and practicability of our findings, beside of the time-independent parameters assumption, we will assume further that:
for any time . Under this assumption, we can rewrite dynamical system (6) as:
where the coefficients are defined as
with .
In this case, for the first token , we see that
This implies that is a constant function on . We will present all possible limit points of for in Theorem 3.6 and Proposition 3.7 below.
Theorem 3.6 (All tokens are exponentially attracted by the first token). Let be a solution of dynamical system (10). Assume that is symmetric and . Then, there exists a zero-measurable subset of such that: if the initial point does not belong in then all tokens converge exponentially to , i.e.,
for some constant and for each .
Proof strategy. The proof is organized into four steps.
Step 1 (two-token reduction). We first analyze the simplest nontrivial interaction between the first two tokens and . The key scalar is , whose sign controls the long-time behavior. A Grönwall-type estimate yields exponential convergence of to .
Step 2 (global positivity regime). We then extend the two-token analysis to the full system under the global positivity assumption that for all . The main tool is a box-invariance argument for the interaction variables , showing that trajectories starting in the positive box cannot exit it (by a contradiction argument based on uniqueness of ODE solutions). This yields exponential convergence of all downstream tokens to .
Step 3 (removing positivity by induction). Next, we drop the positivity assumption and proceed inductively. Assuming that converge exponentially to , we show that the interaction coefficient decays exponentially, implying that converges to an equilibrium orthogonal to .
Step 4 (nongenericity of orthogonal equilibria). Finally, we prove that the orthogonal-drift scenario from Step 3 is nongeneric. For a candidate equilibrium , with , we linearize the flow at and show that the Jacobian admits a positive eigenvalue , so that is a saddle point. The stable manifold theorem then implies that the set of initial conditions leading to the convergence of tokens to lies in a lower-dimensional manifold of Lebesgue measure zero. This provides a complete proof of Theorem 3.6.
Under slightly stronger assumptions, we can apply Theorem 3.6 to recover the single-cluster case stated below.
Proposition 3.7 (Exponential alignment under positive angle conditions). Suppose the assumptions of Theorem 3.6 hold. In addition, assume that the initial configuration satisfies the positive angle condition:
Then all tokens converge exponentially to the aligned state , that is,
for some constant . Moreover, the positivity of interactions is preserved for all time:
Remark 3.8 (All token are exponentially attracted by the first token in practical settings). Theorem 3.6 states that, under certain assumptions, each token converges exponentially either to or to , depending on the sign of the corresponding coefficient . Thus, in this setting there are two possible clusters: one around and one around . Proposition 3.7 imposes stricter assumptions under which all tokens converge exponentially to . In this case, there is only one cluster.
In practice, when the assumptions of Theorem 3.6 and Proposition 3.7 do not fully hold, it is possible to observe more than two clusters at the end of the dynamics (see for examples in Figure 1 below). However, this occurs only rarely. Almost all trajectories still fall into one of the two dominant clusters predicted by Theorem 3.6.
3.3 A generalization to time-dependent regime
In this section, we discuss a generalization of Theorem 3.6 to the setting of time-dependent parameters. Specifically, we allow the parameters to be nonconstant functions of time, subject to additional mild conditions ensuring that the proof strategy from the previous section remains valid.
We borrow the notation from the previous subsection. To keep the proofs tractable while maintaining the generality and practical relevance of our results, we assume that the functions , , and converge exponentially to , , and , respectively, when tends to infinity. (In the previous section, these parameters are constant.) In this case, the interaction coefficients are the matrices
where for each and . Under the above setting, we can generalize Theorem 3.6 to the time-dependent parameter regime as follows.
Theorem 3.9. Let be a solution to the dynamical system


(a) First-token trajectories (100 random initializations; time-independent , , ). 94 trajectories converge to some coordinate unit vector .

(b) A single sequence of 32 tokens (time-independent , , ). Tokens converge toward a point at one coordinate unit vector for some d.
(c) A single sequence of 16 tokens (time-dependent , , ). Tokens converge to points at some coordinate unit vectors for some .
Figure 1: Simulated trajectories of dynamical system (6) with random parameters. The initial points (denoted by small red points in (a) and (b)) are sampled via a uniform distribution on the sphere. In these settings, the first token converges to discrete attractors at the big red points (mostly coordinate unit vectors ) and draws subsequent tokens toward the same points, producing clusters and illustrating the attention sink effect.
for , and is an arbitrary constant. Assume that is symmetric for every and is positive definite. Then, there exists a zero-measurable subset of satisfying the following property: if then there exists a zero-measurable subset of such that if the initial point does not belong in then all tokens converge exponentially to .
Theorem 3.9 indicates that the downstream tokens , for , are strongly driven by the initial direction of the first token . In particular, for generic initializations, these tokens converge exponentially to the same attractor , which leads to the emergence of token clusters in the final layers. This conclusion corroborates the phenomenon described at the beginning of Section 3. Further discussion and intuition for this result are provided in Appendix B.3.
4 Alignment with Observed Behavior in Practical Mamba Settings
We empirically validate the theoretical results established in the previous section using practical Mamba architectures, considering both the continuous-time setting (Subsection 4.1) and the discrete-time setting (Subsection 4.2). We study models with both time-dependent and time-independent parameters, and further investigate how practical architectural components of Mamba (such as pre-layer normalization and linear layers) impact the conclusions of our theory.
4.1 Simulations
To validate our theoretical results, we conduct extensive simulations of the dynamical system (6) under random choices of model parameters, demonstrating that the empirical behaviors observed in the simulations are consistent with our theoretical predictions. In particular, we numerically integrate the system to observe: (i) trajectories of first tokens across many random initializations with time-independent parameters , , and ; (ii) trajectories of all tokens in a single sequence with time-independent parameters , , and ; and (iii) trajectories of all tokens in a single sequence with time-dependent parameters , , and .
Figure 1, which demonstrates the expected results of the trajectories of the tokens under the above settings, reveals two robust patterns. First, the initial token exhibits privileged dynamics and converges to a discrete set of attractors, namely the coordinate vectors , in agreement with Theorems 3.5 and 3.3. Second, the downstream tokens are strongly driven by this first-token trajectory and typically converge to the same attractor, producing token clusters in the final layers, consistent

Figure 2: Percentage of first tokens exhibiting a single non-zero element (threshold ) across simplified Mamba-2 blocks with shared weights, after omitting causal convolution, input/output projections, activations, and inner residuals. Most tokens converged to 1-element tokens, consistent with simulations.

(a) Layer 1, Channel 8

(b) Layer 15, Channel 8

(c) Layer 46, Channel 8

(d) Layer 60, Channel 8
Figure 3: Attention concentration on the first token across different depths of the Falcon-Mamba-7B model [90]. Each subfigure shows the hidden attention matrix for a specific layer: (a) Layer 1, (b) Layer 15, (c) Layer 46, and (d) Layer 60. In early layers, tokens distribute attention more uniformly, but as depth increases, nearly all tokens concentrate disproportionately on the first token. This illustrates the emergence of an attention sink in state-space models.
with Theorem 3.6, Proposition 3.7, and Theorem 3.9. These robust patterns strongly support Observation 3.1.
4.2 Empirical Validation with Full Practical Setting
To validate our theoretical results on practical models, we conduct experiments on simplified versions of the Mamba-2 block. Specifically, we employ the configuration with shared-weight blocks. Within each block, we omit the causal convolution, input projection, and output projection.
We process a batch of 64 sequences through the model. We compute the percentage of sequences where the first token has only one non-near-zero element (threshold ). The results in Figure 2 reveal that most first tokens converge to a representation with only one non-zero element. This outcome aligns with our theoretical predictions and the simulation in Figure 1a.
5 An application – Predict Attention Sink
Observation 3.1, together with the theoretical justification provided in the previous section, suggests that the first token should be regarded with particular importance, as it serves as an attractor for subsequent tokens. This insight provides a principled explanation of the attention sink effect in Mamba models through the attracting role of the first token.
We analyze the hidden attention matrix in equation (4) for the Falcon-Mamba-7B model [90] to quantify how tokens attend to one another. The results in Figure 3 reveal that the concentration of attention on the first token consistently increases with depth, and in the final layers it dominates nearly all other tokens. This empirical trend validates our theoretical justification for token dynamics and, importantly, represents the first observation of the attention sink phenomenon in state-space models. While attention sink was originally identified in transformer-based architectures [83], we have showed that an analogous effect emerges in Mamba models as predicted from Observation 3.1.

(a) Attention sink (%) across layers for the first token.

(b) Attention sink (%) across all token positions.
Figure 4: Attention sink score [27] analysis in the Falcon-Mamba-7B model. Subfigure (a) shows the sink score of the first token and its moving average across layers; the score steadily increases with depth and dominates in the final layers. Subfigure (b) shows the average sink scores across token positions; the first token consistently receives the largest share.
To quantify the attention sink in state-space models, we employ the metrics Sink and Sink (formally defined in Appendix C), adapted from [27] with modifications to account for the structural differences in our hidden attention representation. Specifically, while the original metric is computed from attention logits with shape (batch, head, seqlen, seqlen), our Mamba hidden attention has shape (batch, channel, seqlen, seqlen). Each channel plays an analogous role to an attention head, but given the large number of channels (4096), we uniformly sample 200 channels per layer for evaluation. We fix the threshold to to decide whether the first token exhibits sink in a given channel. The results, shown in Figure 4, reveal that the sink score of the first token increases consistently with depth and that, when averaged across token positions, the first token dominates all others, thereby extending the attention sink phenomenon to state-space models.
6 Conclusion and Limitation
In this work, we developed a theoretical framework for token dynamics in deep Mamba models under realistic assumptions. Modeling Mamba as flow maps on high-dimensional spheres, we characterized limit points of token trajectories, proved exponential convergence, and revealed the first token's role as a global attractor. We further extended our analysis to time-dependent parameters setting and to broader autoregressive models, as well as demonstrated a practical implication to explain the attention sink effect. These results advance the understanding of token dynamics and suggest new directions for improving Mamba models.
Limitation. Our analysis focuses on the continuous-time limit and asymptotic behavior, and future work is needed to fully bridge these insights with the discrete, large-scale implementations of Mamba models in practice.
Acknowledgments and Disclosure of Funding
This research is supported by the National Research Foundation Singapore under the AI Singapore Programme (AISG Award No: AISG2-TC-2023-012-SGIL). This research is also supported by the Ministry of Education, Singapore, under the Academic Research Fund Tier 1 (FY2023) (A-8002040-00-00, A-8002039-00-00), the NUS Presidential Young Professorship Award (A-0009807-01-00), the NUS Artificial Intelligence Institute–Seed Funding (A-8003062-00-00), and the Cross Faculty Grant 2025, CFG25-012 (A-8004460-00-00). T. T. Nguyen acknowledges support from the NSFC Excellent Young Scientists Fund (Overseas) and the Research Start-up Fund of Shanghai Jiao Tong University.
References
[1] Laziz Abdullaev and Tan Minh Nguyen. Transformer meets twicing: Harnessing unattended residual information. In The Thirteenth International Conference on Learning Representations, 2025.
[2] Laziz U Abdullaev, Maksim Tkachenko, and Tan M Nguyen. Revisiting transformers with insights from image filtering and boosting. SIAM Journal on Imaging Sciences, 2025.
[3] Álvaro Rodríguez Abella, João Pedro Silvestre, and Paulo Tabuada. Consensus is all you get: The role of attention in transformers. In Forty-second International Conference on Machine Learning, 2025.
[4] Juan A Acebrón, Luis L Bonilla, Conrad J Pérez Vicente, Félix Ritort, and Renato Spigler. The kuramoto model: A simple paradigm for synchronization phenomena. Reviews of modern physics, 77(1):137–185, 2005.
[5] Md Atik Ahamed and Qiang Cheng. Mambatab: A plug-and-play model for learning tabular data. In 2024 IEEE 7th International Conference on Multimedia Information Processing and Retrieval (MIPR), pages 369–375, 2024.
[6] Albert Alcalde, Giovanni Fantuzzi, and Enrique Zuazua. Clustering in pure-attention hardmax transformers and its role in sentiment analysis. arXiv preprint arXiv:2407.01602, 2024.
[7] Ameen Ali, Itamar Zimerman, and Lior Wolf. The hidden attention of mamba models. arXiv preprint arXiv:2403.01590, 2024.
[8] Jimmy Lei Ba, Jamie Ryan Kiros, and Geoffrey E Hinton. Layer normalization. arXiv preprint arXiv:1607.06450, 2016.
[9] Han Bao, Ryuichiro Hataya, and Ryo Karakida. Self-attention networks localize when qk-eigenspectrum concentrates. arXiv preprint arXiv:2402.02098, 2024.
[10] Ricky TQ Chen, Yulia Rubanova, Jesse Bettencourt, and David K Duvenaud. Neural ordinary differential equations. Advances in neural information processing systems, 31, 2018.
[11] Tianlong Chen, Zhenyu Zhang, Yu Cheng, Ahmed Awadallah, and Zhangyang Wang. The principle of diversity: Training stronger vision transformers calls for reducing all levels of redundancy. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 12020–12030, 2022.
[12] Jingpu Cheng, Qianxiao Li, Ting Lin, and Zuowei Shen. Interpolation, approximation and controllability of deep neural networks. arXiv preprint arXiv:2309.06015, 2023.
[13] Tri Dao and Albert Gu. Transformers are ssms: Generalized models and efficient algorithms through structured state space duality. In International Conference on Machine Learning, pages 10041–10071. PMLR, 2024.
[14] Yihe Dong, Jean-Baptiste Cordonnier, and Andreas Loukas. Attention is not all you need: Pure attention loses rank doubly exponentially with depth. In International Conference on Machine Learning, pages 2793–2803. PMLR, 2021.
[15] Gbetondji JS Dovonon, Michael M Bronstein, and Matt J Kusner. Setting the record straight on transformer oversmoothing. arXiv preprint arXiv:2401.04301, 2024.
[16] Subhabrata Dutta, Tanya Gautam, Soumen Chakrabarti, and Tanmoy Chakraborty. Redesigning the transformer architecture with insights from multi-particle dynamical systems. Advances in Neural Information Processing Systems, 34:5531–5544, 2021.
[17] Ruili Feng, Kecheng Zheng, Yukun Huang, Deli Zhao, Michael Jordan, and Zheng-Jun Zha. Rank diminishing in deep neural networks. Advances in Neural Information Processing Systems, 35:33054–33065, 2022.
[18] Borjan Geshkovski, Hugo Koubbi, Yury Polyanskiy, and Philippe Rigollet. Dynamic metastability in the self-attention model. arXiv preprint arXiv:2410.06833, 2024.
[19] Borjan Geshkovski, Cyril Letrouit, Yury Polyanskiy, and Philippe Rigollet. A mathematical perspective on transformers. arXiv preprint arXiv:2312.10794, 2023.
[20] Borjan Geshkovski, Cyril Letrouit, Yury Polyanskiy, and Philippe Rigollet. The emergence of clusters in self-attention dynamics. Advances in Neural Information Processing Systems, 36, 2024.
[21] Karan Goel, Albert Gu, Chris Donahue, and Christopher Ré. It's raw! audio generation with state-space models. In International Conference on Machine Learning, pages 7616–7633. PMLR, 2022.
[22] Albert Gu and Tri Dao. Mamba: Linear-time sequence modeling with selective state spaces. In First Conference on Language Modeling, 2024.
[23] Albert Gu, Tri Dao, Stefano Ermon, Atri Rudra, and Christopher Ré. Hippo: Recurrent memory with optimal polynomial projections. Advances in neural information processing systems, 33:1474–1487, 2020.
[24] Albert Gu, Karan Goel, Ankit Gupta, and Christopher Ré. On the parameterization and initialization of diagonal state space models. Advances in Neural Information Processing Systems, 35:35971–35983, 2022.
[25] Albert Gu, Karan Goel, and Christopher Re. Efficiently modeling long sequences with structured state spaces. In International Conference on Learning Representations, 2022.
[26] Albert Gu, Isys Johnson, Karan Goel, Khaled Saab, Tri Dao, Atri Rudra, and Christopher Ré. Combining recurrent, convolutional, and continuous-time models with linear state space layers. Advances in neural information processing systems, 34:572–585, 2021.
[27] Xiangming Gu, Tianyu Pang, Chao Du, Qian Liu, Fengzhuo Zhang, Cunxiao Du, Ye Wang, and Min Lin. When attention sink emerges in language models: An empirical view. In The Thirteenth International Conference on Learning Representations, 2025.
[28] Xiaojun Guo, Yifei Wang, Tianqi Du, and Yisen Wang. Contranorm: A contrastive learning perspective on oversmoothing and beyond. arXiv preprint arXiv:2303.06562, 2023.
[29] Ankit Gupta, Albert Gu, and Jonathan Berant. Diagonal state spaces are as effective as structured state spaces. Advances in Neural Information Processing Systems, 35:22982–22994, 2022.
[30] Seung-Yeal Ha, Jeongho Kim, Jinyeong Park, and Xiongtao Zhang. Complete cluster predictability of the cucker-smale flocking model on the real line. Archive for Rational Mechanics and Analysis, 231:319–365, 2019.
[31] Eldad Haber and Lars Ruthotto. Stable architectures for deep neural networks. Inverse problems, 34(1):014004, 2017.
[32] Samy Jelassi, David Brandfonbrener, Sham M Kakade, and Eran Malach. Repeat after me: Transformers are better than state space models at copying. In International Conference on Machine Learning, pages 21502–21521. PMLR, 2024.
[33] Amir Joudaki, Hadi Daneshmand, and Francis Bach. On the impact of activation and normalization in obtaining isometric embeddings at initialization. Advances in Neural Information Processing Systems, 36:39855–39875, 2023.
[34] RE Kalman. A new approach to linear filtering and prediction problems. Journal of Basic Engineering, 82(1):35–45, 1960.
[35] Nikita Karagodin, Yury Polyanskiy, and Philippe Rigollet. Clustering in causal attention masking. Advances in Neural Information Processing Systems, 37:115652–115681, 2024.
[36] Chrysoula Kosma, Giannis Nikolentzos, and Michalis Vazirgiannis. Time-parameterized convolutional neural networks for irregularly sampled time series. arXiv preprint arXiv:2308.03210, 2023.
[37] Samory Kpotufe and Abdeslam Bouliarias. Gradient weights help nonparametric regressors. In Advances in Neural Information Processing Systems, volume 25, 2012.
[38] Ulrich Krause et al. A discrete nonlinear and non-autonomous model of consensus formation. Communications in difference equations, 2000:227–236, 2000.
[39] Yoshiki Kuramoto. Self-entrainment of a population of coupled non-linear oscillators. In International Symposium on Mathematical Problems in Theoretical Physics: January 23–29, 1975, Kyoto University, Kyoto/Japan, pages 420–422. Springer, 1975.
[40] Yann LeCun, Yoshua Bengio, and Geoffrey Hinton. Deep learning. nature, 521(7553):436–444, 2015.
[41] Barak Lenz, Opher Lieber, Alan Arazi, Amir Bergman, Avshalom Manevich, Barak Peleg, Ben Aviram, Chen Almagor, Clara Fridman, Dan Padnos, Daniel Gissin, Daniel Jannai, Dor Muhlgay, Dor Zimberg, Edden M. Gerber, Elad Dolev, Eran Krakovsky, Erez Safahi, Erez Schwartz, Gal Cohen, Gal Shachaf, Haim Rozenblum, Hofit Bata, Ido Blass, Inbal Magar, Itay Dalmedigos, Jhonathan Osin, Julie Fadlon, Maria Rozman, Matan Danos, Michael Gokhman, Mor Zusman, Naama Gidron, Nir Ratner, Noam Gat, Noam Rozen, Oded Fried, Ohad Leshno, Omer Antverg, Omri Abend, Or Dagan, Orit Cohavi, Raz Alon, Ro'i Belson, Roi Cohen, Rom Gilad, Roman Glozman, Shahar Lev, Shai Shalev-Shwartz, Shaked Haim Meirom, Tal Delbari, Tal Ness, Tomer Asida, Tom Ben Gal, Tom Braude, Uriya Pumerantz, Josh Cohen, Yonatan Belinkov, Yuval Globerson, Yuval Peleg Levy, and Yoav Shoham. Jamba: Hybrid transformer-mamba language models. In The Thirteenth International Conference on Learning Representations, 2025.
[42] Kunchang Li, Xinhao Li, Yi Wang, Yinan He, Yali Wang, Limin Wang, and Yu Qiao. Video-mamba: State space model for efficient video understanding. In European Conference on Computer Vision, pages 237–255. Springer, 2024.
[43] Qianxiao Li, Ting Lin, and Zuowei Shen. Deep learning via dynamical systems: An approximation perspective. Journal of the European Mathematical Society, 25(5):1671–1709, 2022.
[44] Shufan Li, Harkanwar Singh, and Aditya Grover. Mamba-nd: Selective state space modeling for multi-dimensional data. In European Conference on Computer Vision, pages 75–92. Springer, 2024.
[45] Yuhong Li, Tianle Cai, Yi Zhang, Deming Chen, and Debadeepta Dey. What makes convolutional models great on long sequence modeling? In The Eleventh International Conference on Learning Representations, 2023.
[46] Dingkang Liang, Xin Zhou, Wei Xu, Xingkui Zhu, Zhikang Zou, Xiaoqing Ye, Xiao Tan, and Xiang Bai. Pointmamba: A simple state space model for point cloud analysis. Advances in neural information processing systems, 37:32653–32677, 2025.
[47] Hongzhou Lin and Stefanie Jegelka. Resnet with one-neuron hidden layers is a universal approximator. Advances in neural information processing systems, 31, 2018.
[48] Fusheng Liu and Qianxiao Li. From generalization analysis to optimization designs for state space models. arXiv preprint arXiv:2405.02670, 2024.
[49] Yiping Lu, Zhuohan Li, Di He, Zhiqing Sun, Bin Dong, Tao Qin, Liwei Wang, and Tie-Yan Liu. Understanding and improving transformer from a multi-particle dynamic system point of view. arXiv preprint arXiv:1906.02762, 2019.
[50] Chao Ma and Ziyang Wang. Semi-mamba-unet: Pixel-level contrastive and cross-supervised visual mamba-based unet for semi-supervised medical image segmentation. Knowledge-Based Systems, 300:112203, 2024.
[51] William Merrill, Jackson Petty, and Ashish Sabharwal. The illusion of state in state-space models. In International Conference on Machine Learning, pages 35492–35506. PMLR, 2024.
[52] Sebastien Motsch and Eitan Tadmor. Heterophilious dynamics enhances consensus. SIAM review, 56(4):577–621, 2014.
[53] Nicola Muca Cirone, Antonio Orvieto, Benjamin Walker, Cristopher Salvi, and Terry Lyons. Theoretical foundations of deep selective state-space models. Advances in Neural Information Processing Systems, 37:127226–127272, 2025.
[54] Eric Nguyen, Karan Goel, Albert Gu, Gordon Downs, Preey Shah, Tri Dao, Stephen Baccus, and Christopher Ré. S4nd: Modeling images and videos as multidimensional signals with state spaces. Advances in neural information processing systems, 35:2846–2861, 2022.
[55] Ho Huu Nghia Nguyen, Tan Nguyen, Huyen Vo, Stanley Osher, and Thieu Vo. Improving neural ordinary differential equations with nesterov's accelerated gradient method. Advances in Neural Information Processing Systems, 35:7712–7726, 2022.
[56] Tam Nguyen, Tan Nguyen, and Richard Baraniuk. Mitigating over-smoothing in transformers via regularized nonlocal functionals. Advances in Neural Information Processing Systems, 36:80233–80256, 2023.
[57] Tam Minh Nguyen, César A Uribe, Tan Minh Nguyen, and Richard Baraniuk. Pidformer: Transformer meets control theory. In Forty-first International Conference on Machine Learning, 2024.
[58] Thai Khanh Nguyen, Vo Ngoc Bich Uyen, Thieu Vo, Tan Minh Nguyen, and Cuong Pham. MuonSSM: Orthogonalizing state space models for sequence modeling. In Forty-third International Conference on Machine Learning, 2026.
[59] Tuan Nguyen, Hirotada Honda, Takashi Sano, Vinh Nguyen, Shugo Nakamura, and Tan Minh Nguyen. From coupled oscillators to graph neural networks: Reducing over-smoothing via a kuramoto model-based approach. In International Conference on Artificial Intelligence and Statistics, pages 2710–2718. PMLR, 2024.
[60] Stefan K Nielsen, Laziz U Abdullaev, Rachel S Teo, and Tan M Nguyen. Elliptical attention. Advances in Neural Information Processing Systems, 37:109748–109789, 2024.
[61] Lorenzo Noci, Sotiris Anagnostidis, Luca Biggio, Antonio Orvieto, Sidak Pal Singh, and Aurelien Lucchi. Signal propagation in transformers: Theoretical perspectives and the role of rank collapse. Advances in Neural Information Processing Systems, 35:27198–27211, 2022.
[62] Lorenzo Noci, Chuning Li, Mufan Li, Bobby He, Thomas Hofmann, Chris J Maddison, and Dan Roy. The shaped transformer: Attention models in the infinite depth-and-width limit. Advances in Neural Information Processing Systems, 36, 2024.
[63] Antonio Orvieto, Samuel L Smith, Albert Gu, Anushan Fernando, Caglar Gulcehre, Razvan Pascanu, and Soham De. Resurrecting recurrent neural networks for long sequences. In International Conference on Machine Learning, pages 26670–26698. PMLR, 2023.
[64] Toshihiro Ota. Decision mamba: Reinforcement learning via sequence modeling with selective state spaces. arXiv preprint arXiv:2403.19925, 2024.
[65] Badri Narayana Patro and Vijay Srinivas Agneeswaran. Mamba-360: Survey of state space models as transformer alternative for long sequence modelling: Methods, applications, and challenges. arXiv preprint arXiv:2404.16112, 2024.
[66] Duy-Tung Pham, An The Nguyen, Viet-Hoang Tran, Nhan-Phu Chung, Xin T Tong, Tan M Nguyen, and Thieu N Vo. Dynamical properties of tokens in self-attention and effects of positional encoding. Advances in Neural Information Processing Systems, 2026.
[67] Maciej Pióro, Kamil Ciebiera, Krystian Król, Jan Ludziejewski, and Sebastian Jaszczur. Moe-mamba: Efficient selective state space models with mixture of experts. arXiv preprint arXiv:2401.04081, 2024.
[68] Farnoush Rezaei Jafari, Grégoire Montavon, Klaus-Robert Müller, and Oliver Eberle. Mambalrp: Explaining selective state space sequence models. Advances in Neural Information Processing Systems, 37:118540–118570, 2025.
[69] Domenec Ruiz-Balet and Enrique Zuazua. Neural ode control for classification, approximation, and transport. SIAM Review, 65(3):735–773, 2023.
[70] George Saon, Ankit Gupta, and Xiaodong Cui. Diagonal state space augmented transformers for speech recognition. In ICASSP 2023-2023 IEEE International Conference on Acoustics, Speech and Signal Processing (ICASSP), pages 1–5. IEEE, 2023.
[71] Michael Scholkemper, Xinyi Wu, Ali Jadbabaie, and Michael T Schaub. Residual connections and normalization can provably prevent oversmoothing in gnns. arXiv preprint arXiv:2406.02997, 2024.
[72] Jimmy T.H. Smith, Andrew Warrington, and Scott Linderman. Simplified state space layers for sequence modeling. In The Eleventh International Conference on Learning Representations, 2023.
[73] Paulo Tabuada and Bahman Gharesifard. Universal approximation power of deep residual neural networks through the lens of control. IEEE Transactions on Automatic Control, 68(5):2715–2728, 2022.
[74] Yi Tay, Mostafa Dehghani, Samira Abnar, Yikang Shen, Dara Bahri, Philip Pham, Jinfeng Rao, Liu Yang, Sebastian Ruder, and Donald Metzler. Long range arena : A benchmark for efficient transformers. In International Conference on Learning Representations, 2021.
[75] Rachel S Teo and Tan M Nguyen. Momentumsmoe: Integrating momentum into sparse mixture of experts. Advances in Neural Information Processing Systems, 37:28965–29000, 2024.
[76] Matthew Thorpe, Tan Minh Nguyen, Hedi Xia, Thomas Strohmer, Andrea Bertozzi, Stanley Osher, and Bao Wang. Grand++: Graph neural diffusion with a source term. In International Conference on Learning Representations, 2022.
[77] Ashish Vaswani, Noam Shazeer, Niki Parmar, Jakob Uszkoreit, Llion Jones, Aidan N Gomez, Lukasz Kaiser, and Illia Polosukhin. Attention is all you need. Advances in neural information processing systems, 30, 2017.
[78] Thieu N Vo, Tung D Pham, Xin T Tong, and Tan Minh Nguyen. Demystifying the token dynamics of deep selective state space models. International Conference on Learning Representations (ICLR), 2025.
[79] Chloe Wang, Oleksii Tsepa, Jun Ma, and Bo Wang. Graph-mamba: Towards long-range graph sequence modeling with selective state spaces. arXiv preprint arXiv:2402.00789, 2024.
[80] Ziyang Wang, Jian-Qing Zheng, Yichi Zhang, Ge Cui, and Lei Li. Mamba-unet: Unet-like pure visual mamba for medical image segmentation. arXiv preprint arXiv:2402.05079, 2024.
[81] Xinyi Wu, Amir Ajorlou, Zihui Wu, and Ali Jadbabaie. Demystifying oversmoothing in attention-based graph neural networks. Advances in Neural Information Processing Systems, 36, 2024.
[82] Hedi Xia, Vai Suliafu, Hangjie Ji, Tan Nguyen, Andrea Bertozzi, Stanley Osher, and Bao Wang. Heavy ball neural ordinary differential equations. Advances in Neural Information Processing Systems, 34:18646–18659, 2021.
[83] Guangxuan Xiao, Yuandong Tian, Beidi Chen, Song Han, and Mike Lewis. Efficient streaming language models with attention sinks. In The Twelfth International Conference on Learning Representations, 2024.
[84] Rui Xu, Shu Yang, Yihui Wang, Bo Du, and Hao Chen. A survey on vision mamba: Models, applications and challenges. arXiv preprint arXiv:2404.18861, 2024.
[85] Yijun Yang, Zhaohu Xing, and Lei Zhu. Vivim: a video vision mamba for medical video object segmentation. arXiv preprint arXiv:2401.14168, 2024.
[86] Shuangfei Zhai, Tatiana Likhomanenko, Etai Littwin, Dan Busbridge, Jason Ramapuram, Yizhe Zhang, Jiatao Gu, and Joshua M Susskind. Stabilizing transformer training by preventing attention entropy collapse. In International Conference on Machine Learning, pages 40770–40803. PMLR, 2023.
[87] Biao Zhang and Rico Sennrich. Root mean square layer normalization. Advances in neural information processing systems, 32, 2019.
[88] Han Zhang, Xi Gao, Jacob Unterman, and Tom Arodz. Approximation capabilities of neural odes and invertible residual networks. In International Conference on Machine Learning, pages 11086–11095. PMLR, 2020.
[89] Lianghui Zhu, Bencheng Liao, Qian Zhang, Xinlong Wang, Wenyu Liu, and Xinggang Wang. Vision mamba: Efficient visual representation learning with bidirectional state space model. In International Conference on Machine Learning, pages 62429–62442. PMLR, 2024.
[90] Jingwei Zuo, Maksim Velikanov, Dhia Eddine Rhaiem, Ilyas Chahed, Younes Belkada, Guillaume Kunsch, and Hakim Hacid. Falcon mamba: The first competitive attention-free 7b language model. arXiv preprint arXiv:2410.05355, 2024.
Appendix of “First-Token Attraction in Mamba Dynamics”
Table of Contents
| A Related Works | 17 |
|---|---|
| B Theoretical Results | 18 |
| B.1 Possible Limit Points of the First Token | 19 |
| B.1.1 Equilibrium Points According to the First Token | 19 |
| B.1.2 Limit points of the First Token | 20 |
| B.2 All Other Tokens are Attracted by the First Token | 24 |
| B.3 A Generalization to the Time-dependent Parameters Setting | 36 |
| C Experiment - Additional Details | 37 |
| C.1 Experimental Setup | 37 |
| C.2 Evaluation | 37 |
A Related Works
ResNets and Neural ODEs Our work connects to the literature that interprets deep neural networks (DNNs) through the lens of dynamical systems. Standard DNNs can be seen as discrete-time dynamical processes, where data propagate sequentially through layers [40]. Residual networks (ResNets) [10, 31, 37] exemplify this view, and their continuous counterparts, neural ordinary differential equations (neural ODEs) [47, 88, 82, 43, 55, 76, 69, 12], formalize the passage to continuous time. In this formulation, the residual block update becomes a flow governed by a differential equation, mapping an initial input to an output . A broad line of work has studied the approximation, interpolation, and controllability properties of these architectures [47, 88, 43, 73, 69, 12, 75].
Oversmoothing and Rank Collapse Transformers face two critical degeneracies: oversmoothing and rank collapse. Oversmoothing causes token representations to become indistinguishable, leading to a loss of expressive power. Nguyen et al. [56, 59], Wu et al. [81], Dovonon et al. [15], and Chen et al. [11] proved that self-attention alone cannot prevent this collapse. Remedies include ContraNorm, a normalization method inspired by contrastive learning [28], and the use of residual connections with normalization, which have been shown to mitigate oversmoothing [71, 1, 2].
Rank collapse, on the other hand, occurs when the hidden representations degenerate into a low-dimensional subspace. Prior studies [14, 17, 61, 33, 86, 57, 62, 60, 9] identified this as a major bottleneck and proposed stabilization strategies to maintain diversity and improve performance.
Theoretical Analyses of Mamba Recent studies have begun to explore Mamba from a theoretical standpoint. Ali et al. [7] interpreted the S6 layer as a linear-time, softmax-free variant of attention, proving that Mamba is more expressive than transformers. In contrast, Muca Cirone et al. [53] applied Rough Path Theory to show that diagonal selective state space models (SSMs) are less expressive than non-diagonal ones. Merrill et al. [51] used circuit complexity theory to argue that both SSMs and transformers belong to the class , implying computational equivalence. Jelassi et al. [32] provided both theoretical and empirical evidence that transformers surpass state space models in copying tasks. Together, these results form a theoretical basis for understanding the expressive and generalization limits of Mamba.
Token Dynamics and Clustering Effects Another perspective interprets sequence models, such as Transformers and Mamba, as interacting particle systems. Lu et al. [49] formulated self-attention as a numerical solver for a convection–diffusion equation, while Dutta et al. [16] proposed TransEvolve, a particle-inspired scheme that reduces complexity. These approaches connect Transformer dynamics to broader nonlinear systems, including flocking [30], synchronization [39, 4], and consensus models [38, 52].
From this dynamical viewpoint, the long-term behavior of tokens has been studied via clustering. Geshkovski et al. [20] proved convergence to limit objects influenced by initial conditions, while follow-up work [19, 18] showed metastable multi-cluster states that persist for long times before collapsing into a single cluster. Alcalde et al. [6] further confirmed asymptotic convergence to clustered equilibria in hardmax Transformers. Pham et al. [66] investigated how different forms of positional encoding - specifically absolute and rotary - affect these dynamical regimes. In contrast, the token dynamics of Mamba models remain largely unexplored. Vo et al. [78] studied the dynamical properties of tokens in a deep Mamba model under a certain restrictive assumptions, and based on that, suggested improvements to the model by excluding negatively impactful scenarios and reordering tokens using importance scores.
In this paper, we take one step further by studying the token dynamics for Mamba without the restrictive assumptions.
B Theoretical Results
Recall that a pre-trained Mamba model can be viewed as a flow map on defined by the following dynamical system:
where
- for each , the map is the projection onto the tangent space at of the sphere and it is defined by
- the coefficient matrices is an diagonal matrix with
- the step size function at the -th channel is defined by
The dynamical system (6) is parameterized by the input-output matrix
the step-size matrix
and the state coefficient vector
Our main problem is studying the dynamical properties of the solutions of system (6). In particular, we want to understand how the set looks like and when it reduces to a set of a single point.
Notation. Throughout this section, the notation denotes a universal positive constant. We write to mean that there exists a constant , independent of time, such that .
B.1 Possible Limit Points of the First Token
In this subsection, we will characterize all possible limit points for the first token. In order to do that, let us consider the differential equation governing the trajectory of the first equation, which is the first equation in the dynamical system (13), given by
where
and . We will determine the set of equilibrium points of this differential equation in Subsection B.1.1. However not every equilibrium point is a limit point. The set of possible actual limit points of the first token is then presented in Subsection B.1.2. Moreover, since
where
denotes the symmetric part of , it follows that only the symmetric component contributes to the quadratic form. Throughout this section, we may therefore assume without loss of generality that is symmetric.
B.1.1 Equilibrium Points According to the First Token
Theorem B.1 (Equilibria of the first token). A vector is an equilibrium of equation (17) if and only if it belongs to one of the following types:
Type 1. (Alignment equilibria) The vector y may have some zero coordinates, but restricted to its nonzero entries we obtain
which lies in the common kernel of the column differences
for the active indices .
Type 2. (Quadratic constraint equilibria) The vector y satisfies
If is definite, then Type 2 equilibria do not exist. Furthermore, if the columns of are linearly independent, then the Type 1 equilibria collapse to exactly two antipodal points
where is the unique unit vector in the one-dimensional intersection of the kernels above.
Proof. By definition,
Substituting , the dynamics take the form
where denotes the orthogonal projection onto .
For each component this yields
with
Equation (18) shows that equilibria arise in two distinct cases:
(i) either , corresponding to Type 2 equilibria,
(ii) or else for every index with .
Since , there exists at least one index with . For any with , condition (ii) implies
which is equivalent to
Let denote the indices of the nonzero entries of , and write
for the restriction of y to these coordinates. Then (20) becomes
which precisely characterizes Type 1 equilibria.
Finally, if is definite, then for all , so no Type 2 equilibria can exist. Moreover, if the columns are linearly independent, the intersection
is one-dimensional in . Its intersection with the unit sphere therefore consists of exactly two antipodal points , which are the only possible equilibria.
B.1.2 Limit points of the First Token
The analysis of stability near equilibrium points, in order to characterize the limit sets of equation (17), is in general quite delicate. Thanks to Theorem B.1, under the assumption that is definite and the columns of are linearly independent, the nonzero-part of equilibria are the two antipodal points
where is the unique intersection of with the one-dimensional subspace
To avoid unnecessary technical complications, we shall henceforth restrict attention to this case. In particular, we consider the high-dimensional setting in which
with denoting the m-th coordinate vector (see Theorem B.5). Apart from the special case D = 2, where the structure can be worked out explicitly (see Theorem B.7), this reduction allows us to describe all possible limit points of the first token.
We start with the following auxiliary lemma.
Lemma B.2 (Sign Preservation). Let be a solution of equation (17). If then for all . Similarly, if then for all .
Proof. Suppose but for some . Then there exists a minimal such that
By continuity of , we have
For the evolution equation reads
Dividing by yields
Let be an increasing sequence with . Then
The right-hand side is bounded, hence the left-hand side is also bounded. But since , we have , a contradiction. Thus for all .
The case is analogous.
Lemma B.3. Let be a solution of equation (17). Assume that and for all . Here, the sign in is the sign of . Suppose that there are such that
Then
for every t > 0.
Proof. By Lemma B.2, we have for every . It remains to prove that
for every t > 0.
The same computation as in the proof of Lemma B.2 gives
and
Hence, we have
Note that, since and are continuous and nonvanishing on , they have constant sign on . Therefore,
for every t > 0. Consequently, we get
for . Combining this with (21), we obtain
Now, suppose to the contrary that for some . Then there is such that for every and . Integrating both side of (21) and using the fact , we get
Then
We get a contradiction. Thus, for every .
The proof is complete.
Lemma B.4. Let be a solution of equation (17). Assume that the symmetric part
of is positive definite, and that , where the sign agrees with the sign of . Suppose that there are such that
Then
Proof. Define
By Lemma B.3, we have for all . Moreover, it follows from (22) that
In particular, is increasing.
We distinguish two cases.
Case 1: as .
In this case we have
Case 2: is bounded on .
Let . By the mean value theorem, there exists such that
Combining this with (23) gives
where . Integrating both sides of (24), we get
As a consequence, we have
Since is Lipschitz continuous, it follows that
This completes the proof.
Theorem B.5 (Convergence of the first tokens in high dimension). Assume that the symmetric part of is positive definite. Let be a solution of equation (17). Assume that , where the sign is chosen according to , for all . Suppose that there exists such that
for every . Then
where the sign is .
Proof. By Lemma B.4, we have
for every . Then
Since has constant sign on , it follows that
Combining (25) and (26), we get
as desired.
Remark B.6. The conclusion of Theorem B.5 highlights a striking selection mechanism: under the assumption that the columns of are linearly independent, the long-time dynamics do not converge to a large collection of equilibria lying in a lower-dimensional sphere in Theorem B.1. Instead, the trajectory is forced to pick out one of the most “extreme” coordinate directions, namely the basis vector corresponding to the largest initial coordinate in magnitude.
In the two-dimensional case, we can actually determine all possible limit points of the first token in the following theorem.
Theorem B.7 (Convergence of the first token in two dimensions). Let and let be a solution of (17). Assume that
• with either or ;
• .
In this setting, the unit circle intersects the line at two antipodal points . Then the limit exists and belongs to the set
Proof. Since , we may parametrize
Define . Then
Taking the inner product with , and using and , yields
Substituting , we obtain
where
Thus satisfies the autonomous ODE
where the points corresponding to zeros of in form precisely . Since is finite, the zeros of partition into intervals on each of which has a definite sign. By the phase portrait of , every trajectory converges to one of the equilibria of , and hence converges to a point in . This proves the claim.
B.2 All Other Tokens are Attracted by the First Token
Different from the first token, the study of the convergence of all tokens based on the dynamical system (13) is much more challenging. To make the proofs feasible while maintaining the generality of our theoretical findings, in this whole subsection, we will consider the dynamical system (13) under the following assumptions:
In this case we can rewrite dynamical system (13) as:
where is defined as
Throughout this section, we will assume that is a solution of the dynamical system (27).
For the first token , we see that
This implies that is a constant for all . In the following, we will present all possible limit points of with .
Define the consensus set
This set has exactly distinct elements, corresponding to the situation where every token is either aligned or anti-aligned with .
Our main theorem of this section is stated as follows:
Theorem B.8. Consider trajectories evolving on the unit sphere under the dynamics (27). Assume that is a symmetric matrix, and that the initial reference token satisfies
Suppose further that for each ,
Then there exists a set of measure zero , depending only on and , such that for any initialization , precisely one of the trajectory converges to some as . Moreover, there exists such that
Outline of the proof. The structure of this section is as follows. We first establish an affirmative result: under a favorable positive-angle condition on the initial token configuration, the system converges to a state where all tokens align with . This is proved in Proposition B.9, with the base case treated separately in Proposition B.15. We then proceed by induction: assuming exponential convergence of the first tokens to , we show that the -th token either converges exponentially to or to a point in the orthogonal complement . Finally, Proposition B.13 demonstrates that the latter scenario occurs only for a set of initial conditions of measure zero. The main difficulty arises from the fact that the interaction terms are not sign-definite—a feature that distinguishes the model from classical consensus or synchronization dynamics. This necessitates a careful combination of nonlinear analysis and linear stability techniques to exclude nongeneric limiting behaviors.
Proposition B.9. Assume that and that:
• for all , and
• for all .
Then,
Moreover, we have
The proof of Proposition B.9 will be postponed to the end of this section, as it requires several preparatory steps. To analyze the token dynamics, we first encode the pairwise interactions between tokens through the scalar quantities
Here measures the relative alignment between tokens and on the sphere , while captures their interaction through the transformation . These variables will serve as the fundamental building blocks in our nonlinear analysis and will play a central role in the proof of Theorem B.8.
Our first step is to establish their evolution equations.
Lemma B.10. Assume that is symmetric. For i > 1, we have
(28)
If , then
Proof. Recalling (27), we have
Dotting both sides of the above equation with , we have
Next for , we compute
We also have
and similarly
The proof is complete.
Proposition B.11. Assume that is symmetric and that the leading token satisfies
Then there exists a minimal index such that exactly one of the following holds:
(i) Every token up to level k converges exponentially to the expected limit direction:
with uniform exponential rate
(ii) All earlier tokens align exponentially:
while the k-th token loses its component along the direction :
and converges to some unit vector .
Moreover, after possibly replacing each by its reflection , we may assume without loss of generality that
Proof. For simplicity of notation, we may assume k = L and proceed by induction on L. Our main tool is Proposition B.9.
We first consider the case . If , then the result follows directly from Proposition B.9. If instead , we define
Since for all , we obtain
Hence, by Proposition B.9 with , we deduce
From this point onward, starting from the third token, we replace by . We call this a positive angle rearrangement. By abuse of notation, may denote either or , depending on whether or . This completes the case . Now assume we have the rearrangement such that
We claim that: if as , then as . Indeed, since as , there exists such that either the set
or
contains an increasing sequence of times . We will show that there exists such that
all have the same sign (positive or negative). If this is the case, we can perform the reflection , apply Proposition B.9, and conclude as .
Since for all as , there exists such that for any ,
This implies
• If there is an increasing sequence of times such that , then we can find such that
Hence Proposition B.9 applied to at time yields as .
• If there is an increasing sequence of times such that , then we can find such that
Hence Proposition B.9 applied to at time yields as .
The claim is proved.
Now if , we show that
Recalling that , the above is equivalent to
Using the evolution equation of in B.10 and the fact that all previous tokens converge to , there exists a time and positive constants such that
Hence for any time , we obtain
Since for all , by letting it follows that
Since the above inequality is true for any time , we get (29). Now we have
This implies that is Cauchy and hence converges to some unit vector as . The proof is complete.
Remark B.12. Proposition B.11 shows that, starting from the third token onward, each trajectory either converges to a point in or else its component in the direction vanishes asymptotically.
In the next proposition, we establish that if all preceding tokens converge to , then the probability that the subsequent token converges to any point outside is zero.
Proposition B.13. Let and assume that . Denote by the set of all points such that
Then the set of initial configurations for which the corresponding trajectory satisfies
has measure zero in .
Proof. Without loss of generality, we may assume that for all . Our first goal is to show that, for each the set of initial conditions leading to has measure zero in .
Recall the notation
For convenience, we define the limiting configuration associated with by
We perturb the configuration around by setting
Here
For , we introduce the first variations
and we set
We obtain the following first-order expansions:
Substituting the above expansions into the equations of Lemma B.10 and collecting the terms, we obtain:
(i) Linearized equation for :
(ii) For , we have
We now introduce the vector defined by
The vector collects the first variations of the interactions relative to the limiting configuration . From the previous computations we obtain
Hence the vector satisfies the linear system
where is the coefficient matrix of the reduced linearized system with rows defined as follows (all coefficients are evaluated at ):
We now show that the matrix always possesses at least one positive eigenvalue. Every row of has sum . Hence
To verify that this eigenvalue corresponds to a tangent direction of the original system, take
Since , we have
The earlier perturbations remain zero, and the linearized last-token equation gives
Consequently, the tangent linearization of the original system admits the positive eigenvalue
We now prove that, for almost every initial configuration
the trajectory converges with limits in . For , set
Define the flow map by
If does not converge to (up to a reflection of tokens), then by Proposition B.11, we have
as . Now fix any such that . If as , then for any , we have
where denotes the local center-stable manifold at . Since the linearization at admits at least one positive eigenvalue,
in the tangent direction , the local stable-center manifold has dimension at most . Consequently, it has measure zero in . From (31) it follows that
Hence belongs to a set of measure zero, namely . This completes the first goal of the proof.
We now note that for each , there exists an open ball such that if for some , then there exists such that . As a consequence, if then does not converge to any point in . Moreover, since is compact, there exist such that
Hence, if then does not converge to any point of the form , .
The proof is complete.
Before proving Proposition B.9, we establish a useful lemma.
Lemma B.14. Let be a differentiable function such that is continuous. Assume and
then for all .
Proof. Assume this is not true, since , there exists a smallest time such that . Since is continuous, there exists such that
This implies for all . By continuity of and the fact that , there exists such that , violating the minimality of . The proof is complete, and hence we have
□
The following establishes Proposition B.9 in the special case L = 2.
Proposition B.15 (Proposition B.9 for ). Assume that . Then
Moreover, the following hold:
• Exponential convergence:
• Positivity preservation:
Proof. Since
it suffices to prove that
From the dynamical system (27), we have
where for all t > 0. Define
A direct computation yields
Step 1: Positivity of . We claim that
At , we have . Fix any . If at some time , then
By Lemma B.14, this implies for all , proving (32).
Step 2: Convergence of . From (33),
with . Hence whenever , so is strictly increasing. Therefore, there exists , with necessarily . Step 3: Exponential convergence. For large , we estimate
Integrating, we obtain
Thus exponentially fast as .
Combining Steps 1–3, we conclude that , which completes the proof.
We are ready to provide the proof of Proposition B.9.
Proof of Proposition B.9. We proceed by induction on . The case has already been established in Proposition B.15. Assume now that and that the proposition holds for , i.e.,
and moreover for all . We will show that with exponential decay rate. The proof of Proposition B.9 is divided into several claims below.
Claim 1. For any , we have for all .
Proof of Claim 1. Indeed, by the induction hypothesis in Proposition B.9, it suffices to consider with . We define the set
By the assumption of Proposition B.9, we have
We now show that the trajectory
remains inside S for all t > 0. Suppose, for contradiction, that the trajectory leaves S. Since it is bounded within a box, it must cross the boundary of S at some finite time. There are two possible scenarios:
• There exists a smallest exit time and a unique index such that
while
That is, the trajectory exits S through the component , rather than exiting all components simultaneously at time T.
• There exists a smallest exit time such that for all , with for all . In this case, the trajectory exits all at once at time .
We now consider the first case, when the trajectory exits S only at the component . By Lemma B.10, for we have
since at least one of the remains strictly positive.
For , we obtain
Thus, in both cases we conclude that .
By continuity of , there exists such that
Hence is strictly increasing on , which implies
Since , there must exist some such that . Moreover, for all . This contradicts the minimality of . Therefore, the first case cannot occur.
Now we consider the second case, when the trajectory
exits S simultaneously at some time T. In this situation, Lemma B.10 implies that
Thus the trajectory passes through the equilibrium point at time . Choose sufficiently small, and consider the flow ODE for on the interval . On this interval we observe two distinct flows satisfying the same system with the same initial data at : the trivial solution and the trajectory with for all . This contradicts the uniqueness of solutions to the differential equations on .
Hence the trajectory cannot exit the boundary of S simultaneously at all components. This completes the proof for the second case and concludes the proof of Claim 1.
Claim 2. There exist a time and a constant such that for all and all .
Proof of Claim 2. For , we observe that
Therefore, the claim holds for such and . It remains to consider the case of for . Now, for any , there exists a time such that
We aim to show that for ,
This will be established by induction on j.
For the base case , using Lemma B.10, we have
Choose any satisfying
We claim that
Indeed, by Lemma B.14, it suffices to check that whenever , we have
This establishes (33) for . Now, assume that for all ,
We will show that
To this end, fix any satisfying
We will prove that for all .
Recall from Lemma B.10 that
Suppose for some . Then, we have
The claim then follows by an application of Lemma B.14.
Claim 3. There exist a time T > 0 and a constant such that
Proof of Claim 3. From Lemma B.10, we have
Fix sufficiently small. Since as for all , there exists such that
If as , then the claim holds trivially. Suppose, to the contrary, that as . Then there exists an increasing sequence such that
We now show that not all can satisfy . Assume for contradiction that
This implies for all . Consequently,
which contradicts the fact that for all t > 0.
Therefore, there exists a time such that
We now prove that
which will imply inequality (34).
To this end, fix any . We will show that for all by applying Lemma B.14.
Indeed, suppose for some . Then, using the earlier lower bounds and the fact that , we obtain
This verifies the condition of Lemma B.14, completing the proof of Claim 3.
Claim 4. There exist a time and a constant such that for all ,
Proof of Claim 4. By the preceding claims and the induction hypothesis, there exist and such that for all ,
For , we compute
Note that the third term is non-positive, since , so we may drop it to obtain an upper bound:
for some positive constants , where we have used the lower bounds , , and the exponential decay .
Applying the Gronwall inequality to this differential inequality yields
which completes the proof of Claim 4.
Proposition B.9 now follows from Claims 1–4.
We end this subsection by the proof of Theorem B.8.
Proof of Theorem B.8. By Proposition B.15 and Proposition B.11, the second token converges to . Moreover, by Proposition B.11, there exists a minimal integer such that, after possibly replacing each by its reflection for , one of the following two cases holds:
(a)
(b)
If the case (a) holds for some then we have
This implies that converges to some unit vector . By Proposition B.13, the set of initial configurations for which such a limit occurs is of measure zero in the phase space . Denote
We have is a set of measure zero in . Moreover, the case (b) holds for if .
This completes the proof.
B.3 A Generalization to the Time-dependent Parameters Setting
In this section, we consider the problem (10) in the case where and are time-dependent. Moreover, we assume that and converge exponentially to , and , respectively. As a sequence, there exists a constant such that the functions
are differentiable on . In addition, the gradients of these functions vanish at .
For every , and , we denote
where .
By the same argument as for Theorem 3.6, we obtain the following result, whose proof we omit.
Theorem B.16. Consider the problem
Let be a solution of this problem. Assume that is symmetric for every and is positive definite. Then, there exists a zero-measurable subset of satisfying the following property: if and then there exists a zero-measurable subset of such that if the initial point does not belong in then all tokens converge exponentially to .
For every , and , we denote
where . Note that if then with , and it follows that
The following result is a direct consequence of Theorem B.16.
Theorem B.17. For each constant , we consider the following problem:
Let be a solution of this problem. Assume that is symmetric for every and is positive definite. Then, there exists a zero-measurable subset of satisfying the following property: if and then there exists a zero-measurable subset of such that if the initial point does not belong in then all tokens converge exponentially to .
C Experiment - Additional Details
C.1 Experimental Setup
We adopt the threshold-based metric of [83], adapted to the hidden attention structure of SSMs. For a given layer and channel , let denote the hidden attention matrix, where is the sequence length. The importance of token in is defined as
We say that channel exhibits an attention sink at the first token if
where is a fixed threshold (we set in our experiments).
The layer-wise sink rate is given by
where is a subset of channels sampled from layer , and . Finally, the model-level sink score is
C.2 Evaluation
To empirically estimate these quantities, we evaluate the Falcon-Mamba-7B model [90] on the dataset of [83], which consists of 170 samples of length . Since each layer contains 4096 channels, we uniformly sample channels per layer to estimate Sink and the overall Sink. We then report Sink as a function of layer depth and the aggregate Sink across tokens in Figure 4. For visualization, we additionally average the softmax-normalized attention matrices across the samples to obtain per-layer attention maps, as shown in Figure 3.