Transformer: Attention Is All You Need (2017, Vaswani et al.)
arXiv: 1706.03762v7
Core problem: In machine translation, an RNN works like a word-by-word interpreter—each token must wait for the previous one. This sequential dependency makes training slow, and information from early tokens degrades over long sentences. CNNs parallelize better, but capturing long-range relations requires stacking many layers. Is there a way for all tokens to "see each other" at once—parallel, fast, and without losing long-distance information?
Method innovations: The paper's answer is the attention mechanism—instead of passing information like a relay baton layer by layer, every token directly "converses" with all other tokens. Like a meeting where everyone speaks simultaneously, a scoring system (softmax) lets each participant focus only on the most relevant others.
Three key architectural designs:
1. Multi-head attention (MHA): Each token's representation is split into 8 heads, each independently learning different relation types—syntax, semantics, coreference—like 8 experts analyzing the same text in parallel. 2. Positional encoding (PE): Since attention itself is position-agnostic, the paper introduces sinusoidal/cosine encodings—different-frequency waves give each position a unique "fingerprint" added to token embeddings. High frequencies distinguish nearby positions; low frequencies distinguish distant ones. 3. Residual connections + LayerNorm: Information can take "shortcuts" (residuals) or go through "deep processing" (attention/FFN), with LayerNorm preventing numerical instability.
Key numbers:
- WMT 2014 English→German: 28.4 BLEU, 2 BLEU above the previous best (including ensembles)
- WMT 2014 English→French: 41.8 BLEU, new single-model SOTA
- Training cost: 8 GPUs, 3.5 days—a fraction of prior best models
- Parameters: 65M (base), 213M (large)—tiny today, enormous at the time
Feynman-style commentary: > The paper's real value is not inventing attention—that appeared in earlier work. Its real contribution is proving one thing: once you design a general enough "mutual attention" mechanism, add "position labels" and an "information highway" (residuals), recurrence and convolution become redundant. It makes you rethink whether the core of deep learning is step-by-step processing or global association. The answer is the latter.