Paper commentary
Sinkhorn Distances: Lightspeed Computation of Optimal Transport
Entropy-regularized transport makes optimal transport distances fast enough for large histograms
- Problem Optimal transport distances are more powerful than information divergences but cost too much to compute on high-dimensional histograms. Switching solvers does not avoid this cost, and the usual shortcuts stop working once the embedding dimension exceeds 4.
- Method Sinkhorn distances add an entropy penalty to the transport problem instead of exploiting the metric space. The penalty makes the problem solvable by Sinkhorn's matrix scaling, which uses only matrix-vector products and can run on GPUs.
- Results On MNIST, dual-Sinkhorn divergences classify digits better than EMD and the other compared distances. The regularized distance stays within 1.2% of EMD at lambda = 100.
Why exact transport stalls on large histograms
Optimal transport distances give a more powerful geometry than the information divergences, but they carry a heavy computational cost. Network simplex and interior point methods both fall under this bound, so the cost cannot be avoided by switching solvers. When the space embeds in Rn with n small, the cost drops, since n = 1 needs only O(d log d) operations.
Embeddings can approximate measures in linear time, and network simplex solvers can be modified to run in quadratic time. These shortcuts become inapplicable once n exceeds 4, because embedding distortions and rising costs grow with n.
The authors argue this cost threatens the usefulness of transport distances for high-dimensional histograms, which are now common in machine learning. Instead of exploiting the structure of the metric space, the authors keep the original transport problem and regularize it with an entropic term. They argue this regularization is intuitive, and that transport theory has long favored it for predicting traffic patterns.
The entropic term turns the transport problem into a strictly convex problem that matrix scaling algorithms can solve. Sinkhorn's fixed point iteration is known to converge linearly, and it relies only on matrix-vector products. The authors propose an implementation that computes the distance from one point to a family of points with matrix-matrix products.
Because of these matrix-matrix products, the approach can run on GPGPU architectures.
Smoothing the transport plan with an entropy constraint
The key idea is to keep the transport plan smooth instead of letting it collapse onto a sparse vertex. A vertex of the transport polytope has at most 2d− 1 non-zero entries, and such vertices behave like quasi-deterministic joint probabilities. The authors therefore restrict the search to tables with enough entropy, an idea close to the maximum-entropy principle.
The reference point is the independence table rc^T, whose entropy equals h(r)+h(c), the largest value any joint table with these marginals can reach. The Kullback-Leibler divergence from a table P to rc^T equals h(r)+h(c)−h(P), so bounding it limits how far P departs from independence. The Sinkhorn distance then minimizes the transport cost over the tables U_α(r,c) whose divergence from rc^T is at most α.
When α is large enough, this set covers the whole transport polytope, so the Sinkhorn distance equals the classic transport distance. The authors then switch to a Lagrange multiplier λ for the same entropy constraint, which gives the dual-Sinkhorn divergence d^λ_M(r,c)=⟨P^λ, M⟩. Here P^λ minimizes ⟨P, M⟩ − (1/λ)h(P) over U(r,c), so a larger λ puts less weight on entropy.
The authors use only this dual form in their experiments and don't compute the constrained Sinkhorn distance itself.
The dual form is what makes the computation practical, since P^λ keeps a simple matrix-scaling structure. Lemma 2 writes P^λ as diag(u)K diag(v) with K = e^(−λM), and Sinkhorn's fixed-point iteration finds u and v.
Matrix scaling replaces the linear program
The regularized plan has the form diag(u) K diag(v), so it is a rescaled copy of the kernel K = e^(-λM). Only the two scaling vectors u and v need to be found, because K already fixes the structure of the plan. Sinkhorn's theorem guarantees that a unique matrix of this form lies in U(r, c), and the fixed-point update (u, v) ← (r./Kv, c./K'u) finds it.
Since K is strictly positive, the existence of this matrix follows from Sinkhorn's theorem, so the plan is necessarily that matrix.
Each pass of the update can be written as a single step u ← r./K(c./K'u), which needs only matrix-vector products. The implementation first drops the bins with zero mass from r and M, which keeps the computation on the positive indices. It then stores K̃ = diag(1./r)K, which saves one vector product per update. The loop repeats the update until u stops changing, then computes v and reads the distance off u, K, M and v.
Passing N target histograms as the columns of C turns the scaling vector into a d by N matrix, so all N distances update together. This matrix-matrix product is the reason the algorithm suits GPGPU platforms. Simplex-like methods instead cycle through complex conditional statements, which makes them harder to parallelize. With N = 1, the algorithm reduces to the simple iteration described in the proof of Lemma 2.
Franklin and Lorenz prove that the scaling factors converge linearly, with a rate bounded above by κ(K)^2. The bound κ(K) tends to 1 as λ grows, so convergence slows for large λ. The authors observe this slowdown as the plan moves closer to the optimal vertex P⋆. The authors consider two stopping criteria in this work, which they detail below.
Do the regularized distances stay metric?
Sinkhorn distances keep symmetry and the triangle inequalities for every α at least 0 and every metric cost matrix M. The proof rests on a gluing lemma with an entropic constraint, which builds a joint table S between x and z from two constrained tables P and Q. Lemma 1 states that S lies in Uα(x, z), so the minimum over that set is bounded above by the cost of S.
Summing the terms of that cost bounds dM,α(x, z) by dM,α(x, y) plus dM,α(y, z), which gives the triangle inequality.
The coincidence axiom fails for small α, because dM,α(r, r) stays above zero whenever h(r) is above zero. Multiplying dM,α by the indicator 1r≠c restores the coincidence axiom, so the function becomes a full distance. At α = 0 the Sinkhorn distance reduces to rT M c, which the authors call the independence kernel. When M is a Euclidean distance matrix, rT M c is a negative definite kernel, and e^(-t dM,0) is positive definite for all t above 0.
The proof of that kernel result uses the norm vector u and the matrix K, which the appendix builds from the embedding points.
These are theoretical properties, and the experiments in the paper don't use the constrained distance at a fixed α. The experiments use the dual-Sinkhorn divergence dλM instead, because the authors only use that form in their experiments.
MNIST classification results
The MNIST experiment asks whether dual-Sinkhorn kernels classify digits better than the compared distances. Each subset uses a 4-fold cross-validation scheme with 3 folds for test and 1 for train, repeated 6 times, giving 24 experiments.
Given a distance d, the kernel is e^(-d/t), with t chosen by cross-validation on each training fold within {1, q10(d), q20(d), q50(d)}. Non-positive definite kernel matrices receive a sufficiently large diagonal term, and SVMs are run with Libsvm in one-vs-one mode. The regularization C is selected in 10^{-2,0,4} using 2 folds and 2 repeats of cross-validation on the training fold.
The Hellinger, χ2, total variation and squared Euclidean (Gaussian kernel) distances serve as baselines alongside EMD. The ground matrix M is the 400×400 matrix of Euclidean distances between the 20×20 bins of the grid. The authors also tried Mahalanobis distances with exp(-tM.^2) and its inverse, but none proved competitive.
For the Independence kernel, the authors consider [m a_ij] with a chosen by cross-validation from {0.01, 0.1, 1}. The λ grid is {5, 7, 9, 11}×1/q50(M), where q50(M) is the median distance between pixels. The number of fixed-point iterations is set to an arbitrary 20 iterations. In most, though not all, folds, λ = 9 comes up as the best setting.
The dual-Sinkhorn divergence beats all other distances by a safe margin, including the classic optimal transport distance labeled EMD. The size of that margin is described in the text rather than tabulated.
These results come from this setup, with its cross-validated kernel width, its fixed 20 iterations and its regularized kernels. A separate check asks whether the dual-Sinkhorn divergence approaches EMD as λ grows. Over 402 pairs of MNIST images, the gap is expected to shrink as λ increases, because the regularization makes the dual-Sinkhorn divergence larger than EMD.
The median relative gap is 3.4% at λ = 50 and 1.2% at λ = 100.
Does the gap to EMD close
The dual-Sinkhorn divergence is necessarily larger than EMD, because the entropic term constrains the transport plan. The authors expect this gap to decrease as λ increases, and they test that expectation on MNIST image pairs. They plot the relative gap (dλM − dM)/dM as a boxplot over 402 pairs of images from the MNIST database. The median gap is 3.4% at λ = 50 and 1.2% at λ = 100.
So the regularized distance approximates EMD closely once λ exceeds 50, though a gap remains at finite λ.
The gap plot in Figure 3 covers λ values from 1 to 100 on a logarithmic-style axis. The λ grid used for the MNIST classification experiments is {5, 7, 9, 11} divided by the median pixel distance q50(M). In most folds, λ = 9 is the best setting, and the dual-Sinkhorn divergence beats EMD by a safe margin. The MNIST kernels, however, use a fixed count of 20 fixed-point iterations.
Timing dual-Sinkhorn against EMD solvers on random histograms
The timing test draws histograms uniformly on the simplex, with dimensions from 64 to 2048, and reports the average time per distance. The cost matrix comes from a random graph with d vertices, edge presence probability 1/2 and uniform edge weights between 0 and 1. Its all-pairs shortest-path matrix, built with the Floyd-Warshall algorithm, is then normalized to unit median.
The authors compare FastEMD and Rubner's emd against dual-Sinkhorn, which they implemented in Matlab following Algorithm 1. The EMD distances and Sinkhorn CPU runs use a single core of a 2.66 Ghz Xeon, while Sinkhorn GPU runs on an NVidia Quadro K5000 card.
The λ values tested are 1, 10 and 50, and λ = 1 gives a relatively dense matrix K. Results at λ = 1 are comparable to those of the Independence kernel, while at λ = 10 or 50 the entries of K = e^(-λM) are very small. Rubner's implementation can't be run for histograms larger than d = 512, so its timings stop there. The advantage of dual-Sinkhorn over EMD solvers grows with the dimension, as the authors expected.
Running Sinkhorn on a GPU adds a further order of magnitude of speed-up. The abstract's claim of several orders of magnitude faster computation rests on these timings.
The number of iterations needed for convergence rises as e^(-λM) becomes diagonally dominant. The total number of iterations doesn't seem to vary with the dimension, so the authors measure iterations as matrix-matrix products. This flat iteration count explains the empirical quadratic time complexity O(d^2) seen in the timings.
Limitations of the regularized iteration and the experiments
The Sinkhorn fixed point iteration can't run beyond a problem-dependent λmax, because some entries of e^(-λM) are stored as zeroes in memory. Convergence is guaranteed only in theory as λ grows toward infinity, so the bound on the iteration is practical rather than theoretical. Franklin and Lorenz (1989) bound the linear convergence rate of the scaling factor u by κ(K)^2, using Hilbert's projective metric.
The upper bound κ(K) tends to 1 as λ grows, so the authors observe slower convergence as Pλ gets closer to the optimal vertex P⋆. The timing comparison with Rubner's emd stops at d = 512, because its implementation can't be run for histograms larger than that.
The authors argue that a fixed number of iterations can work well, so they don't track the approximation error through variations in d. Simply predefining a fixed number of iterations avoids the cost of the error check and can yield even additional speedups. The MNIST experiments use 20 fixed-point iterations, an arbitrary number chosen by the authors.
The empirical study covers only MNIST digit classification and random histograms drawn uniformly on the simplex. Only the dual-Sinkhorn divergence is used in the experiments, so the constrained Sinkhorn distance dM,α isn't computed.
Paper info
- Authors
- Cuturi, Marco
- Venue
- Advances in Neural Information Processing Systems · Published
- Added
- 2026-11-12
- Original paper terms
- Check in the original ↗
- What we show
- Paper info and commentary
AI commentary is a separate explanation from the original paper and may contain errors. The original paper and figures follow each source's terms of use and any rights noted separately.
Quote from the paper
Cuturi, Marco (2013). Sinkhorn Distances: Lightspeed Computation of Optimal Transport. Advances in Neural Information Processing Systems. https://papers.nips.cc/paper/2013/hash/af21d0c97db2e27e13572cbf59eb343d-Abstract.html
BibTeX
@article{marco2013sinkhorn,
title = {{Sinkhorn Distances: Lightspeed Computation of Optimal Transport}},
author = {Cuturi, Marco},
year = {2013},
journal = {Advances in Neural Information Processing Systems},
url = {https://papers.nips.cc/paper/2013/hash/af21d0c97db2e27e13572cbf59eb343d-Abstract.html}
}