Ashish Vaswani, Noam Shazeer, Niki Parmar, Jakob Uszkoreit, Llion Jones, Aidan N. Gomez, Lukasz Kaiser, Illia Polosukhin
The dominant sequence transduction models are based on complex recurrent or convolutional neural networks in an encoder-decoder configuration. The best performing models also connect the encoder and decoder through an attention mechanism. We propose a new simple network architecture, the Transformer, 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.
| Task | Dataset | Metric | Value | Model |
|---|---|---|---|---|
| Machine Translation | IWSLT2015 English-German | BLEU score | 28.5 | Transformer |
| Machine Translation | IWSLT2014 German-English | BLEU score | 34.44 | Transformer |
| Machine Translation | WMT2014 English-German | BLEU score | 28.4 | Transformer Big |
| Machine Translation | WMT2014 English-German | BLEU score | 27.3 | Transformer Base |
| Machine Translation | WMT2014 English-French | BLEU score | 41 | Transformer Big |
| Machine Translation | WMT2014 English-French | BLEU score | 38.1 | Transformer Base |
| Machine Translation | Multi30K | BLUE (DE-EN) | 29 | Transformer |
| Question Answering | Mathematics Dataset | Accuracy | 0.76 | Transformer |
| Text Generation | LSMDC-E | BLEU-1 | 15.35 | Transformer |
| Text Generation | LSMDC-E | BLEU-2 | 4.49 | Transformer |
| Text Generation | LSMDC-E | BLEU-3 | 1.82 | Transformer |
| Text Generation | LSMDC-E | BLEU-4 | 0.76 | Transformer |
| Text Generation | LSMDC-E | CIDEr | 9.32 | Transformer |
| Text Generation | LSMDC-E | METEOR | 11.43 | Transformer |
| Text Generation | LSMDC-E | ROUGE-L | 19.16 | Transformer |
| Text Generation | VIST-E | BLEU-1 | 17.18 | Transformer |
| Text Generation | VIST-E | BLEU-2 | 6.29 | Transformer |
| Text Generation | VIST-E | BLEU-3 | 3.07 | Transformer |
| Text Generation | VIST-E | BLEU-4 | 2.01 | Transformer |
| Text Generation | VIST-E | CIDEr | 12.75 | Transformer |
| Text Generation | VIST-E | METEOR | 6.91 | Transformer |
| Text Generation | VIST-E | ROUGE-L | 18.23 | Transformer |
| Coreference Resolution | Winograd Schema Challenge | Accuracy | 54.1 | Subword-level Transformer LM |
| Constituency Parsing | Penn Treebank | F1 score | 92.7 | Transformer |
| Text Summarization | GigaWord | ROUGE-1 | 37.57 | Transformer |
| Text Summarization | GigaWord | ROUGE-2 | 18.9 | Transformer |
| Text Summarization | GigaWord | ROUGE-L | 34.69 | Transformer |
| Text Summarization | CNN / Daily Mail | ROUGE-1 | 39.5 | Transformer |
| Text Summarization | CNN / Daily Mail | ROUGE-2 | 16.06 | Transformer |
| Text Summarization | CNN / Daily Mail | ROUGE-L | 36.63 | Transformer |
| Abstractive Text Summarization | CNN / Daily Mail | ROUGE-1 | 39.5 | Transformer |
| Abstractive Text Summarization | CNN / Daily Mail | ROUGE-2 | 16.06 | Transformer |
| Abstractive Text Summarization | CNN / Daily Mail | ROUGE-L | 36.63 | Transformer |
| Data-to-Text Generation | LSMDC-E | BLEU-1 | 15.35 | Transformer |
| Data-to-Text Generation | LSMDC-E | BLEU-2 | 4.49 | Transformer |
| Data-to-Text Generation | LSMDC-E | BLEU-3 | 1.82 | Transformer |
| Data-to-Text Generation | LSMDC-E | BLEU-4 | 0.76 | Transformer |
| Data-to-Text Generation | LSMDC-E | CIDEr | 9.32 | Transformer |
| Data-to-Text Generation | LSMDC-E | METEOR | 11.43 | Transformer |
| Data-to-Text Generation | LSMDC-E | ROUGE-L | 19.16 | Transformer |
| Data-to-Text Generation | VIST-E | BLEU-1 | 17.18 | Transformer |
| Data-to-Text Generation | VIST-E | BLEU-2 | 6.29 | Transformer |
| Data-to-Text Generation | VIST-E | BLEU-3 | 3.07 | Transformer |
| Data-to-Text Generation | VIST-E | BLEU-4 | 2.01 | Transformer |
| Data-to-Text Generation | VIST-E | CIDEr | 12.75 | Transformer |
| Data-to-Text Generation | VIST-E | METEOR | 6.91 | Transformer |
| Data-to-Text Generation | VIST-E | ROUGE-L | 18.23 | Transformer |
| Shape Representation Of 3D Point Clouds | ScanObjectNN | GFLOPs | 4.8 | Transformer |
| Shape Representation Of 3D Point Clouds | ScanObjectNN | Number of params (M) | 22.1 | Transformer |
| Shape Representation Of 3D Point Clouds | ScanObjectNN | Overall Accuracy (PB_T50_RS) | 77.24 | Transformer |
| Multimodal Machine Translation | Multi30K | BLUE (DE-EN) | 29 | Transformer |
| 3D Point Cloud Classification | ScanObjectNN | GFLOPs | 4.8 | Transformer |
| 3D Point Cloud Classification | ScanObjectNN | Number of params (M) | 22.1 | Transformer |
| 3D Point Cloud Classification | ScanObjectNN | Overall Accuracy (PB_T50_RS) | 77.24 | Transformer |
| Natural Language Understanding | PDP60 | Accuracy | 58.3 | Subword-level Transformer LM |
| Visual Storytelling | LSMDC-E | BLEU-1 | 15.35 | Transformer |
| Visual Storytelling | LSMDC-E | BLEU-2 | 4.49 | Transformer |
| Visual Storytelling | LSMDC-E | BLEU-3 | 1.82 | Transformer |
| Visual Storytelling | LSMDC-E | BLEU-4 | 0.76 | Transformer |
| Visual Storytelling | LSMDC-E | CIDEr | 9.32 | Transformer |
| Visual Storytelling | LSMDC-E | METEOR | 11.43 | Transformer |
| Visual Storytelling | LSMDC-E | ROUGE-L | 19.16 | Transformer |
| Visual Storytelling | VIST-E | BLEU-1 | 17.18 | Transformer |
| Visual Storytelling | VIST-E | BLEU-2 | 6.29 | Transformer |
| Visual Storytelling | VIST-E | BLEU-3 | 3.07 | Transformer |
| Visual Storytelling | VIST-E | BLEU-4 | 2.01 | Transformer |
| Visual Storytelling | VIST-E | CIDEr | 12.75 | Transformer |
| Visual Storytelling | VIST-E | METEOR | 6.91 | Transformer |
| Visual Storytelling | VIST-E | ROUGE-L | 18.23 | Transformer |
| Story Generation | LSMDC-E | BLEU-1 | 15.35 | Transformer |
| Story Generation | LSMDC-E | BLEU-2 | 4.49 | Transformer |
| Story Generation | LSMDC-E | BLEU-3 | 1.82 | Transformer |
| Story Generation | LSMDC-E | BLEU-4 | 0.76 | Transformer |
| Story Generation | LSMDC-E | CIDEr | 9.32 | Transformer |
| Story Generation | LSMDC-E | METEOR | 11.43 | Transformer |
| Story Generation | LSMDC-E | ROUGE-L | 19.16 | Transformer |
| Story Generation | VIST-E | BLEU-1 | 17.18 | Transformer |
| Story Generation | VIST-E | BLEU-2 | 6.29 | Transformer |
| Story Generation | VIST-E | BLEU-3 | 3.07 | Transformer |
| Story Generation | VIST-E | BLEU-4 | 2.01 | Transformer |
| Story Generation | VIST-E | CIDEr | 12.75 | Transformer |
| Story Generation | VIST-E | METEOR | 6.91 | Transformer |
| Story Generation | VIST-E | ROUGE-L | 18.23 | Transformer |
| 3D Point Cloud Reconstruction | ScanObjectNN | GFLOPs | 4.8 | Transformer |
| 3D Point Cloud Reconstruction | ScanObjectNN | Number of params (M) | 22.1 | Transformer |
| 3D Point Cloud Reconstruction | ScanObjectNN | Overall Accuracy (PB_T50_RS) | 77.24 | Transformer |