arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2610.23242cs.LG
收藏

Transformer中的各向异性表示动力学

A Mixture-Gated Theory of Anisotropic Representation Dynamics in Transformers

University of Florida(佛罗里达大学)

Nguyen Do, My T. Thai

AI总结:

本研究提出混合门控理论分析Transformer各向异性表示动力学,推导谱准则刻画门控诱导的状态切换,经四种Transformer架构实验验证,为注意力路由改变局部表示动力学提供机制与谱层面理解。

摘要:

内部表示之间的微小差异在通过Transformer层时会收缩或增长,这会影响信息的保留方式以及模型对扰动的敏感性。然而,目前仍不清楚注意力权重的变化何时能将原本会收缩的表示差异转变为会增长的差异。我们提出了**各向异性表示动力学的混合门控理论(Mixture-Gated Theory of Anisotropic Representation Dynamics)**,该理论将自注意力分解为值传输(value transport)、查询门控(query gating)和键门控(key gating)。我们的分析揭示了被关注表示的几何结构如何约束门控,以及这些机制之间的相互作用如何逆转由值传输引起的收缩。我们将这一现象形式化为门控诱导的状态切换(gating-induced regime switching),即表示差异在固定注意力路由下收缩,但在全注意力(full attention)下扩张。我们推导了一个充要的谱准则,该准则可在无需穷举搜索的情况下证明切换的存在或不存在,并确定切换方向。除了存在性,我们的理论还刻画了最大相对切换强度,证明了门控可克服的收缩严重程度,并确定了每个非零方向都发生切换的子空间的最大维度。在四种Transformer架构上进行的实验通过解析和有限前向比较验证了这些预测,揭示了不同的查询-键门控机制以及非平凡的切换子空间。我们的结果为注意力路由如何改变局部表示动力学提供了一种机制和谱层面的理解。

英文摘要:

Small differences between internal representations can shrink or grow as they pass through a Transformer layer, affecting how information is preserved and how sensitive the model is to perturbations. Yet it remains unclear when changes in attention weights can turn a representation difference that would otherwise shrink into one that grows. We develop a Mixture-Gated Theory of Anisotropic Representation Dynamics that separates self-attention into value transport, query gating, and key gating. Our analysis reveals how the geometry of attended representations constrains gating and how interactions between these mechanisms can reverse contraction induced by value transport. We formalize this phenomenon as gating-induced regime switching, where a representation difference contracts under fixed attention routing but expands under full attention. We derive a necessary and sufficient spectral criterion that certifies the existence or absence of switching and identifies switching directions without exhaustive search. Beyond existence, our theory characterizes maximum relative switching strength, certifies the severity of contraction that gating can overcome, and determines the largest dimension of a subspace in which every nonzero direction switches. Experiments across four Transformer architectures validate these predictions through analytical and finite-forward comparisons, revealing distinct and joint query--key gating mechanisms and nontrivial switching subspaces. Our results provide a mechanistic and spectral understanding of how attention routing can alter local representation dynamics.

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

↑