Papers › Efficient distributed representations with linear-time attention scores normalization

Efficient distributed representations with linear-time attention scores normalization

30 Mar 2023arXiv:2303.17475archive 2025-07-28

Lorenzo Dall'Amico, Enrico Maria Belliardo

The attention score matrix SoftMax(XYᵀ) encodes relational similarity patterns between objects and is extremely popular in machine learning. However, the complexity required to calculate it runs quadratically with the problem size, making it a computationally heavy solution. In this article, we propose a linear-time approximation of the attention score normalization constants for embedding vectors with bounded norms. We show on several pre-trained embeddings that the accuracy of our estimation formula surpasses competing kernel methods by even orders of magnitude. From this result, we design a linear-time and task-agnostic embedding algorithm based on the optimization of the attention scores. The proposed algorithm is highly interpretable and easily adapted to an arbitrary embedding problem. We consider a few use-cases and observe similar or higher performances and a lower computational time with respect to comparable embedding algorithms.

PaperPDFCode

Code

lorenzodallamico/edrep officialmentioned in papermentioned on GitHub report

Repository list and official/mentioned flags are the archive's, frozen 2025-07-28. Reachability, where shown, is from one Syntology probe window (2026-09-16 to 2026-09-18); repositories not probed show nothing. GitHub stars are not tracked.

Code Syntology ran Syntology

Not run by Syntology. Nothing on this page verifies that the listed code works.

Results from the paper archive 2025-07-28

No leaderboard rows for this paper in the archive.

Methods

SoftmaxTest

Report a problem or propose a change · a person checks every report against the paper or source before anything changes; decisions are listed on /corrections