mlsanityData to 14 Oct 2026

A Comparative Analysis of Attention versus State-Space Models for In-Context Learning

arXiv 2609.32341 ↗First posted 26 Sep 2026cs.LGcited by 0

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

  1. 2017Attention Is All You Needcited by 60,361
  2. 2023LLaMA: Open and Efficient Foundation Language Modelscited by 14,132
  3. 2023Mamba: Linear-Time Sequence Modeling with Selective State Spacescited by 4,718
  4. 2021Efficiently Modeling Long Sequences with Structured State Spacescited by 2,465
  5. 2020Transformers are RNNs: Fast Autoregressive Transformers with Linear Attentioncited by 2,022
  6. 2024RULER: What's the Real Context Size of Your Long-Context Language Models?cited by 1,346
  7. 2024Transformers are SSMs: Generalized Models and Efficient Algorithms Through Structured State Space Dualitycited by 1,336
  8. 2022In-context Learning and Induction Headscited by 964
  9. 2022Transformers learn in-context by gradient descentcited by 732
  10. 2022What Can Transformers Learn In-Context? A Case Study of Simple Function Classescited by 715
  11. 2022What learning algorithm is in-context learning? Investigations with linear modelscited by 684
  12. 2023Retentive Network: A Successor to Transformer for Large Language Modelscited by 613
38 more
  1. 2024Gated Delta Networks: Improving Mamba2 with Delta Rulecited by 532
  2. 2023Gated Linear Attention Transformers with Hardware-Efficient Trainingcited by 514
  3. 2021Linear Transformers Are Secretly Fast Weight Programmerscited by 502
  4. 2022Hungry Hungry Hippos: Towards Language Modeling with State Space Modelscited by 499
  5. 2020Hopfield Networks is All You Needcited by 475
  6. 2024Jamba: A Hybrid Transformer-Mamba Language Modelcited by 401
  7. 2024Parallelizing Linear Transformers with the Delta Rule over Sequence Lengthcited by 396
  8. 2024Learning to (Learn at Test Time): RNNs with Expressive Hidden Statescited by 355
  9. 2023Trained Transformers Learn Linear Models In-Contextcited by 337
  10. 2024xLSTM: Extended Long Short-Term Memorycited by 327
  11. 2023Transformers as Statisticians: Provable In-Context Learning with In-Context Algorithm Selectioncited by 298
  12. 2023Transformers learn to implement preconditioned gradient descent for in-context learningcited by 279
  13. 2024Griffin: Mixing Gated Linear Recurrences with Local Attention for Efficient Language Modelscited by 242
  14. 2024Repeat After Me: Transformers are Better than State Space Models at Copyingcited by 216
  15. 2024Simple linear attention language models balance the recall-throughput tradeoffcited by 208
  16. 2023Zoology: Measuring and Improving Recall in Efficient Language Modelscited by 204
  17. 2024The Illusion of State in State-Space Modelscited by 187
  18. 2023One Step of Gradient Descent is Provably the Optimal In-Context Learner with One Layer of Linear Self-Attentioncited by 170
  19. 2023Birth of a Transformer: A Memory Viewpointcited by 161
  20. 2025RWKV-7 "Goose" with Expressive Dynamic State Evolutioncited by 141
  21. 2024The Evolution of Statistical Induction Heads: In-Context Learning Markov Chainscited by 118
  22. 2024How Transformers Learn Causal Structure with Gradient Descentcited by 118
  23. 2023In-Context Convergence of Transformerscited by 115
  24. 2024Can Mamba Learn How to Learn? A Comparative Study on In-Context Learning Taskscited by 105
  25. 2024Unlocking State-Tracking in Linear RNNs Through Negative Eigenvaluescited by 101
  26. 2023How Many Pretraining Tasks Are Needed for In-Context Learning of Linear Regression?cited by 96
  27. 2024Training Dynamics of Multi-Head Softmax Attention for In-Context Learning: Emergence, Convergence, and Optimalitycited by 74
  28. 2025Test-time regression: a unifying framework for designing sequence models with associative memorycited by 74
  29. 2024RNNs are not Transformers (Yet): The Key Bottleneck on In-context Retrievalcited by 64
  30. 2024Unveiling Induction Heads: Provable Training Dynamics and Feature Learning in Transformerscited by 50
  31. 2024One-layer transformers fail to solve the induction heads taskcited by 32
  32. 2025In-Context Learning Is Provably Bayesian Inference: A Generalization Theory for Meta-Learningcited by 22
  33. 2024Attention layers provably solve single-location regressioncited by 17
  34. 2025From Markov to Laplace: How Mamba In-Context Learns Markov Chainscited by 11
  35. 2023Covering Number of Real Algebraic Varieties and Beyond: Improved Bounds and Applicationscited by 8
  36. 2024Convergence of Gradient Descent for Recurrent Neural Networks: A Nonasymptotic Analysiscited by 8
  37. 2025Understanding Input Selectivity in Mamba: Impact on Approximation Power, Memorization, and Associative Recall Capacitycited by 7
  38. 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

  1. 2025Contextual Representation Flow Across Depth in State-Space and Transformer Architectures
  2. 2025Constrained belief updates explain geometric structures in transformer representations
  3. 2025Mechanistic evaluation of Transformers and state space models
  4. 2026Bayesian Optimality of In-Context Learning with Selective State Spaces
  5. 2025Eigenvalues as a Metric for Memory Dynamics in Sequence Models
  6. 2026Stories in Space: In-Context Learning Trajectories in Conceptual Belief Space
  7. 2024Understanding the differences in Foundation Models: Attention, State Space Models, and Recurrent Neural Networks
  8. 2026Learning to Remember, Learn, and Forget in Attention-Based Models