arXivDaily arXiv每日学术速递 周一至周五更新
arXiv周末暂无论文更新,休息一下吧,周末愉快~~
arXiv 2604.14722cs.LG
收藏

GPT-2中注意力沉底现象的机理分析:一个电路,对缓解策略的更广泛启示

A Mechanistic Account of Attention Sinks in GPT-2: One Circuit, Broader Implications for Mitigation

Tel Aviv University(特拉维夫大学)

Yuval Ran-Milo, Hila Ofek, Shahar Mendel

AI总结:

研究GPT-2模型中注意力沉底现象的机理,发现其源于查询偏差、第一层MLP变换和键投影结构的相互作用,各组件均可独立去除仍存在沉底现象,为缓解策略提供新思路。

摘要:

Transformer模型常表现出注意力沉底现象:对第一个位置的注意力异常高。我们研究了GPT-2风格模型中学习查询偏差和绝对位置编码的这种行为。结合结构分析和因果干预,在自然语言、数学和代码输入中验证,发现沉底现象源于(i)学习查询偏差、(ii)第一层MLP变换的位置编码以及(iii)键投影结构的相互作用。关键的是,我们识别的每个组件单独去除后,架构仍能稳健地表现出沉底现象。这表明,注意力沉底可能通过不同电路在不同架构中产生。这些发现为缓解沉底提供了信息,并推动了对沉底为何出现的更广泛研究。

英文摘要:

Transformers commonly exhibit an attention sink: disproportionately high attention to the first position. We study this behavior in GPT-2-style models with learned query biases and absolute positional embeddings. Combining structural analysis with causal interventions, validated across natural-language, mathematical, and code inputs, we find that the sink arises from the interaction among (i) a learned query bias, (ii) the first-layer MLP transformation of the positional encoding, and (iii) structure in the key projection. Crucially, each component we identify is individually dispensable: architectures omitting each of them robustly exhibit sinks. This indicates that attention sinks may arise through distinct circuits across architectures. These findings inform mitigation of sinks, and motivate broader investigation into why sinks emerge.

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

↑