arXivDaily arXiv每日学术速递 周一至周五更新
arXiv周末暂无论文更新,休息一下吧,周末愉快~~
arXiv 2204.08142cs.CL
收藏

Transformers的动态位置编码

Dynamic Position Encoding for Transformers

Huawei Noah’s Ark Lab(华为诺亚方舟实验室);Amazon(亚马逊)

Joyce Zheng, Mehdi Rezagholizadeh, Peyman Passban

摘要:

在过去的几年里,递归模型一直主导着神经机器翻译(NMT)领域。Transformers \citep{vaswani2017attention}通过提出一种依赖于前馈骨干和自注意力机制的新颖体系结构,从根本上改变了它。虽然Transformers功能强大,但由于其非循环特性,它们可能无法正确编码顺序/位置信息。为了解决这个问题,位置嵌入被专门定义为每个时间步,以丰富单词信息。然而,这样的嵌入在训练之后是固定的,而不管源或目标语言的任务和单词排序系统如何。在本文中,我们提出了一种新的架构,新的位置嵌入取决于输入文本,以解决这个缺点,考虑到目标词的顺序。我们的解决方案没有使用预定义的位置嵌入,而是生成新的嵌入来细化每个单词的位置信息。由于我们不指定源标记的位置并以端到端的方式学习它们,因此我们将我们的方法称为动态位置编码(DPE)。我们评估了我们的模型对多个数据集的影响,从英语翻译成德语,法语和意大利语,并观察到与原始Transformer相比有意义的改进。

英文摘要:

Recurrent models have been dominating the field of neural machine translation (NMT) for the past few years. Transformers \citep{vaswani2017attention}, have radically changed it by proposing a novel architecture that relies on a feed-forward backbone and self-attention mechanism. Although Transformers are powerful, they could fail to properly encode sequential/positional information due to their non-recurrent nature. To solve this problem, position embeddings are defined exclusively for each time step to enrich word information. However, such embeddings are fixed after training regardless of the task and the word ordering system of the source or target language. In this paper, we propose a novel architecture with new position embeddings depending on the input text to address this shortcoming by taking the order of target words into consideration. Instead of using predefined position embeddings, our solution generates new embeddings to refine each word's position information. Since we do not dictate the position of source tokens and learn them in an end-to-end fashion, we refer to our method as dynamic position encoding (DPE). We evaluated the impact of our model on multiple datasets to translate from English into German, French, and Italian and observed meaningful improvements in comparison to the original Transformer.

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

↑