TasksSotADatasetsPapersMethodsSubmitAbout
Papers With Code 2

A community resource for machine learning research: papers, code, benchmarks, and state-of-the-art results.

Explore

Notable BenchmarksAll SotADatasetsPapersMethods

Community

Submit ResultsAbout

Data sourced from the PWC Archive (CC-BY-SA 4.0). Built by the community, for the community.

Methods/Embedded Gaussian Affinity

Embedded Gaussian Affinity

GeneralIntroduced 20008 papers
Source Paper

Description

Embedded Gaussian Affinity is a type of affinity or self-similarity function between two points x_i\mathbf{x\_{i}}x_i and x_j\mathbf{x\_{j}}x_j that uses a Gaussian function in an embedding space:

f(x_i,x_j)=eθ(x_i)Tϕ(x_j)f\left(\mathbf{x\_{i}}, \mathbf{x\_{j}}\right) = e^{\theta\left(\mathbf{x\_{i}}\right)^{T}\phi\left(\mathbf{x\_{j}}\right)}f(x_i,x_j)=eθ(x_i)Tϕ(x_j)

Here θ(x_i)=W_θx_i\theta\left(x\_{i}\right) = W\_{θ}x\_{i}θ(x_i)=W_θx_i and ϕ(x_j)=W_φx_j\phi\left(x\_{j}\right) = W\_{φ}x\_{j}ϕ(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 iii, 1C(x)∑_∀jf(x_i,x_j)g(x_j)\frac{1}{\mathcal{C}\left(\mathbf{x}\right)}\sum\_{\forall{j}}f\left(\mathbf{x}\_{i}, \mathbf{x}\_{j}\right)g\left(\mathbf{x}\_{j}\right)C(x)1​∑_∀jf(x_i,x_j)g(x_j) becomes the softmax computation along the dimension jjj. So we have y=softmax(xTWT_θW_ϕx)g(x)\mathbf{y} = \text{softmax}\left(\mathbf{x}^{T}W^{T}\_{\theta}W\_{\phi}\mathbf{x}\right)g\left(\mathbf{x}\right)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.

Papers Using This Method

Enhancing Tree Type Detection in Forest Fire Risk Assessment: Multi-Stage Approach and Color Encoding with Forest Fire Risk Evaluation Framework for UAV Imagery2024-07-27Vision-based Food Nutrition Estimation via RGB-D Fusion Network2023-10-25Fracture Detection in Wrist X-ray Images Using Deep Learning-Based Object Detection Models2021-11-14Towards Balanced Learning for Instance Recognition2021-08-23FoodLogoDet-1500: A Dataset for Large-Scale Food Logo Detection via Multi-Scale Feature Decoupling Network2021-08-10PBRnet: Pyramidal Bounding Box Refinement to Improve Object Localization Accuracy2020-03-10Libra R-CNN: Towards Balanced Learning for Object Detection2019-04-04Non-local Neural Networks2017-11-21