HackerPapers

arXiv:2111.00396cs.LG

Efficiently Modeling Long Sequences with Structured State Spaces

Albert Gu, Karan Goel, Christopher Ré

Abstract

A central goal of sequence modeling is designing a single principled model that can address sequence data across a range of modalities and tasks, particularly on long-range dependencies. Although conventional models including RNNs, CNNs, and Transformers have specialized variants for capturing long dependencies, they still struggle to scale to very long sequences of $10000$ or more steps. A promising recent approach proposed modeling sequences by simulating the fundamental state space model (SSM) \( x'(t) = Ax(t) + Bu(t), y(t) = Cx(t) + Du(t) \), and showed that for appropriate choices of the state matrix \( A \), this system could handle long-range dependencies mathematically and empirically. However, this method has prohibitive computation and memory requirements, rendering it infeasible as a general sequence modeling solution. We propose the Structured State Space sequence model (S4) based on a new parameterization for the SSM, and show that it can be computed much more efficiently than prior approaches while preserving their theoretical strengths. Our technique involves conditioning \( A \) with a low-rank correction, allowing it to be diagonalized stably and reducing the SSM to the well-studied computation of a Cauchy kernel. S4 achieves strong empirical results across a diverse range of established benchmarks, including (i) 91\% accuracy on sequential CIFAR-10 with no data augmentation or auxiliary losses, on par with a larger 2-D ResNet, (ii) substantially closing the gap to Transformers on image and language modeling tasks, while performing generation $60\times$ faster (iii) SoTA on every task from the Long Range Arena benchmark, including solving the challenging Path-X task of length 16k that all prior work fails on, while being as efficient as all competitors.

arXiv comments
ICLR 2022 (Outstanding Paper HM)
Journal reference
DOI
Subjects
cs.LGMachine Learning

On Hacker News

Linked by 2 identifiable commenters in 2 comments across 2 threads, from Feb 2024 to Feb 2025. Found in 1 HN submission from Sep 2023 to Sep 2023. Open submission discussions.

Comments linking this paper, per year.

Discussed in comments2 threads

    • FYI: lately there has been very interesting univariate time series forecasting work mostly by Albert Gu using state space models. https://arxiv.org/abs/2111.00396 https://arxiv.org/pdf/2111.00396.pdf

      djoldmanView on HNParent context

Submitted to Hacker News

  • Ask HN: Transformer alternatives that could have emergent properties when scaled

    I am trying to identify model architecture candidates that could, like transformers, have "emergent" properties when they are scaled (see https://arxiv.org/abs/2206.07682). Some contenders I already know about are: * Monarch Mixer (https://arxiv.org/pdf/2111.00396.pdf) * Hyena (https://hazyresearch.stanford.edu/blog/2023-03-07-hyena) Thanks for your help.

Connected through shared HN threads, not inferred similarity or a recommendation.