Creator: Petar Veličković (original)
Attention as a weighted sum over a set. Each input embedding is scored against the query by the attention function , giving the weight , while maps the same input to the value being weighted. Multiplying and summing over yields the updated embedding . The sum is permutation-invariant, which is why the mechanism applies to unordered sets as readily as to sequences. From arxiv:1706.03762.
