arXivDaily arXiv每日学术速递 周一至周五更新
感恩节,周五至周末无更新,大家顺遂。周一再来吧
arXiv 1810.07595cs.CL
收藏

注意力机制分析--以神经机器翻译中的词义消歧为例

An Analysis of Attention Mechanisms: The Case of Word Sense Disambiguation in Neural Machine Translation

Uppsala University(乌普萨拉大学);University of Edinburgh(爱丁堡大学);University of Zurich(苏黎世大学)

Gongbo Tang, Rico Sennrich, Joakim Nivre

摘要:

最近的研究表明,神经机器翻译(NMT)中的编码器-解码器注意力机制不同于统计机器翻译中的词对齐。本文以NMT模型中的词义消歧为例,重点分析了编码器-解码器的注意力机制。我们假设注意力机制在翻译歧义词时更关注语境标记。我们探讨了翻译歧义名词时的注意分配模式。与直觉相反,我们发现,与其他名词相比,注意力机制可能会将更多的注意力分配给歧义名词本身,而不是上下文标记。我们的结论是,注意力机制是不是NMT模型的主要机制,以纳入上下文信息的词义消歧。实验结果表明,NMT模型学习编码上下文信息必要的WSD在编码器隐藏状态。对于Transformer模型中的注意力机制,我们揭示了前几层逐渐学习“对齐”源和目标令牌,最后几层学习从相关但未对齐的上下文令牌中提取特征。

英文摘要:

Recent work has shown that the encoder-decoder attention mechanisms in neural machine translation (NMT) are different from the word alignment in statistical machine translation. In this paper, we focus on analyzing encoder-decoder attention mechanisms, in the case of word sense disambiguation (WSD) in NMT models. We hypothesize that attention mechanisms pay more attention to context tokens when translating ambiguous words. We explore the attention distribution patterns when translating ambiguous nouns. Counter-intuitively, we find that attention mechanisms are likely to distribute more attention to the ambiguous noun itself rather than context tokens, in comparison to other nouns. We conclude that attention mechanism is not the main mechanism used by NMT models to incorporate contextual information for WSD. The experimental results suggest that NMT models learn to encode contextual information necessary for WSD in the encoder hidden states. For the attention mechanism in Transformer models, we reveal that the first few layers gradually learn to "align" source and target tokens and the last few layers learn to extract features from the related but unaligned context tokens.

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

↑