Lune

ICLR2025Top-tier venue

Longhorn: State Space Models are Amortized Online Learners

Bo Liu, Rui Wang, Lemeng Wu, Yihao Feng, Peter Stone, Qiang Liu

Abstract

Modern large language models are built on sequence modeling via next-token prediction. While the Transformer remains the dominant architecture for sequence modeling, its quadratic decoding complexity in sequence length poses a major limitation. State-space models (SSMs) present a competitive alternative, offering linear decoding efficiency while maintaining parallelism during training. However, most existing SSMs rely on linear recurrence designs that appear somewhat ad hoc. In this work, we explore SSM design through the lens of online learning, conceptualizing SSMs as meta-modules for specific online learning problems. This approach links SSM design to formulating precise online learning objectives, with state transition rules derived from solving these objectives. Based on this insight, we introduce a novel deep SSM architecture, Longhorn, whose update resembles the closed-form solution for solving the online associative recall problem. Our experimental results show that Longhorn outperforms state-of-the-art SSMs, including the Mamba model, on standard sequence modeling benchmarks, language modeling, and vision tasks. Specifically, Longhorn achieves a 1.8x improvement in sample efficiency compared to Mamba, and can extrapolate over contexts that are up to 16x longer during inference.

Ask Lune

Know this paper in minutes, not an afternoon.

Lune can read every page of it and the top-tier papers that cite it, and gives you its claims, its evidence and its limits, each one cited to the paper it comes from. No skimming, no AI slop.

19 top-tier papers have cited it since. Know what they found before your reviewers do.

Questions to start from

Lune can draw on

the full paper · the top-tier papers that cite it · related work

Get the answer

Free to start. No credit card required.

Lineage

  • PIQA: Reasoning about Physical Commonsense in Natural Language cites WinoGrande: An Adversarial Winograd Schema Challenge at Scale
  • FlashAttention: Fast and Memory-Efficient Exact Attention with IO-Awareness cites Efficiently Modeling Long Sequences with Structured State Spaces
  • FlashAttention: Fast and Memory-Efficient Exact Attention with IO-Awareness cites Language Models are Few-Shot Learners
  • Titans: Learning to Memorize at Test Time cites PIQA: Reasoning about Physical Commonsense in Natural Language
  • Titans: Learning to Memorize at Test Time cites FlashAttention: Fast and Memory-Efficient Exact Attention with IO-Awareness
  • Titans: Learning to Memorize at Test Time cites Efficiently Modeling Long Sequences with Structured State Spaces
  • Titans: Learning to Memorize at Test Time cites Parallelizing Linear Transformers with the Delta Rule over Sequence Length
  • Titans: Learning to Memorize at Test Time cites WinoGrande: An Adversarial Winograd Schema Challenge at Scale
  • It's All Connected: A Journey Through Test-Time Memorization, Attentional Bias, Retention, and Online Optimization cites PIQA: Reasoning about Physical Commonsense in Natural Language
  • It's All Connected: A Journey Through Test-Time Memorization, Attentional Bias, Retention, and Online Optimization cites Titans: Learning to Memorize at Test Time
  • It's All Connected: A Journey Through Test-Time Memorization, Attentional Bias, Retention, and Online Optimization cites Efficiently Modeling Long Sequences with Structured State Spaces
  • It's All Connected: A Journey Through Test-Time Memorization, Attentional Bias, Retention, and Online Optimization cites Parallelizing Linear Transformers with the Delta Rule over Sequence Length
  • It's All Connected: A Journey Through Test-Time Memorization, Attentional Bias, Retention, and Online Optimization cites WinoGrande: An Adversarial Winograd Schema Challenge at Scale
  • Parallelizing Linear Transformers with the Delta Rule over Sequence Length cites PIQA: Reasoning about Physical Commonsense in Natural Language
  • Parallelizing Linear Transformers with the Delta Rule over Sequence Length cites FlashAttention: Fast and Memory-Efficient Exact Attention with IO-Awareness
  • Parallelizing Linear Transformers with the Delta Rule over Sequence Length cites Efficiently Modeling Long Sequences with Structured State Spaces
  • Parallelizing Linear Transformers with the Delta Rule over Sequence Length cites WinoGrande: An Adversarial Winograd Schema Challenge at Scale
  • Parallelizing Linear Transformers with the Delta Rule over Sequence Length cites Gated Slot Attention for Efficient Linear-Time Sequence Modeling
  • Gated Slot Attention for Efficient Linear-Time Sequence Modeling cites Parallelizing Linear Transformers with the Delta Rule over Sequence Length
  • Language Models are Few-Shot Learners cites WinoGrande: An Adversarial Winograd Schema Challenge at Scale
  • Nested Learning: The Illusion of Deep Learning Architectures cites PIQA: Reasoning about Physical Commonsense in Natural Language
  • Nested Learning: The Illusion of Deep Learning Architectures cites Titans: Learning to Memorize at Test Time
  • Nested Learning: The Illusion of Deep Learning Architectures cites It's All Connected: A Journey Through Test-Time Memorization, Attentional Bias, Retention, and Online Optimization
  • Nested Learning: The Illusion of Deep Learning Architectures cites Parallelizing Linear Transformers with the Delta Rule over Sequence Length
  • Nested Learning: The Illusion of Deep Learning Architectures cites WinoGrande: An Adversarial Winograd Schema Challenge at Scale
  • Nested Learning: The Illusion of Deep Learning Architectures cites Language Models are Few-Shot Learners
  • Gated Slot Attention for Efficient Linear-Time Sequence Modeling cites PIQA: Reasoning about Physical Commonsense in Natural Language
  • Gated Slot Attention for Efficient Linear-Time Sequence Modeling cites FlashAttention: Fast and Memory-Efficient Exact Attention with IO-Awareness
  • Gated Slot Attention for Efficient Linear-Time Sequence Modeling cites WinoGrande: An Adversarial Winograd Schema Challenge at Scale
