Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

Kantorovich Relaxation

Kantorovich’s relaxation is the decisive move that turns transport into convex optimization. Deterministic maps are replaced by couplings, infeasibility and asymmetry disappear, and the Wasserstein distances emerge. Historically, this linear-programming viewpoint grew from Kantorovich’s economic planning work Kantorovich, 1942 and is now the standard foundation of optimal transport Villani, 2003Villani, 2009Rachev & Rüschendorf, 1998.

Discrete Relaxation

The discrete relaxation is the cleanest place to see mass splitting. It replaces permutations by a transportation polytope and reveals the linear-programming structure that algorithms exploit.

Monge’s discrete matching problem cannot be applied when the two clouds have different cardinalities or unequal weights. The continuous Monge problem has the same obstruction: there may be no map TT such that Tα=βT_\sharp\al=\be, for instance when one Dirac mass must be sent to several Dirac masses. It is also asymmetric: two Dirac masses can be mapped to one, but one Dirac mass cannot be split into two by a deterministic map.

Kantorovich’s idea is to relax deterministic transportation. Instead of sending each source point xix_i to exactly one target, the mass at xix_i may be dispatched across several targets. The relaxation is encoded by a coupling matrix PR+n×m\P\in\RR_+^{n\times m} for two discrete measures

α=iaiδxi,β=jbjδyj.\al=\sum_i a_i\delta_{x_i}, \qquad \be=\sum_j b_j\delta_{y_j}.

The first consequence is feasibility. There is always at least one admissible plan.

The feasible set is a bounded intersection of an affine space with the nonnegative orthant, hence a convex polytope. In one dimension, the coupling can be read as a matrix: rows index source bins, columns index target bins, and the marginal constraints appear as prescribed row and column sums.

Proof

The reverse implication is immediate. Conversely, assume that aba\otimes b is optimal and let QU(a,b)\Q\in\CouplingsD(a,b) be arbitrary. Since all entries of aba\otimes b are positive, there exists t>0t>0 small enough that

R:=(1+t)(ab)tQ\R\eqdef(1+t)(a\otimes b)-tQ

is nonnegative. It still has row sums aa and column sums bb, so RU(a,b)\R\in\CouplingsD(a,b). Also

ab=11+tR+t1+tQ.a\otimes b=\frac{1}{1+t}\R+\frac{t}{1+t}\Q.

Taking scalar products with C\C, the optimality of aba\otimes b forces both R\R and Q\Q to have the same cost as aba\otimes b. Since Q\Q was arbitrary, all couplings are optimal.

Thus the product plan is mainly a feasibility witness. Except when the linear cost is constant on the whole transportation polytope, it is not expected to solve optimal transport.

Figure Div contrasts deterministic, product and optimal couplings through weighted transport segments.

<IPython.core.display.Image object>

Discrete couplings represented as straight transport segments. The deterministic graph is a feasible Monge-type plan, the product plan spreads every source mass over all targets, and the optimal Kantorovich plan minimizes the quadratic transport cost. Line width and opacity encode transported mass.

The interactive demo below separates the main feasible-plan archetypes: deterministic graphs, independent product couplings, sparse splitting plans, and entropic approximations.

Interactive panel. Use the point and mass sliders to see how a Kantorovich plan can split mass into several weighted links rather than choosing one destination per source.

Figure Div gives the complementary matrix view and displays the prescribed marginals next to each coupling.

<IPython.core.display.Image object>

Coupling matrices with their prescribed marginals. The central grayscale image displays Pij\P_{ij}; the red curve on the left is the source marginal aa, and the blue curve on top is the target marginal bb. The independent product plan is diffuse, whereas the one-dimensional optimal plan concentrates near the monotone quantile correspondence.

The companion control varies the bin count and the endpoint laws, making the transition from diffuse independence to monotone transport visually explicit.

Interactive panel. Use the problem-size and mass-shape controls to compare the coupling matrix with its red and blue marginal sums.

The Kantorovich feasible set is symmetric: PU(a,b)\P\in\CouplingsD(a,b) if and only if PU(b,a)\P^\top\in\CouplingsD(b,a). With a unit transport cost matrix Cij\C_{ij}, the discrete Kantorovich problem reads

LC(a,b):=minPU(a,b)C,P=minPU(a,b)i,jCijPij.\mathcal{L}_\C(a,b) \eqdef \min_{\P\in\CouplingsD(a,b)} \langle \C,\P\rangle = \min_{\P\in\CouplingsD(a,b)} \sum_{i,j} \C_{ij}\P_{ij}.

This is a linear program, and its solutions need not be unique.

Proof

For r{0,1}r\in\{0,1\}, let Pr\P_r be optimal between ara_r and brb_r. For t[0,1]t\in[0,1], the matrix Pt=(1t)P0+tP1\P_t=(1-t)\P_0+tP_1 couples (1t)a0+ta1(1-t)a_0+ta_1 and (1t)b0+tb1(1-t)b_0+tb_1. Therefore

LC((1t)a0+ta1,(1t)b0+tb1)C,Pt=(1t)LC(a0,b0)+tLC(a1,b1).\mathcal L_\C\big((1-t)a_0+ta_1,(1-t)b_0+tb_1\big) \leq \langle \C,\P_t\rangle = (1-t)\mathcal L_\C(a_0,b_0)+t\mathcal L_\C(a_1,b_1).

Figure Div contrasts permutation plans for uniform empirical measures with the splitting couplings needed for nonuniform marginals.

<IPython.core.display.Image object>

From permutation matrices to splitting couplings. When the two empirical measures have the same number of atoms and uniform weights, an optimal plan can be a permutation matrix. Once target masses are nonuniform, one source can send mass to several targets and several sources can merge into the same target.

The interactive demo keeps the same source and target sites while changing the target mass imbalance, so the moment where permutation structure breaks becomes visible.

Interactive panel. Use the split-mass and geometry controls to contrast deterministic permutation-like transport with plans that divide source mass across targets.

Sparsity here is not peculiar to transport. For nonnegative variables, the relevant quantity is the rank of the constraint operator, not the raw number of listed constraints, which may contain redundancies. The following standard linear-programming principle makes this precise.

Proof

The feasible region is a nonempty polyhedron, so the attainment theorem for linear programs gives a minimizer. Among all minimizers, choose P\P^\star with minimal support SS. If #S>rank(A)\#S>\operatorname{rank}(\mathcal A), rank-nullity gives a nonzero matrix HH supported on SS with A(H)=0\mathcal A(H)=0. Both P+tH\P^\star+tH and PtH\P^\star-tH are nonnegative for sufficiently small t>0t>0, and all their constraint values agree with those of P\P^\star. Optimality therefore forces C,H=0\langle \C,H\rangle=0.

Choose σ{1,1}\sigma\in\{-1,1\} so that σH\sigma H has a negative entry, and set

t=min(i,j):σHij<0PijσHij>0.t_\star= \min_{(i,j):\,\sigma H_{ij}<0} \frac{\P^\star_{ij}}{-\sigma H_{ij}}>0.

Then P+tσH\P^\star+t_\star\sigma H is feasible and optimal. At least one positive entry has vanished, and no entry outside SS has appeared, contradicting the minimality of SS.

Proof

Apply the rank-controlled proposition to the marginal operator Amarg(P)=(P1m,P1n)\mathcal A_{\mathrm{marg}}(\P)=(\P\mathbf 1_m,\P^\top\mathbf 1_n). It has rank n+m1n+m-1: equality of total row and column mass gives one relation. Conversely, if (u,v)(u,v) annihilates its image, testing the identity on each elementary matrix gives ui+vj=0u_i+v_j=0 for every (i,j)(i,j). Thus all uiu_i equal one scalar and all vjv_j equal its opposite, so this is the only relation. The preceding proposition therefore supplies an optimal coupling with at most n+m1n+m-1 positive entries.

