On Structured State-Space Duality

Jerry Yao-Chieh Hu, Xiwen Zhang, Ali ElSheikh, Weimin Wu, Han Liu
10/6/2025
cs.LGcs.CLcs.CV

No official code found. Best implementation: MAGICS-LAB/state_space_duality (4 stars, Apache-2.0, last commit 2026-01-27).

Abstract

Structured State-Space Duality (SSD) [Dao & Gu, ICML 2024] is an equivalence between a simple Structured State-Space Model (SSM) and a masked attention mechanism. In particular, a state-space model with a scalar-times-identity state matrix is equivalent to a masked self-attention with a $1$-semiseparable causal mask. Consequently, the same sequence transformation (model) has two algorithmic realizations: as a linear-time $O(T)$ recurrence or as a quadratic-time $O(T^2)$ attention. In this note, we formalize and generalize this duality: (i) we extend SSD from the scalar-identity case to general diagonal SSMs (diagonal state matrices); (ii) we show that these diagonal SSMs match the scalar case's training complexity lower bounds while supporting richer dynamics; (iii) we establish a necessary and sufficient condition under which an SSM is equivalent to $1$-semiseparable masked attention; and (iv) we show that such duality fails to extend to standard softmax attention due to rank explosion. Together, these results tighten bridge between recurrent SSMs and Transformers, and widen the design space for expressive yet efficient sequence models.

View on arXivView PDF

Code Implementations(1)

Apache-2.0

On Structured State-Space Duality

41PythonDec 11, 20258 months agoApache-2.0
attention-mechanismmambamasked-attentionstate-spacestate-space-model+2 more

Similar Papers

Cite this paper

@article{hu2025structured,
  title  = {On Structured State-Space Duality},
  author = {Jerry Yao-Chieh Hu and Xiwen Zhang and Ali ElSheikh and Weimin Wu and Han Liu},
  year   = {2025},
  eprint = {2510.04944},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2510.04944v2}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2510.04944.svg)](https://codeofpaper.com/paper/2510.04944)

Discussion