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

评估自我注意网络学习词序的能力

Assessing the Ability of Self-Attention Networks to Learn Word Order

University of Macau(澳门大学);Tencent AI Lab(腾讯人工智能实验室)

Baosong Yang, Longyue Wang, Derek F. Wong, Lidia S. Chao, Zhaopeng Tu

摘要:

自注意力网络(SAN)由于其高度并行化和在各种NLP任务(例如机器翻译)上的强大性能而引起了很多兴趣。由于缺乏递归神经网络(RNN)等递归结构,SAN在学习单词的位置信息以进行序列建模方面很弱。然而,这一推测既没有得到实证证实,也没有解释他们的强大性能时,“缺乏位置信息”的机器翻译任务进行了探索。为此,我们提出了一种新的单词重排检测任务,以量化SAN和RNN学习的单词顺序信息。具体来说,我们随机地将一个单词移动到另一个位置,并检查经过训练的模型是否可以检测到原始位置和插入位置。实验结果表明:1)在单词重排检测上训练的SAN确实很难学习位置信息,即使是位置嵌入; 2)在机器翻译上训练的SAN比RNN对手学习更好的位置信息,其中位置嵌入起着关键作用。虽然递归结构使模型在学习词序方面更普遍有效,但学习目标在下游任务(如机器翻译)中更重要。

英文摘要:

Self-attention networks (SAN) have attracted a lot of interests due to their high parallelization and strong performance on a variety of NLP tasks, e.g. machine translation. Due to the lack of recurrence structure such as recurrent neural networks (RNN), SAN is ascribed to be weak at learning positional information of words for sequence modeling. However, neither this speculation has been empirically confirmed, nor explanations for their strong performances on machine translation tasks when "lacking positional information" have been explored. To this end, we propose a novel word reordering detection task to quantify how well the word order information learned by SAN and RNN. Specifically, we randomly move one word to another position, and examine whether a trained model can detect both the original and inserted positions. Experimental results reveal that: 1) SAN trained on word reordering detection indeed has difficulty learning the positional information even with the position embedding; and 2) SAN trained on machine translation learns better positional information than its RNN counterpart, in which position embedding plays a critical role. Although recurrence structure make the model more universally-effective on learning word order, learning objectives matter more in the downstream tasks such as machine translation.

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

↑