For transportation polytopes, the same kernel argument has a graph interpretation: a cycle in the bipartite support carries an alternating perturbation with zero row and column sums. Thus every extreme coupling has a forest support.

Proof

All assignments are nonnegative. At each step, the mass placed in entry (i,j)(i,j) is subtracted from exactly one current row residual and one current column residual, so no row or column can receive more mass than prescribed. Conversely, an index is advanced only when its residual has been fully filled. When the algorithm stops, the total assigned mass is iai=jbj\sum_i a_i=\sum_j b_j, hence all row and column sums are exactly aa and bb.

Each positive assignment exhausts at least one current row or one current column. Before the final assignment, at most n1n-1 row advances and m1m-1 column advances can occur without terminating the construction. Hence the number of positive entries is at most (n1)+(m1)+1=n+m1(n-1)+(m-1)+1=n+m-1. For acyclicity, view the positive support as a bipartite graph. Once a row or column index is advanced, it never appears again, so each new positive edge either starts a new component or attaches at least one new vertex to the component currently being swept. No edge is ever added between two old vertices of the same component, so no cycle can be created.

The north-west corner rule, summarized in Algorithm Algorithm: North-west corner coupling, does not use the cost matrix and is therefore not meant to solve the discrete Kantorovich problem. Its role is algorithmic: an acyclic support corresponds to linearly independent marginal constraints. When the support has fewer than n+m1n+m-1 positive entries, transportation simplex implementations complete it with zero-mass basic variables to obtain a degenerate basic feasible solution. This gives a cheap initialization for the pivoting methods discussed in Section Linear-Programming Algorithms.

One-Dimensional Cases

In one dimension, the transportation polytope has a canonical monotone optimizer. This is the weighted version of the sorting rule from the matching chapter.

Proof

The Monge inequality for a convex displacement cost states that, whenever i<ii<i' and j<jj<j',

h(xiyj)+h(xiyj)h(xiyj)+h(xiyj).h(x_i-y_j)+h(x_{i'}-y_{j'}) \leq h(x_i-y_{j'})+h(x_{i'}-y_j).

We prove optimality by induction on n+mn+m. Let P\P be an optimal plan that maximizes P11\P_{11}. If P11<min(a1,b1)\P_{11}<\min(a_1,b_1), then row 1 sends positive mass to some j>1j'>1 and column 1 receives positive mass from some i>1i'>1. Moving the same small amount from (1,j)(1,j') and (i,1)(i',1) to (1,1)(1,1) and (i,j)(i',j') preserves both marginals and, by the displayed inequality, does not increase the cost. It strictly increases P11\P_{11}, a contradiction. Hence P11=min(a1,b1)\P_{11}=\min(a_1,b_1), exactly as in the north-west rule. Row 1 or column 1 is exhausted; deleting it leaves the same problem on a smaller ordered grid. Induction proves that the complete sweep is optimal. Sorting has cost O(nlogn+mlogm)O(n\log n+m\log m), and the sweep creates at most n+m1n+m-1 nonzero entries.

Permutation Matrices As Couplings

Now assume n=mn=m and uniform weights a=b=1n/na=b=\mathbf{1}_n/n. In this case, a matching can be encoded as a matrix with exactly one active entry per row and per column.

The corresponding probability coupling is Pσ/n\P_\sigma/n. If the matching cost matrix is C\C, then

C,Pσ/n=1ni=1nCi,σ(i).\langle \C,\P_\sigma/n\rangle = \frac1n\sum_{i=1}^n \C_{i,\sigma(i)}.

Thus the assignment problem is the minimization of a linear function over the discrete, non-convex set of permutation matrices. The convex relaxation replaces this finite set by all bistochastic matrices.

Proof

Among all nonempty faces of C\mathcal C, choose one of minimal affine dimension. If this face contained two distinct points, maximizing a linear functional that is not constant on the face would produce a nonempty proper exposed subface, contradicting minimality. Hence the minimal face is a singleton, and its point is extreme.

Proof

The set S=arg minxC(x)S=\argmin_{x\in\mathcal C}\ell(x) is nonempty, compact and convex. By Proposition Proposition: Existence of Extreme Points, it has an extreme point xx. If x=(y+z)/2x=(y+z)/2 with y,zCy,z\in\mathcal C, then by linearity and optimality of xx, both yy and zz also minimize \ell on C\mathcal C, hence y,zSy,z\in S. Since xx is extreme in SS, y=z=xy=z=x. Thus xx is extreme in C\mathcal C.

Figure Div shows the non-extreme mechanism used in the proof below. The displayed matrix is bistochastic but not a permutation matrix: the unit entries already behave like isolated matching edges, while the fractional support contains a minimal alternating cycle.

<IPython.core.display.Image object>

Cycle certificate in the Birkhoff--von Neumann proof. The left panel is a 7×77\times7 bistochastic matrix which is not a permutation matrix. The right panel shows its bipartite positive-support graph, with the column nodes sorted as j1,,j7j_1,\ldots,j_7 from top to bottom to match the matrix order: red nodes are rows, blue nodes are columns, thin purple edges correspond to 0<Pij<10<\P_{ij}<1, and bold black edges correspond to isolated entries Pij=1\P_{ij}=1. The orange halo marks the longer alternating fractional cycle along which one can add and subtract mass while preserving all row and column sums.

Interactive panel. Move mass around the alternating cycle and observe that all row and column sums remain unchanged.

Proof

We first prove that permutation matrices are extreme. Let PσPnperm\P_\sigma\in\mathcal P_n^{\mathrm{perm}} and assume that

Pσ=Q+R2withQ,RBn.\P_\sigma=\frac{\Q+\R}{2} \qquad\text{with}\qquad \Q,\R\in\mathcal B_n .

Every bistochastic matrix has entries in [0,1][0,1]. Since the only extreme points of [0,1][0,1] are 0 and 1, each entry of Pσ\P_\sigma fixes the corresponding entries of Q\Q and R\R: if (Pσ)ij=0(\P_\sigma)_{ij}=0, then Qij=Rij=0\Q_{ij}=\R_{ij}=0, while if (Pσ)ij=1(\P_\sigma)_{ij}=1, then Qij=Rij=1\Q_{ij}=\R_{ij}=1. Hence Q=R=Pσ\Q=\R=\P_\sigma, so Pσ\P_\sigma is extreme.

We now prove the converse by contrapositive. Pick PBnPnperm\P\in\mathcal B_n\setminus\mathcal P_n^{\mathrm{perm}}. Since an integral bistochastic matrix is necessarily a permutation matrix, P\P has at least one fractional entry. We shall split P=(Q+R)/2\P=(\Q+\R)/2 with Q,RBn\Q,\R\in\mathcal B_n and QR\Q\neq \R, proving that P\P is not extreme.

Associate with P\P the bipartite graph whose left vertices are the rows, whose right vertices are the columns, and whose edges are the fractional entries 0<Pij<10<\P_{ij}<1. An entry equal to 1 uses the whole mass of its row and column, so it is isolated in the positive support and does not appear in this fractional graph. If a left vertex is incident to one fractional edge, then it must be incident to at least one other fractional edge: after the first fractional contribution, the row still has positive remaining mass, and that remainder cannot be carried by an entry equal to 1. The same argument applies to columns. Thus every non-isolated vertex of the fractional graph has degree at least two.

Starting from any fractional edge, one may therefore walk through adjacent fractional edges without immediately backtracking and without getting stuck. Since the graph is finite, some vertex is eventually visited twice; the portion of the walk between the two visits contains a cycle. Choose a shortest such cycle and write it in alternating form

(i1,j1,i2,j2,,ip,jp),ip+1=i1,(i_1,j_1,i_2,j_2,\ldots,i_p,j_p), \qquad i_{p+1}=i_1,

