potentialpaper

Transformers as Optimal Transport: Stability, Geometry, and Gauge Symmetry

Hong Wang, Kelly Wang

ICLR 2026 submission

Edit this page

Or clone it with git

The page gets its repository with its first edit, so start in the web editor.

Or let your agent set it up

It checks and sets up everything: signing in, git, the clone, credentials and an SSH key.

Abstract. Self-attention is row-wise entropic optimal transport: masked softmax exactly solves independent OT problems on each query's support with unit entropic regularization (ε=1)—not an approximation, but a precise mathematical equivalence. This yields a compositional stability theory via a global ℓ∞→ℓ₁ Lipschitz bound across heads, residuals, and LayerNorm, producing a conservative drift budget and explaining representation locking through local saturation when δ(P)→0. We introduce gauge-invariant coarse Ricci curvature with τ-dependent bounds linking temperature and key scale to contraction, and show depth behaves as Wasserstein gradient flow via an evolution variational inequality. Empirically on GPT-2 variants, measured drift sits well below theoretical budgets (tightness ratio ≈ 0.043), locking occurs in ~10% of samples (TV <10⁻¹⁰), Sinkhorn W₂ concentrates in mid-depth, and curvature gaps tighten with larger τ or smaller key scale as predicted. We prove depth cannot collapse: compositions generically lack single-layer representations with the same key dimension. We report extrinsic Euclidean quantities in a declared canonical gauge. The framework provides actionable design principles for temperature, key scaling, and early exit while organizing attention into a coherent geometric structure.

Are you an author? Claim this paper to see who's reading it, with views and other statistics, and to write about it here.

Claim this paper
How does this paper connect to your work? Write how you built on it, compared with it or reproduced it, or add a summary, a critique or errata.
Or make it interactive:
Start writing

add · history

No versions are recorded yet: its preprint, the venues it went to and what they decided, the camera-ready. Missing a version?

We don't know of a submission of this paper to a venue with open reviews. Missing a submission?

Loading the discussion…