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

Transformer NMT中的注意力权重无法对齐序列之间的单词,但可以解释模型预测

Attention Weights in Transformer NMT Fail Aligning Words Between Sequences but Largely Explain Model Predictions

Universitat Politècnica de Catalunya(加泰罗尼亚理工大学)

Javier Ferrando, Marta R. Costa-jussà

摘要:

这项工作提出了一个广泛的分析Transformer架构的神经机器翻译(NMT)设置。针对编码器-解码器的注意力机制,我们证明了注意力权重主要依赖于来自源序列的无信息标记,系统地产生对齐错误。然而,我们观察到NMT模型将注意力分配给这些标记,以调节两个上下文(源和目标序列的前缀)的预测中的贡献。我们提供的证据错误的对齐对模型行为的影响,证明编码器-解码器注意力机制是非常适合作为NMT的可解释性方法。最后,根据我们的分析,我们提出的方法,大大降低了字对齐出错率相比,标准的注意力权重引起的对齐。

英文摘要:

This work proposes an extensive analysis of the Transformer architecture in the Neural Machine Translation (NMT) setting. Focusing on the encoder-decoder attention mechanism, we prove that attention weights systematically make alignment errors by relying mainly on uninformative tokens from the source sequence. However, we observe that NMT models assign attention to these tokens to regulate the contribution in the prediction of the two contexts, the source and the prefix of the target sequence. We provide evidence about the influence of wrong alignments on the model behavior, demonstrating that the encoder-decoder attention mechanism is well suited as an interpretability method for NMT. Finally, based on our analysis, we propose methods that largely reduce the word alignment error rate compared to standard induced alignments from attention weights.

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

↑