where both (is,js)(i_s,j_s) and (is+1,js)(i_{s+1},j_s) are fractional for every ss. Define

ϵ:=min1sp{Pis,js,Pis+1,js,1Pis,js,1Pis+1,js}>0,\epsilon \eqdef \min_{1\leq s\leq p} \{ \P_{i_s,j_s}, \P_{i_{s+1},j_s}, 1-\P_{i_s,j_s}, 1-\P_{i_{s+1},j_s} \}>0,

and split the cycle edges into the alternating families

A={(is,js)}s=1p,B={(is+1,js)}s=1p.A=\{(i_s,j_s)\}_{s=1}^p, \qquad B=\{(i_{s+1},j_s)\}_{s=1}^p .

Set Q=P\Q=\P and R=P\R=\P outside ABA\cup B; on AA, set Qij=Pij+ϵ/2\Q_{ij}=\P_{ij}+\epsilon/2 and Rij=Pijϵ/2\R_{ij}=\P_{ij}-\epsilon/2; on BB, set Qij=Pijϵ/2\Q_{ij}=\P_{ij}-\epsilon/2 and Rij=Pij+ϵ/2\R_{ij}=\P_{ij}+\epsilon/2. By the definition of ϵ\epsilon, all modified entries stay in [0,1][0,1]. Each row and column of the cycle sees one +ϵ/2+\epsilon/2 and one ϵ/2-\epsilon/2, so the row and column sums remain one. Thus Q,RBn\Q,\R\in\mathcal B_n, QR\Q\neq \R, and P=(Q+R)/2\P=(\Q+\R)/2. Hence P\P is not extreme. Consequently every extreme point of Bn\mathcal B_n is integral, and every integral bistochastic matrix is a permutation matrix.

The same combinatorial idea gives the constructive decomposition used to express a bistochastic matrix as a convex combination of permutations.

The perfect matching required at each iteration exists by Hall’s theorem. Indeed, while the common row and column sum of the residual matrix is s>0s>0, any set II of row vertices and its neighborhood N(I)N(I) satisfy

sI=iIjN(I)RijjN(I)iRij=sN(I).s|I| = \sum_{i\in I}\sum_{j\in N(I)}\R_{ij} \leq \sum_{j\in N(I)}\sum_iR_{ij} =s|N(I)|.

Thus N(I)I|N(I)|\geq|I|, which is Hall’s condition. Subtracting λPσ\lambda \P_\sigma preserves a common row and column sum sλs-\lambda and removes at least one positive entry. The algorithm therefore terminates after finitely many steps with R=0\R=0; summing the updates yields the announced convex decomposition and rλr=1\sum_r\lambda_r=1.

Proof

The feasible set is Bn/n\mathcal B_n/n. By Proposition Proposition: Linear Programs Have Extreme Minimizers, the linear objective has an optimal extreme point. Since scaling preserves extreme points and Theorem Theorem: Birkhoff--von Neumann identifies the extreme points of Bn\mathcal B_n, this optimizer is Pσ/n\P_\sigma/n for some permutation σ\sigma. Its cost is exactly n1iCi,σ(i)n^{-1}\sum_i \C_{i,\sigma(i)}, so σ\sigma is an optimal assignment.

Equivalently, for uniform empirical measures, one can always choose a permutation matrix among the minimizers of the relaxed Kantorovich problem: the relaxation is tight for assignment problems.

Rational Weights

The strict assignment model is tied to equal cardinalities and equal weights, whereas the coupling set Definition: Discrete Couplings And Mass Conservation accommodates arbitrary discrete masses and different support sizes. Figure Div contrasts these regimes. For rational weights, the relaxed problem can in fact be reduced back to a larger uniform assignment problem.

<IPython.core.display.Image object>

From assignments to transport plans, using the same disk-to-annulus geometry. In the balanced equal-weight case, each source atom is matched to one target atom. With a target cloud that has half as many atoms, or with strongly nonuniform target weights, the coupling matrix can merge or split mass; segment thickness and opacity encode its nonzero entries, and blue marker areas encode the prescribed target masses.

The interactive panel below exposes the target resolution, target weights, and regularization level. The first displayed plan is sparse, while positive regularization values show the entropic smoothing used later in the Sinkhorn chapter.

<Figure size 915x345 with 3 Axes>

Interactive panel. Use the source and target sizes, weight pattern, and regularization sliders to see how unequal masses and finite resolution change the matching picture.

Proof

Any assignment between the duplicated source and target clouds defines integers nijn_{ij} counting how many copied particles of type xix_i are matched to copied particles of type yjy_j. These counts satisfy jnij=ki\sum_j n_{ij}=k_i and inij=j\sum_i n_{ij}=\ell_j, and the associated coupling Pij=nij/N\P_{ij}=n_{ij}/N has marginals ki/Nk_i/N and j/N\ell_j/N. The assignment cost is

1Ni,jnijc(xi,yj)=i,jPijc(xi,yj).\frac1N\sum_{i,j} n_{ij}c(x_i,y_j) = \sum_{i,j}\P_{ij}c(x_i,y_j).

Conversely, any nonnegative integer count matrix with those row and column sums can be realized by allocating the kik_i copies of each xix_i among the target copies according to (nij)j(n_{ij})_j. It remains to show that restricting to integer counts does not increase the optimum. Scale a feasible coupling by NN and write Q=NP\Q=N\P. The constraints on Q\Q have integer right-hand sides. After multiplying the target rows by -1, their coefficient matrix is the oriented node-edge incidence matrix of a bipartite graph and is therefore totally unimodular. Every vertex of the transportation polytope is integral, and a linear objective attains its minimum at a vertex. Thus an integral optimal Q\Q exists and the two optimal values coincide. This proves existence, not integrality of every optimizer: convex combinations of distinct integral optima can be fractional.

This network-flow integrality mechanism is the rational-weight counterpart of the Birkhoff--von Neumann theorem above (Theorem: Birkhoff--von Neumann): in both cases, a linear transport relaxation has an optimizer represented by integer edge flows after scaling. Equal unit margins specialize these flows to permutation matrices, whereas a degenerate optimal face may also contain fractional couplings.

Figure Div makes this reduction explicit by replacing each rational mass with identical unit copies and then regrouping the resulting uniform assignment.

<IPython.core.display.Image object>

Rational weights as duplicated uniform matchings, using the same disk-to-annulus geometry with fewer displayed atoms. The red and blue locations are kept fixed, while disk areas encode the integer multiplicities kik_i and j\ell_j. Solving the assignment problem after duplicating particles produces several collapsed segments attached to high-multiplicity atoms; this is the integer count matrix of the proposition.

Interactive panel. Use the site and multiplicity sliders to see how rational weights can be represented by duplicated unit masses before solving an ordinary matching problem.

Applications of discrete transport

Discrete Kantorovich transport applies whenever weighted data points or histograms must be compared through a geometry-aware correspondence. The following examples illustrate information transfer between datasets, comparison of visual distributions, and inference of temporal relations between cell populations.

<IPython.core.display.Image object>

Three snapshots of the Waddington-OT single-cell reprogramming time course. The first panel aggregates a representative sample from all collection times and colors cells from red to blue according to time. The remaining panels highlight the populations observed at days 0, 9, and 18, while cells from other times remain in gray. Every panel uses the same official force-layout embedding and viewport; no transport coupling or interpolated trajectory is displayed.

Linear-Programming Algorithms

The discrete Kantorovich problem is a linear program with much more structure than a generic dense LP. Its variables are arcs of a complete bipartite network, its equality constraints are flow-conservation constraints, and its extreme points are sparse tree-like couplings.

Transportation Simplex And Network Simplex

