NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

The Illusion of State in State-Space Models

William Merrill, Jackson Petty, Ashish Sabharwal

TL;DR

State-Space Models (SSMs) like Mamba are often hailed as the "recurrent" successors to Transformers, promising better state-tracking abilities. This paper shatters that assumption, proving that current SSMs are theoretically limited to the same complexity class as Transformers ($\mathsf{TC}^0$), meaning they cannot solve "hard" state-tracking problems like permutation composition or complex entity tracking that even simple RNNs handle with ease.

What Problem Does This Paper Address?

Transformers have a well-documented weakness: they struggle with inherently sequential tasks and state tracking. State-Space Models (SSMs), such as S4 and Mamba, were designed to bridge this gap by adopting a recurrent formulation similar to Recurrent Neural Networks (RNNs). The community generally believed that this architectural shift granted SSMs superior expressive power for sequential reasoning.

The authors investigate whether this "recurrent" design actually translates to a theoretical advantage. They specifically look at state tracking—the ability to maintain and update a representation of the world as new information arrives—which is critical for tasks like following a game of chess, evaluating code, or tracking characters in a long novel.

Methods

The authors employ the tools of circuit complexity and algebraic formal language theory.

  1. Complexity Mapping: They prove that linear and diagonal SSMs (the category Mamba and S4 fall into) can be simulated by constant-depth, polynomial-size threshold circuits ($\mathsf{TC}^0$). This is the same class that contains Transformers.
  2. The Word Problem: They frame state tracking as a "word problem" on a finite monoid. They focus on the symmetric group $S_5$ (permutations of five objects). Solving the $S_5$ word problem is $\mathsf{NC}^1$-complete, a class believed to be strictly harder than $\mathsf{TC}^0$.
  3. Architectural Extension: To show how to fix this, they introduce Input-Dependent S4 (IDS4). Unlike standard SSMs where the transition matrix is fixed or diagonal, IDS4 makes the transition matrix fully dependent on the input, allowing it to break out of $\mathsf{TC}^0$ and reach $\mathsf{NC}^1$ expressivity.
Figure 2: Complexity hierarchy within NC1. Transformers can only recognize languages within TC0 (Merrill & Sabhar- wal, 2023a), and we show the same for SSMs (Theorems 4.2 and 4.4). Thus, both architectures cannot express the “hard state tracking” captured by NC1-complete problems like S5, which can be straightforwardly expressed by RNNs. The figure assumes the widely held conjecture TC0 ̸= NC1.

Datasets

The authors use synthetic benchmarks designed to test specific algebraic properties of state tracking:

  • $Z_{60}$: An abelian (commutative) group, representing "easy" state tracking.
  • $A_4 \times Z_5$: A non-abelian but solvable group, representing "medium" difficulty.
  • $A_5$: The alternating group on five elements. This is non-solvable and represents "hard" state tracking (the core of the $S_5$ problem).
  • Real-world proxies: They provide formal reductions showing that tracking chess moves (in UCI notation) and evaluating Python code are equivalent to these hard algebraic problems.

Key Insights and Ideas

  • The "Illusion" of Recurrence: Just because a model has a recurrent formulation (like $h_i = Ah_{i-1} + Bx_i$) doesn't mean it has recurrent expressive power. If the transition matrix $A$ is diagonal or fixed, the whole sequence can be computed in parallel using prefix sums, which limits the model to "shallow" computation.
  • Diagonalization is the Bottleneck: Most modern SSMs use diagonal transition matrices for efficiency. The authors show this efficiency is exactly what prevents them from tracking complex states.
  • Input-Dependence is the Key: For a model to truly track state like an RNN, the way it updates its state must change based on the input it just saw. Mamba (S6) has some input dependence, but because it remains diagonal, it still falls into the $\mathsf{TC}^0$ trap.

Key Results

The experimental results confirm the theory. The authors measured the minimum number of layers required to solve group multiplication as sequence length increased.

  • RNNs and IDS4: These models solved the hardest task ($A_5$) with just one layer, regardless of sequence length.
  • Transformers, S4, and Mamba: These models required the number of layers to increase monotonically with the sequence length to maintain accuracy. This proves they are using depth to "simulate" the recurrence they lack natively.
Figure 3: Minimum number of layers (lower is better) required to attain > 90% validation accuracy on group multiplication problems by sequence length and group. RNN and IDS4 models of constant depth can solve arbitrarily long sequences, while transformer, S4, and Mamba models require depths monotonically increasing in sequence length.

Limitations and Future Work

  • Parallelism vs. Expressivity: The very thing that makes SSMs fast to train (parallelizability) is what limits their state tracking. While IDS4 is more expressive, it might be harder to optimize or scale.
  • Learning Dynamics: The authors noted that while IDS4 can express these functions, training it involves iterated matrix products, which can lead to vanishing or exploding gradients—a classic RNN problem.
  • Scaling to LLMs: It remains an open question whether these more expressive, non-diagonal architectures can be successfully scaled to the size of modern Large Language Models while maintaining their training efficiency.

Summary updated

BibTeX
@inproceedings{merrill2024illusion,
  author = {William Merrill and Jackson Petty and Ashish Sabharwal},
  title = {{The Illusion of State in State-Space Models}},
  booktitle = {International Conference on Machine Learning},
  year = {2024},
  url = {https://openreview.net/forum?id=QZgo9JZpLq},
}
Figure