Embedded Gaussian Affinity is a type of affinity or self-similarity function between two points x_i and x_j that uses a Gaussian function in an embedding space:
f(x_i,x_j)=eθ(x_i)Tϕ(x_j)
Here θ(x_i)=W_θx_i and ϕ(x_j)=W_φx_j are two embeddings.
Note that the self-attention module used in the original Transformer model is a special case of non-local operations in the embedded Gaussian version. This can be seen from the fact that for a given i, C(x)1∑_∀jf(x_i,x_j)g(x_j) becomes the softmax computation along the dimension j. So we have y=softmax(xTWT_θW_ϕx)g(x), which is the self-attention form in the Transformer model. This shows how we can relate this recent self-attention model to the classic computer vision method of non-local means.