English

Inverse distance weighting attention

Machine Learning 2023-12-08 v2

Abstract

We report the effects of replacing the scaled dot-product (within softmax) attention with the negative-log of Euclidean distance. This form of attention simplifies to inverse distance weighting interpolation. Used in simple one hidden layer networks and trained with vanilla cross-entropy loss on classification problems, it tends to produce a key matrix containing prototypes and a value matrix with corresponding logits. We also show that the resulting interpretable networks can be augmented with manually-constructed prototypes to perform low-impact handling of special cases.

Keywords

Cite

@article{arxiv.2310.18805,
  title  = {Inverse distance weighting attention},
  author = {Calvin McCarter},
  journal= {arXiv preprint arXiv:2310.18805},
  year   = {2023}
}

Comments

Associative Memory & Hopfield Networks Workshop at NeurIPS 2023

R2 v1 2026-06-28T13:04:47.486Z