The transportation simplex goes back to Dantzig’s formulation of the transportation problem Dantzig, 1951. It works on basic feasible couplings, whose support is completed into a spanning tree of the bipartite supply-demand graph. Reduced costs identify whether an unused arc can decrease the objective. Adding such an arc creates a unique cycle; one then pushes as much mass as possible around that cycle and removes the exhausted arc.

The network simplex is the corresponding pivoting method for general minimum-cost-flow problems Bertsekas & Eckstein, 1988. It keeps node potentials, reduced costs and a spanning-tree basis. Its worst-case number of pivots can be exponential, but the per-pivot operations exploit graph sparsity. Polynomial guarantees can be obtained from strongly polynomial minimum-cost-flow algorithms such as Orlin’s algorithm Orlin, 1997.

Interior-Point Methods

Generic interior-point methods approach the LP through a smooth central path. Assume here that all entries of aa and bb are positive; zero-mass rows and columns must first be removed. The logarithmic-barrier problem on the resulting transport polytope is

Pϵ:=arg minP1m=a,P1n=bPij>0C,Pϵi,jlogPij.\P_\epsilon \eqdef \argmin_{\substack{\P\mathbf{1}_m=a,\;\P^\top\mathbf{1}_n=b\\P_{ij}>0}} \langle \C,\P\rangle - \epsilon\sum_{i,j}\log \P_{ij}.

The barrier is singular at the boundary, so each iterate stays strictly inside the transportation polytope. As ϵ0\epsilon\downarrow0, the central path approaches the set of LP minimizers.

Figure Div isolates this mechanism on a two-dimensional polytope: decreasing the barrier parameter moves the minimizer along the central path toward the optimal face.

<IPython.core.display.Image object>

Logarithmic-barrier central path for a triangular slice of a linear program. Large ϵ\epsilon selects a central interior point; decreasing ϵ\epsilon moves the minimizer toward the optimal vertex while never touching the boundary. This differs from entropic OT, where the entropy temperature is part of the regularized objective itself.

The interactive view exposes the barrier parameter directly: lowering ϵ\epsilon slides the minimizer from the center of the feasible triangle toward the LP vertex.

Interactive panel. Use the barrier and angle controls to move along the interior central path of the transport polytope.

Both interior-point methods and Sinkhorn keep iterates positive, but they use positivity differently. Interior-point algorithms solve the original LP by decreasing a barrier parameter. Sinkhorn fixes an entropic temperature and solves a different, KL-regularized OT problem by alternating diagonal scalings.

Relaxation For Arbitrary Measures

This section lifts the finite-dimensional coupling matrix to a joint probability measure. The payoff is that existence, duality and metric properties can be stated for arbitrary laws, including discrete, singular and continuous distributions.

Continuous Couplings

Unlike the Monge constraint, the coupling constraint is never empty. The continuous feasibility witness is the tensor product coupling.

The next result echoes Proposition Proposition: Discrete Product Optimality Is Degenerate in the continuous setting. In both cases, the independent coupling is optimal precisely when the objective is flat over the whole admissible set; for continuous costs, this flatness is equivalently the additive form c(x,y)=u(x)+v(y)c(x,y)=u(x)+v(y) on the product support.

Proof Sketch

If all couplings are optimal, the product coupling is optimal. Conversely, assume the product is optimal. If cross differences failed to vanish on the product support, there would be points x0,x1,y0,y1x_0,x_1,y_0,y_1 such that exchanging the two target neighborhoods decreases cost. Replacing a small amount of product mass on the two diagonal rectangles by mass on the crossed rectangles keeps the same marginals and lowers the cost, a contradiction. Vanishing cross differences imply c(x,y)=c(x,y)+c(x,y)c(x,y)c(x,y)=c(x,y_\star)+c(x_\star,y)-c(x_\star,y_\star) on the support, so the cost of any coupling depends only on its marginals.

The tensor product is therefore a trivial feasible coupling, not a typical optimizer. The continuity assumption matters: changing a cost on an αβ\al\otimes\be-negligible set can change the cost of singular couplings while leaving the product cost unchanged.

If there exists a map T:XYT:\Xx\to\Yy with Tα=βT_\sharp\al=\be, then the Monge map induces the graph coupling π=(Id,T)αΠ(α,β)\pi=(\Id,T)_\sharp\al\in\Couplings(\al,\be), characterized by

h(x,y)dπ(x,y)=h(x,T(x))dα(x).\int h(x,y)\d\pi(x,y) = \int h(x,T(x))\d\al(x).

Graph couplings are precisely the Kantorovich representation of deterministic Monge maps.

A last important class consists of semi-discrete problems, where α\al has a density and β\be is discrete. Every coupling is supported on the union of the slices X×{yj}\Xx\times\{y_j\}. When an optimal coupling is induced by a map, these slices are selected by a partition of X\Xx into transport cells, as developed in Chapter Paragraph.

Continuous Kantorovich Problem

For a nonnegative Borel cost c:X×Y[0,+]c:\Xx\times\Yy\to[0,+\infty], the discrete Kantorovich problem becomes, for arbitrary measures,

Lc(α,β):=infπΠ(α,β)X×Yc(x,y)dπ(x,y).\mathcal{L}_c(\al,\be) \eqdef \inf_{\pi\in\Couplings(\al,\be)} \int_{\Xx\times\Yy} c(x,y)\d\pi(x,y).

This is an infinite-dimensional linear program over a space of measures.

The linear formulation gives the Kantorovich value opposite curvature properties in its two kinds of arguments: it is convex in the marginals but concave in the ground cost.

Proof

For joint convexity, let (α0,β0)(\alpha_0,\beta_0) and (α1,β1)(\alpha_1,\beta_1) be two pairs of probability measures. The claim is immediate at t{0,1}t\in\{0,1\} or if one of the two values on the right-hand side is infinite. Otherwise, for η>0\eta>0, choose πiΠ(αi,βi)\pi_i\in\Couplings(\alpha_i,\beta_i) such that

cdπiLc(αi,βi)+η,i{0,1}.\int c\d\pi_i \leq \mathcal L_c(\alpha_i,\beta_i)+\eta, \qquad i\in\{0,1\}.

Then (1t)π0+tπ1(1-t)\pi_0+t\pi_1 couples (1t)α0+tα1(1-t)\alpha_0+t\alpha_1 and (1t)β0+tβ1(1-t)\beta_0+t\beta_1, and hence

Lc((1t)α0+tα1,(1t)β0+tβ1)(1t)Lc(α0,β0)+tLc(α1,β1)+η.\mathcal L_c\big((1-t)\alpha_0+t\alpha_1,(1-t)\beta_0+t\beta_1\big) \leq (1-t)\mathcal L_c(\alpha_0,\beta_0) +t\mathcal L_c(\alpha_1,\beta_1)+\eta.

Letting η0\eta\to0 proves joint convexity. For concavity, the endpoint cases are immediate, so assume t(0,1)t\in(0,1). Every πΠ(α,β)\pi\in\Couplings(\alpha,\beta) satisfies

((1t)c0+tc1)dπ(1t)Lc0(α,β)+tLc1(α,β).\int\big((1-t)c_0+tc_1\big)\d\pi \geq (1-t)\mathcal L_{c_0}(\alpha,\beta) +t\mathcal L_{c_1}(\alpha,\beta).

Taking the infimum over π\pi proves the stated inequality.

Proof

The constraint set is nonempty because it contains αβ\al\otimes\be. It is uniformly tight: for ε>0\varepsilon>0, choose compact sets KXXK_\Xx\subset\Xx and KYYK_\Yy\subset\Yy with α(KX),β(KY)1ε/2\al(K_\Xx),\be(K_\Yy)\geq1-\varepsilon/2. Every feasible π\pi then satisfies π(KX×KY)1ε\pi(K_\Xx\times K_\Yy)\geq1-\varepsilon. Prokhorov’s theorem gives relative weak compactness. The marginal constraints are weakly closed because the coordinate projections are continuous, so the feasible set is weakly compact. Finally, Portmanteau’s theorem makes πcdπ\pi\mapsto\int c\d\pi weakly lower semicontinuous. The direct method gives a minimizer.

