From Markov to Laplace: How Mamba In-Context Learns Markov Chains
On the map: State-space sequence models (S4, Mamba) → Core SSM architectures for language
Abstract (arXiv)
While transformer-based language models have driven the AI revolution thus far, their computational complexity has spurred growing interest in viable alternatives, such as structured state space sequence models (SSMs) and Selective SSMs. Among these, Mamba (S6) and its variant Mamba-2 have shown remarkable inference speed-ups over transformers while achieving comparable or superior performance on complex language modeling tasks. However, despite these architectural innovations and empirical successes, the fundamental learning capabilities of Mamba remain poorly understood. In this paper, we address this gap by studying in-context learning (ICL) on Markov chains and uncovering an interesting phenomenon: even a single-layer Mamba efficiently learns the in-context Laplacian smoothing estimator, which is both Bayes and minimax optimal. To explain this, we theoretically characterize the representation capacity of Mamba and reveal the fundamental role of convolution in enabling it to represent the optimal Laplacian smoothing. These theoretical insights align strongly with empirical results and, to the best of our knowledge, represent the first formal connection between Mamba and optimal statistical estimators. Finally, we outline promising research directions inspired by these findings.
Key facts. Cited by 11 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 35 of its 50 references that are in the map. First posted on arXiv 14 Feb 2025.
Builds on
35 of 50 references.
Closest ancestors · 8
Same direction, newest first
- 2024Jamba-1.5: Hybrid Transformer-Mamba Models at Scale22 Aug
- 2024Mamba-Spike: Enhancing the Mamba Architecture with a Spiking Front-End for Efficient Temporal Data Processing4 Aug
- 2024Transformers are SSMs: Generalized Models and Efficient Algorithms Through Structured State Space Duality31 May
- 2024Theoretical Foundations of Deep Selective State-Space Models29 Feb
- 2024Can Mamba Learn How to Learn? A Comparative Study on In-Context Learning Tasks6 Feb
- 2024Is Mamba Capable of In-Context Learning?5 Feb
- 2023Mamba: Linear-Time Sequence Modeling with Selective State Spaces1 Dec
- 2023Structured State Space Models for In-Context Reinforcement Learning7 Mar
Other references · 27
- 2017Attention Is All You Needcited by 60,361
- 2018BERT: Pre-training of Deep Bidirectional Transformers for Language Understandingcited by 40,399
- 2014Adam: A Method for Stochastic Optimizationcited by 37,240
- 2024Vision Mamba: Efficient Visual Representation Learning with Bidirectional State Space Modelcited by 1,056
- 2021An Explanation of In-context Learning as Implicit Bayesian Inferencecited by 938
- 2021Combining Recurrent, Convolutional, and Continuous-time Models with Linear State-Space Layerscited by 608
- 2020HiPPO: Recurrent Memory with Optimal Polynomial Projectionscited by 605
- 2023Resurrecting Recurrent Neural Networks for Long Sequencescited by 408
- 2024xLSTM: Extended Long Short-Term Memorycited by 327
- 2023In-Context Learning Creates Task Vectorscited by 312
- 2023Transformers as Statisticians: Provable In-Context Learning with In-Context Algorithm Selectioncited by 298
- 2024Griffin: Mixing Gated Linear Recurrences with Local Attention for Efficient Language Modelscited by 242
15 more
- 2024Repeat After Me: Transformers are Better than State Space Models at Copyingcited by 216
- 2024The Illusion of State in State-Space Modelscited by 187
- 2024The Evolution of Statistical Induction Heads: In-Context Learning Markov Chainscited by 118
- 2024How Transformers Learn Causal Structure with Gradient Descentcited by 118
- 2024In-Context Language Learning: Architectures and Algorithmscited by 89
- 2024MoEUT: Mixture-of-Experts Universal Transformerscited by 59
- 2024The Expressive Capacity of State Space Models: A Formal Language Perspectivecited by 46
- 2023State-space Models with Layer-wise Nonlinearity are Universal Approximators with Exponential Decaying Memorycited by 39
- 2024One-layer transformers fail to solve the induction heads taskcited by 32
- 2024Separations in the Representational Capabilities of Transformers and Recurrent Architecturescited by 29
- 2024Transformers on Markov Data: Constant Depth Sufficescited by 27
- 2018On Learning Markov Chainscited by 13
- 2024Local to Global: Learning Dynamics and Effect of Initialization for Transformerscited by 11
- 2024Batch Universal Predictioncited by 3
- 2024HiPPO-Prophecy: State-Space Models can Provably Learn Dynamical Systems in Contextcited by 3
Built on by
Citing papers per year: 2025: 6; 2026: 5.
11 papers.
- 2025Schr"odinger Bridge Mamba for One-Step Speech Enhancementcited by 3
- 2025Trained Mamba Emulates Online Gradient Descent in In-Context Linear Regressioncited by 2
- 2025How Can Mamba Learn In Context with Outliers and Generalize Provably?cited by 2
- 2025Mamba Can Learn Low-Dimensional Targets In-Context via Test-Time Feature Learningcited by 1
- 2025KOSS: Kalman-Optimal Selective State Spaces for Long-Term Sequence Modelingcited by 1
- 2026Bayesian Optimality of In-Context Learning with Selective State Spacescited by 1
- 2026Effective Context in Transformers: An Analysis of Fragmentation and Tokenizationcited by 1
- 2025From Text to Trajectories: GPT-2 as an ODE Solver via In-Contextcited by 0
- 2026How Wrong Can a Good Predictor Be? Diverging Updates with Vanishing Predictive KLcited by 0
- 2026A Comparative Analysis of Attention versus State-Space Models for In-Context Learningcited by 0
- 2026Learning Source Structure: Bayesian Prediction with Transformerscited by 0
- 2026Learning Source Structure: Bayesian Prediction with Transformers13 Oct 2026
- 2026A Comparative Analysis of Attention versus State-Space Models for In-Context Learning26 Sep 2026
- 2026How Wrong Can a Good Predictor Be? Diverging Updates with Vanishing Predictive KL10 Sep 2026
- 2026Effective Context in Transformers: An Analysis of Fragmentation and Tokenization13 May 2026
- 2026Bayesian Optimality of In-Context Learning with Selective State Spaces19 Feb 2026
- 2025KOSS: Kalman-Optimal Selective State Spaces for Long-Term Sequence Modeling18 Dec 2025
- 2025Schr"odinger Bridge Mamba for One-Step Speech Enhancement19 Oct 2025
- 2025Mamba Can Learn Low-Dimensional Targets In-Context via Test-Time Feature Learning14 Oct 2025
- 2025How Can Mamba Learn In Context with Outliers and Generalize Provably?1 Oct 2025
- 2025Trained Mamba Emulates Online Gradient Descent in In-Context Linear Regression28 Sep 2025
- 2025From Text to Trajectories: GPT-2 as an ODE Solver via In-Context5 Aug 2025
Similar, not cited
Close in wording, no citation either way
- 2024An Empirical Study of Mamba-based Language Models
- 2026Mamba-3: Improved Sequence Modeling using State Space Principles
- 2024A Survey of Mamba
- 2024Bi-Mamba: Towards Accurate 1-Bit State Space Models
- 2025Block-Biased Mamba for Long-Range Sequence Processing
- 2024MambaLRP: Explaining Selective State Space Sequence Models
- 2024Revealing and Mitigating the Local Pattern Shortcuts of Mamba
- 2025Mamba Modulation: On the Length Generalization of Mamba