What was the key conceptual shift introduced by the paper "Attention Is All You Need"?
Last updated
The paper showed that recurrence and convolution are unnecessary for sequence transduction: a model built solely on attention can model sequences, using self-attention to relate positions within a sequence and cross-attention to relate the two sequences. This made training fully parallel across positions and gave direct long-range connections.
Before: attention as an add-on: Attention helped RNN encoder-decoders align source and target, but the RNN still did the sequence modeling, one step at a time.
After: attention as the core computation: Encoder and decoder are stacks of self-attention plus position-wise feed-forward layers, with residual connections and LayerNorm.
Why it mattered:
Parallelism: all positions are processed at once during training, a good fit for GPUs, so training is much faster than with RNNs.
Constant path length between any two tokens, which eases learning of long-range dependencies.
Scalability: this architecture became the foundation for BERT, GPT and modern LLMs.
Supporting ideas that made it work:
Scaled dot-product attention (divide by
sqrt(d_k)) and multi-head attention, so the model can attend to different subspaces.Positional encodings, to restore order information lost by dropping recurrence.
- https://www.sundeepteki.org/advice/the-transformer-revolution-the-ultimate-guide-for-ai-interviews
- https://learn.modernagecoders.com/resources/ai-and-machine-learning/transformers-and-attention/practice
- https://blog.devgenius.io/attention-this-post-is-all-you-need-understand-key-points-of-the-transformer-paper-in-a-7-677d75b49353