Files
myWiki/concepts/semiseparable-matrices.md

48 lines
1.5 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

---
title: "半可分矩阵 (Semiseparable Matrices)"
created: 2026-06-18
updated: 2026-06-18
type: concept
tags: [mathematics, structured-matrices, ssm, attention]
sources:
- dao-transformers-are-ssms-2024
---
# 半可分矩阵 (Semiseparable Matrices)
半可分矩阵是 Dao & Gu (2024) 用来**桥接 SSM 和 Attention** 的结构化矩阵家族。这是经典数值线性代数中的概念,首次被引入深度学习。
## 定义
矩阵 M ∈ R^(T×T) 是半可分的,如果:
- **子二次参数**:可以用 O(T) 而非 O(T²) 参数表示
- **快速乘法**:存在 O(T) 的矩阵-向量乘法算法
## 与 SSM 的等价
核心定理:**SSM 算子等价于半可分矩阵乘法**
```
Y = SSM(A, B, C)(X) ⇔ Y = M · X
```
其中 M 的结构由 (A_t, B_t, C_t) 参数化:
- M_ij = C_i^T A_{i-1} ... A_{j+1} B_j当 i ≥ j
- M_ij = 0当 i < j因果性
## 为什么是"桥梁"
| 视角 | 计算方式 | 对应的数据结构 |
|------|:--:|------|
| SSM循环 | 逐步扫描 | M O(T) 压缩表示 |
| Attention对偶 | M 的显式乘法 | M O(T²) 展开形式 |
## SSD 算法的关键
[[ssd-algorithm|SSD 算法]] 利用**块分解**在半可分矩阵上实现最优权衡——不完全是 O(T) 也不完全是 O(T²)而是在现代硬件GPU Tensor Core上取最优的中间粒度
## 参考
- [[structured-state-space-duality|SSD]]
- [[ssd-algorithm|SSD 算法]]
- [[structured-masked-attention|SMA]]
- [[dao-transformers-are-ssms-2024|论文]]