Multiplicative attention is attention that scores where the decoder should look in the input sentence using a dot product, which multiplies two vectors together. In 2015, Luong, Pham, and Manning compared score functions for attention in translation models in the paper "Effective Approaches to Attention-based Neural Machine Translation" (EMNLP 2015) and showed that the dot-product form works well.
Additive attention (Bahdanau et al.), proposed a year earlier, computed scores with a network that has one hidden layer. Luong et al. tried simpler dot-product forms and list the following three score functions in Section 3.1 of the paper.
- : the decoder state at time , when it is about to output a target word.
- : the encoder state at position of the input sentence.
- dot and general: since they multiply two vectors together, the Transformer paper called them "multiplicative attention". This article refers to dot and general together as multiplicative attention.
- concat: the same form as additive attention.
The values used as weights are the scores normalized by the softmax function to sum to 1 (Eq. (7) of the paper).
A dot product is larger the more two vectors point in the same direction. The idea is that the more "what is being looked for now" resembles "what is at that input position", the larger the weight it receives.
In the figure at the top of the article, the left side shows the computation flow and the right side shows how scores are computed. For comparison, additive attention is also shown on the right.

