矩阵带状注意力机制:Set Transformer 的上下文自适应值投影
文章背景与核心概要
标准的多头注意力机制(Multi-head Attention)结合了依赖于输入的 Softmax 路由和独立于输入的线性值投影。这意味着对于每一个输入集合,其映射聚合值的算子是固定的。本文通过引入“变换自由度”(Transformation Degrees of Freedom, TDOF)这一复杂性度量,深入探讨了这种不对称性对置换不变集合目标的影响。
研究通过深度分离分析证明,传统的“上下文刚性”注意力机制需要与目标 TDOF 成正比的深度才能实现精确表示,而具备上下文自适应值投影的单层结构即可达到同样效果。为此,作者提出了“矩阵带状注意力”(Matrix Zonotopic Attention, MZAttn),通过将固定的值投影替换为上下文自适应的矩阵带状族(由中心矩阵和输入门控生成矩阵组成),在保持置换等变性的同时,显著提升了模型对复杂集合目标的表示能力。
摘要
多头注意力机制结合了依赖于输入的 Softmax 路由和独立于输入的线性值投影,因此将聚合值映射到输出的算子对于每个输入集合都是相同的。我们研究了这种不对称性对置换不变集合目标的影响。我们引入了目标算子的“变换自由度”(TDOF),这是一种衡量精确表示所需的输入依赖方向数量的复杂性指标,并提出了深度分离分析,表明上下文刚性注意力需要与目标的 TDOF 成正比的深度,而具有上下文自适应值族的单层结构可以表示相同的目标。
基于此分析,我们提出了矩阵带状注意力(Matrix Zonotopic Attention, MZAttn),它用上下文自适应的矩阵带状族取代了固定的值投影:即一个中心矩阵加上由输入相关门控加权的生成矩阵之和。该结构在初始化时可退化为标准的多头注意力,保持了置换等变性,并提供了一种数据驱动的可达性解释。在各种集合预测任务上的实验结果与 TDOF 的预测一致,即架构优势具有选择性:它出现在以高秩、稀疏组合方式依赖于输入集合的目标上,而在参数匹配的标准注意力机制已经具有竞争力的聚合统计目标上,其优势较小。
Multi-head attention combines an input-dependent softmax routing with an input-independent linear value projection, so the per-sample operator mapping aggregated values to outputs is the same for every input set. We study the consequences of this asymmetry for permutation-invariant set targets. We introduce the Transformation Degrees of Freedom (TDOF) of a target operator, a complexity measure counting the input-dependent directions an exact representation requires, and present a depth-separation analysis showing that context-rigid attention needs depth proportional to the target's TDOF, whereas a single layer with a context-adaptive value family can represent the same target.
Building on this analysis, we propose Matrix Zonotopic Attention (MZAttn), which replaces the fixed value projection with a context-adaptive matrix-zonotope family: a centre matrix plus a sum of generator matrices weighted by input-dependent gates. The construction reduces to standard multi-head attention at initialisation, preserves permutation equivariance, and admits a data-driven reachability interpretation. Experiments on a range of set-prediction tasks are consistent with the TDOF prediction that the architectural advantage is selective: it appears on targets that depend on the input set in a high-rank, sparsely combinatorial way, and is small on aggregate-statistic targets where parameter-matched standard attention is already competitive.
链接与资源
- 全文访问: 查看 PDF | HTML (实验性) | TeX 源码
- 引用与工具: Google Scholar | Semantic Scholar | NASA ADS
- Full-Text Access: View PDF | HTML (Experimental) | TeX Source
- Citations & Tools: Google Scholar | Semantic Scholar | NASA ADS