A Comparative Analysis of Attention versus State-Space Models for In-Context Learning
Not on the map. Why?
Abstract (arXiv)
Transformers and state-space models (SSMs) are two prominent sequential learning architectures, yet their comparison remains largely empirical and existing theoretical analyses are typically task-specific or architecturally restricted. In this paper, we develop belief geometry, a unified analytical framework for comparing the representational capabilities of broad classes of attention and SSMs. Starting from a generalized formulation of in-context linear regression and using cumulative Bayes regret as our measure, we abstract three capabilities required by many sequential learning problems in our belief geometry: evidence assembly, belief maintenance, and addressing. We then study three cases of our formulation that isolate these capabilities and yield sharp architectural lessons: For belief maintenance, SSMs attain the optimal regret over stationary aggregation kernels; for positional assembly, SSMs have a memory advantage; and for content addressing, softmax attention has an exponential width advantage over sigmoid-selective SSMs. Experiments with LLaMA-type Transformers and Mamba-2 show that these architectural insights extend beyond our analytically tractable classes and linear-regression testbed.
Key facts. No citing papers in the map yet (data through 14 Oct 2026). Builds on 54 of its 66 references that are in the map. First posted on arXiv 26 Sep 2026.
Builds on
54 of 66 references.
References · 54
- 2017Attention Is All You Needcited by 60,361
- 2023LLaMA: Open and Efficient Foundation Language Modelscited by 14,132
- 2023Mamba: Linear-Time Sequence Modeling with Selective State Spacescited by 4,718
- 2021Efficiently Modeling Long Sequences with Structured State Spacescited by 2,465
- 2020Transformers are RNNs: Fast Autoregressive Transformers with Linear Attentioncited by 2,022
- 2024RULER: What's the Real Context Size of Your Long-Context Language Models?cited by 1,346
- 2024Transformers are SSMs: Generalized Models and Efficient Algorithms Through Structured State Space Dualitycited by 1,336
- 2022In-context Learning and Induction Headscited by 964
- 2022Transformers learn in-context by gradient descentcited by 732
- 2022What Can Transformers Learn In-Context? A Case Study of Simple Function Classescited by 715
- 2022What learning algorithm is in-context learning? Investigations with linear modelscited by 684
- 2023Retentive Network: A Successor to Transformer for Large Language Modelscited by 613
38 more
- 2024Gated Delta Networks: Improving Mamba2 with Delta Rulecited by 532
- 2023Gated Linear Attention Transformers with Hardware-Efficient Trainingcited by 514
- 2021Linear Transformers Are Secretly Fast Weight Programmerscited by 502
- 2022Hungry Hungry Hippos: Towards Language Modeling with State Space Modelscited by 499
- 2020Hopfield Networks is All You Needcited by 475
- 2024Jamba: A Hybrid Transformer-Mamba Language Modelcited by 401
- 2024Parallelizing Linear Transformers with the Delta Rule over Sequence Lengthcited by 396
- 2024Learning to (Learn at Test Time): RNNs with Expressive Hidden Statescited by 355
- 2023Trained Transformers Learn Linear Models In-Contextcited by 337
- 2024xLSTM: Extended Long Short-Term Memorycited by 327
- 2023Transformers as Statisticians: Provable In-Context Learning with In-Context Algorithm Selectioncited by 298
- 2023Transformers learn to implement preconditioned gradient descent for in-context learningcited by 279
- 2024Griffin: Mixing Gated Linear Recurrences with Local Attention for Efficient Language Modelscited by 242
- 2024Repeat After Me: Transformers are Better than State Space Models at Copyingcited by 216
- 2024Simple linear attention language models balance the recall-throughput tradeoffcited by 208
- 2023Zoology: Measuring and Improving Recall in Efficient Language Modelscited by 204
- 2024The Illusion of State in State-Space Modelscited by 187
- 2023One Step of Gradient Descent is Provably the Optimal In-Context Learner with One Layer of Linear Self-Attentioncited by 170
- 2023Birth of a Transformer: A Memory Viewpointcited by 161
- 2025RWKV-7 "Goose" with Expressive Dynamic State Evolutioncited by 141
- 2024The Evolution of Statistical Induction Heads: In-Context Learning Markov Chainscited by 118
- 2024How Transformers Learn Causal Structure with Gradient Descentcited by 118
- 2023In-Context Convergence of Transformerscited by 115
- 2024Can Mamba Learn How to Learn? A Comparative Study on In-Context Learning Taskscited by 105
- 2024Unlocking State-Tracking in Linear RNNs Through Negative Eigenvaluescited by 101
- 2023How Many Pretraining Tasks Are Needed for In-Context Learning of Linear Regression?cited by 96
- 2024Training Dynamics of Multi-Head Softmax Attention for In-Context Learning: Emergence, Convergence, and Optimalitycited by 74
- 2025Test-time regression: a unifying framework for designing sequence models with associative memorycited by 74
- 2024RNNs are not Transformers (Yet): The Key Bottleneck on In-context Retrievalcited by 64
- 2024Unveiling Induction Heads: Provable Training Dynamics and Feature Learning in Transformerscited by 50
- 2024One-layer transformers fail to solve the induction heads taskcited by 32
- 2025In-Context Learning Is Provably Bayesian Inference: A Generalization Theory for Meta-Learningcited by 22
- 2024Attention layers provably solve single-location regressioncited by 17
- 2025From Markov to Laplace: How Mamba In-Context Learns Markov Chainscited by 11
- 2023Covering Number of Real Algebraic Varieties and Beyond: Improved Bounds and Applicationscited by 8
- 2024Convergence of Gradient Descent for Recurrent Neural Networks: A Nonasymptotic Analysiscited by 8
- 2025Understanding Input Selectivity in Mamba: Impact on Approximation Power, Memorization, and Associative Recall Capacitycited by 7
- 2025What One Cannot, Two Can: Two-Layer Transformers Provably Represent Induction Heads on Any-Order Markov Chainscited by 5
50 most cited of 54 All 54 (JSON)
Built on by
Not cited yet.
Similar, not cited
Close in wording, no citation either way
- 2025Contextual Representation Flow Across Depth in State-Space and Transformer Architectures
- 2025Constrained belief updates explain geometric structures in transformer representations
- 2025Mechanistic evaluation of Transformers and state space models
- 2026Bayesian Optimality of In-Context Learning with Selective State Spaces
- 2025Eigenvalues as a Metric for Memory Dynamics in Sequence Models
- 2026Stories in Space: In-Context Learning Trajectories in Conceptual Belief Space
- 2024Understanding the differences in Foundation Models: Attention, State Space Models, and Recurrent Neural Networks
- 2026Learning to Remember, Learn, and Forget in Attention-Based Models