Trained Mamba Emulates Online Gradient Descent in In-Context Linear Regression
On the map: State-space sequence models (S4, Mamba) → Core SSM architectures for language
Abstract (arXiv)
State-space models (SSMs), particularly Mamba, emerge as an efficient Transformer alternative with linear complexity for long-sequence modeling. Recent empirical works demonstrate Mamba's in-context learning (ICL) capabilities competitive with Transformers, a critical capacity for large foundation models. However, theoretical understanding of Mamba's ICL remains limited, restricting deeper insights into its underlying mechanisms. Even fundamental tasks such as linear regression ICL, widely studied as a standard theoretical benchmark for Transformers, have not been thoroughly analyzed in the context of Mamba. To address this gap, we study the training dynamics of Mamba on the linear regression ICL task. By developing novel techniques tackling non-convex optimization with gradient descent related to Mamba's structure, we establish an exponential convergence rate to ICL solution, and derive a loss bound that is comparable to Transformer's. Importantly, our results reveal that Mamba can perform a variant of textitonline gradient descent to learn the latent function in context. This mechanism is different from that of Transformer, which is typically understood to achieve ICL through gradient descent emulation. The theoretical results are verified by experimental simulation.
Key facts. Cited by 2 papers in the map (data through 14 Oct 2026). Placed in Core SSM architectures for language, one of 10 directions in State-space sequence models (S4, Mamba). Builds on 11 of its 46 references that are in the map. First posted on arXiv 28 Sep 2025.
Builds on
11 of 46 references.
Closest ancestors · 2
Same direction, newest first
- 2025From Markov to Laplace: How Mamba In-Context Learns Markov Chains14 Feb
- 2024Mamba-360: Survey of State Space Models as Transformer Alternative for Long Sequence Modelling: Methods, Applications, and Challenges24 Apr
Other references · 9
- 2023In-Context Convergence of Transformerscited by 115
- 2025ATLAS: Learning to Optimally Memorize the Context at Test Timecited by 66
- 2025It's All Connected: A Journey Through Test-Time Memorization, Attentional Bias, Retention, and Online Optimizationcited by 64
- 2025Training Dynamics of In-Context Learning in Linear Attentioncited by 46
- 2024On the Training Convergence of Transformers for In-Context Classification of Gaussian Mixturescited by 15
- 2024MLPs Learn In-Context on Regression and Classification Taskscited by 13
- 2025Gating is Weighting: Understanding Gated Linear Attention through In-context Learningcited by 12
- 2024Learning in the Recurrent State: Gradient Descent with Linear Recurrent Networkscited by 3
- 2024SPMamba: State-space model is all you need in speech separationcited by 1
Built on by
Citing papers per year: 2025: 1; 2026: 1.
2 papers.
Similar, not cited
Close in wording, no citation either way
- 2024Is Mamba Capable of In-Context Learning?
- 2024Can Mamba Learn How to Learn? A Comparative Study on In-Context Learning Tasks
- 2024A Survey of Mamba
- 2023Transformers Learn to Achieve Second-Order Convergence Rates for In-Context Linear Regression
- 2025How Can Mamba Learn In Context with Outliers and Generalize Provably?
- 2025Mamba Modulation: On the Length Generalization of Mamba
- 2024Decision Mamba: Reinforcement Learning via Hybrid Selective Sequence Modeling
- 2026A Theoretical Analysis of Mamba's Training Dynamics: Filtering Relevant Features for Generalization in State Space Models