Dot-Product Attention is an attention mechanism where the alignment score function is calculated as:
$$f_{att}\left(\textbf{h}_{i}, \textbf{s}_{j}\right) = h_{i}^{T}s_{j}$$
It is equivalent to multiplicative attention (without a trainable weight matrix, assuming this is instead an identity matrix). Here $\textbf{h}$ refers to the hidden states for the encoder, and $\textbf{s}$ is the hidden states for the decoder. The function above is thus a type of alignment score function.
Within a neural network, once we have the alignment scores, we calculate the final scores/weights using a softmax function of these alignment scores (ensuring it sums to 1).
Source: Effective Approaches to Attention-based Neural Machine TranslationPaper | Code | Results | Date | Stars |
---|
Task | Papers | Share |
---|---|---|
Image Generation | 46 | 10.11% |
Conditional Image Generation | 17 | 3.74% |
Semantic Segmentation | 15 | 3.30% |
Language Modelling | 12 | 2.64% |
Translation | 12 | 2.64% |
Image Classification | 11 | 2.42% |
Reinforcement Learning | 9 | 1.98% |
Reinforcement Learning (RL) | 9 | 1.98% |
Language Modeling | 9 | 1.98% |
Component | Type |
|
---|---|---|
🤖 No Components Found | You can add them if they exist; e.g. Mask R-CNN uses RoIAlign |