arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2605.18826cs.LGcs.AI
收藏

注意力的路由和过滤结构

The Routing and Filtering Structure of Attention

University of Southern California(南加州大学)

Shafayeth Jamil, Rehan Kapadia

AI总结:

本文研究了注意力机制中的路由和过滤结构,通过分解1776个预训练Transformer的头部,发现路由在低秩状态下运行,并引入S-D注意力作为诊断参数化方法,分离路由和过滤,实现稳定训练和有效降维。

摘要:

注意力交互矩阵$QK^{ op}$包含两个交织的计算:一个斜对称成分用于在位置间重新分配信息(路由),一个对称成分用于缩放相互相关性(过滤)。我们分解了五个预训练Transformer中的1776个头部,发现路由在低秩状态下运行,远低于权重核分配的路由能力。我们引入了S-D注意力作为诊断参数化方法,通过构造分离路由和过滤,保证稳定性($\mathrm{Re}(λ) \le 0$)并稳定训练而无需层归一化。当分离和未归一化时,路由自组织成一个谱级联,第一层的有效秩为2,随着深度扩展到六个尺度,从7M到355M参数。级联预测了注意力可以简化的位置:线性化125M S-D注意力的前七层成本低于5%的困惑度,而标准注意力在相同干预下崩溃。可线性化的区域随着深度扩大。用ELU+1线性注意力替换前四层,可在完整头部维度内达到基线的1.4%以内。级联分配的架构用注意力参数换取困惑度(47%-65%更少的注意力参数,+3.9%到+8.4% PPL)。路由-过滤分解使谱预算变得清晰;级联使其具有可操作性。

英文摘要:

The attention interaction matrix $QK^{\top}$ contains two entangled computations: a skew-symmetric component that redistributes information between positions (routing) and a symmetric component that scales mutual relevance (filtering). We decompose 1776 heads across five pretrained transformers and find routing operating at low rank, well below the routing capacity allocated by the weight kernel. We introduce $S$-$D$ attention as a diagnostic parameterization that disentangles routing from filtering by construction with guaranteed stability ($\mathrm{Re}(λ) \le 0$) and trains stably without layer normalization. When disentangled and unnormalized, routing self-organizes into a spectral cascade, effective rank $2$ at the first layer, expanding with depth across six scales from 7M to 355M parameters. The cascade predicts where attention can be simplified: linearizing the first seven layers of 125M $S$-$D$ attention costs ${<}5\%$ perplexity, whereas standard attention collapses under the same intervention. The linearizable region widens with depth. Replacing the first four layers with ELU+1 linear attention reaches within $1.4\%$ of baseline at full head dimension. Cascade-allocated architectures trade attention parameters for perplexity ($47\%-65\%$ fewer attention parameters at $+3.9\%$ to $+8.4\%$ PPL). The routing-filtering decomposition makes the spectral budget legible; the cascade makes it actionable.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