Is Mamba Capable of In-Context Learning?
On the map: State-space sequence models (S4, Mamba) → Core SSM architectures for language
Abstract (arXiv)
State of the art foundation models such as GPT-4 perform surprisingly well at in-context learning (ICL), a variant of meta-learning concerning the learned ability to solve tasks during a neural network forward pass, exploiting contextual information provided as input to the model. This useful ability emerges as a side product of the foundation model's massive pretraining. While transformer models are currently the state of the art in ICL, this work provides empirical evidence that Mamba, a newly proposed state space model which scales better than transformers w.r.t. the input sequence length, has similar ICL capabilities. We evaluated Mamba on tasks involving simple function approximation as well as more complex natural language processing problems. Our results demonstrate that, across both categories of tasks, Mamba closely matches the performance of transformer models for ICL. Further analysis reveals that, like transformers, Mamba appears to solve ICL problems by incrementally optimizing its internal representations. Overall, our work suggests that Mamba can be an efficient alternative to transformers for ICL tasks involving long input sequences. This is an exciting finding in meta-learning and may enable generalizations of in-context learned AutoML algorithms (like TabPFN or Optformer) to long input sequences.
Key facts. Cited by 45 papers in the map (data through 7 Oct 2026). Placed in Core SSM architectures for language, one of 10 directions in State-space sequence models (S4, Mamba). Builds on 49 of its 72 references that are in the map. First posted on arXiv 5 Feb 2024.
Builds on
49 of 72 references.
Closest ancestors · 5
Same direction, newest first
- 2023Gated Linear Attention Transformers with Hardware-Efficient Training11 Dec
- 2023Mamba: Linear-Time Sequence Modeling with Selective State Spaces1 Dec
- 2022Simplified State Space Layers for Sequence Modeling9 Aug
- 2022Diagonal State Spaces are as Effective as Structured State Spaces27 Mar
- 2021Efficiently Modeling Long Sequences with Structured State Spaces31 Oct
Other references · 44
- 2017Attention Is All You Needcited by 59,932
- 2020Language Models are Few-Shot Learnerscited by 32,199
- 2023LLaMA: Open and Efficient Foundation Language Modelscited by 13,958
- 2016XGBoost: A Scalable Tree Boosting Systemcited by 5,120
- 2020Longformer: The Long-Document Transformercited by 3,362
- 2020The Pile: An 800GB Dataset of Diverse Text for Language Modelingcited by 2,346
- 2020Transformers are RNNs: Fast Autoregressive Transformers with Linear Attentioncited by 1,979
- 2023Pythia: A Suite for Analyzing Large Language Models Across Training and Scalingcited by 1,734
- 2020Rethinking Attention with Performerscited by 1,584
- 2019Generating Long Sequences with Sparse Transformerscited by 1,523
- 2020Linformer: Self-Attention with Linear Complexitycited by 1,462
- 2020Transformer Feed-Forward Layers Are Key-Value Memoriescited by 1,307
32 more
- 2021Train Short, Test Long: Attention with Linear Biases Enables Input Length Extrapolationcited by 1,085
- 2024Vision Mamba: Efficient Visual Representation Learning with Bidirectional State Space Modelcited by 1,051
- 2020Meta-Learning in Neural Networks: A Surveycited by 944
- 2023Large Language Models as Optimizerscited by 830
- 2023RWKV: Reinventing RNNs for the Transformer Eracited by 814
- 2022Transformers learn in-context by gradient descentcited by 714
- 2022What Can Transformers Learn In-Context? A Case Study of Simple Function Classescited by 700
- 2020Long Range Arena: A Benchmark for Efficient Transformerscited by 696
- 2022What learning algorithm is in-context learning? Investigations with linear modelscited by 671
- 2022TabPFN: A Transformer That Solves Small Tabular Classification Problems in a Secondcited by 643
- 2021Combining Recurrent, Convolutional, and Continuous-time Models with Linear State-Space Layerscited by 607
- 2022Hungry Hungry Hippos: Towards Language Modeling with State Space Modelscited by 495
- 2024U-Mamba: Enhancing Long-range Dependency for Biomedical Image Segmentationcited by 412
- 2021Random Feature Attentioncited by 350
- 2021Transformers Can Do Bayesian Inferencecited by 338
- 2022Data Distributional Properties Drive Emergent In-Context Learning in Transformerscited by 303
- 2023In-Context Learning Creates Task Vectorscited by 302
- 2023Function Vectors in Large Language Modelscited by 292
- 2023Transformers as Statisticians: Provable In-Context Learning with In-Context Algorithm Selectioncited by 291
- 2023Transformers learn to implement preconditioned gradient descent for in-context learningcited by 274
- 2022Long Range Language Modeling via Gated State Spacescited by 265
- 2022It's Raw! Audio Generation with State-Space Modelscited by 171
- 2019Blockwise Self-Attention for Long Document Understandingcited by 158
- 2023The mechanistic basis of data dependence and abrupt learning in an in-context classification taskcited by 115
- 2023Selective Structured State-Spaces for Long-Form Video Understandingcited by 105
- 2023ForecastPFN: Synthetically-Trained Zero-Shot Forecastingcited by 102
- 2021Finetuning Pretrained Transformers into RNNscited by 94
- 2024In-Context Language Learning: Architectures and Algorithmscited by 86
- 2022Towards Learning Universal Hyperparameter Optimizers with Transformerscited by 81
- 2023PFNs4BO: In-Context Learning for Bayesian Optimizationcited by 70
- 2023Efficient Bayesian Learning Curve Extrapolation using Prior-Data Fitted Networkscited by 37
- 2023Is attention required for ICL? Exploring the Relationship Between Model Architecture and In-Context Learning Abilitycited by 16
Built on by
Citing papers per year: 2024: 27; 2025: 13; 2026: 5.
45 papers.
Sort:
By area:
- 2024Transformers are SSMs: Generalized Models and Efficient Algorithms Through Structured State Space Dualitycited by 1,283
- 2024Zamba: A Compact 7B SSM Hybrid Modelcited by 118
- 2024Is Mamba Effective for Time Series Forecasting?cited by 110
- 2024The Hidden Attention of Mamba Modelscited by 88
- 2026Mamba-3: Improved Sequence Modeling using State Space Principlescited by 76
- 2024Gated Slot Attention for Efficient Linear-Time Sequence Modelingcited by 73
- 2024Mamba-360: Survey of State Space Models as Transformer Alternative for Long Sequence Modelling: Methods, Applications, and Challengescited by 63
- 2024State Space Model for New-Generation Network Alternative to Transformers: A Surveycited by 59
- 2024Visual Mamba: A Survey and New Outlookscited by 41
- 2024Locating and Editing Factual Associations in Mambacited by 35
- 2024MTMamba: Enhancing Multi-Task Dense Scene Understanding by Mamba-Based Decoderscited by 22
- 2024Fine-grained Analysis of In-context Linear Estimation: Data, Architecture, and Beyondcited by 22
33 more
- 2024Mamba4Cast: Efficient Zero-Shot Time Series Forecasting with State Space Modelscited by 17
- 2024XLand-100B: A Large-Scale Multi-Task Dataset for In-Context Reinforcement Learningcited by 13
- 2024Everything Everywhere All at Once: LLMs can In-Context Learn Multiple Tasks in Superpositioncited by 13
- 2024Mitigating Copy Bias in In-Context Learning through Neuron Pruningcited by 11
- 2025Gating is Weighting: Understanding Gated Linear Attention through In-context Learningcited by 11
- 2024MTMamba++: Enhancing Multi-Task Dense Scene Understanding via Mamba-Based Decoderscited by 10
- 2024Rethinking Mamba in Speech Processing by Self-Supervised Modelscited by 10
- 2025From Markov to Laplace: How Mamba In-Context Learns Markov Chainscited by 9
- 2025ms-Mamba: Multi-scale Mamba for Time-Series Forecastingcited by 7
- 2024Shaking Up VLMs: Comparing Transformers and Structured State Space Models for Vision & Language Modelingcited by 6
- 2024"Oh LLM, I'm Asking Thee, Please Give Me a Decision Tree": Zero-Shot Decision Tree Induction and Embedding with Large Language Modelscited by 6
- 2024Task Diversity Shortens the ICL Plateaucited by 5
- 2025Resona: Improving Context Copying in Linear Recurrence Models with Retrievalcited by 5
- 2024FACTS: A Factored State-Space Framework For World Modellingcited by 4
- 2025Mamba-Based Graph Convolutional Networks: Tackling Over-smoothing with Selective State Spacecited by 4
- 2025The End of Transformers? On Challenging Attention and the Rise of Sub-Quadratic Architecturescited by 3
- 2024Learning in the Recurrent State: Gradient Descent with Linear Recurrent Networkscited by 2
- 2025How Can Mamba Learn In Context with Outliers and Generalize Provably?cited by 2
- 2025Task Schema and Binding: A Double Dissociation Study of In-Context Learningcited by 2
- 2024EDCSSM: Edge Detection with Convolutional State Space Modelcited by 1
- 2024GAMformer: Bridging Tabular Foundation Models and Interpretable Machine Learningcited by 1
- 2024DeepOSets: Non-Autoregressive In-Context Learning with Permutation-Invariance Inductive Biascited by 1
- 2024Variable Aperture Bokeh Rendering via Customized Focal Plane Guidancecited by 1
- 2025Scaling Algorithm Distillation for Continuous Control with Mambacited by 1
- 2025Mamba Can Learn Low-Dimensional Targets In-Context via Test-Time Feature Learningcited by 1
- 2025Genomic Next-Token Predictors are In-Context Learnerscited by 1
- 2026Retrievit: In-context Retrieval Capabilities of Transformers, State Space Models, and Hybrid Architecturescited by 1
- 2026MamTra: A Hybrid Mamba-Transformer Backbone for Speech Synthesiscited by 1
- 2024Improving VTE Identification through Language Models from Radiology Reports: A Comparative Study of Mamba, Phi-3 Mini, and BERTcited by 0
- 2025What Neuroscience Can Teach AI About Learning in Continuously Changing Environmentscited by 0
- 2025From Text to Trajectories: GPT-2 as an ODE Solver via In-Contextcited by 0
- 2026Dendritic In-Context Learning in a Single-Layer Spiking Neural Networkcited by 0
- 2026On the Importance of Gating: Memorization vs. In-Context Learning in State Space Modelscited by 0
- 2026On the Importance of Gating: Memorization vs. In-Context Learning in State Space Models15 Sep 2026
- 2026Dendritic In-Context Learning in a Single-Layer Spiking Neural Network2 Jul 2026
- 2026Mamba-3: Improved Sequence Modeling using State Space Principles16 Mar 2026
- 2026MamTra: A Hybrid Mamba-Transformer Backbone for Speech Synthesis12 Mar 2026
- 2026Retrievit: In-context Retrieval Capabilities of Transformers, State Space Models, and Hybrid Architectures3 Mar 2026
- 2025Task Schema and Binding: A Double Dissociation Study of In-Context Learning19 Dec 2025
- 2025Genomic Next-Token Predictors are In-Context Learners16 Nov 2025
- 2025Mamba Can Learn Low-Dimensional Targets In-Context via Test-Time Feature Learning14 Oct 2025
- 2025The End of Transformers? On Challenging Attention and the Rise of Sub-Quadratic Architectures6 Oct 2025
- 2025How Can Mamba Learn In Context with Outliers and Generalize Provably?1 Oct 2025
- 2025From Text to Trajectories: GPT-2 as an ODE Solver via In-Context5 Aug 2025
- 2025What Neuroscience Can Teach AI About Learning in Continuously Changing Environments2 Jul 2025
33 more
- 2025Scaling Algorithm Distillation for Continuous Control with Mamba16 Jun 2025
- 2025ms-Mamba: Multi-scale Mamba for Time-Series Forecasting10 Apr 2025
- 2025Gating is Weighting: Understanding Gated Linear Attention through In-context Learning6 Apr 2025
- 2025Resona: Improving Context Copying in Linear Recurrence Models with Retrieval28 Mar 2025
- 2025From Markov to Laplace: How Mamba In-Context Learns Markov Chains14 Feb 2025
- 2025Mamba-Based Graph Convolutional Networks: Tackling Over-smoothing with Selective State Space26 Jan 2025
- 2024FACTS: A Factored State-Space Framework For World Modelling28 Oct 2024
- 2024Variable Aperture Bokeh Rendering via Customized Focal Plane Guidance18 Oct 2024
- 2024Learning in the Recurrent State: Gradient Descent with Linear Recurrent Networks15 Oct 2024
- 2024Mamba4Cast: Efficient Zero-Shot Time Series Forecasting with State Space Models12 Oct 2024
- 2024DeepOSets: Non-Autoregressive In-Context Learning with Permutation-Invariance Inductive Bias11 Oct 2024
- 2024Everything Everywhere All at Once: LLMs can In-Context Learn Multiple Tasks in Superposition8 Oct 2024
- 2024Task Diversity Shortens the ICL Plateau7 Oct 2024
- 2024GAMformer: Bridging Tabular Foundation Models and Interpretable Machine Learning6 Oct 2024
- 2024Mitigating Copy Bias in In-Context Learning through Neuron Pruning2 Oct 2024
- 2024"Oh LLM, I'm Asking Thee, Please Give Me a Decision Tree": Zero-Shot Decision Tree Induction and Embedding with Large Language Models27 Sep 2024
- 2024Rethinking Mamba in Speech Processing by Self-Supervised Models11 Sep 2024
- 2024Gated Slot Attention for Efficient Linear-Time Sequence Modeling11 Sep 2024
- 2024Shaking Up VLMs: Comparing Transformers and Structured State Space Models for Vision & Language Modeling9 Sep 2024
- 2024EDCSSM: Edge Detection with Convolutional State Space Model3 Sep 2024
- 2024MTMamba++: Enhancing Multi-Task Dense Scene Understanding via Mamba-Based Decoders27 Aug 2024
- 2024Improving VTE Identification through Language Models from Radiology Reports: A Comparative Study of Mamba, Phi-3 Mini, and BERT16 Aug 2024
- 2024Fine-grained Analysis of In-context Linear Estimation: Data, Architecture, and Beyond13 Jul 2024
- 2024MTMamba: Enhancing Multi-Task Dense Scene Understanding by Mamba-Based Decoders2 Jul 2024
- 2024XLand-100B: A Large-Scale Multi-Task Dataset for In-Context Reinforcement Learning13 Jun 2024
- 2024Transformers are SSMs: Generalized Models and Efficient Algorithms Through Structured State Space Duality31 May 2024
- 2024Zamba: A Compact 7B SSM Hybrid Model26 May 2024
- 2024Visual Mamba: A Survey and New Outlooks29 Apr 2024
- 2024Mamba-360: Survey of State Space Models as Transformer Alternative for Long Sequence Modelling: Methods, Applications, and Challenges24 Apr 2024
- 2024State Space Model for New-Generation Network Alternative to Transformers: A Survey15 Apr 2024
- 2024Locating and Editing Factual Associations in Mamba4 Apr 2024
- 2024Is Mamba Effective for Time Series Forecasting?17 Mar 2024
- 2024The Hidden Attention of Mamba Models3 Mar 2024
- 2024Transformers are SSMs: Generalized Models and Efficient Algorithms Through Structured State Space Dualitycited by 1,283
- 2024Is Mamba Effective for Time Series Forecasting?cited by 110
- 2024The Hidden Attention of Mamba Modelscited by 88
- 2024Mamba-360: Survey of State Space Models as Transformer Alternative for Long Sequence Modelling: Methods, Applications, and Challengescited by 63
- 2024Visual Mamba: A Survey and New Outlookscited by 41
- 2024Locating and Editing Factual Associations in Mambacited by 35
- 2024MTMamba: Enhancing Multi-Task Dense Scene Understanding by Mamba-Based Decoderscited by 22
- 2024MTMamba++: Enhancing Multi-Task Dense Scene Understanding via Mamba-Based Decoderscited by 10
- 2024Rethinking Mamba in Speech Processing by Self-Supervised Modelscited by 10
- 2025From Markov to Laplace: How Mamba In-Context Learns Markov Chainscited by 9
- 2025ms-Mamba: Multi-scale Mamba for Time-Series Forecastingcited by 7
- 2025Mamba-Based Graph Convolutional Networks: Tackling Over-smoothing with Selective State Spacecited by 4
12 most cited of 17 All 17 (JSON)
- 2026MamTra: A Hybrid Mamba-Transformer Backbone for Speech Synthesis12 Mar 2026
- 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
- 2025Scaling Algorithm Distillation for Continuous Control with Mamba16 Jun 2025
- 2025ms-Mamba: Multi-scale Mamba for Time-Series Forecasting10 Apr 2025
- 2025From Markov to Laplace: How Mamba In-Context Learns Markov Chains14 Feb 2025
- 2025Mamba-Based Graph Convolutional Networks: Tackling Over-smoothing with Selective State Space26 Jan 2025
- 2024Rethinking Mamba in Speech Processing by Self-Supervised Models11 Sep 2024
- 2024MTMamba++: Enhancing Multi-Task Dense Scene Understanding via Mamba-Based Decoders27 Aug 2024
- 2024Improving VTE Identification through Language Models from Radiology Reports: A Comparative Study of Mamba, Phi-3 Mini, and BERT16 Aug 2024
- 2024MTMamba: Enhancing Multi-Task Dense Scene Understanding by Mamba-Based Decoders2 Jul 2024
- 2024Transformers are SSMs: Generalized Models and Efficient Algorithms Through Structured State Space Duality31 May 2024
12 newest of 17 All 17 (JSON)
- 2024FACTS: A Factored State-Space Framework For World Modelling28 Oct 2024
- 2024Zamba: A Compact 7B SSM Hybrid Modelcited by 118
- 2024Gated Slot Attention for Efficient Linear-Time Sequence Modelingcited by 73
- 2024State Space Model for New-Generation Network Alternative to Transformers: A Surveycited by 59
- 2024Fine-grained Analysis of In-context Linear Estimation: Data, Architecture, and Beyondcited by 22
- 2024Mamba4Cast: Efficient Zero-Shot Time Series Forecasting with State Space Modelscited by 17
- 2024XLand-100B: A Large-Scale Multi-Task Dataset for In-Context Reinforcement Learningcited by 13
- 2024Everything Everywhere All at Once: LLMs can In-Context Learn Multiple Tasks in Superpositioncited by 13
- 2024Mitigating Copy Bias in In-Context Learning through Neuron Pruningcited by 11
- 2025Gating is Weighting: Understanding Gated Linear Attention through In-context Learningcited by 11
- 2024"Oh LLM, I'm Asking Thee, Please Give Me a Decision Tree": Zero-Shot Decision Tree Induction and Embedding with Large Language Modelscited by 6
- 2024Task Diversity Shortens the ICL Plateaucited by 5
- 2025Resona: Improving Context Copying in Linear Recurrence Models with Retrievalcited by 5
12 most cited of 25 All 25 (JSON)
- 2026On the Importance of Gating: Memorization vs. In-Context Learning in State Space Models15 Sep 2026
- 2026Dendritic In-Context Learning in a Single-Layer Spiking Neural Network2 Jul 2026
- 2026Retrievit: In-context Retrieval Capabilities of Transformers, State Space Models, and Hybrid Architectures3 Mar 2026
- 2025Task Schema and Binding: A Double Dissociation Study of In-Context Learning19 Dec 2025
- 2025Genomic Next-Token Predictors are In-Context Learners16 Nov 2025
- 2025The End of Transformers? On Challenging Attention and the Rise of Sub-Quadratic Architectures6 Oct 2025
- 2025From Text to Trajectories: GPT-2 as an ODE Solver via In-Context5 Aug 2025
- 2025What Neuroscience Can Teach AI About Learning in Continuously Changing Environments2 Jul 2025
- 2025Gating is Weighting: Understanding Gated Linear Attention through In-context Learning6 Apr 2025
- 2025Resona: Improving Context Copying in Linear Recurrence Models with Retrieval28 Mar 2025
- 2024Variable Aperture Bokeh Rendering via Customized Focal Plane Guidance18 Oct 2024
- 2024Learning in the Recurrent State: Gradient Descent with Linear Recurrent Networks15 Oct 2024
12 newest of 25 All 25 (JSON)
Similar, not cited
Close in wording, no citation either way
- 2024Can Mamba Learn How to Learn? A Comparative Study on In-Context Learning Tasks
- 2025Trained Mamba Emulates Online Gradient Descent in In-Context Linear Regression
- 2024A Survey of Mamba
- 2024An Empirical Study of Mamba-based Language Models
- 2024Can Custom Models Learn In-Context? An Exploration of Hybrid Architecture Performance on In-Context Learning Tasks
- 2025Probing In-Context Learning: Impact of Task Complexity and Model Architecture on Generalization and Efficiency
- 2025Mamba Modulation: On the Length Generalization of Mamba
- 2025Understanding In-Context Learning Beyond Transformers: An Investigation of State Space and Hybrid Architectures