On Structured State-Space Duality

Jerry Yao-Chieh Hu, Xiwen Zhang, Ali ElSheikh, Weimin Wu, Han Liu

Introduction

In the current landscape of sequence modeling, two architectures dominate: Transformers and State-Space Models (SSMs). Transformers, powered by self-attention, excel at capturing global dependencies but suffer from a quadratic computational complexity, $O(T^2)$, relative to sequence length. Conversely, SSMs (such as Mamba) offer linear complexity, $O(T)$, through recurrence, making them highly efficient for processing long sequences.

Until recently, the relationship between these two paradigms was largely intuitive. Recent work by Dao & Gu (2024) introduced Structured State-Space Duality (SSD), a mathematical bridge proving that a specific, simple SSM is mathematically equivalent to a masked attention mechanism. However, this foundational theory was restricted to "scalar-identity" matrices, where every state dimension decays at the exact same rate.

This paper formalizes and significantly extends SSD. By generalizing the duality to diagonal state matrices, the authors unlock richer dynamics at no extra computational cost, while also mathematically proving why standard softmax attention remains fundamentally incompatible with this duality.

Theoretical Framework and Methodology

To extend the boundaries of SSD, the authors employ a rigorous mix of linear algebra and matrix theory, focusing specifically on semiseparable matrices.

Generalizing to Diagonal SSMs

The primary theoretical contribution is the proof that an SSM with a diagonal transition matrix $A_t$ is equivalent to a sum of $N$ individual attention heads. Moving from a scalar-identity matrix (a single decay rate) to a diagonal matrix ($N$ distinct decay rates) provides significantly richer modeling dynamics. The authors provide an algorithmic formalization, Algorithm 1 (Diagonal SSD), demonstrating how to compute these richer dynamics in $O(NTd)$ time. Crucially, this matches the asymptotic training complexity of simpler models, offering a "free lunch" in terms of expressivity versus efficiency.

The "New Column" Intuition

To establish the necessary and sufficient conditions for an SSM to have an attention dual, the authors utilize the concept of $N$-semiseparable matrices. They introduce a helpful intuition for understanding SSM state capacity: each "new column" in the induced kernel matrix represents a new, independent direction of information that the hidden state must carry. If a specific block of the sequence requires more independent directions than the state dimension $N$, the duality breaks down.

The Softmax Barrier: Why Standard Attention Fails

A major breakthrough in this paper is the formal proof of why standard Transformer attention—specifically the Softmax operation—cannot be represented as an SSM.

Using Vandermonde determinants and empirical measurements with random Gaussian matrices, the authors analyze the numerical rank growth of attention matrices. They demonstrate that Softmax causes a "rank explosion." Even if the input query and key matrices are strictly low-rank, applying the Softmax function results in an attention matrix that becomes full-rank. Because an SSM's "memory" is strictly bottlenecked by its finite state dimension $N$, it is mathematically incapable of representing the infinite-rank dependencies generated by Softmax.

Empirical Results

The theoretical claims are validated across several benchmarks, confirming both the efficiency and the enhanced expressivity of the generalized SSD framework:

  • Numerical Equivalence: The authors confirmed that their dual attention-like formulation matches the recurrent SSM output to within strict numerical precision (error $\approx 10^{-14}$).
  • Expressivity on Synthetic Tasks: On a custom Mixture-of-Decays time-series regression task, the target signal was composed of multiple different exponential decay rates. A 2-dimensional diagonal SSM easily fit signals that a 1-dimensional scalar SSM fundamentally failed to capture.
  • Improved Generalization: In language modeling tasks using the WikiText-2 dataset, the diagonal variant (SSD-Mamba) achieved a superior validation accuracy of 11.1%, compared to the baseline Mamba's 9.5%. Interestingly, SSD-Mamba achieved this despite fitting the training data less aggressively, suggesting that the diagonal structure acts as a highly beneficial regularizer.
  • Computational Efficiency: The diagonal SSD algorithm successfully maintains linear scaling with sequence length $T$, whereas its explicit attention dual scales quadratically.

Limitations and Future Directions

While the theoretical and empirical results are strong, the authors note a few practical limitations. Most notably, while the asymptotic complexity of Diagonal SSD matches simpler models, there are currently no specialized hardware kernels (like those highly optimized for Mamba) designed specifically for this diagonal structure. Developing these kernels is a critical next step for realizing practical wall-clock speedups.

Furthermore, because exact duality with Softmax is mathematically impossible due to rank explosion, future research could explore which approximations of Softmax best fit the $N$-semiseparable structure required for efficient SSMs. Finally, while the paper establishes the theory for general $N$-semiseparable matrices, fast algorithms for the most general cases remain an open challenge for the sequence modeling community.

Summary updated

BibTeX
@inproceedings{hu2026structured,
  author = {Jerry Yao-Chieh Hu and Xiwen Zhang and Ali ElSheikh and Weimin Wu and Han Liu},
  title = {{On Structured State-Space Duality}},
  booktitle = {International Conference on Machine Learning},
  year = {2026},
  url = {https://openreview.net/forum?id=DKathyl3XN},
}
Figure