mlsanityData to 7 Oct 2026

Retrievit: In-context Retrieval Capabilities of Transformers, State Space Models, and Hybrid Architectures

arXiv 2603.02874 ↗First posted 3 Mar 2026cs.AIcited by 1

Not on the map. Why?

Abstract (arXiv)

Transformers excel at in-context retrieval but suffer from quadratic complexity with sequence length, while State Space Models (SSMs) offer efficient linear-time processing but have limited retrieval capabilities. We investigate whether hybrid architectures combining Transformers and SSMs can achieve the best of both worlds on two synthetic in-context retrieval tasks. The first task, n-gram retrieval, requires the model to reproduce an n-gram that succeeds the query within the input sequence. The second task, position retrieval, presents the model with a query token and requires it to perform a two-hop lookup: first locating the corresponding element in the sequence, and then outputting its positional index. Under controlled conditions, we assess data efficiency, length generalization, robustness to out of domain training examples, and learned representations across Transformers, SSMs, and hybrid architectures. We find that hybrid models outperform SSMs and match or exceed Transformers in terms of data efficiency and extrapolation for tasks that require precise information retrieval from the input context. However, Transformers maintain superiority in position retrieval tasks. Through representation analysis, we discover that SSM-based models develop locality-aware embeddings where tokens representing adjacent positions become neighbors in embedding space, forming interpretable structures. This property is absent in Transformers as causal attention is sufficient for acquiring positional associations, and the introduction of positional encoding amplifies this behavior, leading to improvement in data efficiency. SSMs on the other hand update their internal representations incrementally and without positional encodings, are required to learn these associations. Our findings reveal fundamental differences in how Transformers and SSMs, and hybrid models learn positional associations.

Key facts. Cited by 1 paper in the map (data through 7 Oct 2026). Builds on 47 of its 54 references that are in the map. First posted on arXiv 3 Mar 2026.

Builds on

47 of 54 references.

References · 47

  1. 2017Attention Is All You Needcited by 59,932
  2. 2018BERT: Pre-training of Deep Bidirectional Transformers for Language Understandingcited by 40,204
  3. 2021Learning Transferable Visual Models From Natural Language Supervisioncited by 33,456
  4. 2020Language Models are Few-Shot Learnerscited by 32,199
  5. 2020An Image is Worth 16x16 Words: Transformers for Image Recognition at Scalecited by 29,915
  6. 2022Training language models to follow instructions with human feedbackcited by 15,712
  7. 2020Retrieval-Augmented Generation for Knowledge-Intensive NLP Taskscited by 9,160
  8. 2020Scaling Laws for Neural Language Modelscited by 6,411
  9. 2023Mamba: Linear-Time Sequence Modeling with Selective State Spacescited by 4,616
  10. 2021RoFormer: Enhanced Transformer with Rotary Position Embeddingcited by 4,581
  11. 2023RT-2: Vision-Language-Action Models Transfer Web Knowledge to Robotic Controlcited by 2,993
  12. 2024OpenVLA: An Open-Source Vision-Language-Action Modelcited by 2,777
35 more
  1. 2021Efficiently Modeling Long Sequences with Structured State Spacescited by 2,424
  2. 2020Reformer: The Efficient Transformercited by 1,658
  3. 2024Transformers are SSMs: Generalized Models and Efficient Algorithms Through Structured State Space Dualitycited by 1,283
  4. 2021Train Short, Test Long: Attention with Linear Biases Enables Input Length Extrapolationcited by 1,085
  5. 2021Multimodal Few-Shot Learning with Frozen Language Modelscited by 657
  6. 2014Neural Turing Machinescited by 630
  7. 2023YaRN: Efficient Context Window Extension of Large Language Modelscited by 584
  8. 2024SeeClick: Harnessing GUI Grounding for Advanced Visual GUI Agentscited by 553
  9. 2024TinyVLA: Towards Fast, Data-Efficient Vision-Language-Action Models for Robotic Manipulationcited by 331
  10. 2023The Impact of Positional Encoding on Length Generalization in Transformerscited by 319
  11. 2024LongRoPE: Extending LLM Context Window Beyond 2 Million Tokenscited by 302
  12. 2019Compositionality decomposed: how do neural networks generalise?cited by 264
  13. 2024Griffin: Mixing Gated Linear Recurrences with Local Attention for Efficient Language Modelscited by 232
  14. 2024Repeat After Me: Transformers are Better than State Space Models at Copyingcited by 208
  15. 2023Zoology: Measuring and Improving Recall in Efficient Language Modelscited by 188
  16. 2024The Illusion of State in State-Space Modelscited by 181
  17. 2022It's Raw! Audio Generation with State-Space Modelscited by 171
  18. 2024Samba: Simple Hybrid State Space Models for Efficient Unlimited Context Language Modelingcited by 167
  19. 2016Using Fast Weights to Attend to the Recent Pastcited by 161
  20. 2024Zamba: A Compact 7B SSM Hybrid Modelcited by 118
  21. 2023PoSE: Efficient Context Window Extension of LLMs via Positional Skip-wise Trainingcited by 109
  22. 2024Hymba: A Hybrid-head Architecture for Small Language Modelscited by 95
  23. 2025Nemotron-H: A Family of Accurate and Efficient Hybrid Mamba-Transformer Modelscited by 88
  24. 2024In-Context Language Learning: Architectures and Algorithmscited by 86
  25. 2024Theoretical Foundations of Deep Selective State-Space Modelscited by 73
  26. 2024RNNs are not Transformers (Yet): The Key Bottleneck on In-context Retrievalcited by 62
  27. 2024Jamba-1.5: Hybrid Transformer-Mamba Models at Scalecited by 48
  28. 2020The EOS Decision and Length Extrapolationcited by 46
  29. 2024Is Mamba Capable of In-Context Learning?cited by 45
  30. 2024Understanding Factual Recall in Transformers via Associative Memoriescited by 45
  31. 2022Temporal Sentence Grounding in Videos: A Survey and Future Directionscited by 37
  32. 2019Location Attention for Extrapolation to Longer Sequencescited by 33
  33. 2025Self-Improving Transformers Overcome Easy-to-Hard and Length Generalization Challengescited by 30
  34. 2017The Galactic Dependencies Treebanks: Getting More Data by Synthesizing New Languagescited by 19
  35. 2024Shaking Up VLMs: Comparing Transformers and Structured State Space Models for Vision & Language Modelingcited by 6

Built on by

Cited by year (2026 to 7 Oct)

Citing papers per year: 2026: 1.

1 paper.

Similar, not cited

Close in wording, no citation either way

  1. 2026Retrieval-Aware Distillation for Transformer-SSM Hybrids
  2. 2025Understanding the Skill Gap in Recurrent Language Models: The Role of the Gather-and-Aggregate Mechanism
  3. 2025Mechanistic evaluation of Transformers and state space models
  4. 2024State Space Models are Strong Text Rerankers
  5. 2026Long-Context Modeling via GSS-Transformer Hybrid Architecture with Learnable Mixing
  6. 2025A Comparative Analysis of Contextual Representation Flow in State-Space and Transformer Architectures
  7. 2026Tevatron-Elastic: A Unified Abstraction for Training Elastic Retrievers and Rerankers
  8. 2025Overcoming Long-Context Limitations of State-Space Models via Context-Dependent Sparse Attention