HackerPapers

arXiv:2404.08819cs.LG

The Illusion of State in State-Space Models

William Merrill, Jackson Petty, Ashish Sabharwal

Abstract

State-space models (SSMs) have emerged as a potential alternative architecture for building large language models (LLMs) compared to the previously ubiquitous transformer architecture. One theoretical weakness of transformers is that they cannot express certain kinds of sequential computation and state tracking (Merrill & Sabharwal, 2023), which SSMs are explicitly designed to address via their close architectural similarity to recurrent neural networks (RNNs). But do SSMs truly have an advantage (over transformers) in expressive power for state tracking? Surprisingly, the answer is no. Our analysis reveals that the expressive power of SSMs is limited very similarly to transformers: SSMs cannot express computation outside the complexity class $\mathsf{TC}^0$. In particular, this means they cannot solve simple state-tracking problems like permutation composition. It follows that SSMs are provably unable to accurately track chess moves with certain notation, evaluate code, or track entities in a long narrative. To supplement our formal analysis, we report experiments showing that Mamba-style SSMs indeed struggle with state tracking. Thus, despite its recurrent formulation, the "state" in an SSM is an illusion: SSMs have similar expressiveness limitations to non-recurrent models like transformers, which may fundamentally limit their ability to solve real-world state-tracking problems.

arXiv comments
To appear at ICML 2024. 9 pages + appendices
Journal reference
DOI
Subjects
cs.LGMachine Learning cs.CCComputational Complexity cs.CLComputation and Language cs.FLFormal Languages and Automata Theory

On Hacker News

Linked by 4 identifiable commenters in 5 comments across 5 threads, from May 2024 to Jan 2025. Found in 3 HN submissions from Apr 2024 to Jun 2024. Open submission discussions.

Comments linking this paper, per year.

Discussed in comments5 threads

  1. RWKV Language Model 1 comment
    • The formulations in attention as rnn have similar issues as rwkv. Fundamentally it's a question of what we call an RNN. Personally I think it's important not to call some of these recent architectures RNNs because they have theoretical properties that do not match (read: they're…

      shawntanView on HNParent context

  2. Were RNNs all we needed? 1 comment
    • The model in the paper isn't a "real" RNN due making it parallelizable, for same the reasons described in https://arxiv.org/abs/2404.08819 , and hence is theoretically less powerful than a "real" RNN (struggles at some classes of problems that RNNs traditionally excel at). On…

      logicchainsView on HNParent context

    • Quadratic transformers outperform weaker forms of attention on recall tasks, but recurrent models are strictly more powerful than transformers (when they don't use chain of thought) at state tracking problems. Mamba 2 likely has the same limitations with state tracking as a full…

      logicchainsView on HNParent context

    • Recent example of a proof regarding theoretical limitations of Transformers: https://aclanthology.org/2023.tacl-1.31.pdf (also extended to cover SSMs https://arxiv.org/pdf/2404.08819)

      opprobiumView on HNParent context

Submitted to Hacker News

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