For the Wasserstein cost c(x,y)=d(x,y)pc(x,y)=d(x,y)^p on a Polish metric space, the natural finite-valued domain is

Pp(X):={αM+1(X):d(x,x0)pdα(x)<+},\mathcal P_p(\Xx) \eqdef \left\{ \al\in\Mm_+^1(\Xx): \int d(x,x_0)^p\d\al(x)<+\infty \right\},

for one, and hence every, reference point x0x_0. If α,βPp(X)\al,\be\in\mathcal P_p(\Xx), the product coupling has finite pp-cost by the triangle inequality, and the proposition supplies an optimal coupling.

Monge--Kantorovich Equivalence

The proof of Brenier’s theorem relies on Kantorovich relaxation and duality. Under Brenier’s hypotheses, the relaxation is tight: it has the same cost as the Monge problem and the optimal coupling is induced by a map.

Proof

The proof of Brenier’s theorem shows that the support of any optimal Kantorovich plan lies in the subdifferential ϕ\partial\phi of a convex function. Since α\al has a density, ϕ\phi is differentiable α\al-almost everywhere, so ϕ(x)={ϕ(x)}\partial\phi(x)=\{\nabla\phi(x)\} for α\al-almost every xx. Every optimal coupling is therefore concentrated on the graph of T=ϕT=\nabla\phi and equals (Id,T)α(\Id,T)_\sharp\al.

If α\al does not have a density, non-smooth points of ϕ\phi can be charged by α\al and mass splitting can occur. For instance, moving δ0\delta_0 to (δ1+δ1)/2(\delta_{-1}+\delta_1)/2 can be represented by a plan concentrated on the set-valued subdifferential of ϕ(x)=x\phi(x)=|x|, but not by a deterministic map.

Kantorovich solution in 1D

The atomless assumption in the Monge statement of Section One-Dimensional Transport And Quantiles is a limitation of maps, not of one-dimensional optimality. Once couplings are allowed, atoms can be split by assigning subintervals of quantile levels to different target points. The common quantile parameter therefore defines an optimal relaxed coupling for arbitrary probability measures.

Proof

The push-forward statement πΠ(α,β)\pi^\star\in\Couplings(\al,\be) follows from the quantile push-forward proposition. It remains to prove optimality.

The key point is the one-dimensional uncrossing inequality. If x<xx<x' and y>yy>y', set a=xya=x-y, δ=xx>0\delta=x'-x>0 and η=yy>0\eta=y-y'>0. Convexity of hh implies that increments are monotone, hence

h(a+η)h(a)h(a+δ+η)h(a+δ),h(a+\eta)-h(a)\leq h(a+\delta+\eta)-h(a+\delta),

which is exactly

h(xy)+h(xy)h(xy)+h(xy).h(x-y)+h(x'-y')\geq h(x-y')+h(x'-y).

Thus removing a crossing never increases the cost. For a finite transport matrix on two ordered grids, if i<ii<i' and j>jj>j' carry crossed masses PijP_{i j} and PijP_{i'j'}, move θ=min(Pij,Pij)\theta=\min(P_{i j},P_{i'j'}) units from the crossed entries (i,j)(i,j), (i,j)(i',j') to the uncrossed entries (i,j)(i,j'), (i,j)(i',j). The marginals are unchanged, and the cost does not increase. Repeating this elementary step yields an ordered plan; on an ordered uniform quantile grid, this is the diagonal plan.

For general measures, lift any coupling to quantile coordinates. Let πΠ(α,β)\pi\in\Couplings(\al,\be). Using regular conditional laws of a uniform quantile variable given its image under qαq_\al and qβq_\be, construct a coupling γ\gamma of two uniform variables such that π=(qα,qβ)γ\pi=(q_\al,q_\be)_\sharp\gamma.

To justify the approximation, let κM(r)=max(M,min(r,M))\kappa_M(r)=\max(-M,\min(r,M)) and set qα,M=κMqαq_{\al,M}=\kappa_M\circ q_\al and qβ,M=κMqβq_{\be,M}=\kappa_M\circ q_\be. Approximate these bounded nondecreasing functions almost everywhere by nondecreasing step functions, constant on the uniform intervals Ik=((k1)/N,k/N]I_k=((k-1)/N,k/N]. The matrix GkN=γ(Ik×I)G^N_{k\ell}=\gamma(I_k\times I_\ell) couples two uniform histograms. Proposition Proposition: One-Dimensional Weighted Sweep applied to the ordered step values therefore yields the desired comparison for the step functions. For fixed MM, continuity of hh on [2M,2M][-2M,2M] allows passage to the limit as NN\to\infty.

Finally, κM\kappa_M is nondecreasing and 1-Lipschitz, so for every x,yx,y there is tM(x,y)[0,1]t_M(x,y)\in[0,1] such that κM(x)κM(y)=tM(x,y)(xy)\kappa_M(x)-\kappa_M(y)=t_M(x,y)(x-y). Convexity and nonnegativity give

h(tM(x,y)(xy))(1tM(x,y))h(0)+tM(x,y)h(xy)h(0)+h(xy).h(t_M(x,y)(x-y)) \leq (1-t_M(x,y))h(0)+t_M(x,y)h(x-y) \leq h(0)+h(x-y).

The assumed integrability controls the diagonal term; for a competitor of finite cost the same bound controls the other term, while an infinite-cost competitor is irrelevant. Dominated convergence as MM\to\infty gives

01h(qα(r)qβ(r))drh(xy)dπ(x,y)\int_0^1 h(q_\al(r)-q_\be(r))\d r \leq \int h(x-y)\d\pi(x,y)

for every πΠ(α,β)\pi\in\Couplings(\al,\be).

This result is strictly more flexible than the Monge formula. If α\al has an atom, a map can only send that whole atom to one target point, whereas the quantile interval associated with the atom can be coupled with a nontrivial portion of β\be. The one-dimensional Kantorovich solution therefore handles mass splitting without changing the monotone geometry.

Cyclical Monotonicity

Cyclical monotonicity is the local geometric fingerprint of optimality for a cost cc. It converts a global minimization problem into finite exchange inequalities and is the bridge from Kantorovich plans to convex potentials.

Support and cc-Cyclical Monotonicity

The support of a coupling is the topological support introduced in Definition Definition: Support Of A Measure, now applied to a Radon measure on X×Y\Xx\times\Yy. Thus (x,y)supp(π)(x,y)\in\supp(\pi) exactly when every open neighborhood of (x,y)(x,y) has positive π\pi-mass.

It is enough to check cyclic permutations:

i=1kc(xi,yi)i=1kc(xi,yi+1),yk+1=y1.\sum_{i=1}^k c(x_i,y_i) \leq \sum_{i=1}^k c(x_i,y_{i+1}), \qquad y_{k+1}=y_1.

Optimal Matching to Optimal Transport

For uniform marginals on the same number of atoms, Corollary Corollary: Kantorovich For Matching gives an optimal permutation plan. Its support must be cc-cyclically monotone: otherwise exchanging finitely many targets along a violating cycle would lower the matching cost. The next theorem says that the same finite-exchange certificate holds for arbitrary optimal plans.

Proof Sketch

Suppose a finite family in supp(π)\supp(\pi) violates the exchange inequality. By continuity, the same strict inequality holds in small neighborhoods Ui×ViU_i\times V_i around the chosen pairs. Write mi=π(Ui×Vi)>0m_i=\pi(U_i\times V_i)>0 and choose 0<λ(imi1)10<\lambda\leq(\sum_i m_i^{-1})^{-1}. The scaled restrictions πi=λπUi×Vi/mi\pi_i=\lambda\pi|_{U_i\times V_i}/m_i have common mass λ\lambda and satisfy iπiπ\sum_i\pi_i\leq\pi, even when the rectangles overlap. If αi\al_i and βi\be_i are their marginals, replace iπi\sum_i\pi_i by iαiβσ(i)/λ\sum_i\al_i\otimes\be_{\sigma(i)}/\lambda. The new measure has the same marginals, while the uniform strict inequality makes its cost strictly smaller, contradicting optimality.

