While Transformers have been the main architecture behind deep learning's success in language modeling, state-space models (SSMs) such as Mamba have recently been shown to match or outperform Transformers at small to medium scale. We show that these families of models are actually quite closely related, and develop a rich framework of theoretical connections between SSMs and variants of attention, connected through various decompositions of a well-studied class of structured semiseparable matrices. Our state space duality (SSD) framework allows us to design a new architecture (Mamba-2) whose core layer is an a refinement of Mamba's selective SSM that is 2-8X faster, while continuing to be competitive with Transformers on language modeling.
核心贡献 · Key contributions
建立 SSM 与半可分矩阵变换之间的等价性,揭示新的理论联系。 Establish equivalence between SSMs and semiseparable matrix transformations, revealing new theoretical connections.
提出状态空间对偶(SSD)框架,通过矩阵分解统一 SSM、注意力与结构化矩阵。 Develop state space duality framework unifying SSMs, attention, and structured matrices through matrix decompositions.
推出 Mamba-2,其核心 SSD 层比 Mamba 快 2-8 倍,同时与 Transformer 保持竞争力。 Introduce Mamba-2 whose core SSD layer is 2-8× faster than Mamba while competitive with Transformers.
提出结构化掩码注意力(SMA),将线性注意力推广到任意结构化掩码。 Propose structured masked attention generalizing linear attention to arbitrary structured masks.
开发硬件高效的分块分解算法,训练 FLOPs 为 O(TN²),以矩阵乘法为主导。 Develop hardware-efficient block-decomposition algorithm with O(TN²) training FLOPs dominated by matrix multiplications.
局限 · Limitations
A 矩阵的标量乘单位阵简化相比通用选择性 SSM 降低了表达能力。 Scalar-times-identity simplification of A matrix reduces expressive power versus general selective SSMs.
对偶形式去掉了 softmax,偏离标准注意力;表达性影响尚未充分分析。 Softmax is dropped in dual form, deviating from standard attention; expressivity implications remain unanalyzed.
对偶性仅在标量 SSM 与 1-半可分 SMA 情形建立,不覆盖通用 SSM 族。 Duality established for scalar-identity SSM and 1-semiseparable SMA, not for general SSM families.
实证验证限于中小规模,大规模下的 Scaling 行为尚未证实。 Empirical validation limited to small-to-medium scale; scaling at large scale not demonstrated.
稠密无结构 A 矩阵仍需昂贵预处理,限制了通用结果的实际适用性。 Dense unstructured A matrices still incur expensive preprocessing, limiting practical applicability of general results.
论文章节 · Sections(共 36)
摘要Abstract
2.1 Structured State Space Models2.1 Structured State Space Models
2.2 注意力机制2.2 Attention
2.3 结构化矩阵2.3 Structured Matrices
2.4 概述:结构化状态空间对偶性2.4 Overview: Structured State Space Duality
2.5 Notation2.5 Notation
3 状态空间模型是结构化矩阵3 State Space Models are Structured Matrices