Long data-centre corridor lined with server racks

“Attention Is All You Need”: The 2017 Paper Behind Today’s AI

Header image: illustration, AI-generated.

Explainer

Many of today’s best-known artificial intelligence systems – chatbots, translation tools, coding assistants and image generators – trace their design back to a single research paper published in 2017. Its title was short and confident: “Attention Is All You Need”. Its main contribution, an architecture called the Transformer, has become one of the foundations of modern AI.

The paper

The paper was written by eight researchers, most of them at Google Brain and Google Research: Ashish Vaswani, Noam Shazeer, Niki Parmar, Jakob Uszkoreit, Llion Jones, Aidan N. Gomez, Łukasz Kaiser and Illia Polosukhin. It was posted online in June 2017 and presented at the Conference on Neural Information Processing Systems (then known as NIPS, now NeurIPS) in Long Beach, California, later that year. The authors listed themselves as equal contributors, in random order.

The problem it solved

At the time, most leading systems for language tasks such as translation were built on recurrent neural networks. These process text one word at a time, in order, carrying a running summary of what came before. That approach works, but it has two weaknesses.

  • It is slow to train. Because each step depends on the previous one, the computation cannot easily be split across many processors at once.
  • It struggles with long-distance connections. Information from early in a long sentence or document can fade by the time the model reaches the end.

Researchers had already added a technique called attention to these models, allowing them to look back at relevant earlier words. The 2017 paper’s bold step was to drop recurrence entirely and build the model around attention alone.

How attention works, in plain terms

Consider the sentence: “The trophy did not fit in the suitcase because it was too big.” To understand what “it” refers to, you need to connect it to “trophy”, several words earlier. Attention gives a model a way to do this. For each word, the model calculates how relevant every other word in the passage is, and uses those weights to build a richer representation of the word in context.

The Transformer uses self-attention, in which every word in a sequence attends to every other word, and multi-head attention, in which several of these calculations run in parallel, each able to pick up different kinds of relationship. Because the model has no built-in sense of word order, it adds information about each word’s position.

Why it was a breakthrough

The results were strong. On a standard English-to-German translation benchmark, the larger Transformer model scored 28.4 BLEU, improving on the best previously reported results, including combinations of models, by more than 2 points. It reached this after 3.5 days of training on eight GPUs – a fraction of the training cost of earlier leading systems.

The more important advantage was parallelisation. Because self-attention looks at a whole sequence at once rather than one word at a time, Transformers can make efficient use of modern hardware. That made it practical to train much larger models on much more data.

From translation to today’s AI

Within a few years, the Transformer had spread far beyond translation:

  • BERT, introduced by Google researchers in 2018, used the Transformer’s encoder to improve how computers understand text, including in search.
  • GPT models – the letters stand for Generative Pre-trained Transformer – used the decoder side to generate text, leading eventually to widely used chat assistants.
  • Adapted versions now process images, audio, computer code and biological sequences.

Large language models are built by training Transformers on vast amounts of text to predict what comes next. Scaling up the size of these models and their training data has driven much of the recent progress in AI.

Limitations

The Transformer is not without costs. Standard self-attention compares every word with every other word, so the computation grows rapidly as inputs get longer. Training the largest models requires enormous computing power and energy. And the architecture itself says nothing about whether a model’s outputs are accurate: language models can produce fluent but incorrect statements, which is why careful verification remains essential.

The takeaway

“Attention Is All You Need” did not invent attention or neural networks, but it showed that a model built around attention alone could be both better and far more efficient to train. That combination made today’s large AI systems possible. For another technology reshaping everyday digital life, see Passkeys Explained.

Key takeaways

  • The Transformer architecture was introduced in the 2017 paper “Attention Is All You Need” by eight researchers, mostly at Google.
  • It replaced word-by-word recurrent processing with self-attention, letting models weigh every word against every other.
  • It achieved a state-of-the-art 28.4 BLEU on English-to-German translation at a fraction of previous training costs.
  • Its ability to run in parallel made very large models practical; the “T” in GPT stands for Transformer.

References

  1. Vaswani, A., Shazeer, N., Parmar, N., Uszkoreit, J., Jones, L., Gomez, A. N., Kaiser, Ł. and Polosukhin, I. (2017). Attention is all you need. Advances in Neural Information Processing Systems 30 (NIPS 2017). arXiv:1706.03762
  2. Devlin, J., Chang, M.-W., Lee, K. and Toutanova, K. (2018). BERT: Pre-training of deep bidirectional transformers for language understanding. arXiv:1810.04805
Scroll to Top