# Attention is all you need

Date: 12 June 2017 · Era: V · Transformers · Category: theory · Significance: 5/5
People: Ashish Vaswani, Noam Shazeer, Niki Parmar, Jakob Uszkoreit, Llion Jones, Aidan Gomez, Łukasz Kaiser, Illia Polosukhin
Organisations: Google Brain, Google Research

Canonical: https://shapeofintelligence.com/timeline/2017-attention-is-all-you-need/ · Dataset and text CC BY 4.0

> Eight Google researchers drop recurrence entirely and build a sequence model from attention alone; the transformer trains in parallel, scales without limit, and becomes the architecture of everything.

## What had to happen

29 events back to 1943, oldest first. Direct influences are marked *direct*.

- [1943 · A logical calculus of nervous activity](https://shapeofintelligence.com/md/timeline/1943-mcculloch-pitts-neuron/)
- [1949 · Cells that fire together wire together](https://shapeofintelligence.com/md/timeline/1949-hebb-organization-of-behavior/)
- [1958 · The perceptron learns](https://shapeofintelligence.com/md/timeline/1958-perceptron/)
- [1960 · ADALINE and the least-mean-squares rule](https://shapeofintelligence.com/md/timeline/1960-adaline-lms/)
- [1965 · Moore's law](https://shapeofintelligence.com/md/timeline/1965-moores-law/)
- [1969 · Perceptrons](https://shapeofintelligence.com/md/timeline/1969-perceptrons-book/)
- [1970 · Reverse-mode automatic differentiation](https://shapeofintelligence.com/md/timeline/1970-linnainmaa-backprop/)
- [1974 · Werbos applies backpropagation to neural networks](https://shapeofintelligence.com/md/timeline/1974-werbos-backprop/)
- [1980 · The Neocognitron](https://shapeofintelligence.com/md/timeline/1980-neocognitron/)
- [1982 · The Hopfield network](https://shapeofintelligence.com/md/timeline/1982-hopfield-network/)
- [1985 · The Boltzmann machine](https://shapeofintelligence.com/md/timeline/1985-boltzmann-machine/)
- [1986 · Backpropagation](https://shapeofintelligence.com/md/timeline/1986-backpropagation/)
- [1989 · LeNet reads handwritten postcodes](https://shapeofintelligence.com/md/timeline/1989-lenet/)
- [1990 · Finding structure in time](https://shapeofintelligence.com/md/timeline/1990-elman-network/)
- [1991 · The vanishing gradient problem](https://shapeofintelligence.com/md/timeline/1991-vanishing-gradient/)
- [1997 · Long short-term memory](https://shapeofintelligence.com/md/timeline/1997-lstm/)
- [1998 · MNIST and LeNet-5](https://shapeofintelligence.com/md/timeline/1998-mnist-lenet5/)
- [1999 · The first GPU](https://shapeofintelligence.com/md/timeline/1999-geforce-256/)
- [2003 · A neural probabilistic language model](https://shapeofintelligence.com/md/timeline/2003-neural-language-model/)
- [2006 · Deep belief networks and the word 'deep'](https://shapeofintelligence.com/md/timeline/2006-deep-belief-nets/)
- [2007 · CUDA](https://shapeofintelligence.com/md/timeline/2007-cuda/)
- [2009 · ImageNet](https://shapeofintelligence.com/md/timeline/2009-imagenet/)
- [2010 · Rectified linear units](https://shapeofintelligence.com/md/timeline/2010-relu/)
- [2012 · Dropout](https://shapeofintelligence.com/md/timeline/2012-dropout/)
- [2012 · AlexNet wins ImageNet](https://shapeofintelligence.com/md/timeline/2012-alexnet/)
- [2014 · Attention](https://shapeofintelligence.com/md/timeline/2014-bahdanau-attention/) *direct*
- [2014 · Sequence to sequence learning](https://shapeofintelligence.com/md/timeline/2014-seq2seq/) *direct*
- [2015 · Batch normalisation](https://shapeofintelligence.com/md/timeline/2015-batchnorm/)
- [2015 · Residual networks](https://shapeofintelligence.com/md/timeline/2015-resnet/) *direct*

The paper posted on 12 June 2017 was a translation paper. Its eight authors, listed in an order they said was random, had found that the recurrent networks everyone used for sequences were unnecessary. Bahdanau's attention, which let a decoder look back over the source, could be turned inward: every position in a sentence attends to every other position, computing what to weigh from learned queries and keys, and the whole layer runs at once rather than word by word. Stack six of those layers, with residual connections and normalisation between them, add a position signal so the model knows word order, and you have the transformer. It beat the best translation systems on English–German and English–French and trained in a fraction of the time.

Speed was the point. A recurrent network processes a thousand-word document in a thousand sequential steps; a transformer processes it in one, which means it can use every core of a GPU pod, which means it can be trained on far more data. Scale, which the field had been suspecting was the answer since 2012, became possible for language.

Every model on this timeline after 2017 that reads or writes is a transformer: BERT, the GPTs, AlphaFold 2, Stable Diffusion's text encoder, the vision transformer, the models that drive cars and fold proteins and write code. The paper has been cited more than 150,000 times. The instrument below runs one on the sentence you type and shows you the attention.

## What it led to

55 events downstream, through 2026.

Built on it directly:

- [2018 · GPT: generative pre-training](https://shapeofintelligence.com/md/timeline/2018-gpt-1/)
- [2018 · BERT](https://shapeofintelligence.com/md/timeline/2018-bert/)
- [2020 · An image is worth 16×16 words](https://shapeofintelligence.com/md/timeline/2020-vision-transformer/)
- [2020 · AlphaFold 2 solves protein structure prediction](https://shapeofintelligence.com/md/timeline/2020-alphafold-2/)

And, through them, by era:

- V · Transformers: 8 events
- VI · Everyone: 29 events
- VII · Agents: 14 events

## Sources

- [Attention Is All You Need (arXiv:1706.03762)](https://arxiv.org/abs/1706.03762) — paper
- [Attention Is All You Need (NeurIPS, 2017)](https://papers.nips.cc/paper_files/paper/2017/hash/3f5ee243547dee91fbd053c1c4a845aa-Abstract.html) — paper
- [Transformer: A Novel Neural Network Architecture for Language Understanding (Google Research blog, 2017)](https://research.google/blog/transformer-a-novel-neural-network-architecture-for-language-understanding/) — announcement

---

The Shape of Intelligence by Jamie McKaye (https://jamiemckaye.com) · Markdown mirror of https://shapeofintelligence.com/timeline/2017-attention-is-all-you-need/

Before: [2017 · The Asilomar AI Principles](https://shapeofintelligence.com/md/timeline/2017-asilomar-principles/) · After: [2017 · Deep reinforcement learning from human preferences](https://shapeofintelligence.com/md/timeline/2017-rl-from-human-preferences/)
