Home › Categories › History & Culture › Attention Is All You Need (2017)

Attention Is All You Need (2017)

From WikiTech, the encyclopedia of technology

Event · History & Culture · 5 min read · 914 words · Updated

Attention Is All You Need (2017)
Event
Attention Is All You Need (2017) — article photograph or illustration
Image placeholderPlace the file shown below in the assets/articles folder
File: attention-is-all-you-need.webp
PublishedJune 2017 (arXiv:1706.03762)
VenueNeurIPS 2017
Lead authorAshish Vaswani

"Attention Is All You Need" is a paper by Ashish Vaswani and seven co-authors, mostly at Google, posted to arXiv in June 2017 and presented at NeurIPS 2017.

Context before

Sequence models were based on recurrent or convolutional networks, which process tokens sequentially and are hard to parallelise.

The event

The paper proposed the Transformer, which relies on self-attention: each token computes weights over all other tokens in the sequence. It was evaluated on machine translation.

Aftermath

Transformers were quickly adopted for language tasks, leading to BERT (2018) and GPT models.

Long-term consequences

The architecture became the foundation of large language models and spread to vision, audio and protein modelling.

The problem with sequential models

Before the Transformer, recurrent neural networks were widely used for sequence tasks. A recurrent model updates a hidden state as it reads each token, so later computations depend on earlier ones. This structure can represent order, but it limits parallelism during training and can make it difficult to preserve information across long sequences. Convolutional sequence models offered more parallel computation, yet they required carefully designed layers to connect distant positions.

The paper asked whether attention could become the central mechanism for sequence transduction rather than an addition to a recurrent network. Its answer was a model built from attention and feed-forward layers, without recurrence or convolution in the encoder and decoder. This made it easier to process many positions in parallel during training.

Self-attention and multi-head attention

Self-attention lets each position build a representation using information from other positions in the same sequence. For each token, the model produces a query, key and value vector. Similarity scores between queries and keys determine how strongly the model uses each value. The result is a weighted combination of information from the sequence. In translation, this allows a word's representation to incorporate information from related words even when they are far apart.

The Transformer uses multiple attention heads. Each head learns a different set of projections and can focus on different relationships, such as local phrase structure or longer-range dependencies. The outputs are combined and passed through position-wise feed-forward layers. Positional information is added because attention alone does not inherently know the order in which tokens appeared.

The original model has an encoder-decoder structure. The encoder creates contextual representations of the input sequence. The decoder attends to those representations while also using masked self-attention so that a position cannot inspect future output tokens during generation. Residual connections, normalisation and carefully chosen training settings help the network remain trainable as layers are stacked.

Results and research impact

The authors evaluated the architecture on English-to-German and English-to-French machine translation. The paper reported strong translation quality and training efficiency compared with the recurrent and convolutional systems used in its experiments. Those results were important, but the broader impact came from the architecture's flexibility: researchers could reuse attention-based blocks for tasks other than translation.

BERT adapted Transformer encoders for language understanding, while GPT-style systems use decoder-only Transformers for autoregressive text generation. Later work extended attention-based models to images, audio, video and multimodal inputs. These systems differ in their training objectives, data, scale and design, so the original paper should be understood as a starting point rather than as a complete description of every modern AI model.

Limitations and later developments

Standard full self-attention compares every token with every other token. Its memory and computation requirements therefore grow rapidly with sequence length, which can make very long inputs expensive. Researchers have explored sparse attention, sliding windows, memory mechanisms, retrieval and other ways to extend context or reduce cost. Inference also introduces a different challenge: a language model usually generates tokens sequentially, even when the prompt was processed in parallel.

The Transformer did not remove the need for large datasets, careful evaluation or safeguards against unreliable output. It supplied a general architecture that could be scaled and adapted, but model quality still depends on training data, objective functions, optimisation, inference systems and deployment decisions. Its lasting significance is the way it changed the default design of neural sequence models and enabled a large family of systems built around learned attention.

Why the paper is still studied

The paper is widely studied because it presents the architecture in a form that connects a mathematical mechanism to a practical training system. Its attention equations explain how information is mixed between positions, while the surrounding encoder and decoder blocks show how the mechanism can solve a sequence-to-sequence task. Reproducing the original results today is not the main educational goal; the more important lesson is how to evaluate an architecture through its assumptions, computational cost, baseline comparisons and empirical results. Later models changed many details, but the original design remains a useful reference point for understanding modern neural networks.

Editorial connections and engineering implications

Why self-attention changed model design

A transformer lets each token build a context-dependent representation by comparing itself with other tokens. Learned projections produce queries, keys and values; similarity scores between queries and keys determine how strongly a position uses information from other positions. Multiple attention heads can learn different relationships, while feed-forward layers transform the combined representations. Positional information is also necessary because attention alone does not express sequence order.

Earlier sequence models often processed tokens recurrently, one step after another. Self-attention allows many token interactions to be computed in parallel during training, although conventional attention has memory and compute costs that grow roughly quadratically with sequence length. Long-context systems therefore use optimisations such as sparse attention, caching and alternative attention layouts. The paper did not by itself create modern language models: data, optimisation, hardware, distributed training and evaluation are also essential. A transformer is an architecture, not a guarantee of accuracy. See neural networks and GPU computing.

See also

  • ChatGPT Launch (2022) – The public release of the ChatGPT conversational interface by OpenAI on 30 November 2022.
  • Google – An American technology company known for web search, Android, cloud computing and AI research.
  • OpenAI – An American artificial intelligence research and deployment company.
  • Graphics Processing Unit (GPU) – A processor designed to perform many data-parallel operations, first for graphics and now widely used in scientific and AI computing.
  • NVIDIA – An American company that designs graphics processors and accelerated computing platforms.
  • Neural Network – A machine-learning model made from connected computational units that learn patterns by adjusting numerical parameters from data.
  • Release of the IBM PC (1981) – The August 1981 launch of the IBM Personal Computer, which established the dominant PC platform.
  • The Mother of All Demos (1968) – A 1968 public demonstration by Douglas Engelbart of an interactive computing system with a mouse, hypertext and video conferencing.

References

  1. ↑ arXiv:1706.03762 (arxiv.org)