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 | 37 | 17.21% |
Conditional Image Generation | 15 | 6.98% |
Semantic Segmentation | 14 | 6.51% |
Image Classification | 7 | 3.26% |
Language Modelling | 7 | 3.26% |
Super-Resolution | 7 | 3.26% |
Machine Translation | 7 | 3.26% |
Image-to-Image Translation | 6 | 2.79% |
Object Detection | 5 | 2.33% |
Component | Type |
|
---|---|---|
🤖 No Components Found | You can add them if they exist; e.g. Mask R-CNN uses RoIAlign |