flâneur — a map of the web's best reading

Attention? Attention! | Lil'Log

lilianweng.github.io · 4,417 words · saved by 1 readers

[Updated on 2018-10-28: Add Pointer Network and the link to my implementation of Transformer.] [Updated on 2018-11-06: Add a link to the implementation of Transformer model.] [Updated on 2018-11-18: Add Neural Turing Machines.] [Updated on 2019-07-18: Correct the mistake on using the term “self-attention” when introducing the show-attention-tell paper; moved it to Self-Attention section.] [Updated on 2020-04-07: A follow-up post on improved Transformer models is here.] Attention is, to some extent, motivated by how we pay visual attention to different regions of an image or correlate words in one sentence.

Table of Contents What’s Wrong with Seq2Seq Model? Born for Translation Definition A Family of Attention Mechanisms Summary Self-Attention Soft vs Hard Attention Global vs Local Attention Neural Turing Machines Reading and Writing Attention Mechanisms Pointer Network Transformer Key, Value and Query Multi-Head Self-Attention Encoder Decoder Full Architecture SNAIL Self-Attention GAN References [Updated on 2018-10-28: Add Pointer Network and the link to my implementation of Transformer.] [Updated on 2018-11-06: Add a link to the implementation of Transformer model.] [Updated on 2018-11-18: Add

Explore this link on the map →

related reading