doi
stringlengths
9
10
chunk-id
stringlengths
1
4
chunk
stringlengths
1
1.57k
id
stringlengths
9
10
title
stringlengths
10
127
summary
stringlengths
581
1.92k
source
stringlengths
30
31
authors
sequence
categories
sequence
comment
stringclasses
28 values
journal_ref
stringclasses
1 value
primary_category
stringclasses
6 values
published
stringlengths
8
8
updated
stringlengths
8
8
references
list
1903.00089
9
implemented in Tensorflow-Lingvo (Shen et al., 2019). In all cases we report test results for the checkpoint that performed best on the development set in terms of BLEU. For the multilingual models we create a development set that includes examples we uniformly sample from a concatenation of all the individual language pair development sets, resulting in 13k development examples per model. Another important detail regarding multilingual training is the batching scheme. In all of our multilingual models we use heterogeneous batching, where each batch contains examples which are uniformly sampled from a concatenation of all the language pairs the model is trained on. Specifically, we use batches of 64 examples for sequences shorter than 69 tokens and batches of 16 examples for longer sequences. We did not use oversampling as the dataset is relatively small. 2.3 Results We use tokenized BLEU in order to be comparable with Neubig and Hu (2018). Table 1 showsAz-En Be-En Gl-En Sk-En Avg. # of examples 5.9k 4.5k 10k 61k 20.3k Neubig & Hu 18 baselines 2.7 2.8 16.2 24 11.42
1903.00089
Massively Multilingual Neural Machine Translation
Multilingual neural machine translation (NMT) enables training a single model that supports translation from multiple source languages into multiple target languages. In this paper, we push the limits of multilingual NMT in terms of number of languages being used. We perform extensive experiments in training massively multilingual NMT models, translating up to 102 languages to and from English within a single model. We explore different setups for training such models and analyze the trade-offs between translation quality and various modeling decisions. We report results on the publicly available TED talks multilingual corpus where we show that massively multilingual many-to-many models are effective in low resource settings, outperforming the previous state-of-the-art while supporting up to 59 languages. Our experiments on a large-scale dataset with 102 languages to and from English and up to one million examples per direction also show promising results, surpassing strong bilingual baselines and encouraging future work on massively multilingual NMT.
http://arxiv.org/pdf/1903.00089
[ "Roee Aharoni", "Melvin Johnson", "Orhan Firat" ]
[ "cs.CL" ]
Accepted as a long paper in NAACL 2019
null
cs.CL
20190228
20190702
[]
1903.00089
10
Neubig & Hu 18 baselines 2.7 2.8 16.2 24 11.42 many-to-one 11.7 18.3 29.1 28.3 21.85 Wang et al. 18 11.82 18.71 30.3 28.77 22.4 Ours many-to-one 11.24 18.28 28.63 26.78 21.23 many-to-many 12.78 21.73 30.65 29.54 23.67 Table 1: X !En test BLEU on the TED Talks corpus, for the language pairs from Neubig and Hu (2018) Ar-En De-En He-En It-En Avg. # of examples 213k 167k 211k 203k 198.5k baselines 27.84 30.5 34.37 33.64 31.59 many-to-one 25.93 28.87 30.19 32.42 29.35 many-to-many 28.32 32.97 33.18 35.14 32.4 Table 2: X !En test BLEU on the TED Talks corpus, for language pairs with more than 167k examples updates ar_many2one ro_many2one nl_many2one de_many2one it_many2one ar de it nl 0 0
1903.00089
Massively Multilingual Neural Machine Translation
Multilingual neural machine translation (NMT) enables training a single model that supports translation from multiple source languages into multiple target languages. In this paper, we push the limits of multilingual NMT in terms of number of languages being used. We perform extensive experiments in training massively multilingual NMT models, translating up to 102 languages to and from English within a single model. We explore different setups for training such models and analyze the trade-offs between translation quality and various modeling decisions. We report results on the publicly available TED talks multilingual corpus where we show that massively multilingual many-to-many models are effective in low resource settings, outperforming the previous state-of-the-art while supporting up to 59 languages. Our experiments on a large-scale dataset with 102 languages to and from English and up to one million examples per direction also show promising results, surpassing strong bilingual baselines and encouraging future work on massively multilingual NMT.
http://arxiv.org/pdf/1903.00089
[ "Roee Aharoni", "Melvin Johnson", "Orhan Firat" ]
[ "cs.CL" ]
Accepted as a long paper in NAACL 2019
null
cs.CL
20190228
20190702
[]
1903.00089
11
updates ar_many2one ro_many2one nl_many2one de_many2one it_many2one ar de it nl 0 0 49148 0.2839321792 51751 0.2832087576 53492 0.2823074162 56111 0.2822623849 57843 0.2835516334 59595 0.2890901268 61344 0.2845613658 63938 0.2924402654 65676 0.2828268111 67401 0.2909407914 70019 0.2906394601 71770 0.283375144 73479 0.2862167656 75201 0.2850508094 77780 0.2772497535 79488 0.286601305 81201 0.2964281738 82895 0.2811564505 84594 0.2892799973 86301 0.2811136246 88849 0.2873187661 90551 0.287561506 93101 0.2806210518 95667 0.2852652967 97386 0.286067158 99069 0.285282582 101647 0.2873030901
1903.00089
Massively Multilingual Neural Machine Translation
Multilingual neural machine translation (NMT) enables training a single model that supports translation from multiple source languages into multiple target languages. In this paper, we push the limits of multilingual NMT in terms of number of languages being used. We perform extensive experiments in training massively multilingual NMT models, translating up to 102 languages to and from English within a single model. We explore different setups for training such models and analyze the trade-offs between translation quality and various modeling decisions. We report results on the publicly available TED talks multilingual corpus where we show that massively multilingual many-to-many models are effective in low resource settings, outperforming the previous state-of-the-art while supporting up to 59 languages. Our experiments on a large-scale dataset with 102 languages to and from English and up to one million examples per direction also show promising results, surpassing strong bilingual baselines and encouraging future work on massively multilingual NMT.
http://arxiv.org/pdf/1903.00089
[ "Roee Aharoni", "Melvin Johnson", "Orhan Firat" ]
[ "cs.CL" ]
Accepted as a long paper in NAACL 2019
null
cs.CL
20190228
20190702
[]
1903.00089
12
95667 0.2852652967 97386 0.286067158 99069 0.285282582 101647 0.2873030901 103358 0.2812287509 105932 0.2841886282 107656 0.2752591372 109350 0.2852451503 111069 0.2802457809 113631 0.2839408815 115325 0.2698247731 117038 0.2862476707 119599 0.2838998437 121302 0.2805997431 123015 0.2826767564 Figure 1: Development BLEU on fIt,Ro,Nl,De,Ar g!En vs. training BLEU for the many-to-one and many-to-many models. Best viewed in color. the results of our experiments when evaluating on the same language pairs as they did. The results under “Neubig & Hu 18” are their bilingual baselines and their best many-to-one models. Their many-to-one models use similar-languageregularization, i.e. fine-tuning a pre-trained manyto-one model with data from the language pair of interest together with data from a language pair
1903.00089
Massively Multilingual Neural Machine Translation
Multilingual neural machine translation (NMT) enables training a single model that supports translation from multiple source languages into multiple target languages. In this paper, we push the limits of multilingual NMT in terms of number of languages being used. We perform extensive experiments in training massively multilingual NMT models, translating up to 102 languages to and from English within a single model. We explore different setups for training such models and analyze the trade-offs between translation quality and various modeling decisions. We report results on the publicly available TED talks multilingual corpus where we show that massively multilingual many-to-many models are effective in low resource settings, outperforming the previous state-of-the-art while supporting up to 59 languages. Our experiments on a large-scale dataset with 102 languages to and from English and up to one million examples per direction also show promising results, surpassing strong bilingual baselines and encouraging future work on massively multilingual NMT.
http://arxiv.org/pdf/1903.00089
[ "Roee Aharoni", "Melvin Johnson", "Orhan Firat" ]
[ "cs.CL" ]
Accepted as a long paper in NAACL 2019
null
cs.CL
20190228
20190702
[]
1903.00089
13
interest together with data from a language pair that has a typologically-similar source language and more training data (i.e. Russian and Belarusian, Turkish and Azerbaijani). The results under “Ours” are our many-to-one and many-to-many models we trained identically in terms of model architecture and hyper-parameters. We first note that our many-to-many model outperforms all other models when translating into English, with 1.82 BLEU improvement (when averaged across the four language pairs) over the best fine-tuned many-to-one models of Neubig and Hu (2018) and 2.44 BLEU improvement over our many-to-one model when averaged across the four low-resource language pairs (Table 1). This is surprising as it uses the same X !En data, model architecture and capacity as our many-toone model, while handling a heavier burden since it also supports 58 additional translation tasks (from English into58 languages). Our models also outperform the more complex models of Wang et al. (2019) which use ”Soft Decoupled Encoding” for the input tokens, while our models use a simple subword segmentation.
1903.00089
Massively Multilingual Neural Machine Translation
Multilingual neural machine translation (NMT) enables training a single model that supports translation from multiple source languages into multiple target languages. In this paper, we push the limits of multilingual NMT in terms of number of languages being used. We perform extensive experiments in training massively multilingual NMT models, translating up to 102 languages to and from English within a single model. We explore different setups for training such models and analyze the trade-offs between translation quality and various modeling decisions. We report results on the publicly available TED talks multilingual corpus where we show that massively multilingual many-to-many models are effective in low resource settings, outperforming the previous state-of-the-art while supporting up to 59 languages. Our experiments on a large-scale dataset with 102 languages to and from English and up to one million examples per direction also show promising results, surpassing strong bilingual baselines and encouraging future work on massively multilingual NMT.
http://arxiv.org/pdf/1903.00089
[ "Roee Aharoni", "Melvin Johnson", "Orhan Firat" ]
[ "cs.CL" ]
Accepted as a long paper in NAACL 2019
null
cs.CL
20190228
20190702
[]
1903.00089
14
et al. (2019) which use ”Soft Decoupled Encoding” for the input tokens, while our models use a simple subword segmentation. One possible explanation is that the many-toone model overfits the English side of the corpus as it is multi-way-parallel: in such setting the English sentences are overlapping across the different language pairs, making it much easier for the model to memorize the training set instead of generalizing (when enough capacity is available). On the other hand, the many-to-many model is trained on additional target languages other than English, which can act as regularizers for the X !En tasks, reducing such overfitting. To further illustrate this, Figure 1 tracks the BLEU scores on the individual development sets during training for Italian (It), Romanian (Ro), Dutch (Nl), German (De) and Arabic (Ar) into English (left), together with BLEU scores on a subset of the training set for each model. We can see that while the many-to-one model degrades in performance on the development set, the manyto-many model still improves. Note the large gap in the many-to-one model between the training set BLEU and the development set BLEU, which points on the generalization issue that is
1903.00089
Massively Multilingual Neural Machine Translation
Multilingual neural machine translation (NMT) enables training a single model that supports translation from multiple source languages into multiple target languages. In this paper, we push the limits of multilingual NMT in terms of number of languages being used. We perform extensive experiments in training massively multilingual NMT models, translating up to 102 languages to and from English within a single model. We explore different setups for training such models and analyze the trade-offs between translation quality and various modeling decisions. We report results on the publicly available TED talks multilingual corpus where we show that massively multilingual many-to-many models are effective in low resource settings, outperforming the previous state-of-the-art while supporting up to 59 languages. Our experiments on a large-scale dataset with 102 languages to and from English and up to one million examples per direction also show promising results, surpassing strong bilingual baselines and encouraging future work on massively multilingual NMT.
http://arxiv.org/pdf/1903.00089
[ "Roee Aharoni", "Melvin Johnson", "Orhan Firat" ]
[ "cs.CL" ]
Accepted as a long paper in NAACL 2019
null
cs.CL
20190228
20190702
[]
1903.00089
15
gap in the many-to-one model between the training set BLEU and the development set BLEU, which points on the generalization issue that is not present in the many-to-many setting. We also note that our many-to-one model is on average 0.75 BLEU behind the best many-to-one models in Neubig and Hu (2018). We attribute this to the fact that their models are fine-tuned using similarlanguage-regularization while our model is not. We find an additional difference between the results on the resource-scarce languages (Table 1) and the higher-resource languages (Table 2). Specifically, the bilingual baselines outperform the many-to-one models only in the higherresource setting. This makes sense as in the low-En-Az En-Be En-Gl En-Sk Avg. # of examples 5.9k 4.5k 10k 61k 20.3k baselines 2.16 2.47 3.26 5.8 3.42 one-to-many 5.06 10.72 26.59 24.52 16.72 many-to-many 3.9 7.24 23.78 21.83 14.19 En-Ar En-De En-He En-It Avg.
1903.00089
Massively Multilingual Neural Machine Translation
Multilingual neural machine translation (NMT) enables training a single model that supports translation from multiple source languages into multiple target languages. In this paper, we push the limits of multilingual NMT in terms of number of languages being used. We perform extensive experiments in training massively multilingual NMT models, translating up to 102 languages to and from English within a single model. We explore different setups for training such models and analyze the trade-offs between translation quality and various modeling decisions. We report results on the publicly available TED talks multilingual corpus where we show that massively multilingual many-to-many models are effective in low resource settings, outperforming the previous state-of-the-art while supporting up to 59 languages. Our experiments on a large-scale dataset with 102 languages to and from English and up to one million examples per direction also show promising results, surpassing strong bilingual baselines and encouraging future work on massively multilingual NMT.
http://arxiv.org/pdf/1903.00089
[ "Roee Aharoni", "Melvin Johnson", "Orhan Firat" ]
[ "cs.CL" ]
Accepted as a long paper in NAACL 2019
null
cs.CL
20190228
20190702
[]
1903.00089
16
many-to-many 3.9 7.24 23.78 21.83 14.19 En-Ar En-De En-He En-It Avg. # of examples 213k 167k 211k 203k 198.5k baselines 12.95 23.31 23.66 30.33 22.56 one-to-many 16.67 30.54 27.62 35.89 27.68 many-to-many 14.25 27.95 24.16 33.26 24.9 Table 3: En !X test BLEU on the TED Talks corpus resource setting the baselines have very few training examples to outperform the many-to-one models, while in the higher resource setting they have access to more training data. This corroborates the results of Gu et al. (2018) that showed the sensitivity of such models to similar low resource conditions and the improvements gained from using many-to-one models (however with much fewer language pairs). Table 3 shows the results of our massively multilingual models and bilingual baselines when evaluated out-of-English. In this case we see an opposite trend: the many-to-many model performs worse than the one-to-many model by 2.53 BLEU on average. While previous works (Wang et al.,
1903.00089
Massively Multilingual Neural Machine Translation
Multilingual neural machine translation (NMT) enables training a single model that supports translation from multiple source languages into multiple target languages. In this paper, we push the limits of multilingual NMT in terms of number of languages being used. We perform extensive experiments in training massively multilingual NMT models, translating up to 102 languages to and from English within a single model. We explore different setups for training such models and analyze the trade-offs between translation quality and various modeling decisions. We report results on the publicly available TED talks multilingual corpus where we show that massively multilingual many-to-many models are effective in low resource settings, outperforming the previous state-of-the-art while supporting up to 59 languages. Our experiments on a large-scale dataset with 102 languages to and from English and up to one million examples per direction also show promising results, surpassing strong bilingual baselines and encouraging future work on massively multilingual NMT.
http://arxiv.org/pdf/1903.00089
[ "Roee Aharoni", "Melvin Johnson", "Orhan Firat" ]
[ "cs.CL" ]
Accepted as a long paper in NAACL 2019
null
cs.CL
20190228
20190702
[]
1903.00089
17
worse than the one-to-many model by 2.53 BLEU on average. While previous works (Wang et al., 2018; Sachan and Neubig, 2018) discuss the phenomena of quality degradation in English-to-many settings, this shows that increasing the number of source languages also causes additional degradation in a many-to-many model. This degradation may be due to the English-centric setting: since most of the translation directions the model is trained on are into English, this leaves less capacity for the other target languages (while still performing better than the bilingual baselines on all 8 language pairs). We also note that in this case the results are consistent among the higher and lower resource pairs – the one-to-many model is better than the many-to-many model, which outperforms the bilingual baselines in all cases. This is unlike the difference we saw in the X !En experiments since here we do not have the multi-way-parallel overfitting issue. 2.4 Discussion From the above experiments we learn that NMT models can scale to 59 languages in a lowresource, imbalanced, English-centric setting, with the following observations: (1) massively multilingual many-to-many models outperform
1903.00089
Massively Multilingual Neural Machine Translation
Multilingual neural machine translation (NMT) enables training a single model that supports translation from multiple source languages into multiple target languages. In this paper, we push the limits of multilingual NMT in terms of number of languages being used. We perform extensive experiments in training massively multilingual NMT models, translating up to 102 languages to and from English within a single model. We explore different setups for training such models and analyze the trade-offs between translation quality and various modeling decisions. We report results on the publicly available TED talks multilingual corpus where we show that massively multilingual many-to-many models are effective in low resource settings, outperforming the previous state-of-the-art while supporting up to 59 languages. Our experiments on a large-scale dataset with 102 languages to and from English and up to one million examples per direction also show promising results, surpassing strong bilingual baselines and encouraging future work on massively multilingual NMT.
http://arxiv.org/pdf/1903.00089
[ "Roee Aharoni", "Melvin Johnson", "Orhan Firat" ]
[ "cs.CL" ]
Accepted as a long paper in NAACL 2019
null
cs.CL
20190228
20190702
[]
1903.00089
18
models can scale to 59 languages in a lowresource, imbalanced, English-centric setting, with the following observations: (1) massively multilingual many-to-many models outperform many-to-one and bilingual models with similar capacity and identical training conditions when averaged over 8 language pairs into English. We attribute this improvement over the many-to-one models to the multiple target language pairs which may act as regularizers, especially in this lowresource multi-way-parallel setting that is prone to memorization. (2) many-to-many models are inferior in performance when going out-of-English in comparison to a one-to-many model. We attribute this to English being over-represented in the English-centric many-to-many setting, where it appears as a target language in 58 out of 116 trained directions, which may harm the performance on the rest of the target languages as the model capacity is limited.3 It is important to stress the fact that we compared the different models under identical training conditions and did not perform extensive hyperparameter tuning for each setting separately. However, we believe that such tuning may improve performance even further, as the diversity in each training batch is very different between the different settings. For example, while the baseline model batches include only one language in the
1903.00089
Massively Multilingual Neural Machine Translation
Multilingual neural machine translation (NMT) enables training a single model that supports translation from multiple source languages into multiple target languages. In this paper, we push the limits of multilingual NMT in terms of number of languages being used. We perform extensive experiments in training massively multilingual NMT models, translating up to 102 languages to and from English within a single model. We explore different setups for training such models and analyze the trade-offs between translation quality and various modeling decisions. We report results on the publicly available TED talks multilingual corpus where we show that massively multilingual many-to-many models are effective in low resource settings, outperforming the previous state-of-the-art while supporting up to 59 languages. Our experiments on a large-scale dataset with 102 languages to and from English and up to one million examples per direction also show promising results, surpassing strong bilingual baselines and encouraging future work on massively multilingual NMT.
http://arxiv.org/pdf/1903.00089
[ "Roee Aharoni", "Melvin Johnson", "Orhan Firat" ]
[ "cs.CL" ]
Accepted as a long paper in NAACL 2019
null
cs.CL
20190228
20190702
[]
1903.00089
19
performance even further, as the diversity in each training batch is very different between the different settings. For example, while the baseline model batches include only one language in the source and one language in the target, the manyto-many model includes 59 languages in each side with a strong bias towards English. These differences may require tailored hyper-parameter choices for each settings (i.e. different batch sizes, learning rate schedules, dropout rates etc.) which would be interesting to explore in future work. In the following experiments we investigate whether these observations hold using (1) an even larger set of languages, and (2) a much larger, balanced training corpus that is not multi-wayparallel. 3 High-Resource Setting: 103 Languages 3.1 Experimental Setup In this setting we scale the number of languages and examples per language pair further when training a single massively multilingual model. Since we are not aware of a publicly available resource for this purpose, we construct an in-house dataset. This dataset includes 102 language pairs which we “mirror” to-and-from English, with up to one million examples per language pair. This results in 103 languages in total, and 204 translation directions which we train simultaneously.
1903.00089
Massively Multilingual Neural Machine Translation
Multilingual neural machine translation (NMT) enables training a single model that supports translation from multiple source languages into multiple target languages. In this paper, we push the limits of multilingual NMT in terms of number of languages being used. We perform extensive experiments in training massively multilingual NMT models, translating up to 102 languages to and from English within a single model. We explore different setups for training such models and analyze the trade-offs between translation quality and various modeling decisions. We report results on the publicly available TED talks multilingual corpus where we show that massively multilingual many-to-many models are effective in low resource settings, outperforming the previous state-of-the-art while supporting up to 59 languages. Our experiments on a large-scale dataset with 102 languages to and from English and up to one million examples per direction also show promising results, surpassing strong bilingual baselines and encouraging future work on massively multilingual NMT.
http://arxiv.org/pdf/1903.00089
[ "Roee Aharoni", "Melvin Johnson", "Orhan Firat" ]
[ "cs.CL" ]
Accepted as a long paper in NAACL 2019
null
cs.CL
20190228
20190702
[]
1903.00089
20
to one million examples per language pair. This results in 103 languages in total, and 204 translation directions which we train simultaneously. 3This issue may be alleviated by over-sampling the nonEnglish-target pairs, but we leave this for future work.More details about this dataset are available in Table 4, and Table 10 in the supplementary material details all the languages in the dataset.4 Similarly to our previous experiments, we compare the massively multilingual models to bilingual baselines trained on the same data. We tokenize the data using an in-house tokenizer and then apply joint subword segmentation to achieve an open-vocabulary. In this setting we used a vocabulary of 64k subwords rather than 32k. Since the dataset contains 24k unique characters, a 32k symbol vocabulary will consist of mostly characters, thereby increasing the average sequence length. Regarding the model, for these experiments we use a larger Transformer model with 6 layers in both the encoder and the decoder, model dimension set to 1024, hidden dimension size of 8192, and 16 attention heads. This results in a model with approximately 473.7M parameters.5Since the model and data are much larger in this case, we used a dropout rate of 0.1 for our multilingual models and tuned it to 0.3 for our baseline models
1903.00089
Massively Multilingual Neural Machine Translation
Multilingual neural machine translation (NMT) enables training a single model that supports translation from multiple source languages into multiple target languages. In this paper, we push the limits of multilingual NMT in terms of number of languages being used. We perform extensive experiments in training massively multilingual NMT models, translating up to 102 languages to and from English within a single model. We explore different setups for training such models and analyze the trade-offs between translation quality and various modeling decisions. We report results on the publicly available TED talks multilingual corpus where we show that massively multilingual many-to-many models are effective in low resource settings, outperforming the previous state-of-the-art while supporting up to 59 languages. Our experiments on a large-scale dataset with 102 languages to and from English and up to one million examples per direction also show promising results, surpassing strong bilingual baselines and encouraging future work on massively multilingual NMT.
http://arxiv.org/pdf/1903.00089
[ "Roee Aharoni", "Melvin Johnson", "Orhan Firat" ]
[ "cs.CL" ]
Accepted as a long paper in NAACL 2019
null
cs.CL
20190228
20190702
[]
1903.00089
21
the model and data are much larger in this case, we used a dropout rate of 0.1 for our multilingual models and tuned it to 0.3 for our baseline models as it improved the translation quality on the development set. We evaluate our models on 10 languages from different typological families: Semitic – Arabic (Ar), Hebrew (He), Romance – Galician (Gl), Italian (It), Romanian (Ro), Germanic – German (De), Dutch (Nl), Slavic – Belarusian (Be), Slovak (Sk) and Turkic – Azerbaijani (Az) and Turkish (Tr). We evaluate both to-and-from English, where each language pair is trained on up to one million examples. As in the previous experiment, we report test results from the model that performed best in terms of BLEU on the development set. 4The average number of examples per language pair is 940k, as for 13 out of the 102 pairs we had less than one million examples available. 5This is larger than the Transformer “Big” configuration, which includes approximately 213M trained parameters. # of language pairs 102 examples per pair min 63,879 max 1,000,000 average 940,087 std. deviation 188,194
1903.00089
Massively Multilingual Neural Machine Translation
Multilingual neural machine translation (NMT) enables training a single model that supports translation from multiple source languages into multiple target languages. In this paper, we push the limits of multilingual NMT in terms of number of languages being used. We perform extensive experiments in training massively multilingual NMT models, translating up to 102 languages to and from English within a single model. We explore different setups for training such models and analyze the trade-offs between translation quality and various modeling decisions. We report results on the publicly available TED talks multilingual corpus where we show that massively multilingual many-to-many models are effective in low resource settings, outperforming the previous state-of-the-art while supporting up to 59 languages. Our experiments on a large-scale dataset with 102 languages to and from English and up to one million examples per direction also show promising results, surpassing strong bilingual baselines and encouraging future work on massively multilingual NMT.
http://arxiv.org/pdf/1903.00089
[ "Roee Aharoni", "Melvin Johnson", "Orhan Firat" ]
[ "cs.CL" ]
Accepted as a long paper in NAACL 2019
null
cs.CL
20190228
20190702
[]
1903.00089
22
# of language pairs 102 examples per pair min 63,879 max 1,000,000 average 940,087 std. deviation 188,194 total # of examples 95,888,938 Table 4: Training set details for the 103 langauges corpus, X!En data. Ar Az Be De He It Nl Ro Sk Tr Avg. baselines 23.34 16.3 21.93 30.18 31.83 36.47 36.12 34.59 25.39 27.13 28.33 many-to-one 26.04 23.68 25.36 35.05 33.61 35.69 36.28 36.33 28.35 29.75 31.01 many-to-many 22.17 21.45 23.03 37.06 30.71 35.0 36.18 36.57 29.87 27.64 29.97 Table 5: X !En test BLEU on the 103-language corpus Ar Az Be De He It Nl Ro Sk Tr Avg. baselines 10.57 8.07 15.3 23.24 19.47 31.42 28.68 27.92 11.08 15.54 19.13 one-to-many 12.08 9.92 15.6 31.39 20.01 33 31.06 28.43 17.67 17.68 21.68
1903.00089
Massively Multilingual Neural Machine Translation
Multilingual neural machine translation (NMT) enables training a single model that supports translation from multiple source languages into multiple target languages. In this paper, we push the limits of multilingual NMT in terms of number of languages being used. We perform extensive experiments in training massively multilingual NMT models, translating up to 102 languages to and from English within a single model. We explore different setups for training such models and analyze the trade-offs between translation quality and various modeling decisions. We report results on the publicly available TED talks multilingual corpus where we show that massively multilingual many-to-many models are effective in low resource settings, outperforming the previous state-of-the-art while supporting up to 59 languages. Our experiments on a large-scale dataset with 102 languages to and from English and up to one million examples per direction also show promising results, surpassing strong bilingual baselines and encouraging future work on massively multilingual NMT.
http://arxiv.org/pdf/1903.00089
[ "Roee Aharoni", "Melvin Johnson", "Orhan Firat" ]
[ "cs.CL" ]
Accepted as a long paper in NAACL 2019
null
cs.CL
20190228
20190702
[]
1903.00089
23
one-to-many 12.08 9.92 15.6 31.39 20.01 33 31.06 28.43 17.67 17.68 21.68 many-to-many 10.57 9.84 14.3 28.48 17.91 30.39 29.67 26.23 18.15 15.58 20.11 Table 6: En !X test BLEU on the 103-language corpus 3.2 Results Table 5 describes the results when translating into English. First, we can see that both multilingual models perform better than the baselines in terms of average BLEU. This shows that massively multilingual many-to-many models can work well in realistic settings with millions of training examples, 102 languages and 204 jointly trained directions to-and-from English. Looking more closely, we note several different behaviors in comparison to the low-resource experiments on the TED Talks corpus. First, the many-to-one model here performs better than the many-to-many model. This shows that the previous result was indeed due to the pathologies of the low-resource dataset; when the training data is large enough and not multiway-parallel there is no overfitting in the many-toone model, and it outperforms the many-to-many model in most cases while they are trained identically.
1903.00089
Massively Multilingual Neural Machine Translation
Multilingual neural machine translation (NMT) enables training a single model that supports translation from multiple source languages into multiple target languages. In this paper, we push the limits of multilingual NMT in terms of number of languages being used. We perform extensive experiments in training massively multilingual NMT models, translating up to 102 languages to and from English within a single model. We explore different setups for training such models and analyze the trade-offs between translation quality and various modeling decisions. We report results on the publicly available TED talks multilingual corpus where we show that massively multilingual many-to-many models are effective in low resource settings, outperforming the previous state-of-the-art while supporting up to 59 languages. Our experiments on a large-scale dataset with 102 languages to and from English and up to one million examples per direction also show promising results, surpassing strong bilingual baselines and encouraging future work on massively multilingual NMT.
http://arxiv.org/pdf/1903.00089
[ "Roee Aharoni", "Melvin Johnson", "Orhan Firat" ]
[ "cs.CL" ]
Accepted as a long paper in NAACL 2019
null
cs.CL
20190228
20190702
[]
1903.00089
24
model in most cases while they are trained identically. One particular outlier in this case is German-toEnglish, where the many-to-one model is 2 BLEU points below the many-to-many model. We examine the BLEU score of this language pair on its dedicated German-English development set during training in the many-to-one model and find that it highly fluctuates. We then measure the performance on the test set for this language pair by choosing the best checkpoint on the dedicated German-English development set (instead of on the mixed multilingual development set) and find it to be 38.07, which is actually higher in 1 BLEU than the best result of the many-to-many model. This shows that while training many languages together, there is no “silver bullet”: some languages may suffer from severe interference during training (i.e. a reduction of 3 BLEU in this case, from38.07 to 35.05) while other languages continue to improve with more updates. Table 6 describes the results when translating out-of-English. Again, both of the massively multilingual models perform better than the baselines when averaged across the 10 evaluated language pairs, while handling up to 102 languages
1903.00089
Massively Multilingual Neural Machine Translation
Multilingual neural machine translation (NMT) enables training a single model that supports translation from multiple source languages into multiple target languages. In this paper, we push the limits of multilingual NMT in terms of number of languages being used. We perform extensive experiments in training massively multilingual NMT models, translating up to 102 languages to and from English within a single model. We explore different setups for training such models and analyze the trade-offs between translation quality and various modeling decisions. We report results on the publicly available TED talks multilingual corpus where we show that massively multilingual many-to-many models are effective in low resource settings, outperforming the previous state-of-the-art while supporting up to 59 languages. Our experiments on a large-scale dataset with 102 languages to and from English and up to one million examples per direction also show promising results, surpassing strong bilingual baselines and encouraging future work on massively multilingual NMT.
http://arxiv.org/pdf/1903.00089
[ "Roee Aharoni", "Melvin Johnson", "Orhan Firat" ]
[ "cs.CL" ]
Accepted as a long paper in NAACL 2019
null
cs.CL
20190228
20190702
[]
1903.00089
25
out-of-English. Again, both of the massively multilingual models perform better than the baselines when averaged across the 10 evaluated language pairs, while handling up to 102 languages to-and-from English and 204 translation tasks simultaneously. In this case the results are similar to those we observed on the TED talks corpus, where the one-to-many model performs better than the many-to-many model. Again, this advantage may be due to the one-to-many model handling a smaller number of tasks while not being biased towards English in the target side like the many-to-many model. 4 Analysis The above results show that massively multilingual NMT is indeed possible in large scale settings and can improve performance over strong bilingual baselines. However, it was shown in a somewhat extreme case with more than 100 languages trained jointly, where we saw that in some cases the joint training may harm the performance for some language pairs (i.e. German-English above). In the following analysis we would like to better understand the trade-off between the number of languages involved and the translation accuracy while keeping the model capacity and training configuration fixed. 4.1 Multilinguality & Supervised Performance We first study the effect of varying the number of languages on the translation accuracy in
1903.00089
Massively Multilingual Neural Machine Translation
Multilingual neural machine translation (NMT) enables training a single model that supports translation from multiple source languages into multiple target languages. In this paper, we push the limits of multilingual NMT in terms of number of languages being used. We perform extensive experiments in training massively multilingual NMT models, translating up to 102 languages to and from English within a single model. We explore different setups for training such models and analyze the trade-offs between translation quality and various modeling decisions. We report results on the publicly available TED talks multilingual corpus where we show that massively multilingual many-to-many models are effective in low resource settings, outperforming the previous state-of-the-art while supporting up to 59 languages. Our experiments on a large-scale dataset with 102 languages to and from English and up to one million examples per direction also show promising results, surpassing strong bilingual baselines and encouraging future work on massively multilingual NMT.
http://arxiv.org/pdf/1903.00089
[ "Roee Aharoni", "Melvin Johnson", "Orhan Firat" ]
[ "cs.CL" ]
Accepted as a long paper in NAACL 2019
null
cs.CL
20190228
20190702
[]
1903.00089
26
4.1 Multilinguality & Supervised Performance We first study the effect of varying the number of languages on the translation accuracy in a supervised setting, where we focus on manyAr-En En-Ar Fr-En En-Fr Ru-En En-Ru Uk-En En-Uk Avg. 5-to-5 23.87 12.42 38.99 37.3 29.07 24.86 26.17 16.48 26.14 25-to-25 23.43 11.77 38.87 36.79 29.36 23.24 25.81 17.17 25.8 50-to-50 23.7 11.65 37.81 35.83 29.22 21.95 26.02 15.32 25.18 75-to-75 22.23 10.69 37.97 34.35 28.55 20.7 25.89 14.59 24.37 103-to-103 21.16 10.25 35.91 34.42 27.25 19.9 24.53 13.89 23.41 Table 7: Supervised performance while varying the number of languages involved Ar-Fr Fr-Ar Ru-Uk Uk-Ru Avg. 5-to-5 1.66 4.49 3.7 3.02 3.21
1903.00089
Massively Multilingual Neural Machine Translation
Multilingual neural machine translation (NMT) enables training a single model that supports translation from multiple source languages into multiple target languages. In this paper, we push the limits of multilingual NMT in terms of number of languages being used. We perform extensive experiments in training massively multilingual NMT models, translating up to 102 languages to and from English within a single model. We explore different setups for training such models and analyze the trade-offs between translation quality and various modeling decisions. We report results on the publicly available TED talks multilingual corpus where we show that massively multilingual many-to-many models are effective in low resource settings, outperforming the previous state-of-the-art while supporting up to 59 languages. Our experiments on a large-scale dataset with 102 languages to and from English and up to one million examples per direction also show promising results, surpassing strong bilingual baselines and encouraging future work on massively multilingual NMT.
http://arxiv.org/pdf/1903.00089
[ "Roee Aharoni", "Melvin Johnson", "Orhan Firat" ]
[ "cs.CL" ]
Accepted as a long paper in NAACL 2019
null
cs.CL
20190228
20190702
[]
1903.00089
27
Ar-Fr Fr-Ar Ru-Uk Uk-Ru Avg. 5-to-5 1.66 4.49 3.7 3.02 3.21 25-to-25 1.83 5.52 16.67 4.31 7.08 50-to-50 4.34 4.72 15.14 20.23 11.1 75-to-75 1.85 4.26 11.2 15.88 8.3 103-to-103 2.87 3.05 12.3 18.49 9.17 Table 8: Zero-Shot performance while varying the number of languages involved to-many models. We create four subsets of the in-house dataset by sub-sampling it to a different number of languages in each subset. In this way we create four additional English-centric datasets, containing 5, 25, 50 and 75 languages each to-and-from English. We make sure that each subset contains all the languages from the next smaller subsets – i.e. the 25 language subset contains the 5 language subset, the 50 language subset contains the 25 language subset and so on. We train a similar-capacity large Transformer model (with 473.7M parameters) on each of these subsets and measure the performance for each model on the 8 supervised language pairs
1903.00089
Massively Multilingual Neural Machine Translation
Multilingual neural machine translation (NMT) enables training a single model that supports translation from multiple source languages into multiple target languages. In this paper, we push the limits of multilingual NMT in terms of number of languages being used. We perform extensive experiments in training massively multilingual NMT models, translating up to 102 languages to and from English within a single model. We explore different setups for training such models and analyze the trade-offs between translation quality and various modeling decisions. We report results on the publicly available TED talks multilingual corpus where we show that massively multilingual many-to-many models are effective in low resource settings, outperforming the previous state-of-the-art while supporting up to 59 languages. Our experiments on a large-scale dataset with 102 languages to and from English and up to one million examples per direction also show promising results, surpassing strong bilingual baselines and encouraging future work on massively multilingual NMT.
http://arxiv.org/pdf/1903.00089
[ "Roee Aharoni", "Melvin Johnson", "Orhan Firat" ]
[ "cs.CL" ]
Accepted as a long paper in NAACL 2019
null
cs.CL
20190228
20190702
[]
1903.00089
28
of these subsets and measure the performance for each model on the 8 supervised language pairs from the smallest subset – fArabic, French, Russian, Ukrainian g$English. In this way we can analyze to what extent adding more languages improves or harms translation quality while keeping the model capacity fixed, testing the capacity vs. accuracy “saturation point”. Table 7 shows the results of this experiment, reporting the test results for the models that performed best on the multilingual development set. We can see that in most cases the best results are obtained using the 5-to-5 model, showing that there is indeed a trade off between the number of languages and translation accuracy when using a fixed model capacity and the same training setup. One may expect that the gaps between the different models should become smaller and even close with more updates, as the models with more languages see less examples per language in each batch, thus requiring more updates to improve in terms of BLEU. However, in our setting these gaps did not close even after the models converged, leaving 2.73 average BLEU difference be-tween the 5-to-5 and the 103-to-103 model. 4.2 Multilinguality & Zero-Shot Performance We then study the effect of the number of languages on zero-shot translation accuracy. Since
1903.00089
Massively Multilingual Neural Machine Translation
Multilingual neural machine translation (NMT) enables training a single model that supports translation from multiple source languages into multiple target languages. In this paper, we push the limits of multilingual NMT in terms of number of languages being used. We perform extensive experiments in training massively multilingual NMT models, translating up to 102 languages to and from English within a single model. We explore different setups for training such models and analyze the trade-offs between translation quality and various modeling decisions. We report results on the publicly available TED talks multilingual corpus where we show that massively multilingual many-to-many models are effective in low resource settings, outperforming the previous state-of-the-art while supporting up to 59 languages. Our experiments on a large-scale dataset with 102 languages to and from English and up to one million examples per direction also show promising results, surpassing strong bilingual baselines and encouraging future work on massively multilingual NMT.
http://arxiv.org/pdf/1903.00089
[ "Roee Aharoni", "Melvin Johnson", "Orhan Firat" ]
[ "cs.CL" ]
Accepted as a long paper in NAACL 2019
null
cs.CL
20190228
20190702
[]
1903.00089
29
4.2 Multilinguality & Zero-Shot Performance We then study the effect of the number of languages on zero-shot translation accuracy. Since we find zero-shot accuracy as an interesting measure for model generalization, we hypothesize that by adding more languages, the model is forced to create a more generalized representation to better utilize its capacity, which may improve zeroshot performance. We choose four language pairs for this purpose: Arabic $French which are distant languages, and Ukrainian $Russian which are similar. Table 8 shows the results of our models on these language pairs. For Arabic $French the BLEU scores are very low in all cases, with the 50-to-50 and 25-to-25 models being slightly better than rest on Ar-Fr and Fr-Ar respectively. On Russian $Ukrainian we see clear improvements when increasing the number of languages to more than five. Figure 2 further illustrates this, showing the better generalization performance of the massively multilingual models under this zero-shot setting. While the zero-shot performance in this case is low and unstable for the 5-to-5 and 25-to-25 modupdate 5-to-5 25-to-25 50-to-50 75-to-75 103-to-103 0 0 0 0 0 0
1903.00089
Massively Multilingual Neural Machine Translation
Multilingual neural machine translation (NMT) enables training a single model that supports translation from multiple source languages into multiple target languages. In this paper, we push the limits of multilingual NMT in terms of number of languages being used. We perform extensive experiments in training massively multilingual NMT models, translating up to 102 languages to and from English within a single model. We explore different setups for training such models and analyze the trade-offs between translation quality and various modeling decisions. We report results on the publicly available TED talks multilingual corpus where we show that massively multilingual many-to-many models are effective in low resource settings, outperforming the previous state-of-the-art while supporting up to 59 languages. Our experiments on a large-scale dataset with 102 languages to and from English and up to one million examples per direction also show promising results, surpassing strong bilingual baselines and encouraging future work on massively multilingual NMT.
http://arxiv.org/pdf/1903.00089
[ "Roee Aharoni", "Melvin Johnson", "Orhan Firat" ]
[ "cs.CL" ]
Accepted as a long paper in NAACL 2019
null
cs.CL
20190228
20190702
[]
1903.00089
30
0 0 0 0 0 0 25000 3.360397369 7.345648855 7.028211653 6.687645614 6.629930437 50000 2.003555186 10.08476391 11.66040972 11.46485135 11.34905592 100000 2.383616194 9.54657495 15.44517726 14.72926438 13.17522973 150000 2.588021383 7.121089101 14.5408541 15.54533243 15.89359492 200000 2.589718811 10.99432111 15.82096368 17.38970876 16.26121253 250000 2.854427323 14.00393397 16.53215885 15.97282737 15.3215304 300000 2.823847346 6.934611499 16.78672731 16.52613729 16.16107672 350000 2.950227261 4.779103771 16.73545986 16.12752229 17.03165472 400000 4.301280901 6.631205231 16.16190225 17.38892049 17.55904406
1903.00089
Massively Multilingual Neural Machine Translation
Multilingual neural machine translation (NMT) enables training a single model that supports translation from multiple source languages into multiple target languages. In this paper, we push the limits of multilingual NMT in terms of number of languages being used. We perform extensive experiments in training massively multilingual NMT models, translating up to 102 languages to and from English within a single model. We explore different setups for training such models and analyze the trade-offs between translation quality and various modeling decisions. We report results on the publicly available TED talks multilingual corpus where we show that massively multilingual many-to-many models are effective in low resource settings, outperforming the previous state-of-the-art while supporting up to 59 languages. Our experiments on a large-scale dataset with 102 languages to and from English and up to one million examples per direction also show promising results, surpassing strong bilingual baselines and encouraging future work on massively multilingual NMT.
http://arxiv.org/pdf/1903.00089
[ "Roee Aharoni", "Melvin Johnson", "Orhan Firat" ]
[ "cs.CL" ]
Accepted as a long paper in NAACL 2019
null
cs.CL
20190228
20190702
[]
1903.00089
31
400000 4.301280901 6.631205231 16.16190225 17.38892049 17.55904406 450000 3.882381693 6.804813445 18.20554733 17.48778224 17.9339543 500000 3.45445089 6.358428299 17.32598543 16.71108902 15.97367823 550000 3.18 6.38 18.65 18.28 17.4 600000 2.86 9.5 18.46 14.92 17.12 650000 2.55 12.2 18.98 15.68 16.19 700000 2.98 8.44 20.16 15.4 18.52 Figure 2: Zero-shot BLEU during training for Ukranian to Russian els, it is much better for the 50-to-50, 75-to-75 and 103-to-103 models. Given these results we can say that the balance between capacity and generalization here favors the mid range 50-to-50 model, even when using models with more than 473M trained parameters. This may hint at the necessity of even larger models for such settings, which is a challenging avenue for future work. We also note that our 103 language corpus includes up to
1903.00089
Massively Multilingual Neural Machine Translation
Multilingual neural machine translation (NMT) enables training a single model that supports translation from multiple source languages into multiple target languages. In this paper, we push the limits of multilingual NMT in terms of number of languages being used. We perform extensive experiments in training massively multilingual NMT models, translating up to 102 languages to and from English within a single model. We explore different setups for training such models and analyze the trade-offs between translation quality and various modeling decisions. We report results on the publicly available TED talks multilingual corpus where we show that massively multilingual many-to-many models are effective in low resource settings, outperforming the previous state-of-the-art while supporting up to 59 languages. Our experiments on a large-scale dataset with 102 languages to and from English and up to one million examples per direction also show promising results, surpassing strong bilingual baselines and encouraging future work on massively multilingual NMT.
http://arxiv.org/pdf/1903.00089
[ "Roee Aharoni", "Melvin Johnson", "Orhan Firat" ]
[ "cs.CL" ]
Accepted as a long paper in NAACL 2019
null
cs.CL
20190228
20190702
[]
1903.00089
32
trained parameters. This may hint at the necessity of even larger models for such settings, which is a challenging avenue for future work. We also note that our 103 language corpus includes up to one million examples per language pair – while in real-world MT deployments, systems are trained on much more examples per pair. This again emphasizes the need for better techniques for training such massively multilingual models as we may already be hitting the capacity barrier in our setting. 5 Related Work Dong et al. (2015) extended the NMT model of Bahdanau et al. (2014) to one-to-many translation (from English into 4 languages) by adding a dedicated decoder per target language, showing improvements over strong single-pair baselines. Firat et al. (2016a,b) proposed many-to-many models (with up to 6 languages) by using separate encoders and decoders per language while sharing the attention mechanism. They also introduced the notion of zero-resource translation, where they use synthetic training data generated through pivoting to train translation directions without available training data. Ha et al. (2016) and Johnson et al. (2017) proposed to use a shared encoderdecoder-attention model for many-to-many translation (with up to 7 languages in the latter). In order to determine the target language in such
1903.00089
Massively Multilingual Neural Machine Translation
Multilingual neural machine translation (NMT) enables training a single model that supports translation from multiple source languages into multiple target languages. In this paper, we push the limits of multilingual NMT in terms of number of languages being used. We perform extensive experiments in training massively multilingual NMT models, translating up to 102 languages to and from English within a single model. We explore different setups for training such models and analyze the trade-offs between translation quality and various modeling decisions. We report results on the publicly available TED talks multilingual corpus where we show that massively multilingual many-to-many models are effective in low resource settings, outperforming the previous state-of-the-art while supporting up to 59 languages. Our experiments on a large-scale dataset with 102 languages to and from English and up to one million examples per direction also show promising results, surpassing strong bilingual baselines and encouraging future work on massively multilingual NMT.
http://arxiv.org/pdf/1903.00089
[ "Roee Aharoni", "Melvin Johnson", "Orhan Firat" ]
[ "cs.CL" ]
Accepted as a long paper in NAACL 2019
null
cs.CL
20190228
20190702
[]
1903.00089
33
order to determine the target language in such scenarios they proposed adding dedicated targetlanguage symbols to the source. This method enabled zero-shot translation, showing the ability of the model to generalize to unseen pairs. Recent works propose different methods for parameter sharing between language pairs in multilingual NMT. Blackwood et al. (2018) propose sharing all parameters but the attention mechanism and show improvements over sharing all parameters. Sachan and Neubig (2018) explore sharing various components in self-attentional (Transformer) models. Lu et al. (2018) add a shared “interlingua” layer while using separate encoders and decoders. Zaremoodi et al. (2018) utilize recurrent units with multiple blocks together with a trainable routing network. Platanios et al. (2018) propose to share the entire network, while using a contex-tual parameter generator that learns to generate the parameters of the system given the desired source and target languages. Gu et al. (2018) propose a “Universal Language Representation” layer together with a Mixture-of-Language-Experts component to improve a many-to-one model from 5 languages into English. While the mentioned studies provide valuable contributions to improving multilingual models, they apply their models on only up to 7 languages
1903.00089
Massively Multilingual Neural Machine Translation
Multilingual neural machine translation (NMT) enables training a single model that supports translation from multiple source languages into multiple target languages. In this paper, we push the limits of multilingual NMT in terms of number of languages being used. We perform extensive experiments in training massively multilingual NMT models, translating up to 102 languages to and from English within a single model. We explore different setups for training such models and analyze the trade-offs between translation quality and various modeling decisions. We report results on the publicly available TED talks multilingual corpus where we show that massively multilingual many-to-many models are effective in low resource settings, outperforming the previous state-of-the-art while supporting up to 59 languages. Our experiments on a large-scale dataset with 102 languages to and from English and up to one million examples per direction also show promising results, surpassing strong bilingual baselines and encouraging future work on massively multilingual NMT.
http://arxiv.org/pdf/1903.00089
[ "Roee Aharoni", "Melvin Johnson", "Orhan Firat" ]
[ "cs.CL" ]
Accepted as a long paper in NAACL 2019
null
cs.CL
20190228
20190702
[]
1903.00089
34
languages into English. While the mentioned studies provide valuable contributions to improving multilingual models, they apply their models on only up to 7 languages (Johnson et al., 2017) and 20 trained directions (Cettolo et al., 2017) in a single model, whereas we focus on scaling NMT to much larger numbers of languages and trained directions. Regarding massively multilingual models, Neubig and Hu (2018) explored methods for rapid adaptation of NMT to new languages by training multilingual models on the 59-language TED Talks corpus and fine-tuning them using data from the new languages. While modeling significantly more languages than previous studies, they only train many-to-one models, which we show are inferior in comparison to our proposed massively multilingual many-to-many models when evaluated into English on this dataset. Tiedemann (2018) trained an English-centric many-to-many model on translations of the bible including 927 languages. While this work pointed to an interesting phenomena in the latent space learned by the model where it clusters representations of typologically-similar languages together, it did not include any evaluation of the produced translations. Similarly, Malaviya et al. (2017) trained a many-to-English system including 1017 languages from bible translations, and
1903.00089
Massively Multilingual Neural Machine Translation
Multilingual neural machine translation (NMT) enables training a single model that supports translation from multiple source languages into multiple target languages. In this paper, we push the limits of multilingual NMT in terms of number of languages being used. We perform extensive experiments in training massively multilingual NMT models, translating up to 102 languages to and from English within a single model. We explore different setups for training such models and analyze the trade-offs between translation quality and various modeling decisions. We report results on the publicly available TED talks multilingual corpus where we show that massively multilingual many-to-many models are effective in low resource settings, outperforming the previous state-of-the-art while supporting up to 59 languages. Our experiments on a large-scale dataset with 102 languages to and from English and up to one million examples per direction also show promising results, surpassing strong bilingual baselines and encouraging future work on massively multilingual NMT.
http://arxiv.org/pdf/1903.00089
[ "Roee Aharoni", "Melvin Johnson", "Orhan Firat" ]
[ "cs.CL" ]
Accepted as a long paper in NAACL 2019
null
cs.CL
20190228
20190702
[]
1903.00089
35
produced translations. Similarly, Malaviya et al. (2017) trained a many-to-English system including 1017 languages from bible translations, and used it to infer typological features for the different languages (without evaluating the translation quality). In another relevant work, Artetxe and Schwenk (2018) trained an NMT model on 93 languages and used the learned representations to perform cross-lingual transfer learning. Again, they did not report the performance of the translation model learned in that massively multilingual setting. 6 Conclusions and Future Work We showed that NMT models can successfully scale to 102 languages to-and-from English with 204 trained directions and up to one million examples per direction. Such models improve the translation quality over similar single-pair baselines when evaluated to and from English by more than 2 BLEU when averaged over 10 diverse language pairs in each case. We show a similar result on the low-resource TED Talks corpus with 59 languages and 116 trained directions. We analyze the trade-offs between translation quality and the number of languages involved, pointing on capacity bottlenecks even with very large models and showing that massively multilingual models can generalize better to zero-shot settings. We hope this work will encourage future research on massively multilingual NMT, enabling
1903.00089
Massively Multilingual Neural Machine Translation
Multilingual neural machine translation (NMT) enables training a single model that supports translation from multiple source languages into multiple target languages. In this paper, we push the limits of multilingual NMT in terms of number of languages being used. We perform extensive experiments in training massively multilingual NMT models, translating up to 102 languages to and from English within a single model. We explore different setups for training such models and analyze the trade-offs between translation quality and various modeling decisions. We report results on the publicly available TED talks multilingual corpus where we show that massively multilingual many-to-many models are effective in low resource settings, outperforming the previous state-of-the-art while supporting up to 59 languages. Our experiments on a large-scale dataset with 102 languages to and from English and up to one million examples per direction also show promising results, surpassing strong bilingual baselines and encouraging future work on massively multilingual NMT.
http://arxiv.org/pdf/1903.00089
[ "Roee Aharoni", "Melvin Johnson", "Orhan Firat" ]
[ "cs.CL" ]
Accepted as a long paper in NAACL 2019
null
cs.CL
20190228
20190702
[]
1903.00089
36
showing that massively multilingual models can generalize better to zero-shot settings. We hope this work will encourage future research on massively multilingual NMT, enabling easier support for systems that can serve more people around the globe. There are many possible avenues for future work, including semi-supervised learning in such settings, exploring ways to reduce the performance degradation when increasing the number of languages, or using such models for multilingual transfer learning (McCann et al., 2017; Eriguchi et al., 2018; Artetxe and Schwenk, 2018). Understanding and improving zero-shot performance in such scenarios is also a promising direction for future work. Acknowledgments We would like to thank the Google Brain and Google Translate teams for their useful inputs and discussions. We would also like to thank the entire Lingvo development team for their foundational contributions to this project. References Mikel Artetxe and Holger Schwenk. 2018. Massively multilingual sentence embeddings for zeroshot cross-lingual transfer and beyond. arXiv preprint arXiv:1812.10464 . Dzmitry Bahdanau, Kyunghyun Cho, and Yoshua Bengio. 2014. Neural machine translation by jointly learning to align and translate. arXiv preprint
1903.00089
Massively Multilingual Neural Machine Translation
Multilingual neural machine translation (NMT) enables training a single model that supports translation from multiple source languages into multiple target languages. In this paper, we push the limits of multilingual NMT in terms of number of languages being used. We perform extensive experiments in training massively multilingual NMT models, translating up to 102 languages to and from English within a single model. We explore different setups for training such models and analyze the trade-offs between translation quality and various modeling decisions. We report results on the publicly available TED talks multilingual corpus where we show that massively multilingual many-to-many models are effective in low resource settings, outperforming the previous state-of-the-art while supporting up to 59 languages. Our experiments on a large-scale dataset with 102 languages to and from English and up to one million examples per direction also show promising results, surpassing strong bilingual baselines and encouraging future work on massively multilingual NMT.
http://arxiv.org/pdf/1903.00089
[ "Roee Aharoni", "Melvin Johnson", "Orhan Firat" ]
[ "cs.CL" ]
Accepted as a long paper in NAACL 2019
null
cs.CL
20190228
20190702
[]
1903.00089
37
Dzmitry Bahdanau, Kyunghyun Cho, and Yoshua Bengio. 2014. Neural machine translation by jointly learning to align and translate. arXiv preprint arXiv:1409.0473 . Graeme Blackwood, Miguel Ballesteros, and Todd Ward. 2018. Multilingual neural machine translation with task-specific attention. In Proceedings of the 27th International Conference on Computational Linguistics , Santa Fe, New Mexico, USA. Association for Computational Linguistics. Ondˇrej Bojar, Rajen Chatterjee, Christian Federmann, et al. 2017. Findings of the 2017 conference on machine translation (wmt17). In Proceedings of the Second Conference on Machine Translation .Ondˇrej Bojar, Rajen Chatterjee, Christian Federmann, et al. 2016. Findings of the 2016 conference on machine translation. In ACL 2016 FIRST CONFERENCE ON MACHINE TRANSLATION (WMT16) , pages 131–198. Ondˇrej Bojar, Christian Federmann, Mark Fishel, Yvette Graham, Barry Haddow, Philipp Koehn, and
1903.00089
Massively Multilingual Neural Machine Translation
Multilingual neural machine translation (NMT) enables training a single model that supports translation from multiple source languages into multiple target languages. In this paper, we push the limits of multilingual NMT in terms of number of languages being used. We perform extensive experiments in training massively multilingual NMT models, translating up to 102 languages to and from English within a single model. We explore different setups for training such models and analyze the trade-offs between translation quality and various modeling decisions. We report results on the publicly available TED talks multilingual corpus where we show that massively multilingual many-to-many models are effective in low resource settings, outperforming the previous state-of-the-art while supporting up to 59 languages. Our experiments on a large-scale dataset with 102 languages to and from English and up to one million examples per direction also show promising results, surpassing strong bilingual baselines and encouraging future work on massively multilingual NMT.
http://arxiv.org/pdf/1903.00089
[ "Roee Aharoni", "Melvin Johnson", "Orhan Firat" ]
[ "cs.CL" ]
Accepted as a long paper in NAACL 2019
null
cs.CL
20190228
20190702
[]
1903.00089
38
Ondˇrej Bojar, Christian Federmann, Mark Fishel, Yvette Graham, Barry Haddow, Philipp Koehn, and Christof Monz. 2018. Findings of the 2018 conference on machine translation (wmt18). In Proceedings of the Third Conference on Machine Translation: Shared Task Papers . Mauro Cettolo, Federico Marcello, Bentivogli Luisa, Niehues Jan, St ¨uker Sebastian, Sudoh Katsuitho, Yoshino Koichiro, and Federmann Christian. 2017. Overview of the iwslt 2017 evaluation campaign. In International Workshop on Spoken Language Translation . Daxiang Dong, Hua Wu, Wei He, Dianhai Yu, and Haifeng Wang. 2015. Multi-task learning for multiple language translation. In Proceedings of the 53rd Annual Meeting of the Association for Computational Linguistics and the 7th International Joint Conference on Natural Language Processing . Akiko Eriguchi, Melvin Johnson, Orhan Firat, Hideto Kazawa, and Wolfgang Macherey. 2018. Zeroshot cross-lingual classification using multilingual neural machine translation. arXiv preprint arXiv:1809.04686 .
1903.00089
Massively Multilingual Neural Machine Translation
Multilingual neural machine translation (NMT) enables training a single model that supports translation from multiple source languages into multiple target languages. In this paper, we push the limits of multilingual NMT in terms of number of languages being used. We perform extensive experiments in training massively multilingual NMT models, translating up to 102 languages to and from English within a single model. We explore different setups for training such models and analyze the trade-offs between translation quality and various modeling decisions. We report results on the publicly available TED talks multilingual corpus where we show that massively multilingual many-to-many models are effective in low resource settings, outperforming the previous state-of-the-art while supporting up to 59 languages. Our experiments on a large-scale dataset with 102 languages to and from English and up to one million examples per direction also show promising results, surpassing strong bilingual baselines and encouraging future work on massively multilingual NMT.
http://arxiv.org/pdf/1903.00089
[ "Roee Aharoni", "Melvin Johnson", "Orhan Firat" ]
[ "cs.CL" ]
Accepted as a long paper in NAACL 2019
null
cs.CL
20190228
20190702
[]
1903.00089
39
arXiv:1809.04686 . Orhan Firat, Kyunghyun Cho, and Yoshua Bengio. 2016a. Multi-way, multilingual neural machine translation with a shared attention mechanism. In Proceedings of the 2016 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies . Orhan Firat, Baskaran Sankaran, Yaser Al-Onaizan, Fatos T Yarman Vural, and Kyunghyun Cho. 2016b. Zero-resource translation with multi-lingual neural machine translation. In Proceedings of the 2016 Conference on Empirical Methods in Natural Language Processing . Jiatao Gu, Hany Hassan, Jacob Devlin, and Victor O.K. Li. 2018. Universal neural machine translation for extremely low resource languages. In Proceedings of the 2018 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies . Thanh-Le Ha, Jan Niehues, and Alexander Waibel. 2016. Toward multilingual neural machine translation with universal encoder and decoder. arXiv preprint arXiv:1611.04798 . Hany Hassan, Anthony Aue, Chang Chen, et al.
1903.00089
Massively Multilingual Neural Machine Translation
Multilingual neural machine translation (NMT) enables training a single model that supports translation from multiple source languages into multiple target languages. In this paper, we push the limits of multilingual NMT in terms of number of languages being used. We perform extensive experiments in training massively multilingual NMT models, translating up to 102 languages to and from English within a single model. We explore different setups for training such models and analyze the trade-offs between translation quality and various modeling decisions. We report results on the publicly available TED talks multilingual corpus where we show that massively multilingual many-to-many models are effective in low resource settings, outperforming the previous state-of-the-art while supporting up to 59 languages. Our experiments on a large-scale dataset with 102 languages to and from English and up to one million examples per direction also show promising results, surpassing strong bilingual baselines and encouraging future work on massively multilingual NMT.
http://arxiv.org/pdf/1903.00089
[ "Roee Aharoni", "Melvin Johnson", "Orhan Firat" ]
[ "cs.CL" ]
Accepted as a long paper in NAACL 2019
null
cs.CL
20190228
20190702
[]
1903.00089
40
preprint arXiv:1611.04798 . Hany Hassan, Anthony Aue, Chang Chen, et al. 2018. Achieving human parity on automatic chinese to english news translation. arXiv preprint arXiv:1803.05567 . Melvin Johnson, Mike Schuster, Quoc V Le, et al. 2017. Google’s multilingual neural machine translation system: Enabling zero-shot translation. Transactions of the Association of Computational Linguistics. Nal Kalchbrenner and Phil Blunsom. 2013. Recurrent continuous translation models. In Proceedings of the 2013 Conference on Empirical Methods in Natural Language Processing , Seattle, Washington, USA. Surafel Melaku Lakew, Mauro Cettolo, and Marcello Federico. 2018. A comparison of transformer and recurrent neural networks on multilingual neural machine translation. In Proceedings of the 27th International Conference on Computational Linguistics, Santa Fe, New Mexico, USA. Yichao Lu, Phillip Keung, Faisal Ladhak, Vikas Bhardwaj, Shaonan Zhang, and Jason Sun. 2018. A neural interlingua for multilingual machine translation. InProceedings of the Third Conference on Machine Translation: Research Papers , Belgium, Brussels.
1903.00089
Massively Multilingual Neural Machine Translation
Multilingual neural machine translation (NMT) enables training a single model that supports translation from multiple source languages into multiple target languages. In this paper, we push the limits of multilingual NMT in terms of number of languages being used. We perform extensive experiments in training massively multilingual NMT models, translating up to 102 languages to and from English within a single model. We explore different setups for training such models and analyze the trade-offs between translation quality and various modeling decisions. We report results on the publicly available TED talks multilingual corpus where we show that massively multilingual many-to-many models are effective in low resource settings, outperforming the previous state-of-the-art while supporting up to 59 languages. Our experiments on a large-scale dataset with 102 languages to and from English and up to one million examples per direction also show promising results, surpassing strong bilingual baselines and encouraging future work on massively multilingual NMT.
http://arxiv.org/pdf/1903.00089
[ "Roee Aharoni", "Melvin Johnson", "Orhan Firat" ]
[ "cs.CL" ]
Accepted as a long paper in NAACL 2019
null
cs.CL
20190228
20190702
[]
1903.00089
41
InProceedings of the Third Conference on Machine Translation: Research Papers , Belgium, Brussels. Chaitanya Malaviya, Graham Neubig, and Patrick Littell. 2017. Learning language representations for typology prediction. In Proceedings of the 2017 Conference on Empirical Methods in Natural Language Processing . Bryan McCann, James Bradbury, Caiming Xiong, and Richard Socher. 2017. Learned in translation: Contextualized word vectors. In Advances in Neural Information Processing Systems . Graham Neubig and Junjie Hu. 2018. Rapid adaptation of neural machine translation to new languages. In Proceedings of the 2018 Conference on Empirical Methods in Natural Language Processing . Toan Q. Nguyen and David Chiang. 2017. Transfer learning across low-resource, related languages for neural machine translation. In Proc. IJCNLP . Myle Ott, Sergey Edunov, David Grangier, and Michael Auli. 2018. Scaling neural machine translation. In Proceedings of the Third Conference on Machine Translation: Research Papers . Kishore Papineni, Salim Roukos, Todd Ward, and WeiJing Zhu. 2002. Bleu: a method for automatic evaluation of machine translation. In Proceedings of 40th Annual Meeting of the Association for Computational Linguistics , Philadelphia, Pennsylvania, USA.
1903.00089
Massively Multilingual Neural Machine Translation
Multilingual neural machine translation (NMT) enables training a single model that supports translation from multiple source languages into multiple target languages. In this paper, we push the limits of multilingual NMT in terms of number of languages being used. We perform extensive experiments in training massively multilingual NMT models, translating up to 102 languages to and from English within a single model. We explore different setups for training such models and analyze the trade-offs between translation quality and various modeling decisions. We report results on the publicly available TED talks multilingual corpus where we show that massively multilingual many-to-many models are effective in low resource settings, outperforming the previous state-of-the-art while supporting up to 59 languages. Our experiments on a large-scale dataset with 102 languages to and from English and up to one million examples per direction also show promising results, surpassing strong bilingual baselines and encouraging future work on massively multilingual NMT.
http://arxiv.org/pdf/1903.00089
[ "Roee Aharoni", "Melvin Johnson", "Orhan Firat" ]
[ "cs.CL" ]
Accepted as a long paper in NAACL 2019
null
cs.CL
20190228
20190702
[]
1903.00089
42
40th Annual Meeting of the Association for Computational Linguistics , Philadelphia, Pennsylvania, USA. Emmanouil Antonios Platanios, Mrinmaya Sachan, Graham Neubig, and Tom Mitchell. 2018. Contextual parameter generation for universal neural machine translation. In Proceedings of the 2018 Conference on Empirical Methods in Natural Language Processing .Ye Qi, Sachan Devendra, Felix Matthieu, Padmanabhan Sarguna, and Neubig Graham. 2018. When and why are pre-trained word embeddings useful for neural machine translation. In HLT-NAACL . Devendra Sachan and Graham Neubig. 2018. Parameter sharing methods for multilingual self-attentional translation models. In Proceedings of the Third Conference on Machine Translation: Research Papers, Belgium, Brussels. Rico Sennrich, Barry Haddow, and Alexandra Birch. 2016. Neural machine translation of rare words with subword units. In Proceedings of the 54th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers) , volume 1, pages 1715–1725. Jonathan Shen, Patrick Nguyen, Yonghui Wu, Zhifeng Chen, et al. 2019. Lingvo: a modular and scalable framework for sequence-to-sequence modeling.
1903.00089
Massively Multilingual Neural Machine Translation
Multilingual neural machine translation (NMT) enables training a single model that supports translation from multiple source languages into multiple target languages. In this paper, we push the limits of multilingual NMT in terms of number of languages being used. We perform extensive experiments in training massively multilingual NMT models, translating up to 102 languages to and from English within a single model. We explore different setups for training such models and analyze the trade-offs between translation quality and various modeling decisions. We report results on the publicly available TED talks multilingual corpus where we show that massively multilingual many-to-many models are effective in low resource settings, outperforming the previous state-of-the-art while supporting up to 59 languages. Our experiments on a large-scale dataset with 102 languages to and from English and up to one million examples per direction also show promising results, surpassing strong bilingual baselines and encouraging future work on massively multilingual NMT.
http://arxiv.org/pdf/1903.00089
[ "Roee Aharoni", "Melvin Johnson", "Orhan Firat" ]
[ "cs.CL" ]
Accepted as a long paper in NAACL 2019
null
cs.CL
20190228
20190702
[]
1903.00089
43
Jonathan Shen, Patrick Nguyen, Yonghui Wu, Zhifeng Chen, et al. 2019. Lingvo: a modular and scalable framework for sequence-to-sequence modeling. Ilya Sutskever, Oriol Vinyals, and Quoc V Le. 2014. Sequence to sequence learning with neural networks. In Advances in neural information processing systems , pages 3104–3112. J¨org Tiedemann. 2018. Emerging language spaces learned from massively multilingual corpora. arXiv preprint arXiv:1802.00273 . Ashish Vaswani, Noam Shazeer, Niki Parmar, Jakob Uszkoreit, Llion Jones, Aidan N Gomez, Łukasz Kaiser, and Illia Polosukhin. 2017. Attention is all you need. In Advances in Neural Information Processing Systems , pages 5998–6008. Xinyi Wang, Hieu Pham, Philip Arthur, and Graham Neubig. 2019. Multilingual neural machine translation with soft decoupled encoding. In International Conference on Learning Representations . Yining Wang, Jiajun Zhang, Feifei Zhai, Jingfang Xu,
1903.00089
Massively Multilingual Neural Machine Translation
Multilingual neural machine translation (NMT) enables training a single model that supports translation from multiple source languages into multiple target languages. In this paper, we push the limits of multilingual NMT in terms of number of languages being used. We perform extensive experiments in training massively multilingual NMT models, translating up to 102 languages to and from English within a single model. We explore different setups for training such models and analyze the trade-offs between translation quality and various modeling decisions. We report results on the publicly available TED talks multilingual corpus where we show that massively multilingual many-to-many models are effective in low resource settings, outperforming the previous state-of-the-art while supporting up to 59 languages. Our experiments on a large-scale dataset with 102 languages to and from English and up to one million examples per direction also show promising results, surpassing strong bilingual baselines and encouraging future work on massively multilingual NMT.
http://arxiv.org/pdf/1903.00089
[ "Roee Aharoni", "Melvin Johnson", "Orhan Firat" ]
[ "cs.CL" ]
Accepted as a long paper in NAACL 2019
null
cs.CL
20190228
20190702
[]
1903.00089
44
Conference on Learning Representations . Yining Wang, Jiajun Zhang, Feifei Zhai, Jingfang Xu, and Chengqing Zong. 2018. Three strategies to improve one-to-many multilingual translation. In Proceedings of the 2018 Conference on Empirical Methods in Natural Language Processing , Brussels, Belgium. Yonghui Wu, Mike Schuster, Zhifeng Chen, et al. 2016. Google’s neural machine translation system: Bridging the gap between human and machine translation. arXiv preprint arXiv:1609.08144 . Poorya Zaremoodi, Wray Buntine, and Gholamreza Haffari. 2018. Adaptive knowledge sharing in multi-task learning: Improving low-resource neural machine translation. In Proceedings of the 56th Annual Meeting of the Association for Computational Linguistics , Melbourne, Australia. Barret Zoph, Deniz Yuret, Jonathan May, and Kevin Knight. 2016. Transfer learning for low-resource neural machine translation. In Proceedings of the 2016 Conference on Empirical Methods in Natural Language Processing . A Supplementary Material Language Train set size Arabic 214111 Hebrew 211819 Russian 208458 Korean 205640 Italian 204503 Japanese 204090 Chinese-Taiwan 202646
1903.00089
Massively Multilingual Neural Machine Translation
Multilingual neural machine translation (NMT) enables training a single model that supports translation from multiple source languages into multiple target languages. In this paper, we push the limits of multilingual NMT in terms of number of languages being used. We perform extensive experiments in training massively multilingual NMT models, translating up to 102 languages to and from English within a single model. We explore different setups for training such models and analyze the trade-offs between translation quality and various modeling decisions. We report results on the publicly available TED talks multilingual corpus where we show that massively multilingual many-to-many models are effective in low resource settings, outperforming the previous state-of-the-art while supporting up to 59 languages. Our experiments on a large-scale dataset with 102 languages to and from English and up to one million examples per direction also show promising results, surpassing strong bilingual baselines and encouraging future work on massively multilingual NMT.
http://arxiv.org/pdf/1903.00089
[ "Roee Aharoni", "Melvin Johnson", "Orhan Firat" ]
[ "cs.CL" ]
Accepted as a long paper in NAACL 2019
null
cs.CL
20190228
20190702
[]
1903.00089
45
Arabic 214111 Hebrew 211819 Russian 208458 Korean 205640 Italian 204503 Japanese 204090 Chinese-Taiwan 202646 Chinese-China 199855 Spanish 196026 French 192304 Portuguese-Brazil 184755 Dutch 183767 Turkish 182470 Romanian 180484 Polish 176169 Bulgarian 174444 Vietnamese 171995 German 167888 Persian 150965 Hungarian 147219 Serbian 136898 Greek 134327 Croatian 122091 Ukrainian 108495 Czech 103093 Thai 98064 Indonesian 87406 Slovak 61470 Swedish 56647 Portuguese 51785 Danish 44940 Albanian 44525 Lithuanian 41919 Macedonian 25335 Finnish 24222 Burmese 21497 Armenian 21360 French-Canadian 19870 Slovenian 19831 Hindi 18798 Norwegian 15825 Georgian 13193 Estonian 10738 Kurdish 10371 Galician 10017 Marathi 9840 Mongolian 7607 Esperanto 6535 Tamil 6224 Urdu 5977 Azerbaijani 5946
1903.00089
Massively Multilingual Neural Machine Translation
Multilingual neural machine translation (NMT) enables training a single model that supports translation from multiple source languages into multiple target languages. In this paper, we push the limits of multilingual NMT in terms of number of languages being used. We perform extensive experiments in training massively multilingual NMT models, translating up to 102 languages to and from English within a single model. We explore different setups for training such models and analyze the trade-offs between translation quality and various modeling decisions. We report results on the publicly available TED talks multilingual corpus where we show that massively multilingual many-to-many models are effective in low resource settings, outperforming the previous state-of-the-art while supporting up to 59 languages. Our experiments on a large-scale dataset with 102 languages to and from English and up to one million examples per direction also show promising results, surpassing strong bilingual baselines and encouraging future work on massively multilingual NMT.
http://arxiv.org/pdf/1903.00089
[ "Roee Aharoni", "Melvin Johnson", "Orhan Firat" ]
[ "cs.CL" ]
Accepted as a long paper in NAACL 2019
null
cs.CL
20190228
20190702
[]
1903.00089
46
Marathi 9840 Mongolian 7607 Esperanto 6535 Tamil 6224 Urdu 5977 Azerbaijani 5946 Bosnian 5664 Chinese 5534 Malay 5220 Basque 5182 Bengali 4649 Belarusian 4509 Kazakh 3317 Table 9: Language pairs in the TED talks dataset (58 languages, paired with English) with the train-set size for each pair.Languages Afrikaans Laothian Albanian Latin Amharic Latvian Arabic Lithuanian Armenian Luxembourgish* Azerbaijani Macedonian Basque Malagasy Belarusian Malay Bengali Malayalam Bosnian Maltese Bulgarian Maori Burmese Marathi Catalan Mongolian Cebuano Nepali Chichewa* Norwegian Chinese Pashto Corsican* Persian Croatian Polish Czech Portuguese Danish Punjabi Dutch Romanian Esperanto Russian Estonian Samoan* Finnish Scots Gaelic* French Serbian Frisian Sesotho Galician Shona* Georgian Sindhi* German Sinhalese Greek Slovak Gujarati Slovenian Haitian Creole Somali
1903.00089
Massively Multilingual Neural Machine Translation
Multilingual neural machine translation (NMT) enables training a single model that supports translation from multiple source languages into multiple target languages. In this paper, we push the limits of multilingual NMT in terms of number of languages being used. We perform extensive experiments in training massively multilingual NMT models, translating up to 102 languages to and from English within a single model. We explore different setups for training such models and analyze the trade-offs between translation quality and various modeling decisions. We report results on the publicly available TED talks multilingual corpus where we show that massively multilingual many-to-many models are effective in low resource settings, outperforming the previous state-of-the-art while supporting up to 59 languages. Our experiments on a large-scale dataset with 102 languages to and from English and up to one million examples per direction also show promising results, surpassing strong bilingual baselines and encouraging future work on massively multilingual NMT.
http://arxiv.org/pdf/1903.00089
[ "Roee Aharoni", "Melvin Johnson", "Orhan Firat" ]
[ "cs.CL" ]
Accepted as a long paper in NAACL 2019
null
cs.CL
20190228
20190702
[]
1903.00089
47
Galician Shona* Georgian Sindhi* German Sinhalese Greek Slovak Gujarati Slovenian Haitian Creole Somali Hausa* Spanish Hawaiian* Sundanese Hebrew Swahili Hindi Swedish Hmong* Tagalog Hungarian Tajik* Icelandic Tamil Igbo Telugu Indonesian Thai Irish Turkish Italian Ukrainian Japanese Urdu Javanese Uzbek Kannada Vietnamese Kazakh Welsh Khmer Xhosa Korean Yiddish Kurdish Yoruba* Kyrgyz Zulu Table 10: Language pairs in the in-house dataset (102 languages, paired with English). For languages marked with * we had less than 1M examples, while for the rest we used exactly 1M.
1903.00089
Massively Multilingual Neural Machine Translation
Multilingual neural machine translation (NMT) enables training a single model that supports translation from multiple source languages into multiple target languages. In this paper, we push the limits of multilingual NMT in terms of number of languages being used. We perform extensive experiments in training massively multilingual NMT models, translating up to 102 languages to and from English within a single model. We explore different setups for training such models and analyze the trade-offs between translation quality and various modeling decisions. We report results on the publicly available TED talks multilingual corpus where we show that massively multilingual many-to-many models are effective in low resource settings, outperforming the previous state-of-the-art while supporting up to 59 languages. Our experiments on a large-scale dataset with 102 languages to and from English and up to one million examples per direction also show promising results, surpassing strong bilingual baselines and encouraging future work on massively multilingual NMT.
http://arxiv.org/pdf/1903.00089
[ "Roee Aharoni", "Melvin Johnson", "Orhan Firat" ]
[ "cs.CL" ]
Accepted as a long paper in NAACL 2019
null
cs.CL
20190228
20190702
[]
1904.09925
0
Attention Augmented Convolutional Networks Irwan Bello Barret Zoph Ashish Vaswani Jonathon Shlens Quoc V . Le Google Brain fibello,barretzoph,avaswani,shlens,qvl [email protected] Abstract Convolutional networks have been the paradigm of choice in many computer vision applications. The convolution operation however has a significant weakness in that it only operates on a local neighborhood, thus missing global information. Self-attention, on the other hand, has emerged as a recent advance to capture long range interactions, but has mostly been applied to sequence modeling and generative modeling tasks. In this paper, we consider the use of self-attention for discriminative visual tasks as an alternative to convolutions. We introduce a novel two-dimensional relative self-attention mechanism that proves competitive in replacing convolutions as a stand-alone computational primitive for image classification. We find in control experiments that the best results are obtained when combining both convolutions and self-attention. We therefore propose to augment convolutional operators with this self-attention mechanism by concatenating convolutional feature maps with a set of feature maps produced via self-attention. Extensive experiments show that Attention Augmentation leads
1904.09925
Attention Augmented Convolutional Networks
Convolutional networks have been the paradigm of choice in many computer vision applications. The convolution operation however has a significant weakness in that it only operates on a local neighborhood, thus missing global information. Self-attention, on the other hand, has emerged as a recent advance to capture long range interactions, but has mostly been applied to sequence modeling and generative modeling tasks. In this paper, we consider the use of self-attention for discriminative visual tasks as an alternative to convolutions. We introduce a novel two-dimensional relative self-attention mechanism that proves competitive in replacing convolutions as a stand-alone computational primitive for image classification. We find in control experiments that the best results are obtained when combining both convolutions and self-attention. We therefore propose to augment convolutional operators with this self-attention mechanism by concatenating convolutional feature maps with a set of feature maps produced via self-attention. Extensive experiments show that Attention Augmentation leads to consistent improvements in image classification on ImageNet and object detection on COCO across many different models and scales, including ResNets and a state-of-the art mobile constrained network, while keeping the number of parameters similar. In particular, our method achieves a $1.3\%$ top-1 accuracy improvement on ImageNet classification over a ResNet50 baseline and outperforms other attention mechanisms for images such as Squeeze-and-Excitation. It also achieves an improvement of 1.4 mAP in COCO Object Detection on top of a RetinaNet baseline.
http://arxiv.org/pdf/1904.09925
[ "Irwan Bello", "Barret Zoph", "Ashish Vaswani", "Jonathon Shlens", "Quoc V. Le" ]
[ "cs.CV" ]
ICCV 2019
null
cs.CV
20190422
20200909
[]
1904.09925
1
mechanism by concatenating convolutional feature maps with a set of feature maps produced via self-attention. Extensive experiments show that Attention Augmentation leads to consistent improvements in image classification on ImageNet and object detection on COCO across many different models and scales, including ResNets and a stateof-the art mobile constrained network, while keeping the number of parameters similar. In particular, our method achieves a 1:3%top-1 accuracy improvement on ImageNet classification over a ResNet50 baseline and outperforms other attention mechanisms for images such as Squeezeand-Excitation [17]. It also achieves an improvement of 1.4 mAP in COCO Object Detection on top of a RetinaNet baseline. 1. Introduction Convolutional Neural Networks have enjoyed tremendous success in many computer vision applications, especially in image classification [24, 23]. The design of the convolutional layer imposes 1) locality via a limited receptive field and 2) translation equivariance via weight sharing. 20 30 40 50 60 70 number of parameters (millions)72737475767778798081top-1 accuracy 73.6%76.4%77.9%78.4%
1904.09925
Attention Augmented Convolutional Networks
Convolutional networks have been the paradigm of choice in many computer vision applications. The convolution operation however has a significant weakness in that it only operates on a local neighborhood, thus missing global information. Self-attention, on the other hand, has emerged as a recent advance to capture long range interactions, but has mostly been applied to sequence modeling and generative modeling tasks. In this paper, we consider the use of self-attention for discriminative visual tasks as an alternative to convolutions. We introduce a novel two-dimensional relative self-attention mechanism that proves competitive in replacing convolutions as a stand-alone computational primitive for image classification. We find in control experiments that the best results are obtained when combining both convolutions and self-attention. We therefore propose to augment convolutional operators with this self-attention mechanism by concatenating convolutional feature maps with a set of feature maps produced via self-attention. Extensive experiments show that Attention Augmentation leads to consistent improvements in image classification on ImageNet and object detection on COCO across many different models and scales, including ResNets and a state-of-the art mobile constrained network, while keeping the number of parameters similar. In particular, our method achieves a $1.3\%$ top-1 accuracy improvement on ImageNet classification over a ResNet50 baseline and outperforms other attention mechanisms for images such as Squeeze-and-Excitation. It also achieves an improvement of 1.4 mAP in COCO Object Detection on top of a RetinaNet baseline.
http://arxiv.org/pdf/1904.09925
[ "Irwan Bello", "Barret Zoph", "Ashish Vaswani", "Jonathon Shlens", "Quoc V. Le" ]
[ "cs.CV" ]
ICCV 2019
null
cs.CV
20190422
20200909
[]
1904.09925
2
number of parameters (millions)72737475767778798081top-1 accuracy 73.6%76.4%77.9%78.4% 74.3%77.5%78.4%78.9% 74.7%77.7%78.7%79.1% ResNet SE-ResNet AA-ResNet (ours)Figure 1. Attention Augmentation systematically improves image classification across a large variety of networks of different scales. ImageNet classification accuracy [9] versus the number of parameters for baseline models (ResNet) [14], models augmented with channel-wise attention (SE-ResNet) [17] and our proposed architecture (AA-ResNet). Both these properties prove to be crucial inductive biases when designing models that operate over images. However, the local nature of the convolutional kernel prevents it from capturing global contexts in an image, often necessary for better recognition of objects in images [33]. Self-attention [43], on the other hand, has emerged as a recent advance to capture long range interactions, but has mostly been applied to sequence modeling and generative modeling tasks. The key idea behind self-attention is to
1904.09925
Attention Augmented Convolutional Networks
Convolutional networks have been the paradigm of choice in many computer vision applications. The convolution operation however has a significant weakness in that it only operates on a local neighborhood, thus missing global information. Self-attention, on the other hand, has emerged as a recent advance to capture long range interactions, but has mostly been applied to sequence modeling and generative modeling tasks. In this paper, we consider the use of self-attention for discriminative visual tasks as an alternative to convolutions. We introduce a novel two-dimensional relative self-attention mechanism that proves competitive in replacing convolutions as a stand-alone computational primitive for image classification. We find in control experiments that the best results are obtained when combining both convolutions and self-attention. We therefore propose to augment convolutional operators with this self-attention mechanism by concatenating convolutional feature maps with a set of feature maps produced via self-attention. Extensive experiments show that Attention Augmentation leads to consistent improvements in image classification on ImageNet and object detection on COCO across many different models and scales, including ResNets and a state-of-the art mobile constrained network, while keeping the number of parameters similar. In particular, our method achieves a $1.3\%$ top-1 accuracy improvement on ImageNet classification over a ResNet50 baseline and outperforms other attention mechanisms for images such as Squeeze-and-Excitation. It also achieves an improvement of 1.4 mAP in COCO Object Detection on top of a RetinaNet baseline.
http://arxiv.org/pdf/1904.09925
[ "Irwan Bello", "Barret Zoph", "Ashish Vaswani", "Jonathon Shlens", "Quoc V. Le" ]
[ "cs.CV" ]
ICCV 2019
null
cs.CV
20190422
20200909
[]
1904.09925
3
recent advance to capture long range interactions, but has mostly been applied to sequence modeling and generative modeling tasks. The key idea behind self-attention is to produce a weighted average of values computed from hidden units. Unlike the pooling or the convolutional operator, the weights used in the weighted average operation are produced dynamically via a similarity function between hidden units. As a result, the interaction between input signals depends on the signals themselves rather than being predetermined by their relative location like in convolutions. In particular, this allows self-attention to capture long rangearXiv:1904.09925v5 [cs.CV] 9 Sep 2020 Input Attention maps Weighted average of the values Standard convolutionOutput W H Nh=2 Values²Head Head¹ Figure 2. Attention-augmented convolution : For each spatial location (h, w), Nhattention maps over the image are computed from queries and keys. These attention maps are used to compute Nhweighted averages of the values V . The results are then concatenated, reshaped to match the original volume’s spatial dimensions and mixed with a pointwise convolution. Multi-head attention is applied in parallel to a standard convolution operation and the outputs are concatenated. interactions without increasing the number of parameters.
1904.09925
Attention Augmented Convolutional Networks
Convolutional networks have been the paradigm of choice in many computer vision applications. The convolution operation however has a significant weakness in that it only operates on a local neighborhood, thus missing global information. Self-attention, on the other hand, has emerged as a recent advance to capture long range interactions, but has mostly been applied to sequence modeling and generative modeling tasks. In this paper, we consider the use of self-attention for discriminative visual tasks as an alternative to convolutions. We introduce a novel two-dimensional relative self-attention mechanism that proves competitive in replacing convolutions as a stand-alone computational primitive for image classification. We find in control experiments that the best results are obtained when combining both convolutions and self-attention. We therefore propose to augment convolutional operators with this self-attention mechanism by concatenating convolutional feature maps with a set of feature maps produced via self-attention. Extensive experiments show that Attention Augmentation leads to consistent improvements in image classification on ImageNet and object detection on COCO across many different models and scales, including ResNets and a state-of-the art mobile constrained network, while keeping the number of parameters similar. In particular, our method achieves a $1.3\%$ top-1 accuracy improvement on ImageNet classification over a ResNet50 baseline and outperforms other attention mechanisms for images such as Squeeze-and-Excitation. It also achieves an improvement of 1.4 mAP in COCO Object Detection on top of a RetinaNet baseline.
http://arxiv.org/pdf/1904.09925
[ "Irwan Bello", "Barret Zoph", "Ashish Vaswani", "Jonathon Shlens", "Quoc V. Le" ]
[ "cs.CV" ]
ICCV 2019
null
cs.CV
20190422
20200909
[]
1904.09925
4
parallel to a standard convolution operation and the outputs are concatenated. interactions without increasing the number of parameters. In this paper, we consider the use of self-attention for discriminative visual tasks as an alternative to convolutions. We develop a novel two-dimensional relative selfattention mechanism [37] that maintains translation equivariance while being infused with relative position information, making it well suited for images. Our self-attention formulation proves competitive for replacing convolutions entirely, however we find in control experiments that the best results are obtained when combining both. We therefore do not completely abandon the idea of convolutions, but instead propose to augment convolutions with this selfattention mechanism. This is achieved by concatenating convolutional feature maps, which enforce locality, to selfattentional feature maps capable of modeling longer range dependencies (see Figure 2). We test our method on the CIFAR-100 and ImageNet classification [22, 9] and the COCO object detection [27] tasks, across a wide range of architectures at different computational budgets, including a state-of-the art resource constrained architecture [42]. Attention Augmentation yields systematic improvements with minimal additional
1904.09925
Attention Augmented Convolutional Networks
Convolutional networks have been the paradigm of choice in many computer vision applications. The convolution operation however has a significant weakness in that it only operates on a local neighborhood, thus missing global information. Self-attention, on the other hand, has emerged as a recent advance to capture long range interactions, but has mostly been applied to sequence modeling and generative modeling tasks. In this paper, we consider the use of self-attention for discriminative visual tasks as an alternative to convolutions. We introduce a novel two-dimensional relative self-attention mechanism that proves competitive in replacing convolutions as a stand-alone computational primitive for image classification. We find in control experiments that the best results are obtained when combining both convolutions and self-attention. We therefore propose to augment convolutional operators with this self-attention mechanism by concatenating convolutional feature maps with a set of feature maps produced via self-attention. Extensive experiments show that Attention Augmentation leads to consistent improvements in image classification on ImageNet and object detection on COCO across many different models and scales, including ResNets and a state-of-the art mobile constrained network, while keeping the number of parameters similar. In particular, our method achieves a $1.3\%$ top-1 accuracy improvement on ImageNet classification over a ResNet50 baseline and outperforms other attention mechanisms for images such as Squeeze-and-Excitation. It also achieves an improvement of 1.4 mAP in COCO Object Detection on top of a RetinaNet baseline.
http://arxiv.org/pdf/1904.09925
[ "Irwan Bello", "Barret Zoph", "Ashish Vaswani", "Jonathon Shlens", "Quoc V. Le" ]
[ "cs.CV" ]
ICCV 2019
null
cs.CV
20190422
20200909
[]
1904.09925
5
constrained architecture [42]. Attention Augmentation yields systematic improvements with minimal additional computational burden and notably outperforms the popular Squeeze-and-Excitation [17] channelwise attention approach in all experiments. In particular, Attention Augmentation achieves a 1.3% top-1 accuracy ImageNet on top of a ResNet50 baseline and 1.4 mAP increase in COCO object detection on top of a RetinaNet baseline. Suprisingly, experiments also reveal that fully self-attentional models, a special case of Attention Augmentation, only perform slightly worse than their fully convolutional counterparts on ImageNet, indicating that self-attention is a powerful standalone computational primitive for image classification.2. Related Work 2.1. Convolutional networks Modern computer vision has been built on powerful image featurizers learned on image classification tasks such as CIFAR-10 [22] and ImageNet [9]. These datasets have been used as benchmarks for delineating better image featurizations and network architectures across a broad range of tasks [21]. For example, improving the “backbone” network typically leads to improvements in object detection [19] and image segmentation [6]. These observations have inspired the research and design of new architectures, which are typically derived from the composition of convolution
1904.09925
Attention Augmented Convolutional Networks
Convolutional networks have been the paradigm of choice in many computer vision applications. The convolution operation however has a significant weakness in that it only operates on a local neighborhood, thus missing global information. Self-attention, on the other hand, has emerged as a recent advance to capture long range interactions, but has mostly been applied to sequence modeling and generative modeling tasks. In this paper, we consider the use of self-attention for discriminative visual tasks as an alternative to convolutions. We introduce a novel two-dimensional relative self-attention mechanism that proves competitive in replacing convolutions as a stand-alone computational primitive for image classification. We find in control experiments that the best results are obtained when combining both convolutions and self-attention. We therefore propose to augment convolutional operators with this self-attention mechanism by concatenating convolutional feature maps with a set of feature maps produced via self-attention. Extensive experiments show that Attention Augmentation leads to consistent improvements in image classification on ImageNet and object detection on COCO across many different models and scales, including ResNets and a state-of-the art mobile constrained network, while keeping the number of parameters similar. In particular, our method achieves a $1.3\%$ top-1 accuracy improvement on ImageNet classification over a ResNet50 baseline and outperforms other attention mechanisms for images such as Squeeze-and-Excitation. It also achieves an improvement of 1.4 mAP in COCO Object Detection on top of a RetinaNet baseline.
http://arxiv.org/pdf/1904.09925
[ "Irwan Bello", "Barret Zoph", "Ashish Vaswani", "Jonathon Shlens", "Quoc V. Le" ]
[ "cs.CV" ]
ICCV 2019
null
cs.CV
20190422
20200909
[]
1904.09925
6
[19] and image segmentation [6]. These observations have inspired the research and design of new architectures, which are typically derived from the composition of convolution operations across an array of spatial scales and skip connections [23, 41, 39, 40, 14, 47, 13]. Indeed, automated search strategies for designing architectures based on convolutional primitives result in state-of-the-art accuracy on large-scale image classification tasks that translate across a range of tasks [55, 21]. 2.2. Attention mechanisms in networks Attention has enjoyed widespread adoption as a computational module for modeling sequences because of its ability to capture long distance interactions [2, 44, 4, 3]. Most notably, Bahdanau et al. [2] first proposed to combine attention with a Recurrent Neural Network [15] for alignment in Machine Translation. Attention was further extended by Vaswani et al. [43], where the self-attentional Transformer architecture achieved state-of-the-art results in Machine Translation. Using self-attention in cooperation with convolutions is a theme shared by recent work in Natural Language Processing [49] and Reinforcement Learning [52]. For example, the QANet [50] and Evolved Transformer [38] architectures alternate between self-attention
1904.09925
Attention Augmented Convolutional Networks
Convolutional networks have been the paradigm of choice in many computer vision applications. The convolution operation however has a significant weakness in that it only operates on a local neighborhood, thus missing global information. Self-attention, on the other hand, has emerged as a recent advance to capture long range interactions, but has mostly been applied to sequence modeling and generative modeling tasks. In this paper, we consider the use of self-attention for discriminative visual tasks as an alternative to convolutions. We introduce a novel two-dimensional relative self-attention mechanism that proves competitive in replacing convolutions as a stand-alone computational primitive for image classification. We find in control experiments that the best results are obtained when combining both convolutions and self-attention. We therefore propose to augment convolutional operators with this self-attention mechanism by concatenating convolutional feature maps with a set of feature maps produced via self-attention. Extensive experiments show that Attention Augmentation leads to consistent improvements in image classification on ImageNet and object detection on COCO across many different models and scales, including ResNets and a state-of-the art mobile constrained network, while keeping the number of parameters similar. In particular, our method achieves a $1.3\%$ top-1 accuracy improvement on ImageNet classification over a ResNet50 baseline and outperforms other attention mechanisms for images such as Squeeze-and-Excitation. It also achieves an improvement of 1.4 mAP in COCO Object Detection on top of a RetinaNet baseline.
http://arxiv.org/pdf/1904.09925
[ "Irwan Bello", "Barret Zoph", "Ashish Vaswani", "Jonathon Shlens", "Quoc V. Le" ]
[ "cs.CV" ]
ICCV 2019
null
cs.CV
20190422
20200909
[]
1904.09925
7
layers and convolution layers for Question Answering applications and Machine Translation respectively. Additionally, multiple attention mechanisms have been proposed for visual tasks to address the weaknesses of convolutions [17, 16, 7, 46, 45, 53]. For instance, Squeezeand-Excitation [17] and Gather-Excite [16] reweigh feature channels using signals aggregated from entire feature maps, while BAM [31] and CBAM [46] refine convolutional features independently in the channel and spatial dimensions. In non-local neural networks [45], improvements are shown in video classification and object detection via the additive use of a few non-local residual blocks that employ self-attention in convolutional architectures. However, nonlocal blocks are only added to the architecture after ImageNet pretraining and are initialized in such a way that they do not break pretraining. In contrast, our attention augmented networks do not rely on pretraining of their fully convolutional counterparts and employ self-attention along the entire architecture. The use of multi-head attention allows the model to attend jointly
1904.09925
Attention Augmented Convolutional Networks
Convolutional networks have been the paradigm of choice in many computer vision applications. The convolution operation however has a significant weakness in that it only operates on a local neighborhood, thus missing global information. Self-attention, on the other hand, has emerged as a recent advance to capture long range interactions, but has mostly been applied to sequence modeling and generative modeling tasks. In this paper, we consider the use of self-attention for discriminative visual tasks as an alternative to convolutions. We introduce a novel two-dimensional relative self-attention mechanism that proves competitive in replacing convolutions as a stand-alone computational primitive for image classification. We find in control experiments that the best results are obtained when combining both convolutions and self-attention. We therefore propose to augment convolutional operators with this self-attention mechanism by concatenating convolutional feature maps with a set of feature maps produced via self-attention. Extensive experiments show that Attention Augmentation leads to consistent improvements in image classification on ImageNet and object detection on COCO across many different models and scales, including ResNets and a state-of-the art mobile constrained network, while keeping the number of parameters similar. In particular, our method achieves a $1.3\%$ top-1 accuracy improvement on ImageNet classification over a ResNet50 baseline and outperforms other attention mechanisms for images such as Squeeze-and-Excitation. It also achieves an improvement of 1.4 mAP in COCO Object Detection on top of a RetinaNet baseline.
http://arxiv.org/pdf/1904.09925
[ "Irwan Bello", "Barret Zoph", "Ashish Vaswani", "Jonathon Shlens", "Quoc V. Le" ]
[ "cs.CV" ]
ICCV 2019
null
cs.CV
20190422
20200909
[]
1904.09925
8
on pretraining of their fully convolutional counterparts and employ self-attention along the entire architecture. The use of multi-head attention allows the model to attend jointly to both spatial and feature subspaces. Additionally, we enhance the representational power of self-attention over images by extending relative self-attention [37, 18] to two dimensional inputs allowing us to model translation equivariance in a principled way. Finally our method produces additional feature maps, rather than recalibrating convolutional features via addition [45, 53] or gating [17, 16, 31, 46]. This property allows us to flexibly adjust the fraction of attentional channels and consider a spectrum of architectures, ranging from fully convolutional to fully attentional models. 3. Methods We now formally describe our proposed Attention Augmentation method. We use the following naming conventions:H,WandFinrefer to the height, width and number of input filters of an activation map. Nh,dvanddkrespectively refer the number of heads, the depth of values and the depth of queries and keys in multihead-attention (MHA). We further assume that Nhdividesdvanddkevenly and denotedh vanddh kthe depth of values and queries/keys per attention head.
1904.09925
Attention Augmented Convolutional Networks
Convolutional networks have been the paradigm of choice in many computer vision applications. The convolution operation however has a significant weakness in that it only operates on a local neighborhood, thus missing global information. Self-attention, on the other hand, has emerged as a recent advance to capture long range interactions, but has mostly been applied to sequence modeling and generative modeling tasks. In this paper, we consider the use of self-attention for discriminative visual tasks as an alternative to convolutions. We introduce a novel two-dimensional relative self-attention mechanism that proves competitive in replacing convolutions as a stand-alone computational primitive for image classification. We find in control experiments that the best results are obtained when combining both convolutions and self-attention. We therefore propose to augment convolutional operators with this self-attention mechanism by concatenating convolutional feature maps with a set of feature maps produced via self-attention. Extensive experiments show that Attention Augmentation leads to consistent improvements in image classification on ImageNet and object detection on COCO across many different models and scales, including ResNets and a state-of-the art mobile constrained network, while keeping the number of parameters similar. In particular, our method achieves a $1.3\%$ top-1 accuracy improvement on ImageNet classification over a ResNet50 baseline and outperforms other attention mechanisms for images such as Squeeze-and-Excitation. It also achieves an improvement of 1.4 mAP in COCO Object Detection on top of a RetinaNet baseline.
http://arxiv.org/pdf/1904.09925
[ "Irwan Bello", "Barret Zoph", "Ashish Vaswani", "Jonathon Shlens", "Quoc V. Le" ]
[ "cs.CV" ]
ICCV 2019
null
cs.CV
20190422
20200909
[]
1904.09925
9
We further assume that Nhdividesdvanddkevenly and denotedh vanddh kthe depth of values and queries/keys per attention head. 3.1. Self-attention over images Given an input tensor of shape (H;W;F in),1we flatten it to a matrix X2RHWFinand perform multihead attention as proposed in the Transformer architecture [43]. The output of the self-attention mechanism for a single head h 1We omit the batch dimension for simplicity.can be formulated as: Oh=Softmax0 @(XW q)(XW k)T q dh k1 A(XW v)(1) whereWq,Wk2RFindh kandWv2RFindh vare learned linear transformations that map the input Xto queriesQ= XW q, keysK=XW kand valuesV=XW v. The outputs of all heads are then concatenated and projected again as follows: MHA (X) =Concath O1;:::;O Nhi WO(2) whereWO2Rdvdvis a learned linear transformation.
1904.09925
Attention Augmented Convolutional Networks
Convolutional networks have been the paradigm of choice in many computer vision applications. The convolution operation however has a significant weakness in that it only operates on a local neighborhood, thus missing global information. Self-attention, on the other hand, has emerged as a recent advance to capture long range interactions, but has mostly been applied to sequence modeling and generative modeling tasks. In this paper, we consider the use of self-attention for discriminative visual tasks as an alternative to convolutions. We introduce a novel two-dimensional relative self-attention mechanism that proves competitive in replacing convolutions as a stand-alone computational primitive for image classification. We find in control experiments that the best results are obtained when combining both convolutions and self-attention. We therefore propose to augment convolutional operators with this self-attention mechanism by concatenating convolutional feature maps with a set of feature maps produced via self-attention. Extensive experiments show that Attention Augmentation leads to consistent improvements in image classification on ImageNet and object detection on COCO across many different models and scales, including ResNets and a state-of-the art mobile constrained network, while keeping the number of parameters similar. In particular, our method achieves a $1.3\%$ top-1 accuracy improvement on ImageNet classification over a ResNet50 baseline and outperforms other attention mechanisms for images such as Squeeze-and-Excitation. It also achieves an improvement of 1.4 mAP in COCO Object Detection on top of a RetinaNet baseline.
http://arxiv.org/pdf/1904.09925
[ "Irwan Bello", "Barret Zoph", "Ashish Vaswani", "Jonathon Shlens", "Quoc V. Le" ]
[ "cs.CV" ]
ICCV 2019
null
cs.CV
20190422
20200909
[]
1904.09925
10
O1;:::;O Nhi WO(2) whereWO2Rdvdvis a learned linear transformation. MHA (X)is then reshaped into a tensor of shape (H;W;d v) to match the original spatial dimensions. We note that multi-head attention incurs a complexity of O((HW)2dk) and a memory cost of O((HW)2Nh)as it requires to store attention maps for each head. 3.1.1 Two-dimensional Positional Embeddings Without explicit information about positions, self-attention ispermutation equivariant : MHA ((X)) =(MHA (X)) for any permutation of the pixel locations, making it ineffective for modeling highly structured data such as images. Multiple positional encodings that augment activation maps with explicit spatial information have been proposed to alleviate related issues. In particular, the Image Transformer [32] extends the sinusoidal waves first introduced in the original Transformer [43] to 2 dimensional inputs and CoordConv [29] concatenates positional channels to an activation map.
1904.09925
Attention Augmented Convolutional Networks
Convolutional networks have been the paradigm of choice in many computer vision applications. The convolution operation however has a significant weakness in that it only operates on a local neighborhood, thus missing global information. Self-attention, on the other hand, has emerged as a recent advance to capture long range interactions, but has mostly been applied to sequence modeling and generative modeling tasks. In this paper, we consider the use of self-attention for discriminative visual tasks as an alternative to convolutions. We introduce a novel two-dimensional relative self-attention mechanism that proves competitive in replacing convolutions as a stand-alone computational primitive for image classification. We find in control experiments that the best results are obtained when combining both convolutions and self-attention. We therefore propose to augment convolutional operators with this self-attention mechanism by concatenating convolutional feature maps with a set of feature maps produced via self-attention. Extensive experiments show that Attention Augmentation leads to consistent improvements in image classification on ImageNet and object detection on COCO across many different models and scales, including ResNets and a state-of-the art mobile constrained network, while keeping the number of parameters similar. In particular, our method achieves a $1.3\%$ top-1 accuracy improvement on ImageNet classification over a ResNet50 baseline and outperforms other attention mechanisms for images such as Squeeze-and-Excitation. It also achieves an improvement of 1.4 mAP in COCO Object Detection on top of a RetinaNet baseline.
http://arxiv.org/pdf/1904.09925
[ "Irwan Bello", "Barret Zoph", "Ashish Vaswani", "Jonathon Shlens", "Quoc V. Le" ]
[ "cs.CV" ]
ICCV 2019
null
cs.CV
20190422
20200909
[]
1904.09925
11
the original Transformer [43] to 2 dimensional inputs and CoordConv [29] concatenates positional channels to an activation map. However these encodings did not help in our experiments on image classification and object detection (see Section 4.5). We hypothesize that this is because such positional encodings, while not permutation equivariant, do not satisfy translation equivariance , which is a desirable property when dealing with images. As a solution, we propose to extend the use of relative position encodings [37] to two dimensions and present a memory efficient implementation based on the Music Transformer [18]. Relative positional embeddings: Introduced in [37] for the purpose of language modeling, relative self-attention augments self-attention with relative position embeddings and enables translation equivariance while preventing permutation equivariance. We implement two-dimensional relative self-attention by independently adding relative height information and relative width information. The attention logit for how much pixel i= (ix;iy)attends to pixel j= (jx;jy)is computed as: li;j=qT iq dh k(kj+rW jxix+rH jyiy) (3)
1904.09925
Attention Augmented Convolutional Networks
Convolutional networks have been the paradigm of choice in many computer vision applications. The convolution operation however has a significant weakness in that it only operates on a local neighborhood, thus missing global information. Self-attention, on the other hand, has emerged as a recent advance to capture long range interactions, but has mostly been applied to sequence modeling and generative modeling tasks. In this paper, we consider the use of self-attention for discriminative visual tasks as an alternative to convolutions. We introduce a novel two-dimensional relative self-attention mechanism that proves competitive in replacing convolutions as a stand-alone computational primitive for image classification. We find in control experiments that the best results are obtained when combining both convolutions and self-attention. We therefore propose to augment convolutional operators with this self-attention mechanism by concatenating convolutional feature maps with a set of feature maps produced via self-attention. Extensive experiments show that Attention Augmentation leads to consistent improvements in image classification on ImageNet and object detection on COCO across many different models and scales, including ResNets and a state-of-the art mobile constrained network, while keeping the number of parameters similar. In particular, our method achieves a $1.3\%$ top-1 accuracy improvement on ImageNet classification over a ResNet50 baseline and outperforms other attention mechanisms for images such as Squeeze-and-Excitation. It also achieves an improvement of 1.4 mAP in COCO Object Detection on top of a RetinaNet baseline.
http://arxiv.org/pdf/1904.09925
[ "Irwan Bello", "Barret Zoph", "Ashish Vaswani", "Jonathon Shlens", "Quoc V. Le" ]
[ "cs.CV" ]
ICCV 2019
null
cs.CV
20190422
20200909
[]
1904.09925
12
li;j=qT iq dh k(kj+rW jxix+rH jyiy) (3) whereqiis the query vector for pixel i(the i-th row of Q), kjis the key vector for pixel j(the j-th row of K) andrW jxix andrH jyiyare learned embeddings for relative width jxix and relative height jyiy, respectively. The output of head hnow becomes: Oh=Softmax0 @QKT+Srel H+Srel Wq dh k1 AV (4) whereSrel H;Srel W2RHWHWare matrices of relative position logits along height and width dimensions that satisfy Srel H[i;j] =qT irH jyiyandSrel W[i;j] =qT irW jxix. The relative attention algorithm in [37] explicitly stores all relative embeddings rijin a tensor of shape (HW;HW;dh k), thus incurring an additional memory cost ofO((HW)2dh k). This compares to O((HW)2Nh)for the
1904.09925
Attention Augmented Convolutional Networks
Convolutional networks have been the paradigm of choice in many computer vision applications. The convolution operation however has a significant weakness in that it only operates on a local neighborhood, thus missing global information. Self-attention, on the other hand, has emerged as a recent advance to capture long range interactions, but has mostly been applied to sequence modeling and generative modeling tasks. In this paper, we consider the use of self-attention for discriminative visual tasks as an alternative to convolutions. We introduce a novel two-dimensional relative self-attention mechanism that proves competitive in replacing convolutions as a stand-alone computational primitive for image classification. We find in control experiments that the best results are obtained when combining both convolutions and self-attention. We therefore propose to augment convolutional operators with this self-attention mechanism by concatenating convolutional feature maps with a set of feature maps produced via self-attention. Extensive experiments show that Attention Augmentation leads to consistent improvements in image classification on ImageNet and object detection on COCO across many different models and scales, including ResNets and a state-of-the art mobile constrained network, while keeping the number of parameters similar. In particular, our method achieves a $1.3\%$ top-1 accuracy improvement on ImageNet classification over a ResNet50 baseline and outperforms other attention mechanisms for images such as Squeeze-and-Excitation. It also achieves an improvement of 1.4 mAP in COCO Object Detection on top of a RetinaNet baseline.
http://arxiv.org/pdf/1904.09925
[ "Irwan Bello", "Barret Zoph", "Ashish Vaswani", "Jonathon Shlens", "Quoc V. Le" ]
[ "cs.CV" ]
ICCV 2019
null
cs.CV
20190422
20200909
[]
1904.09925
13
k), thus incurring an additional memory cost ofO((HW)2dh k). This compares to O((HW)2Nh)for the position-unaware version self-attention that does not use position encodings. As we typically have Nh<dh k, such an implementation can prove extremely prohibitive and restrict the number of images that can fit in a minibatch. Instead, we extend the memory efficient relative masked attention algorithm presented in [18] to unmasked relative self-attention over 2 dimensional inputs. Our implementation has a memory cost ofO(HWdh k). We leave the Tensorflow code of the algorithm in the Appendix. The relative positional embeeddings rHandrWare learned and shared across heads but not layers. For each layer, we add (2(H+W)2)dh kparameters to model relative distances along height and width. 3.2. Attention Augmented Convolution Multiple previously proposed attention mechanisms over images [17, 16, 31, 46] suggest that the convolution operator is limited by its locality and lack of understanding of global contexts. These methods capture long-range dependencies by recalibrating convolutional feature maps. In
1904.09925
Attention Augmented Convolutional Networks
Convolutional networks have been the paradigm of choice in many computer vision applications. The convolution operation however has a significant weakness in that it only operates on a local neighborhood, thus missing global information. Self-attention, on the other hand, has emerged as a recent advance to capture long range interactions, but has mostly been applied to sequence modeling and generative modeling tasks. In this paper, we consider the use of self-attention for discriminative visual tasks as an alternative to convolutions. We introduce a novel two-dimensional relative self-attention mechanism that proves competitive in replacing convolutions as a stand-alone computational primitive for image classification. We find in control experiments that the best results are obtained when combining both convolutions and self-attention. We therefore propose to augment convolutional operators with this self-attention mechanism by concatenating convolutional feature maps with a set of feature maps produced via self-attention. Extensive experiments show that Attention Augmentation leads to consistent improvements in image classification on ImageNet and object detection on COCO across many different models and scales, including ResNets and a state-of-the art mobile constrained network, while keeping the number of parameters similar. In particular, our method achieves a $1.3\%$ top-1 accuracy improvement on ImageNet classification over a ResNet50 baseline and outperforms other attention mechanisms for images such as Squeeze-and-Excitation. It also achieves an improvement of 1.4 mAP in COCO Object Detection on top of a RetinaNet baseline.
http://arxiv.org/pdf/1904.09925
[ "Irwan Bello", "Barret Zoph", "Ashish Vaswani", "Jonathon Shlens", "Quoc V. Le" ]
[ "cs.CV" ]
ICCV 2019
null
cs.CV
20190422
20200909
[]
1904.09925
14
of global contexts. These methods capture long-range dependencies by recalibrating convolutional feature maps. In particular, Squeeze-and-Excitation (SE) [17] and GatherExcite (GE) [16] perform channelwise reweighing while BAM [31] and CBAM [46] reweigh both channels and spatial positions independently . In contrast to these approaches, we 1) use an attention mechanism that can attend jointly to spatial and feature subspaces (each head corresponding to a feature subspace) and 2) introduce additional feature maps rather than refining them. Figure 2 summarizes our proposed augmented convolution.Concatenating convolutional and attentional feature maps: Formally, consider an original convolution operator with kernel size k,Fininput filters and Foutoutput filters. The corresponding attention augmented convolution can be written as AAConv (X) =Concath Conv (X);MHA (X)i : We denote=dv Foutthe ratio of attentional channels to number of original output filters and =dk Foutthe ratio of key depth to number of original output filters. Similarly to
1904.09925
Attention Augmented Convolutional Networks
Convolutional networks have been the paradigm of choice in many computer vision applications. The convolution operation however has a significant weakness in that it only operates on a local neighborhood, thus missing global information. Self-attention, on the other hand, has emerged as a recent advance to capture long range interactions, but has mostly been applied to sequence modeling and generative modeling tasks. In this paper, we consider the use of self-attention for discriminative visual tasks as an alternative to convolutions. We introduce a novel two-dimensional relative self-attention mechanism that proves competitive in replacing convolutions as a stand-alone computational primitive for image classification. We find in control experiments that the best results are obtained when combining both convolutions and self-attention. We therefore propose to augment convolutional operators with this self-attention mechanism by concatenating convolutional feature maps with a set of feature maps produced via self-attention. Extensive experiments show that Attention Augmentation leads to consistent improvements in image classification on ImageNet and object detection on COCO across many different models and scales, including ResNets and a state-of-the art mobile constrained network, while keeping the number of parameters similar. In particular, our method achieves a $1.3\%$ top-1 accuracy improvement on ImageNet classification over a ResNet50 baseline and outperforms other attention mechanisms for images such as Squeeze-and-Excitation. It also achieves an improvement of 1.4 mAP in COCO Object Detection on top of a RetinaNet baseline.
http://arxiv.org/pdf/1904.09925
[ "Irwan Bello", "Barret Zoph", "Ashish Vaswani", "Jonathon Shlens", "Quoc V. Le" ]
[ "cs.CV" ]
ICCV 2019
null
cs.CV
20190422
20200909
[]
1904.09925
15
number of original output filters and =dk Foutthe ratio of key depth to number of original output filters. Similarly to the convolution, the proposed attention augmented convolution 1) is equivariant to translation and 2) can readily operate on inputs of different spatial dimensions. We include Tensorflow code for the proposed attention augmented convolution in the Appendix A.3. Effect on number of parameters: Multihead attention introduces a 1x1 convolution with Fininput filters and (2dk+dv) =Fout(2+)output filters to compute queries, keys and values and an additional 1x1 convolution with dv=Foutinput and output filters to mix the contribution of different heads. Considering the decrease in filters in the convolutional part, this leads to the following change in parameters: paramsFinFout(2+ (1k2)+Fout Fin2);(5) where we ignore the parameters introduced by relative position embeddings for simplicity as these are negligible. In practice, this causes a slight decrease in parameters when replacing 3x3 convolutions and a slight increase in parameters when replacing 1x1 convolutions. Interestingly, we find
1904.09925
Attention Augmented Convolutional Networks
Convolutional networks have been the paradigm of choice in many computer vision applications. The convolution operation however has a significant weakness in that it only operates on a local neighborhood, thus missing global information. Self-attention, on the other hand, has emerged as a recent advance to capture long range interactions, but has mostly been applied to sequence modeling and generative modeling tasks. In this paper, we consider the use of self-attention for discriminative visual tasks as an alternative to convolutions. We introduce a novel two-dimensional relative self-attention mechanism that proves competitive in replacing convolutions as a stand-alone computational primitive for image classification. We find in control experiments that the best results are obtained when combining both convolutions and self-attention. We therefore propose to augment convolutional operators with this self-attention mechanism by concatenating convolutional feature maps with a set of feature maps produced via self-attention. Extensive experiments show that Attention Augmentation leads to consistent improvements in image classification on ImageNet and object detection on COCO across many different models and scales, including ResNets and a state-of-the art mobile constrained network, while keeping the number of parameters similar. In particular, our method achieves a $1.3\%$ top-1 accuracy improvement on ImageNet classification over a ResNet50 baseline and outperforms other attention mechanisms for images such as Squeeze-and-Excitation. It also achieves an improvement of 1.4 mAP in COCO Object Detection on top of a RetinaNet baseline.
http://arxiv.org/pdf/1904.09925
[ "Irwan Bello", "Barret Zoph", "Ashish Vaswani", "Jonathon Shlens", "Quoc V. Le" ]
[ "cs.CV" ]
ICCV 2019
null
cs.CV
20190422
20200909
[]
1904.09925
16
practice, this causes a slight decrease in parameters when replacing 3x3 convolutions and a slight increase in parameters when replacing 1x1 convolutions. Interestingly, we find in experiments that attention augmented networks still significantly outperform their fully convolutional counterparts while using less parameters. Attention Augmented Convolutional Architectures: In all our experiments, the augmented convolution is followed by a batch normalization [20] layer which can learn to scale the contribution of the convolution feature maps and the attention feature maps. We apply our augmented convolution once per residual block similarly to other visual attention mechanisms [17, 16, 31, 46] and along the entire architecture as memory permits (see Section 4 for more details). Since the memory cost O((Nh(HW)2)can be prohibitive for large spatial dimensions, we augment convolutions with attention starting from the last layer (with smallest spatial dimension) until we hit memory constraints. To reduce the memory footprint of augmented networks, we typically resort to a smaller batch size and sometimes additionally downsample the inputs to self-attention in the layers with the largest spatial dimensions where it is applied. Downsampling is performed by applying 3x3 average pooling with stride 2 while the following upsampling (required for the concatenation) is obtained via bilinear interpolation.
1904.09925
Attention Augmented Convolutional Networks
Convolutional networks have been the paradigm of choice in many computer vision applications. The convolution operation however has a significant weakness in that it only operates on a local neighborhood, thus missing global information. Self-attention, on the other hand, has emerged as a recent advance to capture long range interactions, but has mostly been applied to sequence modeling and generative modeling tasks. In this paper, we consider the use of self-attention for discriminative visual tasks as an alternative to convolutions. We introduce a novel two-dimensional relative self-attention mechanism that proves competitive in replacing convolutions as a stand-alone computational primitive for image classification. We find in control experiments that the best results are obtained when combining both convolutions and self-attention. We therefore propose to augment convolutional operators with this self-attention mechanism by concatenating convolutional feature maps with a set of feature maps produced via self-attention. Extensive experiments show that Attention Augmentation leads to consistent improvements in image classification on ImageNet and object detection on COCO across many different models and scales, including ResNets and a state-of-the art mobile constrained network, while keeping the number of parameters similar. In particular, our method achieves a $1.3\%$ top-1 accuracy improvement on ImageNet classification over a ResNet50 baseline and outperforms other attention mechanisms for images such as Squeeze-and-Excitation. It also achieves an improvement of 1.4 mAP in COCO Object Detection on top of a RetinaNet baseline.
http://arxiv.org/pdf/1904.09925
[ "Irwan Bello", "Barret Zoph", "Ashish Vaswani", "Jonathon Shlens", "Quoc V. Le" ]
[ "cs.CV" ]
ICCV 2019
null
cs.CV
20190422
20200909
[]
1904.09925
17
Downsampling is performed by applying 3x3 average pooling with stride 2 while the following upsampling (required for the concatenation) is obtained via bilinear interpolation. 4. Experiments In the subsequent experiments, we test Attention Augmentation on standard computer vision architectures such as ResNets [14, 47, 13], and MnasNet [42] on the CIFAR100 [22], ImageNet [9] and COCO [25] datasets. Our experiments show that Attention Augmentation leads to systematic improvements on both image classification and object detection tasks across a broad array of architectures and computational demands. We validate the utility of the proposed two-dimensional relative attention mechanism in ablation experiments. In all experiments, we substitute convolutional feature maps with self-attention feature maps as it makes for an easier comparison against the baseline models. Unless specified otherwise, all results correspond to our two-dimensional relative self-attention mechanism. Experimental details can be found in the Appendix. 4.1. CIFAR-100 image classification We first investigate how Attention Augmentation performs on CIFAR-100 [22], a standard benchmark for lowresolution imagery, using a Wide ResNet architecture [51]. The Wide-ResNet-28-10 architecture is comprised of 3
1904.09925
Attention Augmented Convolutional Networks
Convolutional networks have been the paradigm of choice in many computer vision applications. The convolution operation however has a significant weakness in that it only operates on a local neighborhood, thus missing global information. Self-attention, on the other hand, has emerged as a recent advance to capture long range interactions, but has mostly been applied to sequence modeling and generative modeling tasks. In this paper, we consider the use of self-attention for discriminative visual tasks as an alternative to convolutions. We introduce a novel two-dimensional relative self-attention mechanism that proves competitive in replacing convolutions as a stand-alone computational primitive for image classification. We find in control experiments that the best results are obtained when combining both convolutions and self-attention. We therefore propose to augment convolutional operators with this self-attention mechanism by concatenating convolutional feature maps with a set of feature maps produced via self-attention. Extensive experiments show that Attention Augmentation leads to consistent improvements in image classification on ImageNet and object detection on COCO across many different models and scales, including ResNets and a state-of-the art mobile constrained network, while keeping the number of parameters similar. In particular, our method achieves a $1.3\%$ top-1 accuracy improvement on ImageNet classification over a ResNet50 baseline and outperforms other attention mechanisms for images such as Squeeze-and-Excitation. It also achieves an improvement of 1.4 mAP in COCO Object Detection on top of a RetinaNet baseline.
http://arxiv.org/pdf/1904.09925
[ "Irwan Bello", "Barret Zoph", "Ashish Vaswani", "Jonathon Shlens", "Quoc V. Le" ]
[ "cs.CV" ]
ICCV 2019
null
cs.CV
20190422
20200909
[]
1904.09925
18
The Wide-ResNet-28-10 architecture is comprised of 3 stages of 4 residual blocks each using two 33convolutions. We augment the Wide-ResNet-28-10 by augmenting the first convolution of all residual blocks with relative attention using Nh=8 heads and =2=0.2 and a minimum of 20 dimensions per head for the keys. We compare Attention Augmentation (AA) against other forms of attention including Squeeze-and-Excitation (SE) [17] and the parameterfree formulation of Gather-Excite (GE) [16]. Table 1 shows that Attention Augmentation improves performance both over the baseline network and Squeeze-and-Excitation at a similar parameter and complexity cost. Architecture Params GFlops top-1 top-5 Wide-ResNet [51] 36.3M 10.4 80.3 95.0 GE-Wide-ResNet [16] 36.3M 10.4 79.8 95.0 SE-Wide-ResNet [17] 36.5M 10.4 81.0 95.3 AA-Wide-ResNet (ours) 36.2M 10.9 81.6 95.2 Table 1. Image classification on the CIFAR-100 dataset [22] using
1904.09925
Attention Augmented Convolutional Networks
Convolutional networks have been the paradigm of choice in many computer vision applications. The convolution operation however has a significant weakness in that it only operates on a local neighborhood, thus missing global information. Self-attention, on the other hand, has emerged as a recent advance to capture long range interactions, but has mostly been applied to sequence modeling and generative modeling tasks. In this paper, we consider the use of self-attention for discriminative visual tasks as an alternative to convolutions. We introduce a novel two-dimensional relative self-attention mechanism that proves competitive in replacing convolutions as a stand-alone computational primitive for image classification. We find in control experiments that the best results are obtained when combining both convolutions and self-attention. We therefore propose to augment convolutional operators with this self-attention mechanism by concatenating convolutional feature maps with a set of feature maps produced via self-attention. Extensive experiments show that Attention Augmentation leads to consistent improvements in image classification on ImageNet and object detection on COCO across many different models and scales, including ResNets and a state-of-the art mobile constrained network, while keeping the number of parameters similar. In particular, our method achieves a $1.3\%$ top-1 accuracy improvement on ImageNet classification over a ResNet50 baseline and outperforms other attention mechanisms for images such as Squeeze-and-Excitation. It also achieves an improvement of 1.4 mAP in COCO Object Detection on top of a RetinaNet baseline.
http://arxiv.org/pdf/1904.09925
[ "Irwan Bello", "Barret Zoph", "Ashish Vaswani", "Jonathon Shlens", "Quoc V. Le" ]
[ "cs.CV" ]
ICCV 2019
null
cs.CV
20190422
20200909
[]
1904.09925
19
Table 1. Image classification on the CIFAR-100 dataset [22] using the Wide-ResNet 28-10 architecture [51]. 4.2. ImageNet image classification with ResNet We next examine how Attention Augmentation performs on ImageNet [9, 21], a standard large-scale dataset for high resolution imagery, across an array of architectures. We start with the ResNet architecture [14, 47, 13] because of itswidespread use and its ability to easily scale across several computational budgets. The building block in ResNet-34 comprises two 3x3 convolutions with the same number of output filters. ResNet-50 and its larger counterparts use a bottleneck block comprising of 1x1, 3x3, 1x1 convolutions where the last pointwise convolution expands the number of filters and the first one contracts the number of filters. We modify all ResNets by augmenting the 3x3 convolutions as this decreases number of parameters.2We apply Attention Augmentation in each residual block of the last 3 stages of the architecture – when the spatial dimensions of
1904.09925
Attention Augmented Convolutional Networks
Convolutional networks have been the paradigm of choice in many computer vision applications. The convolution operation however has a significant weakness in that it only operates on a local neighborhood, thus missing global information. Self-attention, on the other hand, has emerged as a recent advance to capture long range interactions, but has mostly been applied to sequence modeling and generative modeling tasks. In this paper, we consider the use of self-attention for discriminative visual tasks as an alternative to convolutions. We introduce a novel two-dimensional relative self-attention mechanism that proves competitive in replacing convolutions as a stand-alone computational primitive for image classification. We find in control experiments that the best results are obtained when combining both convolutions and self-attention. We therefore propose to augment convolutional operators with this self-attention mechanism by concatenating convolutional feature maps with a set of feature maps produced via self-attention. Extensive experiments show that Attention Augmentation leads to consistent improvements in image classification on ImageNet and object detection on COCO across many different models and scales, including ResNets and a state-of-the art mobile constrained network, while keeping the number of parameters similar. In particular, our method achieves a $1.3\%$ top-1 accuracy improvement on ImageNet classification over a ResNet50 baseline and outperforms other attention mechanisms for images such as Squeeze-and-Excitation. It also achieves an improvement of 1.4 mAP in COCO Object Detection on top of a RetinaNet baseline.
http://arxiv.org/pdf/1904.09925
[ "Irwan Bello", "Barret Zoph", "Ashish Vaswani", "Jonathon Shlens", "Quoc V. Le" ]
[ "cs.CV" ]
ICCV 2019
null
cs.CV
20190422
20200909
[]
1904.09925
20
Attention Augmentation in each residual block of the last 3 stages of the architecture – when the spatial dimensions of the activation maps are 28x28, 14x14 and 7x7 – and downsample only during the first stage. All attention augmented networks use =2=0.2, except for ResNet-34 which uses ==0.25. The number of attention heads is fixed to Nh=8. Architecture Params (M) Infer Train top-1 ResNet-50 25.6 - - 76.4 SE [17] 28.1 +12% +92% 77.5 (77.0) BAM [31] 25.9 +19% +43% 77.3 CBAM [46] 28.1 +56% +132% 77.4 (77.4) GALA [28] 29.4 +86% +133% 77.5 (77.3) AA (= 0:25) 24.3 +29% +25% 77.7 Table 2. Image classification performance of different attention mechanisms on the ImageNet dataset. refers to the increase in latency times compared to the ResNet50 on a single Tesla V100
1904.09925
Attention Augmented Convolutional Networks
Convolutional networks have been the paradigm of choice in many computer vision applications. The convolution operation however has a significant weakness in that it only operates on a local neighborhood, thus missing global information. Self-attention, on the other hand, has emerged as a recent advance to capture long range interactions, but has mostly been applied to sequence modeling and generative modeling tasks. In this paper, we consider the use of self-attention for discriminative visual tasks as an alternative to convolutions. We introduce a novel two-dimensional relative self-attention mechanism that proves competitive in replacing convolutions as a stand-alone computational primitive for image classification. We find in control experiments that the best results are obtained when combining both convolutions and self-attention. We therefore propose to augment convolutional operators with this self-attention mechanism by concatenating convolutional feature maps with a set of feature maps produced via self-attention. Extensive experiments show that Attention Augmentation leads to consistent improvements in image classification on ImageNet and object detection on COCO across many different models and scales, including ResNets and a state-of-the art mobile constrained network, while keeping the number of parameters similar. In particular, our method achieves a $1.3\%$ top-1 accuracy improvement on ImageNet classification over a ResNet50 baseline and outperforms other attention mechanisms for images such as Squeeze-and-Excitation. It also achieves an improvement of 1.4 mAP in COCO Object Detection on top of a RetinaNet baseline.
http://arxiv.org/pdf/1904.09925
[ "Irwan Bello", "Barret Zoph", "Ashish Vaswani", "Jonathon Shlens", "Quoc V. Le" ]
[ "cs.CV" ]
ICCV 2019
null
cs.CV
20190422
20200909
[]
1904.09925
21
mechanisms on the ImageNet dataset. refers to the increase in latency times compared to the ResNet50 on a single Tesla V100 GPU with Tensorflow using a batch size of 128. For fair comparison, we also include top-1 results (in parentheses) when scaling networks in width to match 25:6M parameters as the ResNet50 baseline. Architecture GFlops Params top-1 top-5 ResNet-34 [14] 7.4 21.8M 73.6 91.5 SE-ResNet-34 [17] 7.4 22.0M 74.3 91.8 AA-ResNet-34 (ours) 7.1 20.7M 74.7 92.0 ResNet-50 [14] 8.2 25.6M 76.4 93.1 SE-ResNet-50 [17] 8.2 28.1M 77.5 93.7 AA-ResNet-50 (ours) 8.3 25.8M 77.7 93.8 ResNet-101 [14] 15.6 44.5M 77.9 94.0 SE-ResNet-101 [17] 15.6 49.3M 78.4 94.2
1904.09925
Attention Augmented Convolutional Networks
Convolutional networks have been the paradigm of choice in many computer vision applications. The convolution operation however has a significant weakness in that it only operates on a local neighborhood, thus missing global information. Self-attention, on the other hand, has emerged as a recent advance to capture long range interactions, but has mostly been applied to sequence modeling and generative modeling tasks. In this paper, we consider the use of self-attention for discriminative visual tasks as an alternative to convolutions. We introduce a novel two-dimensional relative self-attention mechanism that proves competitive in replacing convolutions as a stand-alone computational primitive for image classification. We find in control experiments that the best results are obtained when combining both convolutions and self-attention. We therefore propose to augment convolutional operators with this self-attention mechanism by concatenating convolutional feature maps with a set of feature maps produced via self-attention. Extensive experiments show that Attention Augmentation leads to consistent improvements in image classification on ImageNet and object detection on COCO across many different models and scales, including ResNets and a state-of-the art mobile constrained network, while keeping the number of parameters similar. In particular, our method achieves a $1.3\%$ top-1 accuracy improvement on ImageNet classification over a ResNet50 baseline and outperforms other attention mechanisms for images such as Squeeze-and-Excitation. It also achieves an improvement of 1.4 mAP in COCO Object Detection on top of a RetinaNet baseline.
http://arxiv.org/pdf/1904.09925
[ "Irwan Bello", "Barret Zoph", "Ashish Vaswani", "Jonathon Shlens", "Quoc V. Le" ]
[ "cs.CV" ]
ICCV 2019
null
cs.CV
20190422
20200909
[]
1904.09925
22
SE-ResNet-101 [17] 15.6 49.3M 78.4 94.2 AA-ResNet-101 (ours) 16.1 45.4M 78.7 94.4 ResNet-152 [14] 23.0 60.2M 78.4 94.2 SE-ResNet-152 [17] 23.1 66.8M 78.9 94.5 AA-ResNet-152 (ours) 23.8 61.6M 79.1 94.6 Table 3. Image classification on the ImageNet dataset [9] across a range of ResNet architectures: ResNet-34, ResNet-50, Resnet101, and ResNet-152 [14, 47, 13]. Table 2 benchmarks Attention Augmentation against channel and spatial attention mechanisms BAM [31], CBAM [46] and GALA [28] with channel reduction ratio= 16 on the ResNet50 architecture. Despite the 2We found that augmenting the pointwise expansions works just as well but does not save parameters or computations. Architecture GFlops Params top-1 top-5 MnasNet-0.75 0.45 2.91M 73.3 91.3 AA-MnasNet-0.75 0.51 3.02M 73.9 91.6
1904.09925
Attention Augmented Convolutional Networks
Convolutional networks have been the paradigm of choice in many computer vision applications. The convolution operation however has a significant weakness in that it only operates on a local neighborhood, thus missing global information. Self-attention, on the other hand, has emerged as a recent advance to capture long range interactions, but has mostly been applied to sequence modeling and generative modeling tasks. In this paper, we consider the use of self-attention for discriminative visual tasks as an alternative to convolutions. We introduce a novel two-dimensional relative self-attention mechanism that proves competitive in replacing convolutions as a stand-alone computational primitive for image classification. We find in control experiments that the best results are obtained when combining both convolutions and self-attention. We therefore propose to augment convolutional operators with this self-attention mechanism by concatenating convolutional feature maps with a set of feature maps produced via self-attention. Extensive experiments show that Attention Augmentation leads to consistent improvements in image classification on ImageNet and object detection on COCO across many different models and scales, including ResNets and a state-of-the art mobile constrained network, while keeping the number of parameters similar. In particular, our method achieves a $1.3\%$ top-1 accuracy improvement on ImageNet classification over a ResNet50 baseline and outperforms other attention mechanisms for images such as Squeeze-and-Excitation. It also achieves an improvement of 1.4 mAP in COCO Object Detection on top of a RetinaNet baseline.
http://arxiv.org/pdf/1904.09925
[ "Irwan Bello", "Barret Zoph", "Ashish Vaswani", "Jonathon Shlens", "Quoc V. Le" ]
[ "cs.CV" ]
ICCV 2019
null
cs.CV
20190422
20200909
[]
1904.09925
23
AA-MnasNet-0.75 0.51 3.02M 73.9 91.6 MnasNet-1.0 0.63 3.89M 75.2 92.4 AA-MnasNet-1.0 0.70 4.06M 75.7 92.6 MnasNet-1.25 1.01 5.26M 76.7 93.2 AA-MnasNet-1.25 1.11 5.53M 77.2 93.6 MnasNet-1.4 1.17 6.10M 77.2 93.5 AA-MnasNet-1.4 1.29 6.44M 77.7 93.8 Table 4. Baseline and attention augmented MnasNet [42] accuracies with width multipliers 0.75, 1.0, 1.25 and 1.4. lack of specialized kernels (See Appendix A.3), Attention Augmentation offers a competitive accuracy/computational trade-off compared to previously proposed attention mechanisms. Table 3 compares the non-augmented networks and Squeeze-and-Excitation (SE) [17] across different network scales. In all experiments, Attention Augmentation significantly increases performance over the non-augmented baseline and notably outperforms Squeeze-and-Excitation
1904.09925
Attention Augmented Convolutional Networks
Convolutional networks have been the paradigm of choice in many computer vision applications. The convolution operation however has a significant weakness in that it only operates on a local neighborhood, thus missing global information. Self-attention, on the other hand, has emerged as a recent advance to capture long range interactions, but has mostly been applied to sequence modeling and generative modeling tasks. In this paper, we consider the use of self-attention for discriminative visual tasks as an alternative to convolutions. We introduce a novel two-dimensional relative self-attention mechanism that proves competitive in replacing convolutions as a stand-alone computational primitive for image classification. We find in control experiments that the best results are obtained when combining both convolutions and self-attention. We therefore propose to augment convolutional operators with this self-attention mechanism by concatenating convolutional feature maps with a set of feature maps produced via self-attention. Extensive experiments show that Attention Augmentation leads to consistent improvements in image classification on ImageNet and object detection on COCO across many different models and scales, including ResNets and a state-of-the art mobile constrained network, while keeping the number of parameters similar. In particular, our method achieves a $1.3\%$ top-1 accuracy improvement on ImageNet classification over a ResNet50 baseline and outperforms other attention mechanisms for images such as Squeeze-and-Excitation. It also achieves an improvement of 1.4 mAP in COCO Object Detection on top of a RetinaNet baseline.
http://arxiv.org/pdf/1904.09925
[ "Irwan Bello", "Barret Zoph", "Ashish Vaswani", "Jonathon Shlens", "Quoc V. Le" ]
[ "cs.CV" ]
ICCV 2019
null
cs.CV
20190422
20200909
[]
1904.09925
24
baseline and notably outperforms Squeeze-and-Excitation (SE) [17] while being more parameter efficient (Figure 1). Remarkably, our AA-ResNet-50 performs comparably to the baseline ResNet-101 and our AA-ResNet-101 outperforms the baseline ResNet-152. These results suggest that attention augmentation is preferable to simply making networks deeper. We include and discuss attention maps visualizations from different pixel positions in the appendix. 4.3. ImageNet classification with MnasNet In this section, we inspect the use of Attention Augmentation in a resource constrained setting by conducting ImageNet experiments with the MnasNet architecture [42], which is an extremely parameter-efficient architecture. In particular, the MnasNet was found by neural architecture search [54], using only the highly optimized mobile inverted bottleneck block [36] and the Squeeze-andExcitation operation [17] as the primitives in its search space. We apply Attention Augmentation to the mobile inverted bottleneck by replacing convolutional channels in the expansion pointwise convolution using =2=0.1 and Nh=4 heads. Our augmented MnasNets use augmented inverted bottlenecks in the last 13 blocks out of 18 in the
1904.09925
Attention Augmented Convolutional Networks
Convolutional networks have been the paradigm of choice in many computer vision applications. The convolution operation however has a significant weakness in that it only operates on a local neighborhood, thus missing global information. Self-attention, on the other hand, has emerged as a recent advance to capture long range interactions, but has mostly been applied to sequence modeling and generative modeling tasks. In this paper, we consider the use of self-attention for discriminative visual tasks as an alternative to convolutions. We introduce a novel two-dimensional relative self-attention mechanism that proves competitive in replacing convolutions as a stand-alone computational primitive for image classification. We find in control experiments that the best results are obtained when combining both convolutions and self-attention. We therefore propose to augment convolutional operators with this self-attention mechanism by concatenating convolutional feature maps with a set of feature maps produced via self-attention. Extensive experiments show that Attention Augmentation leads to consistent improvements in image classification on ImageNet and object detection on COCO across many different models and scales, including ResNets and a state-of-the art mobile constrained network, while keeping the number of parameters similar. In particular, our method achieves a $1.3\%$ top-1 accuracy improvement on ImageNet classification over a ResNet50 baseline and outperforms other attention mechanisms for images such as Squeeze-and-Excitation. It also achieves an improvement of 1.4 mAP in COCO Object Detection on top of a RetinaNet baseline.
http://arxiv.org/pdf/1904.09925
[ "Irwan Bello", "Barret Zoph", "Ashish Vaswani", "Jonathon Shlens", "Quoc V. Le" ]
[ "cs.CV" ]
ICCV 2019
null
cs.CV
20190422
20200909
[]
1904.09925
25
Nh=4 heads. Our augmented MnasNets use augmented inverted bottlenecks in the last 13 blocks out of 18 in the MnasNet architecture, starting when the spatial dimension is 28x28. We downsample only in the first stage where Attention Augmentation is applied. We leave the final pointwise convolution, also referred to as the “head”, unchanged. In Table 4, we report ImageNet accuracies for the baseline MnasNet and its attention augmented variants at different width multipliers. Our experiments show that Attention Augmentation yields accuracy improvements across all width multipliers. Augmenting MnasNets with relative self-attention incurs a slight parameter increase, however 2.5 3.0 3.5 4.0 4.5 5.0 5.5 6.0 6.5 7.0 number of parameters (millions)737475767778top-1 accuracy 73.3%75.2%76.7%77.2% 73.9%75.7%77.2%77.7% MnasNet AA-MnasNet (ours)Figure 3. ImageNet top-1 accuracy as a function of number of parameters for MnasNet (black) and Attention-Augmented-MnasNet
1904.09925
Attention Augmented Convolutional Networks
Convolutional networks have been the paradigm of choice in many computer vision applications. The convolution operation however has a significant weakness in that it only operates on a local neighborhood, thus missing global information. Self-attention, on the other hand, has emerged as a recent advance to capture long range interactions, but has mostly been applied to sequence modeling and generative modeling tasks. In this paper, we consider the use of self-attention for discriminative visual tasks as an alternative to convolutions. We introduce a novel two-dimensional relative self-attention mechanism that proves competitive in replacing convolutions as a stand-alone computational primitive for image classification. We find in control experiments that the best results are obtained when combining both convolutions and self-attention. We therefore propose to augment convolutional operators with this self-attention mechanism by concatenating convolutional feature maps with a set of feature maps produced via self-attention. Extensive experiments show that Attention Augmentation leads to consistent improvements in image classification on ImageNet and object detection on COCO across many different models and scales, including ResNets and a state-of-the art mobile constrained network, while keeping the number of parameters similar. In particular, our method achieves a $1.3\%$ top-1 accuracy improvement on ImageNet classification over a ResNet50 baseline and outperforms other attention mechanisms for images such as Squeeze-and-Excitation. It also achieves an improvement of 1.4 mAP in COCO Object Detection on top of a RetinaNet baseline.
http://arxiv.org/pdf/1904.09925
[ "Irwan Bello", "Barret Zoph", "Ashish Vaswani", "Jonathon Shlens", "Quoc V. Le" ]
[ "cs.CV" ]
ICCV 2019
null
cs.CV
20190422
20200909
[]
1904.09925
26
AA-MnasNet (ours)Figure 3. ImageNet top-1 accuracy as a function of number of parameters for MnasNet (black) and Attention-Augmented-MnasNet (red) with width multipliers 0:75,1:0,1:25and1:4. we verify in Figure 3 that the accuracy improvements are not just explained by the parameter increase. Additionally, we note that the MnasNet architecture employs Squeezeand-Excitation at multiple locations that were optimally selected via architecture search, further suggesting the benefits of our method. 4.4. Object Detection with COCO dataset We next investigate the use of Attention Augmentation on the task of object detection on the COCO dataset [27]. We employ the RetinaNet architecture with a ResNet-50 and ResNet-101 backbone as done in [26], using the opensourced RetinaNet codebase.3We apply Attention Augmentation uniquely on the ResNet backbone, modifying them similarly as in our ImageNet classification experiments. Our relative self-attention mechanism improves the performance of the RetinaNet on both ResNet-50 and ResNet101 as shown in Table 5. Most notably, Attention Augmentation yields a 1.4% mAP improvement over a strong RetinaNet baseline from [26]. In contrast to the success
1904.09925
Attention Augmented Convolutional Networks
Convolutional networks have been the paradigm of choice in many computer vision applications. The convolution operation however has a significant weakness in that it only operates on a local neighborhood, thus missing global information. Self-attention, on the other hand, has emerged as a recent advance to capture long range interactions, but has mostly been applied to sequence modeling and generative modeling tasks. In this paper, we consider the use of self-attention for discriminative visual tasks as an alternative to convolutions. We introduce a novel two-dimensional relative self-attention mechanism that proves competitive in replacing convolutions as a stand-alone computational primitive for image classification. We find in control experiments that the best results are obtained when combining both convolutions and self-attention. We therefore propose to augment convolutional operators with this self-attention mechanism by concatenating convolutional feature maps with a set of feature maps produced via self-attention. Extensive experiments show that Attention Augmentation leads to consistent improvements in image classification on ImageNet and object detection on COCO across many different models and scales, including ResNets and a state-of-the art mobile constrained network, while keeping the number of parameters similar. In particular, our method achieves a $1.3\%$ top-1 accuracy improvement on ImageNet classification over a ResNet50 baseline and outperforms other attention mechanisms for images such as Squeeze-and-Excitation. It also achieves an improvement of 1.4 mAP in COCO Object Detection on top of a RetinaNet baseline.
http://arxiv.org/pdf/1904.09925
[ "Irwan Bello", "Barret Zoph", "Ashish Vaswani", "Jonathon Shlens", "Quoc V. Le" ]
[ "cs.CV" ]
ICCV 2019
null
cs.CV
20190422
20200909
[]
1904.09925
27
RetinaNet baseline from [26]. In contrast to the success of Squeeze-and-Excitation in image classification with ImageNet, our experiments show that adding Squeeze-andExcitation operators in the backbone network of the RetinaNet significantly hurts performance, in spite of grid searching over the squeeze ratio 2f4;8;16g. We hypothesize that localization requires precise spatial information which SE discards during the spatial pooling operation, thereby negatively affecting performance. Self-attention on the other hand maintains spatial information and is likely to 3https://github.com/tensorflow/tpu/tree/master/ models/official/retinanet Backbone architecture GFlops Params mAP COCO mAP 50 mAP 75 ResNet-50 [26] 182 33.4M 36.8 54.5 39.5 SE-ResNet-50 [17] 183 35.9M 36.5 54.0 39.1 AA-ResNet-50 (ours) 182 33.1M 38.2 56.5 40.7 ResNet-101 [26] 243 52.4M 38.5 56.4 41.2 SE-ResNet-101 [17] 243 57.2M 37.4 55.0 39.9
1904.09925
Attention Augmented Convolutional Networks
Convolutional networks have been the paradigm of choice in many computer vision applications. The convolution operation however has a significant weakness in that it only operates on a local neighborhood, thus missing global information. Self-attention, on the other hand, has emerged as a recent advance to capture long range interactions, but has mostly been applied to sequence modeling and generative modeling tasks. In this paper, we consider the use of self-attention for discriminative visual tasks as an alternative to convolutions. We introduce a novel two-dimensional relative self-attention mechanism that proves competitive in replacing convolutions as a stand-alone computational primitive for image classification. We find in control experiments that the best results are obtained when combining both convolutions and self-attention. We therefore propose to augment convolutional operators with this self-attention mechanism by concatenating convolutional feature maps with a set of feature maps produced via self-attention. Extensive experiments show that Attention Augmentation leads to consistent improvements in image classification on ImageNet and object detection on COCO across many different models and scales, including ResNets and a state-of-the art mobile constrained network, while keeping the number of parameters similar. In particular, our method achieves a $1.3\%$ top-1 accuracy improvement on ImageNet classification over a ResNet50 baseline and outperforms other attention mechanisms for images such as Squeeze-and-Excitation. It also achieves an improvement of 1.4 mAP in COCO Object Detection on top of a RetinaNet baseline.
http://arxiv.org/pdf/1904.09925
[ "Irwan Bello", "Barret Zoph", "Ashish Vaswani", "Jonathon Shlens", "Quoc V. Le" ]
[ "cs.CV" ]
ICCV 2019
null
cs.CV
20190422
20200909
[]
1904.09925
28
SE-ResNet-101 [17] 243 57.2M 37.4 55.0 39.9 AA-ResNet-101 (ours) 245 51.7M 39.2 57.8 41.9 Table 5. Object detection on the COCO dataset [27] using the RetinaNet architecture [26] with different backbone architectures. We report mean Average Precision at three different IoU values. be able to identify object boundaries successfully. Visualizations of attention maps (See Figures 9 and 10 in the Appendix) reveal that some heads are indeed delineating objects from their background which might be important for localization. 4.5. Ablation Study Fully-attentional vision models: In this section, we investigate the performance of Attention Augmentation as a function of the fraction of attentional channels. As we increase this fraction to 100%, we begin to replace a ConvNet with a fully attentional model, only leaving pointwise convolutions and the stem unchanged. Table 6 presents the performance of Attention Augmentation on the ResNet-50 architecture for varying ratios =2f0:25;0:5;0:75;1:0g. Performance slightly degrades as the ratio of attentional channels increases, which we hypothesize is partly explained by the average pooling operation for downsampling
1904.09925
Attention Augmented Convolutional Networks
Convolutional networks have been the paradigm of choice in many computer vision applications. The convolution operation however has a significant weakness in that it only operates on a local neighborhood, thus missing global information. Self-attention, on the other hand, has emerged as a recent advance to capture long range interactions, but has mostly been applied to sequence modeling and generative modeling tasks. In this paper, we consider the use of self-attention for discriminative visual tasks as an alternative to convolutions. We introduce a novel two-dimensional relative self-attention mechanism that proves competitive in replacing convolutions as a stand-alone computational primitive for image classification. We find in control experiments that the best results are obtained when combining both convolutions and self-attention. We therefore propose to augment convolutional operators with this self-attention mechanism by concatenating convolutional feature maps with a set of feature maps produced via self-attention. Extensive experiments show that Attention Augmentation leads to consistent improvements in image classification on ImageNet and object detection on COCO across many different models and scales, including ResNets and a state-of-the art mobile constrained network, while keeping the number of parameters similar. In particular, our method achieves a $1.3\%$ top-1 accuracy improvement on ImageNet classification over a ResNet50 baseline and outperforms other attention mechanisms for images such as Squeeze-and-Excitation. It also achieves an improvement of 1.4 mAP in COCO Object Detection on top of a RetinaNet baseline.
http://arxiv.org/pdf/1904.09925
[ "Irwan Bello", "Barret Zoph", "Ashish Vaswani", "Jonathon Shlens", "Quoc V. Le" ]
[ "cs.CV" ]
ICCV 2019
null
cs.CV
20190422
20200909
[]
1904.09925
29
Performance slightly degrades as the ratio of attentional channels increases, which we hypothesize is partly explained by the average pooling operation for downsampling at the first stage where Attention Augmentation is applied. Attention Augmentation proves however quite robust to the fraction of attentional channels. For instance, AA-ResNet50 with==0.75 outperforms its ResNet-50 counterpart, while being more parameter and flops efficient, indicating that mostly employing attentional channels is readily competitive. Perhaps surprisingly, these experiments also reveal that our proposed self-attention mechanism is a powerful standalone computational primitive for image classification and that fully attentional models are viable for discriminative visual tasks. In particular, AA-ResNet-50 with ==1, which uses exclusively attentional channels, is only 2.5% worse in accuracy than its fully convolutional counterpart, in spite of downsampling with average pooling and having 25% less parameters. Notably, this fully attentional architecture4also outperforms ResNet-34 while being more parameter and flops efficient (see Table 6). 4We consider pointwise convolutions as dense layers. This architecture
1904.09925
Attention Augmented Convolutional Networks
Convolutional networks have been the paradigm of choice in many computer vision applications. The convolution operation however has a significant weakness in that it only operates on a local neighborhood, thus missing global information. Self-attention, on the other hand, has emerged as a recent advance to capture long range interactions, but has mostly been applied to sequence modeling and generative modeling tasks. In this paper, we consider the use of self-attention for discriminative visual tasks as an alternative to convolutions. We introduce a novel two-dimensional relative self-attention mechanism that proves competitive in replacing convolutions as a stand-alone computational primitive for image classification. We find in control experiments that the best results are obtained when combining both convolutions and self-attention. We therefore propose to augment convolutional operators with this self-attention mechanism by concatenating convolutional feature maps with a set of feature maps produced via self-attention. Extensive experiments show that Attention Augmentation leads to consistent improvements in image classification on ImageNet and object detection on COCO across many different models and scales, including ResNets and a state-of-the art mobile constrained network, while keeping the number of parameters similar. In particular, our method achieves a $1.3\%$ top-1 accuracy improvement on ImageNet classification over a ResNet50 baseline and outperforms other attention mechanisms for images such as Squeeze-and-Excitation. It also achieves an improvement of 1.4 mAP in COCO Object Detection on top of a RetinaNet baseline.
http://arxiv.org/pdf/1904.09925
[ "Irwan Bello", "Barret Zoph", "Ashish Vaswani", "Jonathon Shlens", "Quoc V. Le" ]
[ "cs.CV" ]
ICCV 2019
null
cs.CV
20190422
20200909
[]
1904.09925
30
flops efficient (see Table 6). 4We consider pointwise convolutions as dense layers. This architecture employs 4 non-pointwise convolutions in the stem and the first stage of the architecture, but we believe such operations can be replaced by attention too.Architecture GFlops Params top-1 top-5 ResNet-34 [14] 7.4 21.8M 73.6 91.5 ResNet-50 [14] 8.2 25.6M 76.4 93.1 == 0:25 7.9 24.3M 77.7 93.8 == 0:5 7.3 22.3M 77.3 93.6 == 0:75 6.8 20.7M 76.7 93.2 == 1:0 6.3 19.4M 73.9 91.5 Table 6. Attention Augmented ResNet-50 with varying ratios of attentional channels. 0 25 50 75 100 fraction of attention versus convolutional channels707274767880top-1 accuracy76.4%77.5% 76.6% 75.4% 71.1%77.7% 77.3% 76.7% 73.9%
1904.09925
Attention Augmented Convolutional Networks
Convolutional networks have been the paradigm of choice in many computer vision applications. The convolution operation however has a significant weakness in that it only operates on a local neighborhood, thus missing global information. Self-attention, on the other hand, has emerged as a recent advance to capture long range interactions, but has mostly been applied to sequence modeling and generative modeling tasks. In this paper, we consider the use of self-attention for discriminative visual tasks as an alternative to convolutions. We introduce a novel two-dimensional relative self-attention mechanism that proves competitive in replacing convolutions as a stand-alone computational primitive for image classification. We find in control experiments that the best results are obtained when combining both convolutions and self-attention. We therefore propose to augment convolutional operators with this self-attention mechanism by concatenating convolutional feature maps with a set of feature maps produced via self-attention. Extensive experiments show that Attention Augmentation leads to consistent improvements in image classification on ImageNet and object detection on COCO across many different models and scales, including ResNets and a state-of-the art mobile constrained network, while keeping the number of parameters similar. In particular, our method achieves a $1.3\%$ top-1 accuracy improvement on ImageNet classification over a ResNet50 baseline and outperforms other attention mechanisms for images such as Squeeze-and-Excitation. It also achieves an improvement of 1.4 mAP in COCO Object Detection on top of a RetinaNet baseline.
http://arxiv.org/pdf/1904.09925
[ "Irwan Bello", "Barret Zoph", "Ashish Vaswani", "Jonathon Shlens", "Quoc V. Le" ]
[ "cs.CV" ]
ICCV 2019
null
cs.CV
20190422
20200909
[]
1904.09925
31
76.6% 75.4% 71.1%77.7% 77.3% 76.7% 73.9% no position with position Figure 4. Effect of relative position embeddings as the ratio of attentional channels increases on our Attention-Augmented ResNet50. Importance of position encodings: In Figure 4, we show the effect of our proposed two-dimensional relative position encodings as a function of the fraction of attentional channels. As expected, experiments demonstrate that our relative position encodings become increasingly more important as the architecture employs more attentional channels. In particular, the fully self-attentional ResNet-50 gains 2.8% top-1 ImageNet accuracy when using relative position encodings, which indicates the necessity of maintaining position information for fully self-attentional vision models. We additionally compare our proposed two-dimensional Architecture Position Encodings top-1 top-5 AA-ResNet-34 None 74.4 91.9 AA-ResNet-34 2d Sine 74.4 92.0 AA-ResNet-34 CoordConv 74.4 92.0 AA-ResNet-34 Relative (ours) 74.7 92.0 AA-ResNet-50 None 77.5 93.7
1904.09925
Attention Augmented Convolutional Networks
Convolutional networks have been the paradigm of choice in many computer vision applications. The convolution operation however has a significant weakness in that it only operates on a local neighborhood, thus missing global information. Self-attention, on the other hand, has emerged as a recent advance to capture long range interactions, but has mostly been applied to sequence modeling and generative modeling tasks. In this paper, we consider the use of self-attention for discriminative visual tasks as an alternative to convolutions. We introduce a novel two-dimensional relative self-attention mechanism that proves competitive in replacing convolutions as a stand-alone computational primitive for image classification. We find in control experiments that the best results are obtained when combining both convolutions and self-attention. We therefore propose to augment convolutional operators with this self-attention mechanism by concatenating convolutional feature maps with a set of feature maps produced via self-attention. Extensive experiments show that Attention Augmentation leads to consistent improvements in image classification on ImageNet and object detection on COCO across many different models and scales, including ResNets and a state-of-the art mobile constrained network, while keeping the number of parameters similar. In particular, our method achieves a $1.3\%$ top-1 accuracy improvement on ImageNet classification over a ResNet50 baseline and outperforms other attention mechanisms for images such as Squeeze-and-Excitation. It also achieves an improvement of 1.4 mAP in COCO Object Detection on top of a RetinaNet baseline.
http://arxiv.org/pdf/1904.09925
[ "Irwan Bello", "Barret Zoph", "Ashish Vaswani", "Jonathon Shlens", "Quoc V. Le" ]
[ "cs.CV" ]
ICCV 2019
null
cs.CV
20190422
20200909
[]
1904.09925
32
AA-ResNet-34 Relative (ours) 74.7 92.0 AA-ResNet-50 None 77.5 93.7 AA-ResNet-50 2d Sine 77.5 93.7 AA-ResNet-50 CoordConv 77.5 93.8 AA-ResNet-50 Relative (ours) 77.7 93.8 Table 7. Effects of different position encodings in Attention Augmentation on ImageNet classification. Position Encodings mAP COCO mAP 50 mAP 75 None 37.7 56.0 40.2 CoordConv [29] 37.4 55.5 40.1 Relative (ours) 38.2 56.5 40.7 Table 8. Effects of different position encodings in Attention Augmentation on the COCO object detection task using a RetinaNet AA-ResNet-50 backbone. relative position encodings to other position encoding schemes. We apply Attention Augmentation using the same hyperparameters as 4.2 with the following different position encoding schemes: 1) The position-unaware version of self-attention (referred to as None ), 2) a two-dimensional implementation of the sinusoidal positional waves (referred
1904.09925
Attention Augmented Convolutional Networks
Convolutional networks have been the paradigm of choice in many computer vision applications. The convolution operation however has a significant weakness in that it only operates on a local neighborhood, thus missing global information. Self-attention, on the other hand, has emerged as a recent advance to capture long range interactions, but has mostly been applied to sequence modeling and generative modeling tasks. In this paper, we consider the use of self-attention for discriminative visual tasks as an alternative to convolutions. We introduce a novel two-dimensional relative self-attention mechanism that proves competitive in replacing convolutions as a stand-alone computational primitive for image classification. We find in control experiments that the best results are obtained when combining both convolutions and self-attention. We therefore propose to augment convolutional operators with this self-attention mechanism by concatenating convolutional feature maps with a set of feature maps produced via self-attention. Extensive experiments show that Attention Augmentation leads to consistent improvements in image classification on ImageNet and object detection on COCO across many different models and scales, including ResNets and a state-of-the art mobile constrained network, while keeping the number of parameters similar. In particular, our method achieves a $1.3\%$ top-1 accuracy improvement on ImageNet classification over a ResNet50 baseline and outperforms other attention mechanisms for images such as Squeeze-and-Excitation. It also achieves an improvement of 1.4 mAP in COCO Object Detection on top of a RetinaNet baseline.
http://arxiv.org/pdf/1904.09925
[ "Irwan Bello", "Barret Zoph", "Ashish Vaswani", "Jonathon Shlens", "Quoc V. Le" ]
[ "cs.CV" ]
ICCV 2019
null
cs.CV
20190422
20200909
[]
1904.09925
33
self-attention (referred to as None ), 2) a two-dimensional implementation of the sinusoidal positional waves (referred to as 2d Sine ) as used in [32], 3) CoordConv [29] for which we concatenate (x,y,r) coordinate channels to the inputs of the attention function, and 4) our proposed two-dimensional relative position encodings (referred to as Relative ). In Table 7 and 8, we present the results on ImageNet classification and the COCO object detection task respectively. On both tasks, Attention Augmentation without position encodings already yields improvements over the fully convolutional non-augmented variants. Our experiments also reveal that the sinusoidal encodings and the coordinate convolution do not provide improvements over the positionunaware version of Attention Augmentation. We obtain additional improvements when using our two-dimensional relative attention, demonstrating the utility of preserving translation equivariance while preventing permutation equivariance. 5. Discussion and future work In this work, we consider the use of self-attention for vision models as an alternative to convolutions. We introduce a novel two-dimensional relative self-attention mechanism for images that enables training of competitive fully selfattentional vision models on image classification for the first
1904.09925
Attention Augmented Convolutional Networks
Convolutional networks have been the paradigm of choice in many computer vision applications. The convolution operation however has a significant weakness in that it only operates on a local neighborhood, thus missing global information. Self-attention, on the other hand, has emerged as a recent advance to capture long range interactions, but has mostly been applied to sequence modeling and generative modeling tasks. In this paper, we consider the use of self-attention for discriminative visual tasks as an alternative to convolutions. We introduce a novel two-dimensional relative self-attention mechanism that proves competitive in replacing convolutions as a stand-alone computational primitive for image classification. We find in control experiments that the best results are obtained when combining both convolutions and self-attention. We therefore propose to augment convolutional operators with this self-attention mechanism by concatenating convolutional feature maps with a set of feature maps produced via self-attention. Extensive experiments show that Attention Augmentation leads to consistent improvements in image classification on ImageNet and object detection on COCO across many different models and scales, including ResNets and a state-of-the art mobile constrained network, while keeping the number of parameters similar. In particular, our method achieves a $1.3\%$ top-1 accuracy improvement on ImageNet classification over a ResNet50 baseline and outperforms other attention mechanisms for images such as Squeeze-and-Excitation. It also achieves an improvement of 1.4 mAP in COCO Object Detection on top of a RetinaNet baseline.
http://arxiv.org/pdf/1904.09925
[ "Irwan Bello", "Barret Zoph", "Ashish Vaswani", "Jonathon Shlens", "Quoc V. Le" ]
[ "cs.CV" ]
ICCV 2019
null
cs.CV
20190422
20200909
[]
1904.09925
34
for images that enables training of competitive fully selfattentional vision models on image classification for the first time. We propose to augment convolutional operators with this self-attention mechanism and validate the superiority ofthis approach over other attention schemes. Extensive experiments show that Attention Augmentation leads to systematic improvements on both image classification and object detection tasks across a wide range of architectures and computational settings. Several open questions from this work remain. In future work, we will focus on the fully attentional regime and explore how different attention mechanisms trade off computational efficiency versus representational power. For instance, identifying a local attention mechanism may result in an efficient and scalable computational mechanism that could prevent the need for downsampling with average pooling [34]. Additionally, it is plausible that architectural design choices that are well suited when exclusively relying on convolutions are suboptimal when using self-attention mechanisms. As such, it would be interesting to see if using Attention Augmentation as a primitive in automated architecture search procedures proves useful to find even better models than those previously found in image classification [55], object detection [12], image segmentation [6] and other domains [5, 1, 35, 8]. Finally, one can ask to which
1904.09925
Attention Augmented Convolutional Networks
Convolutional networks have been the paradigm of choice in many computer vision applications. The convolution operation however has a significant weakness in that it only operates on a local neighborhood, thus missing global information. Self-attention, on the other hand, has emerged as a recent advance to capture long range interactions, but has mostly been applied to sequence modeling and generative modeling tasks. In this paper, we consider the use of self-attention for discriminative visual tasks as an alternative to convolutions. We introduce a novel two-dimensional relative self-attention mechanism that proves competitive in replacing convolutions as a stand-alone computational primitive for image classification. We find in control experiments that the best results are obtained when combining both convolutions and self-attention. We therefore propose to augment convolutional operators with this self-attention mechanism by concatenating convolutional feature maps with a set of feature maps produced via self-attention. Extensive experiments show that Attention Augmentation leads to consistent improvements in image classification on ImageNet and object detection on COCO across many different models and scales, including ResNets and a state-of-the art mobile constrained network, while keeping the number of parameters similar. In particular, our method achieves a $1.3\%$ top-1 accuracy improvement on ImageNet classification over a ResNet50 baseline and outperforms other attention mechanisms for images such as Squeeze-and-Excitation. It also achieves an improvement of 1.4 mAP in COCO Object Detection on top of a RetinaNet baseline.
http://arxiv.org/pdf/1904.09925
[ "Irwan Bello", "Barret Zoph", "Ashish Vaswani", "Jonathon Shlens", "Quoc V. Le" ]
[ "cs.CV" ]
ICCV 2019
null
cs.CV
20190422
20200909
[]
1904.09925
35
other domains [5, 1, 35, 8]. Finally, one can ask to which degree fully attentional models can replace convolutional networks for visual tasks. Acknowledgements The authors would like to thank Tsung-Yi Lin, Prajit Ramachandran, Mingxing Tan, Yanping Huang and the Google Brain team for insightful comments and discussions. References [1] Maximilian Alber, Irwan Bello, Barret Zoph, Pieter-Jan Kindermans, Prajit Ramachandran, and Quoc V . Le. Backprop evolution. CoRR , abs/1808.02822, 2018. 8 [2] Dzmitry Bahdanau, Kyunghyun Cho, and Yoshua Bengio. Neural machine translation by jointly learning to align and translate. In International Conference on Learning Representations , 2015. 2 [3] Irwan Bello, Sayali Kulkarni, Sagar Jain, Craig Boutilier, Ed Huai-hsin Chi, Elad Eban, Xiyang Luo, Alan Mackey, and Ofer Meshi. Seq2slate: Re-ranking and slate optimization with rnns. CoRR , abs/1810.02019, 2018. 2
1904.09925
Attention Augmented Convolutional Networks
Convolutional networks have been the paradigm of choice in many computer vision applications. The convolution operation however has a significant weakness in that it only operates on a local neighborhood, thus missing global information. Self-attention, on the other hand, has emerged as a recent advance to capture long range interactions, but has mostly been applied to sequence modeling and generative modeling tasks. In this paper, we consider the use of self-attention for discriminative visual tasks as an alternative to convolutions. We introduce a novel two-dimensional relative self-attention mechanism that proves competitive in replacing convolutions as a stand-alone computational primitive for image classification. We find in control experiments that the best results are obtained when combining both convolutions and self-attention. We therefore propose to augment convolutional operators with this self-attention mechanism by concatenating convolutional feature maps with a set of feature maps produced via self-attention. Extensive experiments show that Attention Augmentation leads to consistent improvements in image classification on ImageNet and object detection on COCO across many different models and scales, including ResNets and a state-of-the art mobile constrained network, while keeping the number of parameters similar. In particular, our method achieves a $1.3\%$ top-1 accuracy improvement on ImageNet classification over a ResNet50 baseline and outperforms other attention mechanisms for images such as Squeeze-and-Excitation. It also achieves an improvement of 1.4 mAP in COCO Object Detection on top of a RetinaNet baseline.
http://arxiv.org/pdf/1904.09925
[ "Irwan Bello", "Barret Zoph", "Ashish Vaswani", "Jonathon Shlens", "Quoc V. Le" ]
[ "cs.CV" ]
ICCV 2019
null
cs.CV
20190422
20200909
[]
1904.09925
36
and Ofer Meshi. Seq2slate: Re-ranking and slate optimization with rnns. CoRR , abs/1810.02019, 2018. 2 [4] Irwan Bello, Hieu Pham, Quoc V . Le, Mohammad Norouzi, and Samy Bengio. Neural combinatorial optimization with reinforcement learning. 2016. 2 [5] Irwan Bello, Barret Zoph, Vijay Vasudevan, and Quoc V . Le. Neural optimizer search with reinforcement learning. In Proceedings of the 34th International Conference on Machine Learning - Volume 70 , ICML’17, pages 459–468. JMLR.org, 2017. 8 [6] Liang-Chieh Chen, Maxwell Collins, Yukun Zhu, George Papandreou, Barret Zoph, Florian Schroff, Hartwig Adam, and Jon Shlens. Searching for efficient multi-scale architectures for dense image prediction. In Advances in Neural Information Processing Systems , pages 8713–8724, 2018. 2, 8 [7] Yunpeng Chen, Yannis Kalantidis, Jianshu Li, Shuicheng Yan, and Jiashi Feng. A2-nets: Double attention networks.
1904.09925
Attention Augmented Convolutional Networks
Convolutional networks have been the paradigm of choice in many computer vision applications. The convolution operation however has a significant weakness in that it only operates on a local neighborhood, thus missing global information. Self-attention, on the other hand, has emerged as a recent advance to capture long range interactions, but has mostly been applied to sequence modeling and generative modeling tasks. In this paper, we consider the use of self-attention for discriminative visual tasks as an alternative to convolutions. We introduce a novel two-dimensional relative self-attention mechanism that proves competitive in replacing convolutions as a stand-alone computational primitive for image classification. We find in control experiments that the best results are obtained when combining both convolutions and self-attention. We therefore propose to augment convolutional operators with this self-attention mechanism by concatenating convolutional feature maps with a set of feature maps produced via self-attention. Extensive experiments show that Attention Augmentation leads to consistent improvements in image classification on ImageNet and object detection on COCO across many different models and scales, including ResNets and a state-of-the art mobile constrained network, while keeping the number of parameters similar. In particular, our method achieves a $1.3\%$ top-1 accuracy improvement on ImageNet classification over a ResNet50 baseline and outperforms other attention mechanisms for images such as Squeeze-and-Excitation. It also achieves an improvement of 1.4 mAP in COCO Object Detection on top of a RetinaNet baseline.
http://arxiv.org/pdf/1904.09925
[ "Irwan Bello", "Barret Zoph", "Ashish Vaswani", "Jonathon Shlens", "Quoc V. Le" ]
[ "cs.CV" ]
ICCV 2019
null
cs.CV
20190422
20200909
[]
1904.09925
37
[7] Yunpeng Chen, Yannis Kalantidis, Jianshu Li, Shuicheng Yan, and Jiashi Feng. A2-nets: Double attention networks. CoRR , abs/1810.11579, 2018. 3 [8] Ekin Dogus Cubuk, Barret Zoph, Dandelion Man ´e, Vijay Vasudevan, and Quoc V . Le. Autoaugment: Learning augmentation policies from data. CoRR , abs/1805.09501, 2018. 8 [9] Jia Deng, Wei Dong, Richard Socher, Li-Jia Li, Kai Li, and Li Fei-Fei. Imagenet: A large-scale hierarchical image database. In IEEE Conference on Computer Vision and Pattern Recognition . IEEE, 2009. 1, 2, 5 [10] Xavier Gastaldi. Shake-shake regularization. arXiv preprint arXiv:1705.07485 , 2017. 11 [11] Golnaz Ghiasi, Tsung-Yi Lin, and Quoc V Le. Dropblock: A regularization method for convolutional networks. In Advances in Neural Information Processing Systems , pages 10750–10760, 2018. 11
1904.09925
Attention Augmented Convolutional Networks
Convolutional networks have been the paradigm of choice in many computer vision applications. The convolution operation however has a significant weakness in that it only operates on a local neighborhood, thus missing global information. Self-attention, on the other hand, has emerged as a recent advance to capture long range interactions, but has mostly been applied to sequence modeling and generative modeling tasks. In this paper, we consider the use of self-attention for discriminative visual tasks as an alternative to convolutions. We introduce a novel two-dimensional relative self-attention mechanism that proves competitive in replacing convolutions as a stand-alone computational primitive for image classification. We find in control experiments that the best results are obtained when combining both convolutions and self-attention. We therefore propose to augment convolutional operators with this self-attention mechanism by concatenating convolutional feature maps with a set of feature maps produced via self-attention. Extensive experiments show that Attention Augmentation leads to consistent improvements in image classification on ImageNet and object detection on COCO across many different models and scales, including ResNets and a state-of-the art mobile constrained network, while keeping the number of parameters similar. In particular, our method achieves a $1.3\%$ top-1 accuracy improvement on ImageNet classification over a ResNet50 baseline and outperforms other attention mechanisms for images such as Squeeze-and-Excitation. It also achieves an improvement of 1.4 mAP in COCO Object Detection on top of a RetinaNet baseline.
http://arxiv.org/pdf/1904.09925
[ "Irwan Bello", "Barret Zoph", "Ashish Vaswani", "Jonathon Shlens", "Quoc V. Le" ]
[ "cs.CV" ]
ICCV 2019
null
cs.CV
20190422
20200909
[]
1904.09925
38
A regularization method for convolutional networks. In Advances in Neural Information Processing Systems , pages 10750–10760, 2018. 11 [12] Golnaz Ghiasi, Tsung-Yi Lin, Ruoming Pang, and Quoc V Le. NAS-FPN: Learning scalable feature pyramid architecture for object detection. In The IEEE Conference on Computer Vision and Pattern Recognition (CVPR) , June 2019. 8 [13] Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Deep residual learning for image recognition. In IEEE Conference on Computer Vision and Pattern Recognition , 2016. 2, 5 [14] Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Identity mappings in deep residual networks. In European Conference on Computer Vision , 2016. 1, 2, 5, 7, 11 [15] Sepp Hochreiter and Juergen Schmidhuber. Long short-term memory. Neural Computation , 1997. 2 [16] Jie Hu, Li Shen, Samuel Albanie, Gang Sun, and Andrea Vedaldi. Gather-excite: Exploiting feature context in convolutional neural networks. In Advances in Neural Information Processing Systems , pages 9423–9433, 2018. 3, 4, 5
1904.09925
Attention Augmented Convolutional Networks
Convolutional networks have been the paradigm of choice in many computer vision applications. The convolution operation however has a significant weakness in that it only operates on a local neighborhood, thus missing global information. Self-attention, on the other hand, has emerged as a recent advance to capture long range interactions, but has mostly been applied to sequence modeling and generative modeling tasks. In this paper, we consider the use of self-attention for discriminative visual tasks as an alternative to convolutions. We introduce a novel two-dimensional relative self-attention mechanism that proves competitive in replacing convolutions as a stand-alone computational primitive for image classification. We find in control experiments that the best results are obtained when combining both convolutions and self-attention. We therefore propose to augment convolutional operators with this self-attention mechanism by concatenating convolutional feature maps with a set of feature maps produced via self-attention. Extensive experiments show that Attention Augmentation leads to consistent improvements in image classification on ImageNet and object detection on COCO across many different models and scales, including ResNets and a state-of-the art mobile constrained network, while keeping the number of parameters similar. In particular, our method achieves a $1.3\%$ top-1 accuracy improvement on ImageNet classification over a ResNet50 baseline and outperforms other attention mechanisms for images such as Squeeze-and-Excitation. It also achieves an improvement of 1.4 mAP in COCO Object Detection on top of a RetinaNet baseline.
http://arxiv.org/pdf/1904.09925
[ "Irwan Bello", "Barret Zoph", "Ashish Vaswani", "Jonathon Shlens", "Quoc V. Le" ]
[ "cs.CV" ]
ICCV 2019
null
cs.CV
20190422
20200909
[]
1904.09925
39
Processing Systems , pages 9423–9433, 2018. 3, 4, 5 [17] Jie Hu, Li Shen, and Gang Sun. Squeeze-and-excitation networks. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition , 2018. 1, 2, 3, 4, 5, 6, 7 [18] Cheng-Zhi Anna Huang, Ashish Vaswani, Jakob Uszkoreit, Noam Shazeer, Curtis Hawthorne, Andrew M Dai, Matthew D Hoffman, and Douglas Eck. Music transformer. InAdvances in Neural Processing Systems , 2018. 3, 4 [19] Jonathan Huang, Vivek Rathod, Chen Sun, Menglong Zhu, Anoop Korattikara, Alireza Fathi, Ian Fischer, Zbigniew Wojna, Yang Song, Sergio Guadarrama, et al. Speed/accuracy trade-offs for modern convolutional object detectors. In IEEE Conference on Computer Vision and Pattern Recognition, 2017. 2 [20] Sergey Ioffe and Christian Szegedy. Batch normalization: Accelerating deep network training by reducing internal covariate shift. In International Conference on Learning Representations , 2015. 4
1904.09925
Attention Augmented Convolutional Networks
Convolutional networks have been the paradigm of choice in many computer vision applications. The convolution operation however has a significant weakness in that it only operates on a local neighborhood, thus missing global information. Self-attention, on the other hand, has emerged as a recent advance to capture long range interactions, but has mostly been applied to sequence modeling and generative modeling tasks. In this paper, we consider the use of self-attention for discriminative visual tasks as an alternative to convolutions. We introduce a novel two-dimensional relative self-attention mechanism that proves competitive in replacing convolutions as a stand-alone computational primitive for image classification. We find in control experiments that the best results are obtained when combining both convolutions and self-attention. We therefore propose to augment convolutional operators with this self-attention mechanism by concatenating convolutional feature maps with a set of feature maps produced via self-attention. Extensive experiments show that Attention Augmentation leads to consistent improvements in image classification on ImageNet and object detection on COCO across many different models and scales, including ResNets and a state-of-the art mobile constrained network, while keeping the number of parameters similar. In particular, our method achieves a $1.3\%$ top-1 accuracy improvement on ImageNet classification over a ResNet50 baseline and outperforms other attention mechanisms for images such as Squeeze-and-Excitation. It also achieves an improvement of 1.4 mAP in COCO Object Detection on top of a RetinaNet baseline.
http://arxiv.org/pdf/1904.09925
[ "Irwan Bello", "Barret Zoph", "Ashish Vaswani", "Jonathon Shlens", "Quoc V. Le" ]
[ "cs.CV" ]
ICCV 2019
null
cs.CV
20190422
20200909
[]
1904.09925
40
Accelerating deep network training by reducing internal covariate shift. In International Conference on Learning Representations , 2015. 4 [21] Simon Kornblith, Jonathon Shlens, and Quoc V Le. Do better imagenet models transfer better? In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, 2019. 2, 5[22] Alex Krizhevsky. Learning multiple layers of features from tiny images. Technical report, University of Toronto, 2009. 2, 5 [23] Alex Krizhevsky, Ilya Sutskever, and Geoffrey E. Hinton. Imagenet classification with deep convolutional neural networks. In Advances in Neural Information Processing System, 2012. 1, 2 [24] Yann LeCun, L ´eon Bottou, Yoshua Bengio, and Patrick Haffner. Gradient-based learning applied to document recognition. Proceedings of the IEEE , 1998. 1 [25] Tsung-Yi Lin, Piotr Doll ´ar, Ross Girshick, Kaiming He, Bharath Hariharan, and Serge Belongie. Feature pyramid networks for object detection. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition , 2017. 5
1904.09925
Attention Augmented Convolutional Networks
Convolutional networks have been the paradigm of choice in many computer vision applications. The convolution operation however has a significant weakness in that it only operates on a local neighborhood, thus missing global information. Self-attention, on the other hand, has emerged as a recent advance to capture long range interactions, but has mostly been applied to sequence modeling and generative modeling tasks. In this paper, we consider the use of self-attention for discriminative visual tasks as an alternative to convolutions. We introduce a novel two-dimensional relative self-attention mechanism that proves competitive in replacing convolutions as a stand-alone computational primitive for image classification. We find in control experiments that the best results are obtained when combining both convolutions and self-attention. We therefore propose to augment convolutional operators with this self-attention mechanism by concatenating convolutional feature maps with a set of feature maps produced via self-attention. Extensive experiments show that Attention Augmentation leads to consistent improvements in image classification on ImageNet and object detection on COCO across many different models and scales, including ResNets and a state-of-the art mobile constrained network, while keeping the number of parameters similar. In particular, our method achieves a $1.3\%$ top-1 accuracy improvement on ImageNet classification over a ResNet50 baseline and outperforms other attention mechanisms for images such as Squeeze-and-Excitation. It also achieves an improvement of 1.4 mAP in COCO Object Detection on top of a RetinaNet baseline.
http://arxiv.org/pdf/1904.09925
[ "Irwan Bello", "Barret Zoph", "Ashish Vaswani", "Jonathon Shlens", "Quoc V. Le" ]
[ "cs.CV" ]
ICCV 2019
null
cs.CV
20190422
20200909
[]
1904.09925
41
networks for object detection. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition , 2017. 5 [26] Tsung-Yi Lin, Priya Goyal, Ross Girshick, Kaiming He, and Piotr Doll ´ar. Focal loss for dense object detection. In Proceedings of the IEEE international conference on computer vision , pages 2980–2988, 2017. 6, 7, 11 [27] Tsung-Yi Lin, Michael Maire, Serge Belongie, James Hays, Pietro Perona, Deva Ramanan, Piotr Doll ´ar, and C Lawrence Zitnick. Microsoft coco: Common objects in context. In European Conference on Computer Vision , pages 740–755. Springer, 2014. 2, 6, 7 [28] Drew Linsley, Dan Scheibler, Sven Eberhardt, and Thomas Serre. Global-and-local attention networks for visual recognition. CoRR , abs/1805.08819, 2018. 5 [29] Rosanne Liu, Joel Lehman, Piero Molino, Felipe Petroski Such, Eric Frank, Alex Sergeev, and Jason Yosinski. An intriguing failing of convolutional neural networks and the
1904.09925
Attention Augmented Convolutional Networks
Convolutional networks have been the paradigm of choice in many computer vision applications. The convolution operation however has a significant weakness in that it only operates on a local neighborhood, thus missing global information. Self-attention, on the other hand, has emerged as a recent advance to capture long range interactions, but has mostly been applied to sequence modeling and generative modeling tasks. In this paper, we consider the use of self-attention for discriminative visual tasks as an alternative to convolutions. We introduce a novel two-dimensional relative self-attention mechanism that proves competitive in replacing convolutions as a stand-alone computational primitive for image classification. We find in control experiments that the best results are obtained when combining both convolutions and self-attention. We therefore propose to augment convolutional operators with this self-attention mechanism by concatenating convolutional feature maps with a set of feature maps produced via self-attention. Extensive experiments show that Attention Augmentation leads to consistent improvements in image classification on ImageNet and object detection on COCO across many different models and scales, including ResNets and a state-of-the art mobile constrained network, while keeping the number of parameters similar. In particular, our method achieves a $1.3\%$ top-1 accuracy improvement on ImageNet classification over a ResNet50 baseline and outperforms other attention mechanisms for images such as Squeeze-and-Excitation. It also achieves an improvement of 1.4 mAP in COCO Object Detection on top of a RetinaNet baseline.
http://arxiv.org/pdf/1904.09925
[ "Irwan Bello", "Barret Zoph", "Ashish Vaswani", "Jonathon Shlens", "Quoc V. Le" ]
[ "cs.CV" ]
ICCV 2019
null
cs.CV
20190422
20200909
[]
1904.09925
42
Such, Eric Frank, Alex Sergeev, and Jason Yosinski. An intriguing failing of convolutional neural networks and the coordconv solution. In Advances in Neural Information Processing Systems , pages 9628–9639, 2018. 3, 8 [30] Ilya Loshchilov and Frank Hutter. SGDR: Stochastic gradient descent with warm restarts. arXiv preprint arXiv:1608.03983 , 2016. 11 [31] Jongchan Park, Sanghyun Woo, Joon-Young Lee, and In So Kweon. Bam: bottleneck attention module. In British Machine Vision Conference , 2018. 3, 4, 5 [32] Niki Parmar, Ashish Vaswani, Jakob Uszkoreit, Łukasz Kaiser, Noam Shazeer, Alexander Ku, and Dustin Tran. Image transformer. In International Conference on Machine Learning , 2018. 3, 8 [33] Andrew Rabinovich, Andrea Vedaldi, Carolina Galleguillos, Eric Wiewiora, and Serge Belongie. Objects in context. 2007. 1 [34] Prajit Ramachandran, Niki Parmar, Ashish Vaswani, Irwan Bello, Anselm Levskaya, and Jonathon Shlens. Stand-alone
1904.09925
Attention Augmented Convolutional Networks
Convolutional networks have been the paradigm of choice in many computer vision applications. The convolution operation however has a significant weakness in that it only operates on a local neighborhood, thus missing global information. Self-attention, on the other hand, has emerged as a recent advance to capture long range interactions, but has mostly been applied to sequence modeling and generative modeling tasks. In this paper, we consider the use of self-attention for discriminative visual tasks as an alternative to convolutions. We introduce a novel two-dimensional relative self-attention mechanism that proves competitive in replacing convolutions as a stand-alone computational primitive for image classification. We find in control experiments that the best results are obtained when combining both convolutions and self-attention. We therefore propose to augment convolutional operators with this self-attention mechanism by concatenating convolutional feature maps with a set of feature maps produced via self-attention. Extensive experiments show that Attention Augmentation leads to consistent improvements in image classification on ImageNet and object detection on COCO across many different models and scales, including ResNets and a state-of-the art mobile constrained network, while keeping the number of parameters similar. In particular, our method achieves a $1.3\%$ top-1 accuracy improvement on ImageNet classification over a ResNet50 baseline and outperforms other attention mechanisms for images such as Squeeze-and-Excitation. It also achieves an improvement of 1.4 mAP in COCO Object Detection on top of a RetinaNet baseline.
http://arxiv.org/pdf/1904.09925
[ "Irwan Bello", "Barret Zoph", "Ashish Vaswani", "Jonathon Shlens", "Quoc V. Le" ]
[ "cs.CV" ]
ICCV 2019
null
cs.CV
20190422
20200909
[]
1904.09925
43
Bello, Anselm Levskaya, and Jonathon Shlens. Stand-alone self-attention in vision models. CoRR , abs/1906.05909, 2019. 8 [35] Prajit Ramachandran, Barret Zoph, and Quoc V . Le. Searching for activation functions. CoRR , abs/1710.05941, 2017. 8 [36] Mark Sandler, Andrew Howard, Menglong Zhu, Andrey Zhmoginov, and Liang-Chieh Chen. Mobilenetv2: Inverted residuals and linear bottlenecks. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition , pages 4510–4520, 2018. 6 [37] Peter Shaw, Jakob Uszkoreit, and Ashish Vaswani. Selfattention with relative position representations. arXiv preprint arXiv:1803.02155 , 2018. 2, 3, 4 [38] David R. So, Chen Liang, and Quoc V . Le. The evolved transformer. CoRR , abs/1901.11117, 2019. 3 [39] Christian Szegedy, Sergey Ioffe, Vincent Vanhoucke, and Alex Alemi. Inception-v4, Inception-Resnet and the impact
1904.09925
Attention Augmented Convolutional Networks
Convolutional networks have been the paradigm of choice in many computer vision applications. The convolution operation however has a significant weakness in that it only operates on a local neighborhood, thus missing global information. Self-attention, on the other hand, has emerged as a recent advance to capture long range interactions, but has mostly been applied to sequence modeling and generative modeling tasks. In this paper, we consider the use of self-attention for discriminative visual tasks as an alternative to convolutions. We introduce a novel two-dimensional relative self-attention mechanism that proves competitive in replacing convolutions as a stand-alone computational primitive for image classification. We find in control experiments that the best results are obtained when combining both convolutions and self-attention. We therefore propose to augment convolutional operators with this self-attention mechanism by concatenating convolutional feature maps with a set of feature maps produced via self-attention. Extensive experiments show that Attention Augmentation leads to consistent improvements in image classification on ImageNet and object detection on COCO across many different models and scales, including ResNets and a state-of-the art mobile constrained network, while keeping the number of parameters similar. In particular, our method achieves a $1.3\%$ top-1 accuracy improvement on ImageNet classification over a ResNet50 baseline and outperforms other attention mechanisms for images such as Squeeze-and-Excitation. It also achieves an improvement of 1.4 mAP in COCO Object Detection on top of a RetinaNet baseline.
http://arxiv.org/pdf/1904.09925
[ "Irwan Bello", "Barret Zoph", "Ashish Vaswani", "Jonathon Shlens", "Quoc V. Le" ]
[ "cs.CV" ]
ICCV 2019
null
cs.CV
20190422
20200909
[]
1904.09925
44
[39] Christian Szegedy, Sergey Ioffe, Vincent Vanhoucke, and Alex Alemi. Inception-v4, Inception-Resnet and the impact of residual connections on learning. In International Conference on Learning Representations Workshop Track , 2016. 2 [40] Christian Szegedy, Wei Liu, Yangqing Jia, Pierre Sermanet, Scott Reed, Dragomir Anguelov, Dumitru Erhan, Vincent Vanhoucke, and Andrew Rabinovich. Going deeper with convolutions. In IEEE Conference on Computer Vision and Pattern Recognition , 2015. 2 [41] Christian Szegedy, Vincent Vanhoucke, Sergey Ioffe, Jon Shlens, and Zbigniew Wojna. Rethinking the Inception architecture for computer vision. In IEEE Conference on Computer Vision and Pattern Recognition , 2016. 2, 11 [42] Mingxing Tan, Bo Chen, Ruoming Pang, Vijay Vasudevan, and Quoc V Le. Mnasnet: Platform-aware neural architecture search for mobile. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition , 2018. 2, 5, 6, 11
1904.09925
Attention Augmented Convolutional Networks
Convolutional networks have been the paradigm of choice in many computer vision applications. The convolution operation however has a significant weakness in that it only operates on a local neighborhood, thus missing global information. Self-attention, on the other hand, has emerged as a recent advance to capture long range interactions, but has mostly been applied to sequence modeling and generative modeling tasks. In this paper, we consider the use of self-attention for discriminative visual tasks as an alternative to convolutions. We introduce a novel two-dimensional relative self-attention mechanism that proves competitive in replacing convolutions as a stand-alone computational primitive for image classification. We find in control experiments that the best results are obtained when combining both convolutions and self-attention. We therefore propose to augment convolutional operators with this self-attention mechanism by concatenating convolutional feature maps with a set of feature maps produced via self-attention. Extensive experiments show that Attention Augmentation leads to consistent improvements in image classification on ImageNet and object detection on COCO across many different models and scales, including ResNets and a state-of-the art mobile constrained network, while keeping the number of parameters similar. In particular, our method achieves a $1.3\%$ top-1 accuracy improvement on ImageNet classification over a ResNet50 baseline and outperforms other attention mechanisms for images such as Squeeze-and-Excitation. It also achieves an improvement of 1.4 mAP in COCO Object Detection on top of a RetinaNet baseline.
http://arxiv.org/pdf/1904.09925
[ "Irwan Bello", "Barret Zoph", "Ashish Vaswani", "Jonathon Shlens", "Quoc V. Le" ]
[ "cs.CV" ]
ICCV 2019
null
cs.CV
20190422
20200909
[]
1904.09925
45
5, 6, 11 [43] Ashish Vaswani, Noam Shazeer, Niki Parmar, Jakob Uszkoreit, Llion Jones, Aidan N Gomez, Łukasz Kaiser, and Illia Polosukhin. Attention is all you need. In Advances in Neural Information Processing Systems , pages 5998–6008, 2017. 1, 2, 3 [44] Oriol Vinyals, Meire Fortunato, and Navdeep Jaitly. Pointer networks. In NIPS , pages 2692–2700, 2015. 2 [45] Xiaolong Wang, Ross Girshick, Abhinav Gupta, and Kaiming He. Non-local neural networks. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 7794–7803, 2018. 3 [46] Sanghyun Woo, Jongchan Park, Joon-Young Lee, and In So Kweon. Cbam: Convolutional block attention module. InProceedings of the European Conference on Computer Vision (ECCV) , pages 3–19, 2018. 3, 4, 5 [47] Saining Xie, Ross Girshick, Piotr Doll ´ar, Zhuowen Tu, and Kaiming He. Aggregated residual transformations for deep
1904.09925
Attention Augmented Convolutional Networks
Convolutional networks have been the paradigm of choice in many computer vision applications. The convolution operation however has a significant weakness in that it only operates on a local neighborhood, thus missing global information. Self-attention, on the other hand, has emerged as a recent advance to capture long range interactions, but has mostly been applied to sequence modeling and generative modeling tasks. In this paper, we consider the use of self-attention for discriminative visual tasks as an alternative to convolutions. We introduce a novel two-dimensional relative self-attention mechanism that proves competitive in replacing convolutions as a stand-alone computational primitive for image classification. We find in control experiments that the best results are obtained when combining both convolutions and self-attention. We therefore propose to augment convolutional operators with this self-attention mechanism by concatenating convolutional feature maps with a set of feature maps produced via self-attention. Extensive experiments show that Attention Augmentation leads to consistent improvements in image classification on ImageNet and object detection on COCO across many different models and scales, including ResNets and a state-of-the art mobile constrained network, while keeping the number of parameters similar. In particular, our method achieves a $1.3\%$ top-1 accuracy improvement on ImageNet classification over a ResNet50 baseline and outperforms other attention mechanisms for images such as Squeeze-and-Excitation. It also achieves an improvement of 1.4 mAP in COCO Object Detection on top of a RetinaNet baseline.
http://arxiv.org/pdf/1904.09925
[ "Irwan Bello", "Barret Zoph", "Ashish Vaswani", "Jonathon Shlens", "Quoc V. Le" ]
[ "cs.CV" ]
ICCV 2019
null
cs.CV
20190422
20200909
[]
1904.09925
46
[47] Saining Xie, Ross Girshick, Piotr Doll ´ar, Zhuowen Tu, and Kaiming He. Aggregated residual transformations for deep neural networks. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition , 2017. 2, 5 [48] Yoshihiro Yamada, Masakazu Iwamura, Takuya Akiba, and Koichi Kise. Shakedrop regularization for deep residual learning. arXiv preprint arXiv:1802.02375 , 2018. 11 [49] Baosong Yang, Longyue Wang, Derek F. Wong, Lidia S. Chao, and Zhaopeng Tu. Convolutional self-attention network. In CoRR , volume abs/1810.13320, 2018. 2 [50] Adams Wei Yu, David Dohan, Minh-Thang Luong, Rui Zhao, Kai Chen, Mohammad Norouzi, and Quoc V Le. QAnet: Combining local convolution with global selfattention for reading comprehension. In International Conference on Learning Representations , 2018. 2
1904.09925
Attention Augmented Convolutional Networks
Convolutional networks have been the paradigm of choice in many computer vision applications. The convolution operation however has a significant weakness in that it only operates on a local neighborhood, thus missing global information. Self-attention, on the other hand, has emerged as a recent advance to capture long range interactions, but has mostly been applied to sequence modeling and generative modeling tasks. In this paper, we consider the use of self-attention for discriminative visual tasks as an alternative to convolutions. We introduce a novel two-dimensional relative self-attention mechanism that proves competitive in replacing convolutions as a stand-alone computational primitive for image classification. We find in control experiments that the best results are obtained when combining both convolutions and self-attention. We therefore propose to augment convolutional operators with this self-attention mechanism by concatenating convolutional feature maps with a set of feature maps produced via self-attention. Extensive experiments show that Attention Augmentation leads to consistent improvements in image classification on ImageNet and object detection on COCO across many different models and scales, including ResNets and a state-of-the art mobile constrained network, while keeping the number of parameters similar. In particular, our method achieves a $1.3\%$ top-1 accuracy improvement on ImageNet classification over a ResNet50 baseline and outperforms other attention mechanisms for images such as Squeeze-and-Excitation. It also achieves an improvement of 1.4 mAP in COCO Object Detection on top of a RetinaNet baseline.
http://arxiv.org/pdf/1904.09925
[ "Irwan Bello", "Barret Zoph", "Ashish Vaswani", "Jonathon Shlens", "Quoc V. Le" ]
[ "cs.CV" ]
ICCV 2019
null
cs.CV
20190422
20200909
[]
1904.09925
47
QAnet: Combining local convolution with global selfattention for reading comprehension. In International Conference on Learning Representations , 2018. 2 [51] Sergey Zagoruyko and Nikos Komodakis. Wide residual networks. In British Machine Vision Conference , 2016. 5[52] Vinicius Zambaldi, David Raposo, Adam Santoro, Victor Bapst, Yujia Li, Igor Babuschkin, Karl Tuyls, David Reichert, Timothy Lillicrap, Edward Lockhart, Murray Shanahan, Victoria Langston, Razvan Pascanu, Matthew Botvinick, Oriol Vinyals, and Peter Battaglia. Deep reinforcement learning with relational inductive biases. In ICLR , 2019. 2 [53] Han Zhang, Ian J. Goodfellow, Dimitris N. Metaxas, and Augustus Odena. Self-attention generative adversarial networks. arXiv:1805.08318 , 2018. 3 [54] Barret Zoph and Quoc V . Le. Neural architecture search with reinforcement learning. In International Conference on Learning Representations , 2017. 6 [55] Barret Zoph, Vijay Vasudevan, Jonathon Shlens, and Quoc V Le. Learning transferable architectures for scalable image
1904.09925
Attention Augmented Convolutional Networks
Convolutional networks have been the paradigm of choice in many computer vision applications. The convolution operation however has a significant weakness in that it only operates on a local neighborhood, thus missing global information. Self-attention, on the other hand, has emerged as a recent advance to capture long range interactions, but has mostly been applied to sequence modeling and generative modeling tasks. In this paper, we consider the use of self-attention for discriminative visual tasks as an alternative to convolutions. We introduce a novel two-dimensional relative self-attention mechanism that proves competitive in replacing convolutions as a stand-alone computational primitive for image classification. We find in control experiments that the best results are obtained when combining both convolutions and self-attention. We therefore propose to augment convolutional operators with this self-attention mechanism by concatenating convolutional feature maps with a set of feature maps produced via self-attention. Extensive experiments show that Attention Augmentation leads to consistent improvements in image classification on ImageNet and object detection on COCO across many different models and scales, including ResNets and a state-of-the art mobile constrained network, while keeping the number of parameters similar. In particular, our method achieves a $1.3\%$ top-1 accuracy improvement on ImageNet classification over a ResNet50 baseline and outperforms other attention mechanisms for images such as Squeeze-and-Excitation. It also achieves an improvement of 1.4 mAP in COCO Object Detection on top of a RetinaNet baseline.
http://arxiv.org/pdf/1904.09925
[ "Irwan Bello", "Barret Zoph", "Ashish Vaswani", "Jonathon Shlens", "Quoc V. Le" ]
[ "cs.CV" ]
ICCV 2019
null
cs.CV
20190422
20200909
[]
1904.09925
48
[55] Barret Zoph, Vijay Vasudevan, Jonathon Shlens, and Quoc V Le. Learning transferable architectures for scalable image recognition. In Proceedings of the IEEE conference on computer vision and pattern recognition , pages 8697–8710, 2018. 2, 8, 11 A. Appendix A.1. Experimental details Tuning Unless specified otherwise, we use the default hyperparameters found in reference baseline codebases without tuning.was searched inf0.1, 0.2, 0.5g,inf0.0, 0.1, 0.25, 0.5, 0.75, 1.0 gand the number of heads was chosen based on memory constraints (starting from 8 and decreasing when necessary). We report the final accuracy for each run without performing early stopping. CIFAR-100 Given the low resolution of CIFAR-100 images, we do not downsample feature maps before the attention operation and instead resort to a smaller batch size. We train all networks for 500 epochs using synchronous SGD with momentum 0.9 distributed across 8 TESLA V100 GPUs. The learning rate is linearly scaled from 0 to 0:2B=256, whereBis the total batch size, for the first 5%
1904.09925
Attention Augmented Convolutional Networks
Convolutional networks have been the paradigm of choice in many computer vision applications. The convolution operation however has a significant weakness in that it only operates on a local neighborhood, thus missing global information. Self-attention, on the other hand, has emerged as a recent advance to capture long range interactions, but has mostly been applied to sequence modeling and generative modeling tasks. In this paper, we consider the use of self-attention for discriminative visual tasks as an alternative to convolutions. We introduce a novel two-dimensional relative self-attention mechanism that proves competitive in replacing convolutions as a stand-alone computational primitive for image classification. We find in control experiments that the best results are obtained when combining both convolutions and self-attention. We therefore propose to augment convolutional operators with this self-attention mechanism by concatenating convolutional feature maps with a set of feature maps produced via self-attention. Extensive experiments show that Attention Augmentation leads to consistent improvements in image classification on ImageNet and object detection on COCO across many different models and scales, including ResNets and a state-of-the art mobile constrained network, while keeping the number of parameters similar. In particular, our method achieves a $1.3\%$ top-1 accuracy improvement on ImageNet classification over a ResNet50 baseline and outperforms other attention mechanisms for images such as Squeeze-and-Excitation. It also achieves an improvement of 1.4 mAP in COCO Object Detection on top of a RetinaNet baseline.
http://arxiv.org/pdf/1904.09925
[ "Irwan Bello", "Barret Zoph", "Ashish Vaswani", "Jonathon Shlens", "Quoc V. Le" ]
[ "cs.CV" ]
ICCV 2019
null
cs.CV
20190422
20200909
[]
1904.09925
49
GPUs. The learning rate is linearly scaled from 0 to 0:2B=256, whereBis the total batch size, for the first 5% training epochs and then annealed with cosine decay [30]. We use standard CIFAR preprocessing: mean normalizing, random flipping and cropping [55, 10, 48]. Non-augmented architectures are trained with a batch size of 1024 and a weight decay of 2e-4. Augmented architectures are trained with batch size of 256 and a weight decay of 5e-4. ImageNet classification with ResNet We train all ResNet architectures for 100 epochs using synchronous SGD with momentum 0.9 across 8 TESLA V100 GPUs and weight decay of 1e-4. We use the largest batch size per workerB2f32;64;128;256gthat fits in a minibatch. The initial learning rate is scaled linearly according to the total batch size using a base learning rate of 0.128 for total batch size of 256. During training, we linearly scale the learning rate from 0 to this value for the first 5% of training epochs and divide it by 10 at epochs 30, 60, 80 and 90. We use
1904.09925
Attention Augmented Convolutional Networks
Convolutional networks have been the paradigm of choice in many computer vision applications. The convolution operation however has a significant weakness in that it only operates on a local neighborhood, thus missing global information. Self-attention, on the other hand, has emerged as a recent advance to capture long range interactions, but has mostly been applied to sequence modeling and generative modeling tasks. In this paper, we consider the use of self-attention for discriminative visual tasks as an alternative to convolutions. We introduce a novel two-dimensional relative self-attention mechanism that proves competitive in replacing convolutions as a stand-alone computational primitive for image classification. We find in control experiments that the best results are obtained when combining both convolutions and self-attention. We therefore propose to augment convolutional operators with this self-attention mechanism by concatenating convolutional feature maps with a set of feature maps produced via self-attention. Extensive experiments show that Attention Augmentation leads to consistent improvements in image classification on ImageNet and object detection on COCO across many different models and scales, including ResNets and a state-of-the art mobile constrained network, while keeping the number of parameters similar. In particular, our method achieves a $1.3\%$ top-1 accuracy improvement on ImageNet classification over a ResNet50 baseline and outperforms other attention mechanisms for images such as Squeeze-and-Excitation. It also achieves an improvement of 1.4 mAP in COCO Object Detection on top of a RetinaNet baseline.
http://arxiv.org/pdf/1904.09925
[ "Irwan Bello", "Barret Zoph", "Ashish Vaswani", "Jonathon Shlens", "Quoc V. Le" ]
[ "cs.CV" ]
ICCV 2019
null
cs.CV
20190422
20200909
[]
1904.09925
50
rate from 0 to this value for the first 5% of training epochs and divide it by 10 at epochs 30, 60, 80 and 90. We use standard Inception data augmentation as described in [41]. ImageNet classification with MnasNet We follow the training setup described in [42] and train all networks for 350 epochs with the RMSProp optimizer using exponential learning rate decay. When training our augmented MnasNets, we divide the learning rate by 2 and adjusted the learning rate decay so that the final learning rate stays the same. Object Detection with COCO dataset We follow the setup described in [26, 11] and train the RetinaNet from scratch for 150 epochs without using ImageNet pretraining for the ResNet backbone. A.2. Computational & Memory costs Table 9 provides the breakdown of self-attention related computational costs per image. Storing attention maps in each layer induces a memory cost of Nh(HW)2bfloat16 . At inference, the memory cost for storing attention maps is only 1.2% of the memory required to store model parameters (49MB). Layer Memory Params FLOPS fStage 2 - H=W=14g* 4 600KB 43k 22M
1904.09925
Attention Augmented Convolutional Networks
Convolutional networks have been the paradigm of choice in many computer vision applications. The convolution operation however has a significant weakness in that it only operates on a local neighborhood, thus missing global information. Self-attention, on the other hand, has emerged as a recent advance to capture long range interactions, but has mostly been applied to sequence modeling and generative modeling tasks. In this paper, we consider the use of self-attention for discriminative visual tasks as an alternative to convolutions. We introduce a novel two-dimensional relative self-attention mechanism that proves competitive in replacing convolutions as a stand-alone computational primitive for image classification. We find in control experiments that the best results are obtained when combining both convolutions and self-attention. We therefore propose to augment convolutional operators with this self-attention mechanism by concatenating convolutional feature maps with a set of feature maps produced via self-attention. Extensive experiments show that Attention Augmentation leads to consistent improvements in image classification on ImageNet and object detection on COCO across many different models and scales, including ResNets and a state-of-the art mobile constrained network, while keeping the number of parameters similar. In particular, our method achieves a $1.3\%$ top-1 accuracy improvement on ImageNet classification over a ResNet50 baseline and outperforms other attention mechanisms for images such as Squeeze-and-Excitation. It also achieves an improvement of 1.4 mAP in COCO Object Detection on top of a RetinaNet baseline.
http://arxiv.org/pdf/1904.09925
[ "Irwan Bello", "Barret Zoph", "Ashish Vaswani", "Jonathon Shlens", "Quoc V. Le" ]
[ "cs.CV" ]
ICCV 2019
null
cs.CV
20190422
20200909
[]
1904.09925
51
model parameters (49MB). Layer Memory Params FLOPS fStage 2 - H=W=14g* 4 600KB 43k 22M fStage 3 - H=W=14g* 6 600KB 90k 40M fStage 4 - H=W=7g* 3 37.5KB 190k 19M Training 6MB (total) 1.3M 390M Inference 600KB (max) 1.3M 390M Table 9. Computational costs associated with self-attention in the forward pass of the ResNet50. During inference, we only consider the largest memory cost since activations are not stored. Figures 5 and 6 show the accuracies of our attention augmented networks across FLOPS counts, which correlate with running times across hardware platforms. 5 10 15 20 25 computational demand (GFlops).72737475767778798081top-1 accuracy. 73.6%76.4%77.9%78.4% 74.3%77.5%78.4%78.9% 74.7%77.7%78.7%79.1% ResNet SE-ResNet AA-ResNet (ours) Figure 5. ImageNet top-1 accuracy as a function of computational
1904.09925
Attention Augmented Convolutional Networks
Convolutional networks have been the paradigm of choice in many computer vision applications. The convolution operation however has a significant weakness in that it only operates on a local neighborhood, thus missing global information. Self-attention, on the other hand, has emerged as a recent advance to capture long range interactions, but has mostly been applied to sequence modeling and generative modeling tasks. In this paper, we consider the use of self-attention for discriminative visual tasks as an alternative to convolutions. We introduce a novel two-dimensional relative self-attention mechanism that proves competitive in replacing convolutions as a stand-alone computational primitive for image classification. We find in control experiments that the best results are obtained when combining both convolutions and self-attention. We therefore propose to augment convolutional operators with this self-attention mechanism by concatenating convolutional feature maps with a set of feature maps produced via self-attention. Extensive experiments show that Attention Augmentation leads to consistent improvements in image classification on ImageNet and object detection on COCO across many different models and scales, including ResNets and a state-of-the art mobile constrained network, while keeping the number of parameters similar. In particular, our method achieves a $1.3\%$ top-1 accuracy improvement on ImageNet classification over a ResNet50 baseline and outperforms other attention mechanisms for images such as Squeeze-and-Excitation. It also achieves an improvement of 1.4 mAP in COCO Object Detection on top of a RetinaNet baseline.
http://arxiv.org/pdf/1904.09925
[ "Irwan Bello", "Barret Zoph", "Ashish Vaswani", "Jonathon Shlens", "Quoc V. Le" ]
[ "cs.CV" ]
ICCV 2019
null
cs.CV
20190422
20200909
[]
1904.09925
52
ResNet SE-ResNet AA-ResNet (ours) Figure 5. ImageNet top-1 accuracy as a function of computational demand for variety of ResNet architectures [14]. From left to right: ResNet-34, ResNet-50, ResNet-101 and ResNet-152. 0.4 0.6 0.8 1.0 1.2 1.4 computational demand (GFlops).737475767778top-1 accuracy 73.3%75.2%76.7%77.2% 73.9%75.7%77.2%77.7% MnasNet AA-MnasNet (ours) Figure 6. ImageNet top-1 accuracy as a function of computational demand for MnasNet (black) and Attention-Augmented-MnasNet (red) with width multipliers 0:75,1:0,1:25and1:4. A.3. 2D Relative Self-Attention implementation While our method is simple and only requires matrix multiplication, addition and the softmax operation (Equations 3 and 4), our implementation relies on non-trivial operations (e.g. tiling, transposing and reshaping) because no low-level kernels currently exist for hardware platforms. Future work may develop specialized kernels as previously
1904.09925
Attention Augmented Convolutional Networks
Convolutional networks have been the paradigm of choice in many computer vision applications. The convolution operation however has a significant weakness in that it only operates on a local neighborhood, thus missing global information. Self-attention, on the other hand, has emerged as a recent advance to capture long range interactions, but has mostly been applied to sequence modeling and generative modeling tasks. In this paper, we consider the use of self-attention for discriminative visual tasks as an alternative to convolutions. We introduce a novel two-dimensional relative self-attention mechanism that proves competitive in replacing convolutions as a stand-alone computational primitive for image classification. We find in control experiments that the best results are obtained when combining both convolutions and self-attention. We therefore propose to augment convolutional operators with this self-attention mechanism by concatenating convolutional feature maps with a set of feature maps produced via self-attention. Extensive experiments show that Attention Augmentation leads to consistent improvements in image classification on ImageNet and object detection on COCO across many different models and scales, including ResNets and a state-of-the art mobile constrained network, while keeping the number of parameters similar. In particular, our method achieves a $1.3\%$ top-1 accuracy improvement on ImageNet classification over a ResNet50 baseline and outperforms other attention mechanisms for images such as Squeeze-and-Excitation. It also achieves an improvement of 1.4 mAP in COCO Object Detection on top of a RetinaNet baseline.
http://arxiv.org/pdf/1904.09925
[ "Irwan Bello", "Barret Zoph", "Ashish Vaswani", "Jonathon Shlens", "Quoc V. Le" ]
[ "cs.CV" ]
ICCV 2019
null
cs.CV
20190422
20200909
[]
1904.09925
53
no low-level kernels currently exist for hardware platforms. Future work may develop specialized kernels as previously done for convolutions. Therefore, we believe that current latency times (Table 2) reflect the lack of dedicated engineering as opposed to inefficiency in the proposed method. def shape list(x): """Return list of dims, statically where possible.""" static = x.get shape().as list() shape = tf.shape(x) ret = [] for i, static dim in enumerate(static): dim = static dim or shape[i] ret.append(dim) return ret def split heads 2d(inputs, Nh): """Split channels into multiple heads.""" B, H, W, d = shape list(inputs) retshape = [B, H, W, Nh, d // Nh] split = tf.reshape(inputs, ret shape) return tf.transpose(split, [0, 3, 1, 2, 4]) def combine heads 2d(inputs): """Combine heads (inverse of split heads 2d).""" transposed = tf.transpose(inputs, [0, 2, 3, 1, 4]) Nh, channels = shape list(transposed)[ 2:]
1904.09925
Attention Augmented Convolutional Networks
Convolutional networks have been the paradigm of choice in many computer vision applications. The convolution operation however has a significant weakness in that it only operates on a local neighborhood, thus missing global information. Self-attention, on the other hand, has emerged as a recent advance to capture long range interactions, but has mostly been applied to sequence modeling and generative modeling tasks. In this paper, we consider the use of self-attention for discriminative visual tasks as an alternative to convolutions. We introduce a novel two-dimensional relative self-attention mechanism that proves competitive in replacing convolutions as a stand-alone computational primitive for image classification. We find in control experiments that the best results are obtained when combining both convolutions and self-attention. We therefore propose to augment convolutional operators with this self-attention mechanism by concatenating convolutional feature maps with a set of feature maps produced via self-attention. Extensive experiments show that Attention Augmentation leads to consistent improvements in image classification on ImageNet and object detection on COCO across many different models and scales, including ResNets and a state-of-the art mobile constrained network, while keeping the number of parameters similar. In particular, our method achieves a $1.3\%$ top-1 accuracy improvement on ImageNet classification over a ResNet50 baseline and outperforms other attention mechanisms for images such as Squeeze-and-Excitation. It also achieves an improvement of 1.4 mAP in COCO Object Detection on top of a RetinaNet baseline.
http://arxiv.org/pdf/1904.09925
[ "Irwan Bello", "Barret Zoph", "Ashish Vaswani", "Jonathon Shlens", "Quoc V. Le" ]
[ "cs.CV" ]
ICCV 2019
null
cs.CV
20190422
20200909
[]
1904.09925
54
transposed = tf.transpose(inputs, [0, 2, 3, 1, 4]) Nh, channels = shape list(transposed)[ 2:] retshape = shape list(transposed)[: 2] + [Nh channels] return tf.reshape(transposed, ret shape) def rel toabs(x): """Converts tensor from relative to aboslute indexing.""" # [B, Nh, L, 2L 1] B, Nh, L, = shape list(x) # Pad to shift from relative to absolute indexing. colpad = tf.zeros((B, Nh, L, 1)) x = tf.concat([x, col pad], axis=3) flat x = tf.reshape(x, [B, Nh, L 2L]) flat pad = tf.zeros((B, Nh, L 1)) flat xpadded = tf.concat([flat x, flat pad], axis=2) # Reshape and slice out the padded elements. final x = tf.reshape(flat xpadded, [B, Nh, L+1, 2 L1])
1904.09925
Attention Augmented Convolutional Networks
Convolutional networks have been the paradigm of choice in many computer vision applications. The convolution operation however has a significant weakness in that it only operates on a local neighborhood, thus missing global information. Self-attention, on the other hand, has emerged as a recent advance to capture long range interactions, but has mostly been applied to sequence modeling and generative modeling tasks. In this paper, we consider the use of self-attention for discriminative visual tasks as an alternative to convolutions. We introduce a novel two-dimensional relative self-attention mechanism that proves competitive in replacing convolutions as a stand-alone computational primitive for image classification. We find in control experiments that the best results are obtained when combining both convolutions and self-attention. We therefore propose to augment convolutional operators with this self-attention mechanism by concatenating convolutional feature maps with a set of feature maps produced via self-attention. Extensive experiments show that Attention Augmentation leads to consistent improvements in image classification on ImageNet and object detection on COCO across many different models and scales, including ResNets and a state-of-the art mobile constrained network, while keeping the number of parameters similar. In particular, our method achieves a $1.3\%$ top-1 accuracy improvement on ImageNet classification over a ResNet50 baseline and outperforms other attention mechanisms for images such as Squeeze-and-Excitation. It also achieves an improvement of 1.4 mAP in COCO Object Detection on top of a RetinaNet baseline.
http://arxiv.org/pdf/1904.09925
[ "Irwan Bello", "Barret Zoph", "Ashish Vaswani", "Jonathon Shlens", "Quoc V. Le" ]
[ "cs.CV" ]
ICCV 2019
null
cs.CV
20190422
20200909
[]
1904.09925
55
final x = tf.reshape(flat xpadded, [B, Nh, L+1, 2 L1]) final x = final x[:, :, :L, L 1:] return final x def relative logits 1d(q, rel k, H, W, Nh, transpose mask): """Compute relative logits along one dimenion.""" rellogits = tf.einsum(’bhxyd,md >bhxym’, q, rel k) # Collapse height and heads rellogits = tf.reshape( rellogits, [ 1, Nh H, W, 2 W1]) rellogits = rel toabs(rel logits) # Shape it and tile height times rellogits = tf.reshape(rel logits, [ 1, Nh, H, W, W]) rellogits = tf.expand dims(rel logits, axis=3) rellogits = tf.tile(rel logits, [1, 1, 1, H, 1, 1]) # Reshape for adding to the logits. rellogits = tf.transpose(rel logits, transpose mask)
1904.09925
Attention Augmented Convolutional Networks
Convolutional networks have been the paradigm of choice in many computer vision applications. The convolution operation however has a significant weakness in that it only operates on a local neighborhood, thus missing global information. Self-attention, on the other hand, has emerged as a recent advance to capture long range interactions, but has mostly been applied to sequence modeling and generative modeling tasks. In this paper, we consider the use of self-attention for discriminative visual tasks as an alternative to convolutions. We introduce a novel two-dimensional relative self-attention mechanism that proves competitive in replacing convolutions as a stand-alone computational primitive for image classification. We find in control experiments that the best results are obtained when combining both convolutions and self-attention. We therefore propose to augment convolutional operators with this self-attention mechanism by concatenating convolutional feature maps with a set of feature maps produced via self-attention. Extensive experiments show that Attention Augmentation leads to consistent improvements in image classification on ImageNet and object detection on COCO across many different models and scales, including ResNets and a state-of-the art mobile constrained network, while keeping the number of parameters similar. In particular, our method achieves a $1.3\%$ top-1 accuracy improvement on ImageNet classification over a ResNet50 baseline and outperforms other attention mechanisms for images such as Squeeze-and-Excitation. It also achieves an improvement of 1.4 mAP in COCO Object Detection on top of a RetinaNet baseline.
http://arxiv.org/pdf/1904.09925
[ "Irwan Bello", "Barret Zoph", "Ashish Vaswani", "Jonathon Shlens", "Quoc V. Le" ]
[ "cs.CV" ]
ICCV 2019
null
cs.CV
20190422
20200909
[]
1904.09925
56
# Reshape for adding to the logits. rellogits = tf.transpose(rel logits, transpose mask) rellogits = tf.reshape(rel logits, [ 1, Nh, H W, HW]) return rel logits Figure 7. Helper functions in Tensorflow for 2D relative selfattention.def relative logits(q, H, W, Nh, dkh): """Compute relative logits.""" # Relative logits in width dimension first. relembeddings w = tf.get variable( ’rwidth’, shape=(2 W1, dkh), initializer=tf.random normal initializer(dkh 0.5)) # [B, Nh, HW, HW] rellogits w = relative logits 1d( q, rel embeddings w, H, W, Nh, [0, 1, 2, 4, 3, 5]) # Relative logits in height dimension next. # For ease, we 1) transpose height and width, # 2) repeat the above steps and # 3) transpose to eventually put the logits # in their right positions. relembeddings h = tf.get variable(
1904.09925
Attention Augmented Convolutional Networks
Convolutional networks have been the paradigm of choice in many computer vision applications. The convolution operation however has a significant weakness in that it only operates on a local neighborhood, thus missing global information. Self-attention, on the other hand, has emerged as a recent advance to capture long range interactions, but has mostly been applied to sequence modeling and generative modeling tasks. In this paper, we consider the use of self-attention for discriminative visual tasks as an alternative to convolutions. We introduce a novel two-dimensional relative self-attention mechanism that proves competitive in replacing convolutions as a stand-alone computational primitive for image classification. We find in control experiments that the best results are obtained when combining both convolutions and self-attention. We therefore propose to augment convolutional operators with this self-attention mechanism by concatenating convolutional feature maps with a set of feature maps produced via self-attention. Extensive experiments show that Attention Augmentation leads to consistent improvements in image classification on ImageNet and object detection on COCO across many different models and scales, including ResNets and a state-of-the art mobile constrained network, while keeping the number of parameters similar. In particular, our method achieves a $1.3\%$ top-1 accuracy improvement on ImageNet classification over a ResNet50 baseline and outperforms other attention mechanisms for images such as Squeeze-and-Excitation. It also achieves an improvement of 1.4 mAP in COCO Object Detection on top of a RetinaNet baseline.
http://arxiv.org/pdf/1904.09925
[ "Irwan Bello", "Barret Zoph", "Ashish Vaswani", "Jonathon Shlens", "Quoc V. Le" ]
[ "cs.CV" ]
ICCV 2019
null
cs.CV
20190422
20200909
[]
1904.09925
57
# 2) repeat the above steps and # 3) transpose to eventually put the logits # in their right positions. relembeddings h = tf.get variable( ’rheight’, shape=(2 H1, dkh), initializer=tf.random normal initializer(dkh 0.5)) # [B, Nh, HW, HW] rellogits h = relative logits 1d( tf.transpose(q, [0, 1, 3, 2, 4]), relembeddings h, W, H, Nh, [0, 1, 4, 2, 5, 3]) return rel logits h, rel logits w def self attention 2d(inputs, dk, dv, Nh, relative=True): """2d relative self attention.""" , H, W, = shape list(inputs) dkh = dk // Nh dvh = dv // Nh flatten hw = lambda x, d: tf.reshape(x, [ 1, Nh, H W, d]) # Compute q, k, v kqv = tf.layers.conv2d(inputs, 2 dk + dv, 1)
1904.09925
Attention Augmented Convolutional Networks
Convolutional networks have been the paradigm of choice in many computer vision applications. The convolution operation however has a significant weakness in that it only operates on a local neighborhood, thus missing global information. Self-attention, on the other hand, has emerged as a recent advance to capture long range interactions, but has mostly been applied to sequence modeling and generative modeling tasks. In this paper, we consider the use of self-attention for discriminative visual tasks as an alternative to convolutions. We introduce a novel two-dimensional relative self-attention mechanism that proves competitive in replacing convolutions as a stand-alone computational primitive for image classification. We find in control experiments that the best results are obtained when combining both convolutions and self-attention. We therefore propose to augment convolutional operators with this self-attention mechanism by concatenating convolutional feature maps with a set of feature maps produced via self-attention. Extensive experiments show that Attention Augmentation leads to consistent improvements in image classification on ImageNet and object detection on COCO across many different models and scales, including ResNets and a state-of-the art mobile constrained network, while keeping the number of parameters similar. In particular, our method achieves a $1.3\%$ top-1 accuracy improvement on ImageNet classification over a ResNet50 baseline and outperforms other attention mechanisms for images such as Squeeze-and-Excitation. It also achieves an improvement of 1.4 mAP in COCO Object Detection on top of a RetinaNet baseline.
http://arxiv.org/pdf/1904.09925
[ "Irwan Bello", "Barret Zoph", "Ashish Vaswani", "Jonathon Shlens", "Quoc V. Le" ]
[ "cs.CV" ]
ICCV 2019
null
cs.CV
20190422
20200909
[]
1904.09925
58
# Compute q, k, v kqv = tf.layers.conv2d(inputs, 2 dk + dv, 1) k, q, v = tf.split(kqv, [dk, dk, dv], axis=3) q= dkh  0.5 # scaled dot product # After splitting, shape is [B, Nh, H, W, dkh or dvh] q = split heads 2d(q, Nh) k = split heads 2d(k, Nh) v = split heads 2d(v, Nh) # [B, Nh, HW, HW] logits = tf.matmul(flatten hw(q, dkh), flatten hw(k, dkh), transpose b=True) if relative: rellogits h, rel logits w = relative logits(q, H, W, Nh, dkh) logits += rel logits h logits += rel logits w weights = tf.nn.softmax(logits) attn out = tf.matmul(weights, flatten hw(v, dvh))
1904.09925
Attention Augmented Convolutional Networks
Convolutional networks have been the paradigm of choice in many computer vision applications. The convolution operation however has a significant weakness in that it only operates on a local neighborhood, thus missing global information. Self-attention, on the other hand, has emerged as a recent advance to capture long range interactions, but has mostly been applied to sequence modeling and generative modeling tasks. In this paper, we consider the use of self-attention for discriminative visual tasks as an alternative to convolutions. We introduce a novel two-dimensional relative self-attention mechanism that proves competitive in replacing convolutions as a stand-alone computational primitive for image classification. We find in control experiments that the best results are obtained when combining both convolutions and self-attention. We therefore propose to augment convolutional operators with this self-attention mechanism by concatenating convolutional feature maps with a set of feature maps produced via self-attention. Extensive experiments show that Attention Augmentation leads to consistent improvements in image classification on ImageNet and object detection on COCO across many different models and scales, including ResNets and a state-of-the art mobile constrained network, while keeping the number of parameters similar. In particular, our method achieves a $1.3\%$ top-1 accuracy improvement on ImageNet classification over a ResNet50 baseline and outperforms other attention mechanisms for images such as Squeeze-and-Excitation. It also achieves an improvement of 1.4 mAP in COCO Object Detection on top of a RetinaNet baseline.
http://arxiv.org/pdf/1904.09925
[ "Irwan Bello", "Barret Zoph", "Ashish Vaswani", "Jonathon Shlens", "Quoc V. Le" ]
[ "cs.CV" ]
ICCV 2019
null
cs.CV
20190422
20200909
[]
1904.09925
59
weights = tf.nn.softmax(logits) attn out = tf.matmul(weights, flatten hw(v, dvh)) attn out = tf.reshape(attn out, [ 1, Nh, H, W, dvh]) attn out = combine heads 2d(attn out) # Project heads attn out = tf.layers.conv2d(attn out, dv, 1) return attn out def augmented conv2d(X, Fout, k, dk, dv, Nh, relative): conv out = tf.layers.conv2d(inputs=X, filters=Fout dv, kernel size=k, padding=’same’) attn out = self attention 2d(X, dk, dv, Nh, relative= relative) return tf.concat([conv out, attn out], axis=3) Figure 8. Tensorflow code for 2D relative self-attention. A.4. Attention visualizations. In Figure 10, we present attention maps visualizations for the input image shown in Figure 9. We see that attention heads learn to specialize to different content and notably can delineate object boundaries.
1904.09925
Attention Augmented Convolutional Networks
Convolutional networks have been the paradigm of choice in many computer vision applications. The convolution operation however has a significant weakness in that it only operates on a local neighborhood, thus missing global information. Self-attention, on the other hand, has emerged as a recent advance to capture long range interactions, but has mostly been applied to sequence modeling and generative modeling tasks. In this paper, we consider the use of self-attention for discriminative visual tasks as an alternative to convolutions. We introduce a novel two-dimensional relative self-attention mechanism that proves competitive in replacing convolutions as a stand-alone computational primitive for image classification. We find in control experiments that the best results are obtained when combining both convolutions and self-attention. We therefore propose to augment convolutional operators with this self-attention mechanism by concatenating convolutional feature maps with a set of feature maps produced via self-attention. Extensive experiments show that Attention Augmentation leads to consistent improvements in image classification on ImageNet and object detection on COCO across many different models and scales, including ResNets and a state-of-the art mobile constrained network, while keeping the number of parameters similar. In particular, our method achieves a $1.3\%$ top-1 accuracy improvement on ImageNet classification over a ResNet50 baseline and outperforms other attention mechanisms for images such as Squeeze-and-Excitation. It also achieves an improvement of 1.4 mAP in COCO Object Detection on top of a RetinaNet baseline.
http://arxiv.org/pdf/1904.09925
[ "Irwan Bello", "Barret Zoph", "Ashish Vaswani", "Jonathon Shlens", "Quoc V. Le" ]
[ "cs.CV" ]
ICCV 2019
null
cs.CV
20190422
20200909
[]
1904.09925
60
for the input image shown in Figure 9. We see that attention heads learn to specialize to different content and notably can delineate object boundaries. Figure 9. An input image. The red crosses indexed 1 to 4 represent the pixel locations for which we show the attention maps in Figure 10. Figure 10. Visualization of attention maps for an augmented convolution in the Attention-Augmented-ResNet50. Rows correspond to the 8 different heads and columns correspond to the 4 pixel locations depicted in the input image (See Figure 9).
1904.09925
Attention Augmented Convolutional Networks
Convolutional networks have been the paradigm of choice in many computer vision applications. The convolution operation however has a significant weakness in that it only operates on a local neighborhood, thus missing global information. Self-attention, on the other hand, has emerged as a recent advance to capture long range interactions, but has mostly been applied to sequence modeling and generative modeling tasks. In this paper, we consider the use of self-attention for discriminative visual tasks as an alternative to convolutions. We introduce a novel two-dimensional relative self-attention mechanism that proves competitive in replacing convolutions as a stand-alone computational primitive for image classification. We find in control experiments that the best results are obtained when combining both convolutions and self-attention. We therefore propose to augment convolutional operators with this self-attention mechanism by concatenating convolutional feature maps with a set of feature maps produced via self-attention. Extensive experiments show that Attention Augmentation leads to consistent improvements in image classification on ImageNet and object detection on COCO across many different models and scales, including ResNets and a state-of-the art mobile constrained network, while keeping the number of parameters similar. In particular, our method achieves a $1.3\%$ top-1 accuracy improvement on ImageNet classification over a ResNet50 baseline and outperforms other attention mechanisms for images such as Squeeze-and-Excitation. It also achieves an improvement of 1.4 mAP in COCO Object Detection on top of a RetinaNet baseline.
http://arxiv.org/pdf/1904.09925
[ "Irwan Bello", "Barret Zoph", "Ashish Vaswani", "Jonathon Shlens", "Quoc V. Le" ]
[ "cs.CV" ]
ICCV 2019
null
cs.CV
20190422
20200909
[]