Monotonicity

If the optimal plan is induced by a map TT, there is a set GG of full α\al-measure such that (x,T(x))supp(π)(x,T(x))\in\supp(\pi) for every xGx\in G. For x1,,xkGx_1,\ldots,x_k\in G, cyclical monotonicity reads

i=1kc(xi,T(xi))i=1kc(xi,T(xi+1)).\sum_{i=1}^k c(x_i,T(x_i)) \leq \sum_{i=1}^k c(x_i,T(x_{i+1})).

For c(x,y)=12xy2c(x,y)=\frac12\|x-y\|^2, the two-point case gives, for x,yGx,y\in G,

T(x)T(y),xy0,\langle T(x)-T(y),x-y\rangle\geq0,

so the optimal representative of TT is monotone on GG.

One Dimension

In one dimension, for c(x,y)=xypc(x,y)=|x-y|^p, the two-point inequality has a strict uncrossing consequence when p>1p>1: if x<yx<y, every optimal map satisfies T(x)T(y)T(x)\leq T(y) on its full-measure transport set. For p=1p=1, uncrossing is not strict. The monotone rearrangement remains optimal, but nonmonotone maps and nondeterministic plans can also be optimal, as in Remark Remark: Book-shifting as a flat Kantorovich face.

Metric Properties: Wasserstein Distances

OT costs become genuine distances when the ground cost comes from a metric. The proof relies on a gluing lemma.

OT Defines a Distance

The discrete gluing lemma is the finite-dimensional mechanism behind the triangle inequality.

Proof

If bj>0b_j>0, summing SijkS_{ijk} over kk gives Pijbj/bj=Pij\P_{ij}b_j/b_j=\P_{ij}; if bj=0b_j=0, the corresponding column of P\P and row of Q\Q are zero. The other prescribed marginal is checked in the same way. Summing over the intermediate index jj gives R\R. Its row and column sums are aa and cc.

Figure Div displays this construction in matrix form.

<IPython.core.display.Image object>

Discrete gluing lemma in matrix form. The first two panels are optimal one-dimensional couplings through an intermediate marginal. The third panel shows the induced marginal R=Pdiag(1/b)QR=P\diag(1/b)Q; it is feasible and is the coupling used in the triangle-inequality proof.

The interactive version changes the resolution of the intermediate marginal, which controls how mediated the glued source-target plan becomes.

Interactive panel. Use the mediation slider to inspect how two couplings through an intermediate marginal glue into a source-target plan.

Proof

Symmetry follows by transposing couplings. Positivity follows because a zero cost plan must be supported on the diagonal. For the triangle inequality, take optimal couplings PP from aa to bb and QQ from bb to cc, glue them into SS, and use the feasible marginal RR from aa to cc. Then Minkowski’s inequality and the ground triangle inequality give

Wp(a,c)(i,j,k(Dij+Djk)pSijk)1/pWp(a,b)+Wp(b,c).W_p(a,c) \leq \left(\sum_{i,j,k}(D_{ij}+D_{jk})^pS_{ijk}\right)^{1/p} \leq W_p(a,b)+W_p(b,c).

Continuous Gluing

The same construction extends to probability measures by disintegrating both couplings with respect to their common marginal.

Proof Sketch

Disintegrate π\pi and ξ\xi against their common marginal β\be, obtaining conditional laws πy\pi_y on X\Xx and ξy\xi_y on Z\Zz. Define σ\sigma by the conditional-product formula

g(x,y,z)dσ=Y(XZg(x,y,z)dπy(x)dξy(z))dβ(y).\int g(x,y,z)\d\sigma = \int_\Yy \left(\int_\Xx\int_\Zz g(x,y,z)\d\pi_y(x)\d\xi_y(z)\right) \d\be(y).

This is the measure-theoretic version of the discrete formula above.

Proof

Symmetry is obtained by swapping the coordinates of a coupling. If the value is zero, an optimal coupling is supported on the diagonal and therefore the two marginals coincide. For the triangle inequality, glue optimal couplings πΠ(α,β)\pi\in\Couplings(\al,\be) and ξΠ(β,γ)\xi\in\Couplings(\be,\ga) into σ\sigma, project it to a coupling ρ\rho between α\al and γ\ga, and apply the ground triangle inequality plus Minkowski:

Wp(α,γ)((d(x,y)+d(y,z))pdσ(x,y,z))1/pWp(α,β)+Wp(β,γ).\Wass_p(\al,\ga) \leq \left(\int (d(x,y)+d(y,z))^p\d\sigma(x,y,z)\right)^{1/p} \leq \Wass_p(\al,\be)+\Wass_p(\be,\ga).

Interpolation Induced By A Plan

The quadratic Wasserstein distance does not only compare two endpoint measures. An optimal plan also says how to move mass between them: each active pair (x,y)(x,y) travels along the segment joining xx to yy. This turns an optimal coupling into a curve of measures.

In the discrete case, each mass PijP_{ij} moves from xix_i to yjy_j along its own segment. When the optimal plan is not induced by a map, one source atom can split into several moving atoms. If the optimal plan is not unique, different optimal plans may also induce different W2\Wass_2 geodesics.

Proof

Push the optimal plan π\pi^\star forward by (es,et)(e_s,e_t). This gives a coupling γs,tΠ(αs,αt)\gamma_{s,t}\in\Couplings(\al_s,\al_t), and

zz2dγs,t(z,z)=et(x,y)es(x,y)2dπ(x,y)=(ts)2W22(α0,α1).\int \norm{z-z'}^2\d\gamma_{s,t}(z,z') = \int \norm{e_t(x,y)-e_s(x,y)}^2\d\pi^\star(x,y) = (t-s)^2\Wass_2^2(\al_0,\al_1).

Hence W2(αs,αt)(ts)W2(α0,α1)\Wass_2(\al_s,\al_t)\leq(t-s)\Wass_2(\al_0,\al_1). Applying this upper bound to the three pairs (0,s)(0,s), (s,t)(s,t) and (t,1)(t,1), and using the triangle inequality of Proposition Proposition: Metric Property Of The Wasserstein Distance, gives

W2(α0,α1)W2(α0,αs)+W2(αs,αt)+W2(αt,α1)W2(α0,α1).\Wass_2(\al_0,\al_1) \leq \Wass_2(\al_0,\al_s)+\Wass_2(\al_s,\al_t)+\Wass_2(\al_t,\al_1) \leq \Wass_2(\al_0,\al_1).

All inequalities are therefore equalities, in particular the middle segment has the claimed length.

Figure Div visualizes the construction when the optimal plan splits mass, so that the intermediate measure is obtained by moving every coupled pair along its Euclidean segment.

<IPython.core.display.Image object>

McCann interpolation induced by a non-deterministic optimal transport plan. In every panel, the red and blue endpoint measures are shown with low opacity, thin gray segments display the support Pij>tolP_{ij}>\mathrm{tol} of the coupling, and the moving atoms are colored from red to blue along the interpolation.

The companion panel lets the same coupling be inspected along time tt, with an entropy slider to contrast sparse and diffuse plans.

Interactive panel. Use the interpolation time and plan controls to see how a fixed coupling induces a cloud of displacement paths between endpoint measures.

Comparison With Monge

