论文标题

测量变压器中上下文信息的混合

Measuring the Mixing of Contextual Information in the Transformer

论文作者

Ferrando, Javier, Gállego, Gerard I., Costa-jussà, Marta R.

论文摘要

Transformer架构通过自我发项机制汇总了输入信息,但是对整个模型中如何混合此信息尚无清楚的了解。此外,最近的作品表明,仅注意力重量不足以描述信息流。在本文中,我们考虑了整个注意力障碍 - 多头注意,残留连接和归一化 - 并定义一个度量,以测量每一层中令牌之间的交互。然后,我们汇总了层的解释,以提供模型预测的输入归因分数。在实验上,我们表明我们的方法,Alti(层次互动的汇总),比基于梯度的方法提供了更忠实的解释和更高的鲁棒性。

The Transformer architecture aggregates input information through the self-attention mechanism, but there is no clear understanding of how this information is mixed across the entire model. Additionally, recent works have demonstrated that attention weights alone are not enough to describe the flow of information. In this paper, we consider the whole attention block -- multi-head attention, residual connection, and layer normalization -- and define a metric to measure token-to-token interactions within each layer. Then, we aggregate layer-wise interpretations to provide input attribution scores for model predictions. Experimentally, we show that our method, ALTI (Aggregation of Layer-wise Token-to-token Interactions), provides more faithful explanations and increased robustness than gradient-based methods.

扫码加入交流群

加入微信交流群

微信交流群二维码

扫码加入学术交流群,获取更多资源