arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2003.04974cs.CLcs.LGstat.ML
收藏

Transformer++

Transformer++

American Express(美国运通)

Prakhar Thapak, Prodip Hore

摘要:

注意力机制的最新进展已经取代了用于机器翻译任务的递归神经网络及其变体。使用注意力机制的Transformer在序列建模中单独实现了最先进的结果。基于注意力机制的神经机器翻译是可并行的,并且比递归神经网络更有效地解决了处理句子中单词之间的长程依赖关系的问题。注意力中的一个关键概念是学习三个矩阵,查询,键和值,其中单词之间的全局依赖关系是通过线性投影词嵌入通过这些矩阵来学习的。在Transformer中,可以同时学习多个查询、键、值矩阵,这些矩阵集中在嵌入维的不同子空间上,这称为多头。我们认为,某些词之间的依赖关系,可以更好地学习,通过一个中间的上下文,而不是直接建模词词的依赖关系。这可能是由于某些依赖关系的性质或缺乏模式,使它们难以使用多头自注意力进行全局建模。在这项工作中,我们提出了一种新的学习依赖关系的方式,通过在多头使用卷积的上下文。在WMT 2014英语到德语和英语到法语的翻译任务中,这种新形式的多头注意力与传统形式一起实现了比Transformer更好的结果。我们还引入了一个框架,在编码器的训练过程中学习POS标记和NER信息,这进一步提高了结果,在WMT 2014英语到德语的翻译任务中,实现了32.1 BLEU的最新水平,比现有的最佳水平高出1.4 BLEU,在WMT 2014英语到法语的翻译任务中,实现了44.6 BLEU的最新水平,比现有的最佳水平高出1.1 BLEU。我们称之为Transformer++。

英文摘要:

Recent advancements in attention mechanisms have replaced recurrent neural networks and its variants for machine translation tasks. Transformer using attention mechanism solely achieved state-of-the-art results in sequence modeling. Neural machine translation based on the attention mechanism is parallelizable and addresses the problem of handling long-range dependencies among words in sentences more effectively than recurrent neural networks. One of the key concepts in attention is to learn three matrices, query, key, and value, where global dependencies among words are learned through linearly projecting word embeddings through these matrices. Multiple query, key, value matrices can be learned simultaneously focusing on a different subspace of the embedded dimension, which is called multi-head in Transformer. We argue that certain dependencies among words could be learned better through an intermediate context than directly modeling word-word dependencies. This could happen due to the nature of certain dependencies or lack of patterns that lend them difficult to be modeled globally using multi-head self-attention. In this work, we propose a new way of learning dependencies through a context in multi-head using convolution. This new form of multi-head attention along with the traditional form achieves better results than Transformer on the WMT 2014 English-to-German and English-to-French translation tasks. We also introduce a framework to learn POS tagging and NER information during the training of encoder which further improves results achieving a new state-of-the-art of 32.1 BLEU, better than existing best by 1.4 BLEU, on the WMT 2014 English-to-German and 44.6 BLEU, better than existing best by 1.1 BLEU, on the WMT 2014 English-to-French translation tasks. We call this Transformer++.

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

↑