The distance Wp\Wass_p defined through the Kantorovich problem (64) should be contrasted with the directed distance W~\widetilde{\Wass} obtained using Monge’s problem. The Kantorovich feasible set is never empty, since it contains the product coupling, although the pp-cost may still be infinite without moment assumptions on non-compact spaces. By contrast, Monge’s constraint set {T:Tα=β}\{T:T_\sharp\al=\be\} can be empty. When an optimal Monge map exists, Kantorovich gives the same value by choosing the graph coupling (Id,T)α(\Id,T)_\sharp\al.

The next proposition makes precise one important sense in which Kantorovich is the relaxation of Monge. The cleanest statement is first made in the lifted plan variable π\pi: deterministic graph couplings are dense among all couplings when the source can be split at arbitrarily fine scales. Thus the Kantorovich functional is the weak lower-semicontinuous envelope of the Monge graph functional.

This is an equality of infimal values: the Kantorovich minimum is attained, whereas the infimum defining W~p\tilde\Wass_p need not be attained by a transport map.

Proof

Let πΠ(α,β)\pi\in\Couplings(\al,\be). Choose finite Borel partitions (Ai)i(A_i)_i and (Bj)j(B_j)_j of X\Xx with mesh at most ϵ\epsilon, and set mij=π(Ai×Bj)m_{ij}=\pi(A_i\times B_j). Since α\al is atomless and jmij=α(Ai)\sum_jm_{ij}=\al(A_i), split each AiA_i into pieces AijA_{ij} with α(Aij)=mij\al(A_{ij})=m_{ij}. For mij>0m_{ij}>0, Proposition Proposition: Existence Of Transport Maps From Atomless Sources gives a measurable map from AijA_{ij} to BjB_j sending αAij/mij\al|_{A_{ij}}/m_{ij} to βBj/β(Bj)\be|_{B_j}/\be(B_j). Pasting these maps gives Tα=βT_\sharp\al=\be, and the graph coupling (Id,T)α(\Id,T)_\sharp\al has the same masses as π\pi on all rectangles Ai×BjA_i\times B_j.

Uniform continuity of every test function on the compact product implies that these graph couplings converge weakly to π\pi as the mesh goes to zero. Applying this to the continuous cost dpd^p gives convergence of costs. Therefore any weakly lower-semicontinuous minorant of the graph functional is bounded above by FpF_p along the approximating graph couplings, while FpF_p itself is continuous and below the graph functional. This proves the envelope claim and then the equality of infima.

Since FpF_p is affine in the plan variable and Π(α,β)\Couplings(\al,\be) is convex, this envelope is also the closed convex relaxation of the Monge graph problem in the space of transport plans.

At the level of endpoint measures, this gives a literal lower-semicontinuous-envelope interpretation for the Monge pp-cost whenever source measures can be regularized into atomless ones.

Proof

For every admissible map TT, the graph plan (Id,T)α(\Id,T)_\sharp\al is a coupling, hence Wp(α,β)pW~p(α,β)p\Wass_p(\al,\be)^p\leq \widetilde{\Wass}_p(\al,\be)^p. Since Wpp\Wass_p^p is continuous in the product Wp\Wass_p topology, it is a lower-semicontinuous minorant of the extended Monge cost.

Conversely, let HH be any lower-semicontinuous minorant of the extended Monge cost. Fix (α,β)(\al,\be) and choose atomless αkα\al_k\to\al in Wp\Wass_p. By Proposition Proposition: Kantorovich As The Plan-Space Relaxation Of Monge, W~p(αk,β)p=Wp(αk,β)p\widetilde{\Wass}_p(\al_k,\be)^p=\Wass_p(\al_k,\be)^p. Therefore H(α,β)lim infkH(αk,β)limkWp(αk,β)p=Wp(α,β)pH(\al,\be)\leq\liminf_k H(\al_k,\be)\leq \lim_k\Wass_p(\al_k,\be)^p=\Wass_p(\al,\be)^p. Thus no larger lower-semicontinuous minorant exists.

The extra density assumption in the corollary is essential. If α\al has atoms, the graph-density statement can fail dramatically: a single source Dirac mass cannot be mapped to two target Dirac masses. On finite spaces, the topology is discrete and this obstruction cannot be removed by closure. In such cases the Kantorovich formulation is not merely a closure of existing maps with the same marginals; it genuinely adds the possibility of splitting atomic mass.

Applications of Wasserstein distance

Representing structured data as probability measures turns the Wasserstein distance into a geometry-aware comparison tool. The following are two representative application domains: single-cell biology and natural-language processing.

Metric Properties: Topology And Applications

Wasserstein distances metrize weak convergence under moment control, sit between weak and strong topologies, and provide quantitative estimates in probability and robust optimization.

Proof

The left inequality is Jensen’s inequality applied to rrq/pr\mapsto r^{q/p}. The right inequality follows from d(x,y)qdiam(X)qpd(x,y)pd(x,y)^q\leq\diam(\Xx)^{q-p}d(x,y)^p.

On compact spaces this is also the weak-* topology inherited from the duality between continuous functions and finite measures. On noncompact spaces, “narrow convergence” avoids conflating this probability topology with other weak-* topologies.

Strong Versus Weak Topology

The total variation norm induces the strong topology on measures. For a signed difference, αβTV=αβ(X)\norm{\al-\be}_{\TV}=|\al-\be|(\Xx); this is an L1L^1 norm for densities and an 1\ell^1 norm for discrete weights. The following proposition shows that total variation is itself a transport cost for the degenerate 0/10/1 ground metric.

Proof

Let λ=α+β\lambda=\al+\be, write a=dα/dλa=\d\al/\d\lambda and b=dβ/dλb=\d\be/\d\lambda, and define the common part η\eta by dη/dλ=min(a,b)\d\eta/\d\lambda=\min(a,b). The residual measures α=αη\al'=\al-\eta and β=βη\be'=\be-\eta are mutually singular and have common mass

r=1η(X)=12abdλ=12αβTV.r=1-\eta(\Xx) =\frac12\int|a-b|\d\lambda =\frac12\|\al-\be\|_{\TV}.

The diagonal submeasure of any coupling is bounded by both marginals, hence by η\eta. Every coupling therefore has off-diagonal mass, and thus 0/10/1 cost, at least rr. If r=0r=0, the diagonal coupling is optimal. If r>0r>0, the coupling

π=Δη+1rαβ,Δ(x)=(x,x),\pi^\star =\Delta_\sharp\eta+\frac1r\al'\otimes\be', \qquad \Delta(x)=(x,x),

has the prescribed marginals. Since αβ\al'\perp\be', its product term is concentrated off the diagonal and has cost rr. This attains the lower bound.

Probabilistic Interpretation

Probability theory gives weak convergence its most direct interpretation: it compares distributions rather than samplewise realizations. In terms of random vectors, if XnαnX_n\sim\al_n and XαX\sim\al (not necessarily defined on the same probability space), then αnα\al_n\rightharpoonup\al means precisely that XnX_n converges in law to XX.

Convergence in law should be distinguished from stronger notions that compare random variables on a common probability space. In that setting, XnXX_n\to X almost surely means pointwise convergence outside a null set, while convergence in probability means

ϵ>0,P(XnX>ϵ)0.\foralls \epsilon>0,\qquad \PP(\norm{X_n-X}>\epsilon)\to0.

Almost-sure convergence implies convergence in probability, which in turn implies convergence in law. The last notion depends only on the marginal laws, since it is exactly the weak convergence (Xn)PXP(X_n)_\sharp\PP\rightharpoonup X_\sharp\PP, and therefore does not require a common probability space.

Convergence in law should also be distinguished from strong convergence of measures. Total variation convergence controls the mass assigned to every measurable set, not only averages against continuous test functions, and therefore implies weak convergence. The converse fails, notably for empirical approximations of continuous laws.

Central Limit Theorem and OT

