Transformer: Attention Is All You Need (2017, Vaswani et al.)
arXiv: 1706.03762v7
The Core Problem
In machine translation, an RNN works like a word-by-word interpreter — each word must wait for the previous one to be processed. This sequential dependency makes training extremely slow, and by the time information from early words reaches later positions in long sentences, it has already degraded. CNNs are somewhat better since they parallelize, but capturing long-range word relationships requires many stacked layers. Is there a way to let all words "see each other" at once — parallel, fast, and without losing long-distance information?
Method Innovation
The paper's answer is the attention mechanism. Instead of passing information like a relay baton layer by layer, every word directly "talks to" every other word. It's like a meeting where everyone speaks simultaneously, but through an "importance scoring system" (softmax), each person only focuses on the most relevant contributions.
Three key architectural designs:
1. Multi-Head Attention (MHA): Each token's representation is split into 8 groups (heads), each independently learning different types of relationships — one for syntax, one for semantics, one for coreference, and so on. Like 8 experts analyzing the same passage in parallel. 2. Positional Encoding (PE): Since attention itself has no notion of word order, the paper introduces sinusoidal positional encodings — waves of different frequencies give each position a unique "fingerprint" that is added to the token embedding. High-frequency waves distinguish nearby positions; low-frequency waves distinguish distant ones. 3. Residual Connections + LayerNorm: Information can take a "shortcut" (residual) or be "deep-processed" (attention/FFN), with LayerNorm preventing numerical explosion.
Key Numbers
- WMT 2014 English-German translation: 28.4 BLEU, beating the previous best (including ensembles) by 2 BLEU
- WMT 2014 English-French translation: 41.8 BLEU, new single-model SOTA
- Training cost: 8 GPUs, 3.5 days — a fraction of the previous best models
- Parameters: 65M (base), 213M (large) — tiny by today's standards, but enormous at the time
Impact Assessment
This paper defined the entire LLM era. GPT, BERT, T5, LLaMA, DeepSeek — every modern large model is built on the Transformer skeleton. It proved that "attention is all you need": no recurrence, no convolution — pure attention plus feed-forward layers can do anything.
Feynman-Style Commentary
> The real value of this paper is not that it invented attention — attention existed in earlier work. Its true value is proving one thing: when you design a general enough "mutual attention" mechanism, add "position labels" and an "information highway" (residuals), recurrence and convolution are redundant. It forces you to rethink: is the core of deep learning step-by-step processing or global association? The answer is the latter.
---
arXiv: 1706.03762v7