Builds onCited byLeft to right by year; the more cited, the higher.

Cited by top-tier papers19

  1. Parallelizing Linear Transformers with the Delta Rule over Sequence LengthSonglin Yang, Bailin Wang, Yu Zhang, Yikang Shen et al.NeurIPS 2024 · 412 citations
  2. Titans: Learning to Memorize at Test TimeAli Behrouz, Peilin Zhong, Vahab MirrokniNeurIPS 2025 · 368 citations
  3. Nested Learning: The Illusion of Deep Learning ArchitecturesAli Behrouz, Meisam Razaviyayn, Peilin Zhong, Vahab MirrokniNeurIPS 2025 · 96 citations
  4. Gated Slot Attention for Efficient Linear-Time Sequence ModelingYu Zhang, Songlin Yang, Rui-Jie Zhu, Yue Zhang et al.NeurIPS 2024 · 93 citations
  5. It's All Connected: A Journey Through Test-Time Memorization, Attentional Bias, Retention, and Online OptimizationAli Behrouz, Meisam Razaviyayn, Peilin Zhong, Vahab MirrokniICLR 2026 · 63 citations

Builds on19

  1. Language Models are Few-Shot LearnersTom B. Brown, Benjamin Mann, Nick Ryder, Melanie Subbiah et al.NeurIPS 2020 · 64,255 citations
  2. FlashAttention: Fast and Memory-Efficient Exact Attention with IO-AwarenessTri Dao, Daniel Y. Fu, Stefano Ermon, Atri Rudra et al.NeurIPS 2022 · 5,493 citations
  3. Efficiently Modeling Long Sequences with Structured State SpacesAlbert Gu, Karan Goel, Christopher RéICLR 2022 · 3,482 citations
  4. WinoGrande: An Adversarial Winograd Schema Challenge at ScaleKeisuke Sakaguchi, Ronan Le Bras, Chandra Bhagavatula, Yejin ChoiAAAI 2020 · 3,037 citations
  5. PIQA: Reasoning about Physical Commonsense in Natural LanguageYonatan Bisk, Rowan Zellers, Ronan Le Bras, Jianfeng Gao et al.AAAI 2020 · 2,916 citations

Related papers

  1. The Expressive Capacity of State Space Models: A Formal Language PerspectiveYash Raj Sarrof, Yana Veitsman, Michael HahnNeurIPS 2024 · 53 citations
  2. Trained Mamba Emulates Online Gradient Descent in In-Context Linear RegressionJiarui Jiang, Wei Huang, Miao Zhang, Taiji Suzuki et al.NeurIPS 2025 · 2 citations
  3. Achilles' Heel of Mamba: Essential difficulties of the Mamba architecture demonstrated by synthetic dataTianyi Chen, Pengxiao Lin, Zhiwei Wang, Zhi-Qin John XuNeurIPS 2025 · 4 citations
  4. TransMamba: A Sequence-Level Hybrid Transformer-Mamba Language ModelYixing Li, Ruobing Xie, Zhen Yang, Xingwu Sun et al.AAAI 2026 · 3 citations
  5. Resurrecting Recurrent Neural Networks for Long SequencesAntonio Orvieto, Samuel L. Smith, Albert Gu, Anushan Fernando et al.ICML 2023 · 474 citations
Dusk over the sea between two cliffs drawn in fine vertical lines