Limit theorems produce canonical convergent sequences of probability measures, and Wasserstein distances turn their qualitative conclusions into metric error bounds. The central limit theorem concerns sums of independent random variables; because sums of independent variables correspond to convolutions of their laws, the following statement introduces convolution before expressing the theorem in transport language.

Figure Div makes this qualitative weak convergence visible in the elementary Bernoulli case: every finite-nn law is discrete, yet the normalized atom heights approach the Gaussian density.

<IPython.core.display.Image object>

Central-limit theorem for normalized Bernoulli sums. Starting from α0=12(δ1+δ1)\alpha_0=\frac12(\delta_{-1}+\delta_1), the law of Zn=n1/2iXiZ_n=n^{-1/2}\sum_i X_i remains discrete, but its rescaled atom heights approach the standard Gaussian density shown in gray. Proposition Proposition: Berry--Esseen bound in W1\Wass_1 later quantifies this weak convergence in W1\Wass_1.

The interactive version varies the number of summands and the Bernoulli skew, making weak convergence visible even while every displayed law remains discrete.

Interactive panel. Use the number-of-summands and Bernoulli-skew controls to watch the Wasserstein CLT scaling predicted by Lipschitz test functions.

Wasserstein Metrizes Weak Convergence

As explained in Remark Remark: Weak convergence for discrete measures, for Dirac masses,

δxnδxTV=2,Wp(δxn,δx)=d(xn,x).\|\delta_{x_n}-\delta_x\|_{\TV}=2, \qquad \Wass_p(\delta_{x_n},\delta_x)=d(x_n,x).

Thus the strong topology never sees Diracs converge unless they are eventually equal, while the Wasserstein topology captures their spatial convergence. On an unbounded space, weak convergence alone does not prevent a vanishing amount of mass from escaping to infinity; Wasserstein convergence also controls the corresponding moment tail.

Proof

If Wp(αk,α)0\Wass_p(\al_k,\al)\to0, then W1Wp\Wass_1\leq\Wass_p gives weak convergence. For every coupling of αk\al_k and α\al, the reverse triangle inequality in LpL^p bounds the difference between the rooted pp-th moments by the coupling cost; minimizing proves moment convergence.

Conversely, the Skorokhod representation theorem gives random variables XkαkX_k\sim\al_k and XαX\sim\al such that XkXX_k\to X almost surely. Convergence of the pp-th moments makes d(Xk,x0)pd(X_k,x_0)^p uniformly integrable. The estimate

d(Xk,X)p2p1(d(Xk,x0)p+d(X,x0)p)d(X_k,X)^p\leq 2^{p-1}\bigl(d(X_k,x_0)^p+d(X,x_0)^p\bigr)

and Vitali’s theorem yield E[d(Xk,X)p]0\mathbb E[d(X_k,X)^p]\to0. The law of (Xk,X)(X_k,X) is a coupling, hence Wp(αk,α)0\Wass_p(\al_k,\al)\to0. Finally, truncating the continuous moment function by min{d(,x0)p,Rp}\min\{d(\cdot,x_0)^p,R^p\} proves the equivalence with the uniform tail condition.

On compact spaces the moment function is bounded and continuous, so the moment condition is automatic and Wp\Wass_p metrizes weak convergence.

On a finite metric space, weak and strong topologies coincide. If dmin=minxyd(x,y)d_{\min}=\min_{x\neq y}d(x,y) and dmax=maxx,yd(x,y)d_{\max}=\max_{x,y}d(x,y), then

dmin2αβTVW1(α,β)dmax2αβTV.\frac{d_{\min}}{2}\|\al-\be\|_{\TV} \leq \Wass_1(\al,\be) \leq \frac{d_{\max}}{2}\|\al-\be\|_{\TV}.

Measure-to-Measure Maps on Wasserstein Space

Many constructions in modern machine learning act directly on probability laws. This section isolates this viewpoint and records two useful principles: some transformations move particles without splitting them, while others are intrinsically diffusive.

Maps on Wasserstein space.

Once Wasserstein distances provide a topology on probability measures, it is natural to study transformations of probability measures as maps

Φ:Pp(X)Pp(X)\Phi:\Pp_p(\Xx)\longrightarrow \Pp_p(\Xx)

on Wasserstein space. Later chapters use such maps repeatedly: flow matching and diffusion models evolve laws during sampling, one-step transportation methods learn maps between latent and data distributions, and transformers update the empirical law of their tokens; see Chapter Paragraph and Section Evolution in Depth of Transformers. Two questions are especially useful. The structural question asks whether Φ\Phi preserves a discrete particle representation. The metric question asks whether Φ\Phi is stable, for instance Lipschitz, for Wp\Wass_p.

Particle-preserving transport representations.

The deterministic case is obtained by pushing each input measure through a map that may itself depend on that input measure:

Φ(α)=Γ[α]α,Γ[α]:XX.\Phi(\al) = \Gamma[\al]_\sharp \al, \qquad \Gamma[\al] : \Xx \to \Xx .

Then, for every discrete measure,

α=i=1naiδxiΦ(α)=i=1naiδΓ[α](xi).\al=\sum_{i=1}^n a_i\de_{x_i} \quad\Longrightarrow\quad \Phi(\al)=\sum_{i=1}^n a_i\de_{\Gamma[\al](x_i)} .

Thus the weights and the number of particles are preserved, up to possible collisions between images. This is the natural structure behind deterministic particle methods: particles move, but they do not split. Lavenant and Savaré Lavenant & Savaré, 2026 study when transformations of measures admit transport representatives of the form (95), the obstructions to choosing representatives continuously, and the additional regularity available when Φ\Phi is Wasserstein-Lipschitz.

Mass-splitting Markov maps.

The opposite case is a stochastic transformation, where one input particle can generate a full output distribution. Let KK be a Markov kernel on X\Xx, so that K(y,)K(y,\cdot) is a probability measure for each yy. To obtain a map on Pp(X)\Pp_p(\Xx), assume a finite-moment bound

Xd(x,x0)pK(y,dx)C(1+d(y,x0)p)\int_{\Xx} d(x,x_0)^p\,K(y,\d x) \leq C\bigl(1+d(y,x_0)^p\bigr)

for some x0Xx_0\in\Xx. The associated linear map

Xf(x)dΨ(α)(x)=XXf(x)K(y,dx)dα(y)\int_{\Xx} f(x)\,\d\Psi(\al)(x) = \int_{\Xx}\int_{\Xx} f(x)\,K(y,\d x)\,\d\al(y)

is a measure-to-measure map from Pp(X)\Pp_p(\Xx) to itself: integrating the moment bound against α\al proves that Ψ(α)\Psi(\al) has finite ppth moment. If X=Rd\Xx=\RR^d and K(y,dx)=κ(xy)dxK(y,\d x)=\kappa(x-y)\d x for a probability density κ\kappa with finite ppth moment, then Ψ(α)=ακ\Psi(\al)=\al*\kappa is convolution. Unless K(y,)K(y,\cdot) is a Dirac mass, a single atom is sent to a diffuse probability distribution. Heat flows, noising steps in diffusion models, and other smoothing mechanisms therefore belong to this mass-splitting class.

If in addition X\Xx is Polish and Wp(K(y,),K(y,))Ld(y,y)\Wass_p(K(y,\cdot),K(y',\cdot))\leq Ld(y,y'), then Ψ\Psi is LL-Lipschitz for Wp\Wass_p. Glue an input coupling of (y,y)(y,y') with measurable optimal couplings between K(y,)K(y,\cdot) and K(y,)K(y',\cdot), then integrate the resulting kernel coupling. Its expected ppth-power cost is at most LpL^p times the input coupling cost.

Wasserstein stability.

Regularity of Φ\Phi is a stability requirement: small perturbations of the input law should not create large changes of the output law. For transport representations, the following elementary estimate separates the spatial Lipschitz constant of the map from its sensitivity to the input measure.