ICode9

精准搜索请尝试: 精确搜索
首页 > 其他分享> 文章详细

Attention Is All You Need

2022-01-12 22:35:37  阅读:148  来源: 互联网

标签:Transformer attention sequence models Attention Need model translation


本文告诉我们attention机制可以不仅用于联系编码器和解码器,也可以用于模型的全部部分的构筑。
arXiv:1706.03762v5
贡献小引:
Equal contribution.
(先驱)Jakob proposed replacing RNNs with self-attention and started the effort to evaluate this idea.
(模型实现)Ashish, with Illia, designed and implemented the first Transformer models and has been crucially involved in every aspect of this work. Noam proposed scaled dot-product attention, multi-head attention, and the parameter-free position representation and became the other person involved in nearly every detail.
(模型变体)Niki designed, implemented, tuned, and evaluated countless model variants in our original codebase and tensor2tensor. Llion also experimented with novel(新颖的) model variants, was responsible for our initial codebase, and efficient inference and visualizations.
(《Tensor2Tensor for Neural Machine Translation》,tensor2tensor是一个是一个深度学习模型和数据集库,旨在使深度学习更易于访问并加速 ML 研究)
Lukasz and Aidan spent countless long days designing various parts of and implementing tensor2tensor, replacing our earlier codebase, greatly improving results, and massively accelerating our research.


(Attention就在此图的根结点处)

Attention Is All You Need

Abstract

The dominant(主导的) sequence transduction(转移) models are based on complex recurrent or convolutional neural networks, including an encoder and a decoder. The best-performing models also connect the encoder and decoder through an attention mechanism.
We propose a new simple network architecture, the Transformer, which is based solely(仅仅地) on attention mechanisms, dispensing with(免除) recurrence and convolutions entirely.
Experiments on two machine translation tasks show these models to be superior(优越的) in quality while being more parallelizable(可并行化的) and requiring significantly less time to train(训练时间也较短).
Our model achieves 28.4 BLEU on the WMT 2014 English-to-German translation task, improving over the existing best results, including ensembles, by over 2 BLEU.
On the WMT 2014 English-to-French translation task, our model establishes a new single-model state-of-the-art BLEU score of 41.8 after training for 3.5 days on eight GPUs, a small fraction of the training costs of the best models from the literature(这只是文献中最佳模型训练成本的一小部分).
We show that the Transformer generalizes well to other tasks by applying it successfully to English constituency parsing both with large and limited training data.

Abstract 释义

sequence transduction models:一个用途是machine translation.
主流的sequence transduction models(序列转移模型,seq2seq)基于递归或循环神经网络,包括编码器和解码器。性能最好的模型通过attention机制联系其编码和解码器。
我们提出了一种新的简单的网络架构,Transformer,仅仅基于attention机制。
实验发现这种网络架构的模型在进行更多的并行化,且需要更少训练时间的同时,实现了优越的性能。

Introduction

Recurrent neural networks, long short-term memory, and gated recurrent neural networks in particular have been firmly established as state-of-the-art approaches in sequence modeling and transduction problems such as language modeling and machine translation [35, 2, 5]. Numerous efforts have since continued to push the boundaries of recurrent language models and encoder-decoder architectures [38, 24, 15].
Recurrent models typically factor computation along the symbol positions of the input and output
sequences. Aligning the positions to steps in computation time, they generate a sequence of hidden
states \(h_t\), as a function of the previous hidden state ht−1 and the input for position t. This inherently
sequential nature precludes parallelization within training examples, which becomes critical at longer
sequence lengths, as memory constraints limit batching across examples. Recent work has achieved
significant improvements in computational efficiency through factorization tricks [21] and conditional
computation [32], while also improving model performance in case of the latter. The fundamental
constraint of sequential computation, however, remains.
Attention mechanisms have become an integral part of compelling sequence modeling and transduction models in various tasks, allowing modeling of dependencies without regard to their distance in
the input or output sequences [2, 19]. In all but a few cases [27], however, such attention mechanisms
are used in conjunction with a recurrent network.
In this work we propose the Transformer, a model architecture eschewing recurrence and instead
relying entirely on an attention mechanism to draw global dependencies between input and output.
The Transformer allows for significantly more parallelization and can reach a new state of the art in
translation quality after being trained for as little as twelve hours on eight P100 GPUs.

标签:Transformer,attention,sequence,models,Attention,Need,model,translation
来源: https://www.cnblogs.com/qianxinn/p/15795643.html

本站声明: 1. iCode9 技术分享网(下文简称本站)提供的所有内容,仅供技术学习、探讨和分享;
2. 关于本站的所有留言、评论、转载及引用,纯属内容发起人的个人观点,与本站观点和立场无关;
3. 关于本站的所有言论和文字,纯属内容发起人的个人观点,与本站观点和立场无关;
4. 本站文章均是网友提供,不完全保证技术分享内容的完整性、准确性、时效性、风险性和版权归属;如您发现该文章侵犯了您的权益,可联系我们第一时间进行删除;
5. 本站为非盈利性的个人网站,所有内容不会用来进行牟利,也不会利用任何形式的广告来间接获益,纯粹是为了广大技术爱好者提供技术内容和技术思想的分享性交流网站。

专注分享技术,共同学习,共同进步。侵权联系[81616952@qq.com]

Copyright (C)ICode9.com, All Rights Reserved.

ICode9版权所有