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

贡献权重:自注意力Transformer的几何分析

Contribution Weights: A Geometrical Analysis of Self-Attention Transformers

University of Cambridge(剑桥大学)

Harry Jake Cunningham, Nicola Muca Cirone

AI总结:

提出基于投影的贡献权重度量,结合注意力权重、值向量大小和方向对齐,更准确识别关键令牌,并揭示注意力汇的主动抑制功能。

摘要:

分析注意力权重已成为解释大型语言模型(LLM)信息流的标准方法。然而,这种方法有显著局限性,因为它忽略了被聚合的值向量的几何特性。为了解决这个问题,我们引入了\emph{贡献权重},这是一种基于投影的度量,通过考虑令牌的注意力权重、值大小以及与层输出的方向对齐来量化令牌的影响。我们证明,贡献权重提供了更忠实的令牌重要性度量,在不同解码器模型、任务和数据集中,始终优于基于注意力的度量,用于识别语义关键令牌。此外,我们的度量能够对\emph{注意力汇}进行新的机制分析。虽然先前的工作将注意力汇描述为多余注意力的被动存储库,但我们揭示它们起到了主动的功能作用,通过汇率与输出范数之间的凸关系抑制信息,通过反对低置信度令牌的语义漂移来稳定表示。

英文摘要:

Analyzing attention weights has become a standard approach for interpreting the information flow of Large Language Models (LLMs). However, this approach has significant limitations as it neglects the geometric properties of the value vectors being aggregated. To address this gap, we introduce \emph{Contribution Weights}, a projection-based metric that quantifies a token's influence by accounting for it's attention weight, value magnitude, and directional alignment with the layer output. We demonstrate that contribution weights provide a more faithful measure of token importance, consistently outperforming attention-based metrics in identifying semantically critical tokens across different decoder-only models, tasks, and datasets. Further, our metric enables novel mechanistic analysis of \emph{attention sinks}. While previous work characterized sinks as passive repositories for excess attention, we reveal they serve an active functional role, suppressing information through a convex relationship between sink rate and output norm, stabilizing representations by opposing the semantic drift of low-confidence tokens.

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

↑