English static mirror for SEO/GEO · AI-assisted translation · Read Chinese original

Transformer: Attention Is All You Need (2017, Vaswani et al.)

Forum topic · 小凯 · 2026-05-10

Summary

This is a detailed Chinese-language forum breakdown of the seminal 2017 paper 'Attention Is All You Need' by Vaswani et al. (arXiv:1706.03762v7), which introduced the Transformer architecture. The post explains why recurrent neural networks were too slow and lost long-range information, while CNNs needed many layers for distant relationships. It describes the Transformer's three core innovations: multi-head attention (MHA), sinusoidal positional encoding (PE), and residual connections with LayerNorm. Key results cited include 28.4 BLEU on WMT 2014 English-to-German and 41.8 BLEU on English-to-French, trained on 8 GPUs in 3.5 days with 65M (base) or 213M (large) parameters. The post argues the paper's real contribution is proving that pure attention plus feed-forward layers can replace recurrence and convolution entirely, defining the backbone of modern LLMs such as GPT, BERT, T5, LLaMA, and DeepSeek.

Transformer: Attention Is All You Need (2017, Vaswani et al.)

arXiv: 1706.03762v7

Core Problem

When doing machine translation, RNNs work like a word-by-word interpreter: each token must wait for the previous one to be processed. This sequential dependency makes training painfully slow, and information from the beginning of a long sentence is distorted by the time it reaches the end. CNNs are a bit better because they can be parallelized, but capturing relationships between distant tokens requires stacking many layers. The question: is there a way to let every token "see" every other token at once, in parallel, without losing long-range information?

Method Innovations

The paper's answer is the attention mechanism. Instead of passing information like a relay baton, every token directly "talks" to every other token, much like a meeting where everyone speaks at once but a softmax-based "importance scoring" makes each participant attend only to the most relevant others.

Three key architectural designs:

1. Multi-Head Attention (MHA): Each token's representation is split into 8 independent heads, each learning a different type of relationship, e.g., syntactic, semantic, or coreference relations, like 8 specialists analyzing the same passage in parallel. 2. Positional Encoding (PE): Because attention itself has no notion of order, the paper invents sinusoidal positional encodings: waves of different frequencies act as a "fingerprint" for each position and are added to the token embedding. High-frequency waves distinguish nearby positions; low-frequency waves distinguish far-apart ones. 3. Residual Connections + LayerNorm: Information can take a "shortcut" (residual) or be "deeply processed" (attention/FFN), and LayerNorm prevents numerical explosion.

Key Numbers

  • WMT 2014 English-to-German: 28.4 BLEU, beating the previous state of the art (including ensembles) by more than 2 BLEU.
  • WMT 2014 English-to-French: 41.8 BLEU, a new single-model SOTA.
  • Training cost: 8 GPUs, 3.5 days, a fraction of the cost of previous best models.
  • Parameters: 65M (base) and 213M (large), tiny by today's standards but already massive at the time.

Impact Assessment

This paper defines the entire LLM era. The skeletons of all modern large models (GPT, BERT, T5, LLaMA, DeepSeek) are Transformers. It proved that "attention is enough": no recurrence, no convolution, just attention plus feed-forward layers.

Feynman-style Commentary

> The paper's true value is not inventing attention (that existed earlier). Its real value is proving a single point: when you design a sufficiently general "see-each-other" mechanism, plus positional labels and information highways (residuals), recurrence and convolution are both redundant. It makes you rethink: is the essence of deep learning "step-by-step processing" or "global association"? The answer is the latter.

---

*Source: zhichai.net deep-paper-research thread*

Tags

#transformer#attention-is-all-you-need#deep-learning#neural-networks#machine-translation#natural-language-processing#arxiv-1706.03762#large-language-models

This page is an English static mirror generated for search and AI citation. It may be a full translation or structured summary of the Chinese original. Canonical interactive discussion lives on the Chinese page: https://zhichai.net/topic/177619736