Scaled-Dot-Product Attention as One-Sided Entropic Optimal Transport
Elon Litman

TL;DR
This paper mathematically justifies scaled-dot-product attention as the solution to a one-sided Entropic Optimal Transport problem, linking it to optimal inference and a variance-reduced reinforcement learning update.
Contribution
It provides a first-principles derivation of SDPA, connecting it to EOT and information geometry, and reveals the nature of its gradient as a manifold-aware update.
Findings
SDPA solves a degenerate EOT problem maximizing similarity with maximal entropy.
The backpropagation gradient matches an advantage-based policy gradient from reinforcement learning.
The EOT formulation induces a Fisher information geometry on attention distributions.
Abstract
The scaled-dot-product attention (SDPA) mechanism is a core component of modern deep learning, but its mathematical form is often motivated by heuristics. This work provides a first-principles justification for SDPA. We first show that the attention forward pass is the exact solution to a degenerate, one-sided Entropic Optimal Transport (EOT) problem, which seeks a distribution that maximizes similarity while being maximally entropic. This optimization perspective has a direct consequence for the backward pass. We prove that the standard gradient computed via backpropagation is mathematically identical to an advantage-based policy gradient, a variance-reduced update rule from reinforcement learning. Crucially, we demonstrate that the EOT formulation of the forward pass induces a specific information geometry on the space of attention distributions. It is this geometry, characterized by…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Taxonomy
TopicsAdversarial Robustness in Machine Learning · Advanced Memory and Neural Computing · Age of Information Optimization
