Attention Is All You Need · Section 7

7 Conclusion

What the paper claims to have shown, and what its authors planned next. Set beside what happened since, the plans read like a map of the following years.

The plans, and what happened
  1. 2017 The paper: attention only, text only, generation one token at a time.
  2. 2017 Non-autoregressive translation writes all the output words at once instead of one by one, at some cost in quality. Less sequential generation Gu et al., Non-Autoregressive Neural Machine Translation, November 2017(opens in a new tab)
  3. 2018 The Image Transformer generates images pixel by pixel with self-attention restricted to a local neighbourhood. Local, restricted attention Parmar et al., Image Transformer, February 2018(opens in a new tab)
  4. 2020 Longformer reads documents thousands of tokens long by letting most tokens attend only to a window around them. Local, restricted attention Beltagy et al., Longformer, April 2020(opens in a new tab)
  5. 2020 The Vision Transformer cuts an image into patches, treats them as tokens, and classifies images with a plain Transformer encoder. Images, audio and video Dosovitskiy et al., An Image is Worth 16x16 Words, October 2020(opens in a new tab)
  6. 2021 ViViT applies the same idea to video, with tokens taken from space and time. Images, audio and video Arnab et al., ViViT: A Video Vision Transformer, March 2021(opens in a new tab)
  7. 2022 Speculative decoding lets a small model draft several tokens that the large model then checks in one parallel step. Less sequential generation Leviathan et al., Fast Inference from Transformers via Speculative Decoding, November 2022(opens in a new tab)
  8. 2022 Whisper, an encoder–decoder Transformer like the paper's, turns speech into text. Images, audio and video Radford et al., Robust Speech Recognition via Large-Scale Weak Supervision, December 2022(opens in a new tab)

The conclusion's three plans: other modalities (images, audio and video), local restricted attention for large inputs, and less sequential generation. Below them, dated developments since 2017, each linked to its published source; pick a plan to see the ones that answer it.

What this section says

The conclusion restates the claim: the Transformer is the first sequence transduction model built entirely on attention, replacing the recurrent layers of encoder–decoder models with multi-headed self-attention. It trains significantly faster than recurrent or convolutional designs and set a new state of the art on both WMT 2014 tasks, on English to German beating even ensembles.

Then the plans: apply attention-based models to other tasks; to inputs and outputs other than text; to large inputs such as images, audio and video, with local, restricted attention; and make generation less sequential. The code was released as part of the tensor2tensor library.

The figure sets each plan beside later work. Transformers now read images, video and speech; restricted and sparse attention let them read long documents; and generating text one token at a time is still the main cost of using them, which is why ways to write several tokens at once are an active field. The decoder half alone became the design of today's GPT-style models (chapter 22, to come).

In the paper's words

“We plan to extend the Transformer to problems involving input and output modalities other than text and to investigate local, restricted attention mechanisms to efficiently handle large inputs and outputs such as images, audio and video.”

Section 7 In plain words: Next: inputs and outputs other than text, and attention limited to a neighbourhood so that large inputs such as images, audio and video become affordable.

“Making generation less sequential is another research goals of ours.”

Section 7 In plain words: The authors also want generation to be less one-token-at-a-time.

Quoted from Vaswani et al., Attention Is All You Need, arXiv:1706.03762v7(opens in a new tab). The figures on this page are redrawn, not copied.

The notation

The symbols of this section, in the paper and in our model
Symbol Meaning In the paper Our miniature
\(\text{modality}\) a kind of input or output: text, images, audio, video text only, in the paper text only: English and German
\(\text{restricted attention}\) attention limited to a neighbourhood of r positions around each one (Table 1's last row) planned not used
\(\text{sequential generation}\) writing one token at a time, each waiting for the one before still sequential the same: greedy or beam search

Try it

Try this The decoder half alone, as GPT-style models use it: our next-word model writes one token at a time, the sequential generation the paper wanted to reduce.

Check yourself

Three questions a reader of this section should now be able to answer. The lab checks your answer against the paper and our models.

The plans

Which plans does the conclusion name?

What was replaced

What does the conclusion say multi-headed self-attention replaced?

Images

In which year did the Vision Transformer, a plain Transformer encoder on image patches, appear (see the figure)?

Your answer
A whole number
An unhandled error has occurred. Reload 🗙

Reconnecting…

Your connection to the Transformers and Attention Lab dropped, probably a Wi-Fi blip. Hold on while it reconnects.

The connection could not be restored. The page will reload in a few seconds.