Files
myWiki/concepts/tensor-contraction-duality.md

51 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: "张量收缩对偶 (Tensor Contraction Duality)"
created: 2026-06-18
updated: 2026-06-18
type: concept
tags: [mathematics, duality, ssm, attention]
sources:
- dao-transformers-are-ssms-2024
---
# 张量收缩对偶 (Tensor Contraction Duality)
张量收缩对偶是 Dao & Gu (2024) 揭示 [[structured-state-space-duality|SSD]] 框架的**两种互补视角之一**——从双线性形式的张量收缩导出 SSM ↔ Attention 的对偶。
## 两种视角
### 视角 1矩阵变换
```
Y = M · X
M_ij = C_i^T A_{i-1} ... A_{j+1} B_j
```
- 将 SSM 看作参数化矩阵 M 的乘法
- M 属于 [[semiseparable-matrices|半可分矩阵]] 家族
### 视角 2张量收缩
```
序列变换 = 张量收缩(Z, X)
```
- 将 SSM 和 Attention 统一为张量上的相同收缩模式
- Z 的秩和结构决定了是线性SSM还是二次Attention形式
## 对偶的本质
两种视角等价但揭示不同属性:
| 视角 | 揭示 | 适合 |
|------|------|------|
| 矩阵变换 | 结构化矩阵、分块算法 | 高效实现SSD 算法) |
| 张量收缩 | 对偶性、注意力连接 | 理论分析、框架统一 |
## 在证明中的应用
张量收缩视角提供了线性注意力的**新证明**——从张量收缩的双线性形式直接导出其循环形式,比 Katharopoulos et al. (2020) 的原始证明更简洁。
## 参考
- [[structured-state-space-duality|SSD]]
- [[semiseparable-matrices|半可分矩阵]]
- [[structured-masked-attention|SMA]]
- [[dao-transformers-are-ssms-2024|论文]]