基于梯度归因的注意力头分析在上下文感知机器翻译中的扩展
Scaling Attention Head Analysis via Gradient-Based Attribution in Context-Aware Machine Translation
浏览论文内容
中文总结 AI 辅助
本文提出基于梯度的注意力头归因方法,通过反向传播Token级最大边际损失,在上下文感知机器翻译中实现大规模因果分析,发现通用型注意力头并揭示注意力与性能的非必然关联。
中文摘要 AI 辅助
本文提出了一种基于梯度的注意力头归因策略,其中Token级最大边际损失被反向传播到注意力图。该框架支持对注意力头进行大规模因果分析,适用于大型语言模型。我们在上下文感知机器翻译中的消歧任务上评估了该方法,分析了4个模型和4个语言方向上的50个现象。我们通过实验证明,该方法与在三个模型和两个语言方向上增加token间关系的注意力分数所产生的效果一致,从而确保了方法的鲁棒性。我们的分析揭示了“通用型”注意力头的存在,这些注意力头在关注不同关系时能提升模型性能。我们发现,注意力头分配给某种关系的平均注意力并不一定与模型性能相关,这表明模型在训练过程中在注意力头功能方面产生了冗余。
英文摘要
In this paper, we introduce a gradient-based head attribution strategy where the Token-level Max-Margin loss is backpropagated to the attention maps. This framework enables a large-scale causal analysis of attention heads, making it suitable for LLMs. We evaluate our method on the task of disambiguation in Context-aware Machine Translation, where we analyze 50 phenomena across 4 models and 4 language directions. We empirically show the alignment of our method with the effects of increasing the attention scores of token-to-token relations on three models and two language directions, ensuring the robustness of our method. Our analysis reveals the presence of the "general-purpose" attention heads that improve the model's performance when attending to different relations. We find that the average attention a head assigns to a relation does not necessarily relate to the model's performance, which suggests that the models developed redundancies during training in terms of the head functions.
发表机构
- Maastricht University(马斯特里赫特大学)
机构由 AI 辅助整理,请以论文原文为准。