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.

Generalized OT Problems

This chapter changes the optimization problem rather than only the ground distance. Barycenters average several measures, multi-marginal OT couples many measures at once, low-rank and capacity constraints restrict the admissible plans, inverse OT learns the cost from observed transport, and weak or martingale OT acts on conditional laws. These models remain close to Kantorovich optimization, but the unknown can now be a family of couplings, a factored plan, a learned cost, or a coupling subject to nonlinear conditional constraints.

OT Barycenters

Barycenters ask how to average probability measures rather than points. This section explains the variational definition, the special closed forms in one dimension and for Gaussians, and the entropic algorithms used in practice.

Frechet Means

The natural formulation is a Frechet-mean problem on the space of probability measures: the unknown is the barycenter measure itself, and its support is not prescribed. It uses the continuous Kantorovich value Lc\mathcal L_c defined in (40).

Unlike a coupling, the barycenter is a new probability measure on X\Xx. Since the weights λs\lambda_s are nonnegative, problem (1) is convex in α\alpha: Proposition Proposition: Convexity in the Marginals and Concavity in the Cost shows that the continuous Kantorovich value is jointly convex in its two marginals. Agueh and Carlier introduced this problem, following earlier ideas of Carlier and Ekeland Agueh & Carlier, 2011Carlier & Ekeland, 2010. For the quadratic cost on X=Rd\Xx=\RR^d, a barycenter exists under the finite-second- moment assumption. It is unique if at least one positive-weight input is absolutely continuous; more general criteria ensure uniqueness through an essentially unique multi-marginal barycentric map. Discrete existence, consistency, and fixed-point constructions are studied in Anderes et al., 2016Esteban et al., 2016Le Gouic & Loubes, 2016.

Fixed-support discrete barycenters

For computation, one often turns the preceding infinite-dimensional problem into a finite one by prescribing possible barycenter locations. Assume the inputs are discrete,

βs=j=1nsbs,jδxs,j,bs=(bs,j)j=1nsΔns.\beta_s=\sum_{j=1}^{n_s} b_{s,j}\delta_{x_{s,j}}, \qquad b_s=(b_{s,j})_{j=1}^{n_s}\in\simplex_{n_s}.

Choose candidate barycenter sites (yi)i=1n(y_i)_{i=1}^n and restrict the unknown to α=iaiδyi\alpha=\sum_i a_i\delta_{y_i}. For each input ss, the cost Lc(α,βs)\mathcal L_c(\alpha,\beta_s) then becomes a finite Kantorovich problem with cost matrix

(Cs)ij=c(yi,xs,j)Rn×ns.(C_s)_{ij}=c(y_i,x_{s,j})\in\RR^{n\times n_s}.

Thus its value is LCs(a,bs)\mathcal L_{C_s}(a,b_s), in the notation of the discrete Kantorovich problem (9).

This construction is a finite-dimensional restriction, not an exact discrete reduction of the general barycenter problem. In the ordinary two-marginal Kantorovich problem, once both marginals are discrete, the two supports are known and the whole problem is exactly the matrix optimization (9) on their product support. For barycenters, the input supports do not determine the support of the unknown barycenter: a minimizer may place mass outside the chosen sites (yi)i(y_i)_i and outside the union of the input supports. Once the candidate support is fixed, however, the nonnegative weights λs\lambda_s and Proposition Proposition: Joint Convexity of Discrete OT show that problem (4) is convex in aa: the discrete Kantorovich value is jointly convex in its two histograms.

For quadratic costs, the multi-marginal formulation of Section Multimarginal OT shows that, for discrete inputs, one may choose a barycenter supported on weighted averages sλsxs,is\sum_s\lambda_s x_{s,i_s} of one support point from each input. This exact candidate set can contain sns\prod_s n_s points, but Corollary Corollary: Sparse Discrete Barycenters shows that there exists a barycenter for which at most snsS+1\sum_s n_s-S+1 of them carry positive mass. Prescribing the support (yi)i(y_i)_i before solving (4) is nevertheless a numerical approximation, because the active weighted averages are not known in advance.

Figure Div moves beyond this degenerate case and compares barycenter grids obtained from one-dimensional quantile averaging and two-dimensional entropic transport under the same bilinear corner weights.

<IPython.core.display.Image object>

Wasserstein barycenter grids for four corner measures. The left panel uses the one-dimensional formula Qu,v=i,jλij(u,v)QijQ_{u,v}=\sum_{i,j}\lambda_{ij}(u,v)Q_{ij} for one Gaussian law and three asymmetric two-Gaussian mixtures, and displays densities reconstructed from the averaged quantiles. The right panel computes entropic Wasserstein barycenters on a common pixel grid for the cat, two-disk, cross and clover silhouettes, using the normalized squared ground cost, ϵ=4104\epsilon=4\cdot10^{-4} and a Sinkhorn tolerance of 51085\cdot10^{-8}. The barycenters are rendered as density images with values clamped at their 95%95\% quantile rather than by threshold contours. Colors interpolate between the four corners and encode the same bilinear weights in both panels.

The interactive demo below keeps the exact one-dimensional formula visible: the two coordinates set bilinear weights on the four corner laws, the middle panel averages their quantile functions, and the right panel reconstructs the resulting barycenter density.

Interactive panel. Use the barycentric coordinate controls to move through the four input laws and compare quantile and entropic barycenter constructions.

One-Dimensional Case

On the line, barycenters become linear after the quantile change of variables. This gives the rare case where the barycenter is explicit rather than the solution of a high-dimensional optimization problem.

Proof

The one-dimensional formula for W2\Wass_2 gives

sλsW22(α,βs)=01sλsFα1(r)Fβs1(r)2dr.\sum_s\lambda_s\Wass_2^2(\alpha,\beta_s) = \int_0^1 \sum_s\lambda_s \abs{F_\alpha^{-1}(r)-F_{\beta_s}^{-1}(r)}^2 \d r.

The minimization decouples pointwise in rr. For each fixed rr, the minimizer of zsλszFβs1(r)2z\mapsto\sum_s\lambda_s|z-F_{\beta_s}^{-1}(r)|^2 is the weighted average sλsFβs1(r)\sum_s\lambda_sF_{\beta_s}^{-1}(r). This function is nondecreasing because it is a positive weighted sum of nondecreasing quantile functions, hence it is a valid quantile function.

Gaussian Case

Gaussian barycenters show that the same separation as in the Gaussian Wasserstein formula persists: means average linearly, while covariances average according to the Bures--Wasserstein geometry.

Proof

Let Rα\mathcal R\alpha denote the Gaussian measure with the same mean and covariance as α\alpha. For every competitor αP2(Rd)\alpha\in\Pp_2(\RR^d) and every Gaussian input βs\beta_s, the Gelbrich contraction of Theorem Theorem: Gelbrich theorem gives

W22(Rα,βs)=W22(Rα,Rβs)W22(α,βs).\Wass_2^2(\mathcal R\alpha,\beta_s) = \Wass_2^2(\mathcal R\alpha,\mathcal R\beta_s) \leq \Wass_2^2(\alpha,\beta_s).

Summing with weights λs\lambda_s shows that moment-matched Gaussian projection cannot increase the barycenter objective. Since a barycenter exists, projecting any minimizer produces a Gaussian barycenter. The input with positive-definite covariance is absolutely continuous, so the uniqueness criterion following Definition Definition: Optimal-Transport Barycenter implies that the barycenter itself is this Gaussian measure.

For a Gaussian candidate, the Gaussian Wasserstein formula separates the objective as

sλsW22(N(m,Σ),N(ms,Σs))=sλsmms2+sλsB(Σ,Σs)2.\sum_s\lambda_s\Wass_2^2\bigl(\Gaussian(\mean,\cov),\Gaussian(\mean_s,\cov_s)\bigr) = \sum_s\lambda_s\norm{\mean-\mean_s}^2 + \sum_s\lambda_s\Bb(\cov,\cov_s)^2.

The first term is uniquely minimized at m=sλsms\mean=\sum_s\lambda_s\mean_s. The second is the Bures barycenter problem. Uniqueness of the Wasserstein barycenter makes its covariance minimizer unique, and the presence of a positive-definite input makes this minimizer positive definite Esteban et al., 2016Bhatia et al., 2019. At such a minimizer, set

Ts:=Σ1/2(Σ1/2ΣsΣ1/2)1/2Σ1/2.T_s \eqdef \cov^{-1/2} \pa{\cov^{1/2}\cov_s\cov^{1/2}}^{1/2} \cov^{-1/2}.

The differential of ΣB(Σ,Σs)2\cov\mapsto\Bb(\cov,\cov_s)^2 in a symmetric direction HH is tr((IdTs)H)\operatorname{tr}((\Id-T_s)H). Hence first-order optimality is sλsTs=Id\sum_s\lambda_sT_s=\Id. Multiplying on the left and right by Σ1/2\cov^{1/2} gives the covariance equation. In dimension one, B(σ2,σs2)2=(σσs)2\Bb(\sigma^2,\sigma_s^2)^2=(\sigma-\sigma_s)^2, whose minimizer is σ=sλsσs\sigma=\sum_s\lambda_s\sigma_s.

If all input covariances are singular, the same contraction argument still gives a Gaussian barycenter, but the uniqueness step can fail and non-Gaussian barycenters may coexist. Thus nondegeneracy is essential when asserting that every barycenter is Gaussian.

Figure Div illustrates the nonlinear covariance interpolation characterized above; increasing anisotropy makes the simultaneous rotation and rescaling of the Bures--Wasserstein barycenter especially visible.

<IPython.core.display.Image object>

Bures--Wasserstein barycenters of centered Gaussian covariance matrices. Each panel shows a 5×55\times5 grid of barycenter ellipses for four corner covariances, without separate input panels: the corner ellipses are the four input covariances themselves. The right grid uses more anisotropic inputs, making the nonlinear rotation and scaling of covariance barycenters more visible.

The interactive Gaussian demo compares the Bures covariance barycenter with a plain Euclidean covariance average under the same weights. The difference is most visible for rotated, anisotropic covariances: the Euclidean average blends matrix entries, whereas the Bures barycenter follows the geometry induced by quadratic Gaussian transport.

Interactive panel. Use the corner-covariance and interpolation controls to see how Gaussian barycenter ellipses interpolate covariance geometry.

Sliced and Radon Barycenters

Slicing gives a scalable surrogate for high-dimensional barycenters by applying the one-dimensional quantile formula in every projection direction. For measures on Rd\RR^d, one replaces W2\Wass_2 by the sliced distance SW2\SW_2 introduced in Definition Definition: Sliced Wasserstein Distance and interpreted through the Radon transform in Section Sliced Wasserstein Distances:

minαP2(Rd)sλsSW22(α,βs).\min_{\alpha\in\Pp_2(\RR^d)} \sum_s \lambda_s \SW_2^2(\alpha,\beta_s).

The constraint that all projected measures come from the same α\alpha is the nontrivial part. A cheaper Radon-domain approximation drops this consistency constraint and minimizes directly over one-dimensional projected laws (γθ)θ(\gamma_\theta)_\theta:

min(γθ)Sd1sλsW22(γθ,(Pθ)βs)dσ(θ).\min_{(\gamma_\theta)} \int_{\Sphere^{d-1}} \sum_s \lambda_s \Wass_2^2(\gamma_\theta,(P_\theta)_\sharp\beta_s) \d\sigma(\theta).

For each θ\theta, this is a one-dimensional barycenter, hence its quantile is the weighted average of the projected quantiles. For two inputs β0\beta_0 and β1\beta_1, define

Qi(θ,r)=F(Pθ)βi1(r),Qt(θ,r)=(1t)Q0(θ,r)+tQ1(θ,r),γt,θ=(Qt(θ,))Leb[0,1].Q_i(\theta,r) = F^{-1}_{(P_\theta)_\sharp\beta_i}(r), \qquad Q_t(\theta,r) = (1-t)Q_0(\theta,r)+tQ_1(\theta,r), \qquad \gamma_{t,\theta} = \bigl(Q_t(\theta,\cdot)\bigr)_\sharp\mathrm{Leb}_{[0,1]}.

Thus QtQ_t is the directionwise quantile field, and when γt,θ\gamma_{t,\theta} has a density we denote it by ht(θ,)h_t(\theta,\cdot). The relaxed value is a lower bound on the sliced-barycenter value. If the minimizing family is Radon-consistent, meaning that γθ=(Pθ)αˉ\gamma_\theta=(P_\theta)_\sharp\bar\alpha for a common probability measure αˉ\bar\alpha and almost every θ\theta, then αˉ\bar\alpha is an exact sliced barycenter. In general, independently computed one-dimensional barycenters do not satisfy the range conditions of the Radon transform. One therefore reconstructs a density in a least-squares sense, usually through a regularized Radon pseudoinverse.

Let h(θ,t)h(\theta,t) denote a density of γθ\gamma_\theta. We use the one-dimensional Fourier transform in tt given by

h^(θ,ω)=Reıωth(θ,t)dt,h(θ,t)=12πReıωth^(θ,ω)dω,\widehat h(\theta,\omega) = \int_{\RR}e^{-\imath\omega t}h(\theta,t)\d t, \qquad h(\theta,t) = \frac1{2\pi}\int_{\RR}e^{\imath\omega t}\widehat h(\theta,\omega)\d\omega,

whenever Fourier inversion is valid.

Proof

Use the compatible dd-dimensional Fourier convention

ρ^(ξ)=Rdeıξ,xρ(x)dx,ρ(x)=1(2π)dRdeıξ,xρ^(ξ)dξ.\widehat\rho(\xi)=\int_{\RR^d}e^{-\imath\dotp{\xi}{x}}\rho(x)\d x, \qquad \rho(x)=\frac1{(2\pi)^d}\int_{\RR^d} e^{\imath\dotp{\xi}{x}}\widehat\rho(\xi)\d\xi.

The Fourier-slice theorem gives Rρ^(θ,ω)=ρ^(ωθ)\widehat{R\rho}(\theta,\omega)=\widehat\rho(\omega\theta). Plancherel’s identity therefore turns the least-squares objective, up to the positive factor 1/(2π)1/(2\pi), into

Sd1Rρ^(ωθ)h^(θ,ω)2dωdσ(θ).\int_{\Sphere^{d-1}}\int_{\RR} \abs{\widehat\rho(\omega\theta)-\widehat h(\theta,\omega)}^2 \d\omega\,\d\sigma(\theta).

Every ξ0\xi\neq0 has the two signed-polar representations (ξ/ξ,ξ)(\xi/\norm{\xi},\norm{\xi}) and (ξ/ξ,ξ)(-\xi/\norm{\xi},-\norm{\xi}). Pointwise least squares consequently gives

ρ^(ξ)=12[h^(ξξ,ξ)+h^(ξξ,ξ)].\widehat{\rho^\dagger}(\xi) = \frac12\left[ \widehat h\left(\frac\xi{\norm{\xi}},\norm{\xi}\right) + \widehat h\left(-\frac\xi{\norm{\xi}},-\norm{\xi}\right) \right].

Inverse dd-dimensional Fourier transformation and signed polar coordinates give (27); the factor Sd1/2\abs{\Sphere^{d-1}}/2 accounts for the normalization of σ\sigma and the two signed representations. If h=Rρh=R\rho, the Fourier-slice theorem makes both terms in the last display equal to ρ^(ξ)\widehat\rho(\xi), proving exact recovery.

Formula (27) is the filtered back-projection representation of the Radon pseudoinverse used in tomography Herman, 1980; ωd1|\omega|^{d-1} is its ramp multiplier. Since this multiplier amplifies high frequencies, one typically chooses a bandwidth Ω>0\Omega>0 and an even low-pass window χ\chi with χ(0)=1\chi(0)=1, and replaces the ramp by

mΩ(ω)=ωd1χ(ω/Ω),RΩh(x)=Sd12(2π)dSd1Reıωθ,xmΩ(ω)h^(θ,ω)dωdσ(θ).m_\Omega(\omega) = |\omega|^{d-1}\chi(\omega/\Omega), \qquad R_\Omega^\dagger h(x) = \frac{\abs{\Sphere^{d-1}}}{2(2\pi)^d} \int_{\Sphere^{d-1}}\int_{\RR} e^{\imath\omega\dotp{\theta}{x}} m_\Omega(\omega)\widehat h(\theta,\omega) \d\omega\,\d\sigma(\theta).

The numerical reconstruction below uses the super-Gaussian window χ(s)=es4\chi(s)=e^{-|s|^4}. Choose ηt0\eta_t\geq0 so that the positive part below has nonzero mass, and define the nonnegative, unit-mass reconstruction

At(x)=((RΩht)(x)ηt)+Rd((RΩht)(z)ηt)+dz.A_t(x) = \frac{\bigl((R_\Omega^\dagger h_t)(x)-\eta_t\bigr)_+} {\displaystyle\int_{\RR^d} \bigl((R_\Omega^\dagger h_t)(z)-\eta_t\bigr)_+\d z}.

For the endpoints, set Ai=ρiA_i=\rho_i when βi=ρidx\beta_i=\rho_i\d x, i{0,1}i\in\{0,1\}. In the figure, the small threshold ηt\eta_t only suppresses finite-angle inversion ghosts. The resulting regularized density is generally only a least-squares approximation to the independently averaged slices. This fast construction was introduced for sliced and Radon Wasserstein barycenters in Bonneel et al., 2015, but it is not the exact constrained sliced barycenter. With all directions, the Radon transform is injective by the Cramér--Wold theorem Cramér & Wold, 1936; inconsistency comes from failure of Radon range conditions such as antipodal symmetry and moment consistency; with finitely many directions, the sampled Radon operator is also non-injective.

Figure Div follows the resulting density, projected-density and quantile fields through a cat-to-heart interpolation.

<IPython.core.display.Image object>

Radon-domain sliced barycentric interpolation between the cat and heart densities. The columns correspond to t=0,0.2,,1t=0,0.2,\ldots,1. The first row shows the endpoint densities and the intermediate reconstructions AtA_t defined in (32) from the windowed pseudoinverse (31). The second row shows the projected-density fields hth_t (labeled RtR_t in the figure), obtained by converting the directionwise quantile barycenters back into one-dimensional densities. The third row shows the quantile fields QtQ_t defined in (23).

Interactive panel. Move the interpolation time and projection angle to compare image-space densities, Radon profiles, and quantile interpolation in the sliced barycenter construction.

Sinkhorn for Barycenters

A key difference with the regularized two-marginal OT problem is that there is no canonical reference measure αβ\alpha\otimes\beta, because the barycenter α\alpha is unknown. To reduce complexity, one usually fixes a candidate support for the barycenter and solves the discrete problem (4); this introduces a discretization error but keeps the number of unknowns manageable.

One can then use the entropy-only convention of (2) and approximate (4) by

minaΔns=1SλsLCsϵ(a,bs)\min_{a\in\simplex_n} \sum_{s=1}^S \lambda_s\mathcal L_{\C_s}^{\epsilon}(a,b_s)

for some ϵ>0\epsilon>0. This is a smooth convex minimization problem, which can be tackled using gradient descent Cuturi & Doucet, 2014. An alternative is to use a descent method, typically quasi-Newton, on the semi-dual Cuturi & Peyré, 2016; this is useful when adding extra regularization on the barycenter, for instance to impose smoothness.

A simple but effective approach developed in Benamou et al., 2015 observes that (33) has the same minimizers as the weighted KL projection problem

min(Ps)sϵsλsKL(PsKs)\min_{(\P_s)_s} \epsilon\sum_s\lambda_s \operatorname{KL}(\P_s\mid K_s)

subject to

Ps1n=bsfor all s,P11n1==PS1nS.\P_s^\top\mathbf 1_n=b_s \quad\text{for all }s, \qquad \P_1\mathbf 1_{n_1} = \cdots = \P_S\mathbf 1_{n_S}.

Here Ks:=eCs/ϵK_s\eqdef e^{-\C_s/\epsilon}. The barycenter aa is implicitly encoded in the common row marginal

a=P11n1==PS1nS.a=\P_1\mathbf 1_{n_1}=\cdots=\P_S\mathbf 1_{n_S}.

The two objectives differ only by constants depending on (Cs,ϵ)s(\C_s,\epsilon)_s, not on the couplings or barycenter. Assume below that every Cs\C_s is finite and every bsb_s is positive; zero-weight target atoms can be deleted before the iteration. The optimal couplings then have scaling form

Ps=diag(us)Ksdiag(vs),\P_s=\diag(u_s)K_s\diag(v_s),

and the generalized Sinkhorn iterations are

vsbsKsus,as(Ksvs)λs,usaKsvs.v_s\leftarrow\frac{b_s}{K_s^\top u_s}, \qquad a\leftarrow\prod_s(K_s v_s)^{\lambda_s}, \qquad u_s\leftarrow\frac{a}{K_s v_s}.

The geometric mean enforces the fact that all couplings share the same barycenter marginal.

The scaling cycle has an exact dual-optimization interpretation; it is not merely a sequence of marginal normalizations. Write us=efs/ϵu_s=e^{f_s/\epsilon} and vs=egs/ϵv_s=e^{g_s/\epsilon}, with all operations understood componentwise. The proposition below shows that these potentials maximize the concave dual (41). With (fs)s(f_s)_s fixed, the objective separates over ss, and its exact maximizer in each gsg_s is

gs+=ϵlog ⁣(bsKsefs/ϵ),g_s^+ = \epsilon\log\!\left( \frac{b_s}{K_s^\top e^{f_s/\epsilon}} \right),

which is precisely the vsv_s-update. Conversely, with (gs+)s(g_s^+)_s fixed, exact maximization over the coupled block (fs)s(f_s)_s under sλsfs=0\sum_s\lambda_s f_s=0 gives

qs:=Ksegs+/ϵ,a+=sqsλs,fs+=ϵlog ⁣(a+qs).q_s \eqdef K_s e^{g_s^+/\epsilon}, \qquad a^+ = \prod_s q_s^{\lambda_s}, \qquad f_s^+ = \epsilon\log\!\left(\frac{a^+}{q_s}\right).

Thus a complete generalized Sinkhorn cycle is exact two-block coordinate ascent on the dual, or equivalently alternating minimization of its negative. Indeed, the constraint follows from loga+=sλslogqs\log a^+=\sum_s\lambda_s\log q_s, while the first-order conditions require efs+/ϵqs=a+e^{f_s^+/\epsilon}q_s=a^+ for every ss. In the primal formulation (34), the same cycle alternates weighted KL projections onto the target-column constraints and the common-row-marginal constraint Benamou et al., 2015.

Proof

Introduce Lagrange multipliers in (34):

min(Ps)s,amax(fs,gs)ssλs(ϵKL(PsKs)+aPs1ns,fs+bsPs1n,gs).\min_{(\P_s)_s,a} \max_{(f_s,g_s)_s} \sum_s\lambda_s \left( \epsilon\operatorname{KL}(\P_s\mid K_s) + \dotp{a-\P_s\mathbf 1_{n_s}}{f_s} + \dotp{b_s-\P_s^\top\mathbf 1_n}{g_s} \right).

The explicit constraint aΣna\in\Sigma_n may be dropped here: nonnegativity of the couplings, together with Ps1ns=a\P_s\mathbf 1_{n_s}=a and Ps1n=bs\P_s^\top\mathbf 1_n=b_s, already forces aΣna\in\Sigma_n. We may therefore minimize the Lagrangian over aRna\in\mathbb R^n. Strong duality allows one to exchange the minimum and maximum. Finiteness of the minimum with respect to aa gives the vector constraint sλsfs=0\sum_s\lambda_s f_s=0, while minimizing with respect to Ps\P_s gives the Legendre transform of KL(Ks)\operatorname{KL}(\cdot\mid K_s):

max(fs,gs)ssλs[gs,bsϵKL(fsgsϵ|Ks)],sλsfs=0.\max_{(f_s,g_s)_s} \sum_s\lambda_s \left[ \dotp{g_s}{b_s} - \epsilon \operatorname{KL}^* \left(\frac{f_s\oplus g_s}{\epsilon}\middle|K_s\right) \right], \qquad \sum_s\lambda_s f_s=0.

The separable conjugate is

KL(UK)=i,jKi,j(eUi,j1),\operatorname{KL}^*(U\mid K) = \sum_{i,j}K_{i,j}(e^{U_{i,j}}-1),

because for k>0k>0,

supr0ur(rlog(r/k)r+k)=k(eu1).\sup_{r\geq0} ur-\big(r\log(r/k)-r+k\big) = k(e^u-1).

Substituting this conjugate gives the displayed dual, including its additive constant. Coordinate maximization in gsg_s gives the vsv_s update; block maximization in all (fs)s(f_s)_s under sλsfs=0\sum_s\lambda_s f_s=0 gives the weighted geometric mean and then the usu_s update.

Classical applications include two-dimensional image interpolation, three-dimensional shape interpolation, and barycenters on surfaces where the ground cost is the square of the geodesic distance Solomon et al., 2015.

Wasserstein-Over-Wasserstein and Barycenters

The barycenter formula does not require a finite list of inputs. The Wasserstein-over-Wasserstein viewpoint of Section Wasserstein Over Wasserstein allows one to replace the discrete family (βs,λs)s(\beta_s,\lambda_s)_s by a law AP(P(Ω))\mathfrak A\in\mathcal P(\mathcal P(\Omega)) over probability measures. Such population Wasserstein barycenters were studied for random probability measures by Bigot and Klein, in general geodesic settings by Le Gouic and Loubes, and on Riemannian manifolds by Kim and Pass Bigot & Klein, 2018Le Gouic & Loubes, 2016Kim & Pass, 2017. Assume, for instance, that cc is lower semicontinuous and that there exists at least one β0P(Ω)\beta_0\in\mathcal P(\Omega) with

P(Ω)Lc(β0,α)dA(α)<+,\int_{\mathcal P(\Omega)} \mathcal L_c(\beta_0,\alpha)\,\mathrm d\mathfrak A(\alpha)<+\infty,

together with the usual compactness or coercivity hypotheses ensuring existence of minimizers. For instance, these assumptions are automatic when Ω\Omega is compact and cc is continuous. The barycenter correspondence is then

Bc(A):=ArgminβP(Ω)P(Ω)Lc(β,α)dA(α).\mathcal B_c(\mathfrak A) \eqdef \operatorname*{Argmin}_{\beta\in\mathcal P(\Omega)} \int_{\mathcal P(\Omega)} \mathcal L_c(\beta,\alpha)\,\mathrm d\mathfrak A(\alpha).

When this set is a singleton, we denote its element by

α~A:=argminβP(Ω)P(Ω)Lc(β,α)dA(α),\widetilde\alpha_{\mathfrak A} \eqdef \operatorname*{argmin}_{\beta\in\mathcal P(\Omega)} \int_{\mathcal P(\Omega)} \mathcal L_c(\beta,\alpha)\,\mathrm d\mathfrak A(\alpha),

which defines a nonlinear flattening map Aα~A\mathfrak A\mapsto\widetilde\alpha_{\mathfrak A} from laws over measures back to measures on Ω\Omega. When A=sλsδβs\mathfrak A=\sum_s\lambda_s\delta_{\beta_s}, this is exactly the finite barycenter problem above. This map should be contrasted with the linear collapsed, or barycentric, mixture αˉA\bar\alpha_{\mathfrak A} of Definition Definition: Collapsed, Or Barycentric, Mixture, which simply averages the input measures themselves. The two operations agree in degenerate linear situations, but in general α~A\widetilde\alpha_{\mathfrak A} is a geometric average in transport space, whereas αˉA\bar\alpha_{\mathfrak A} is an ordinary mixture in the ambient linear space of measures.

The next result records the corresponding law of large numbers. It is useful when a dataset is itself made of probability measures, for instance populations of histograms, posterior distributions or shapes. We state it in the compact setting, where no moment or tightness side conditions are needed; non-compact extensions require the usual integrability assumptions. Consistency of Wasserstein barycenters and related statistical constructions is developed in Boissard et al., 2015Le Gouic & Loubes, 2016Zemel & Panaretos, 2019; streaming and large-scale uses of many input measures appear for instance in Staib et al., 2017Srivastava et al., 2015Srivastava et al., 2018.

Proof

Set K=P(Ω)K=\mathcal P(\Omega). Since Ω\Omega is compact metric, KK is compact metric for weak convergence, and so is P(K)\mathcal P(K). The space C(K)C(K) is separable for the uniform norm. Applying the scalar strong law to a countable dense family of test functions and then using uniform approximation gives, almost surely, for every ΦC(K)\Phi\in C(K),

Φ(α)dA^p(α)=1pi=1pΦ(αi)Φ(α)dA(α)\int \Phi(\alpha)\,\mathrm d\widehat{\mathfrak A}_p(\alpha) = \frac1p\sum_{i=1}^p\Phi(\alpha_i) \longrightarrow \int \Phi(\alpha)\,\mathrm d\mathfrak A(\alpha)

This is exactly (50).

For the collapsed mixtures, take fC(Ω)f\in C(\Omega) and define Φf(α)=Ωfdα\Phi_f(\alpha)=\int_\Omega f\,\mathrm d\alpha. This function is continuous on P(Ω)\mathcal P(\Omega). Hence

ΩfdαˉA^p=P(Ω)Φf(α)dA^p(α)P(Ω)Φf(α)dA(α)=ΩfdαˉA,\int_\Omega f\,\mathrm d\bar\alpha_{\widehat{\mathfrak A}_p} = \int_{\mathcal P(\Omega)} \Phi_f(\alpha)\,\mathrm d\widehat{\mathfrak A}_p(\alpha) \longrightarrow \int_{\mathcal P(\Omega)} \Phi_f(\alpha)\,\mathrm d\mathfrak A(\alpha) = \int_\Omega f\,\mathrm d\bar\alpha_{\mathfrak A},

which proves (51).

It remains to prove the nonlinear barycenter consistency. The map (β,α)Lc(β,α)(\beta,\alpha)\mapsto\mathcal L_c(\beta,\alpha) is continuous on K2K^2. Therefore the map βhβ\beta\mapsto h_\beta, where hβ(α)=Lc(β,α)h_\beta(\alpha)=\mathcal L_c(\beta,\alpha), is continuous from the compact space KK to C(K)C(K). Its image

H:={hβ:βK}\mathcal H \eqdef \{h_\beta:\beta\in K\}

is compact in C(K)C(K). The convergence of A^p\widehat{\mathfrak A}_p to A\mathfrak A is uniform over H\mathcal H: given η>0\eta>0, cover H\mathcal H by finitely many η\eta-balls in \|\cdot\|_\infty, use weak convergence for the centers, and bound the error on the balls by the total variation of A^pA\widehat{\mathfrak A}_p-\mathfrak A. Hence the empirical objectives

Fp(β):=Lc(β,α)dA^p(α)F_p(\beta)\eqdef \int\mathcal L_c(\beta,\alpha)\, \mathrm d\widehat{\mathfrak A}_p(\alpha)

converge uniformly on KK to

F(β):=Lc(β,α)dA(α).F(\beta)\eqdef \int\mathcal L_c(\beta,\alpha)\, \mathrm d\mathfrak A(\alpha).

Let βpBc(A^p)\beta_p\in\mathcal B_c(\widehat{\mathfrak A}_p). Compactness gives a subsequence βpkβ\beta_{p_k}\rightharpoonup\beta. Uniform convergence, continuity of FF, and optimality of βpk\beta_{p_k} give, for any γK\gamma\in K,

F(β)=limkFpk(βpk)limkFpk(γ)=F(γ),F(\beta) = \lim_k F_{p_k}(\beta_{p_k}) \leq \lim_k F_{p_k}(\gamma) = F(\gamma),

so βBc(A)\beta\in\mathcal B_c(\mathfrak A). If this set is the singleton {α~A}\{\widetilde\alpha_{\mathfrak A}\}, every converging subsequence has the same limit, and therefore the whole sequence α~A^p\widetilde\alpha_{\widehat{\mathfrak A}_p} converges to α~A\widetilde\alpha_{\mathfrak A}, proving (52).

Thus, (50) is the classical law of large numbers on Wasserstein space, and (51) is its linear image under the collapse map. By contrast, (52) is nonlinear: it recomputes a Wasserstein barycenter from the empirical law over measures. The number pp of input measures should not be confused with the number nn of samples used to approximate each input measure, studied in Section Sample Complexity. In applications one often observes pp empirical measures, each made of roughly nn atoms, hence about npnp points in total. Balancing the error due to finitely many input laws against the error due to finitely sampled input laws is a separate statistical and computational tradeoff.

Toward Central Limit Theorems on Wasserstein Space

The same hierarchy suggests a central-limit refinement of the preceding law of large numbers, but the nonlinear geometry makes this substantially more delicate. For the linear collapse αˉA^p\bar\alpha_{\widehat{\mathfrak A}_p}, testing against a fixed fC(Ω)f\in C(\Omega) reduces the question to the classical scalar central limit theorem for the random variable αfdα\alpha\mapsto\int f\,\mathrm d\alpha. For the nonlinear barycenter α~A^p\widetilde\alpha_{\widehat{\mathfrak A}_p}, however, there is no canonical vector difference α~A^pα~A\widetilde\alpha_{\widehat{\mathfrak A}_p}-\widetilde\alpha_{\mathfrak A} inside P(Ω)\mathcal P(\Omega). One has to choose a local linearization. When the population barycenter is sufficiently regular so that the optimal map TpT_p from α~A\widetilde\alpha_{\mathfrak A} to α~A^p\widetilde\alpha_{\widehat{\mathfrak A}_p} exists, this amounts to asking whether p(TpId)\sqrt p\,(T_p-\mathrm{Id}) converges in a Hilbert space such as L2(α~A)L^2(\widetilde\alpha_{\mathfrak A}). In nonsmooth settings one must instead work with optimal-plan or logarithmic-map coordinates. Even after such a linearization, an infinite-dimensional CLT requires tightness of the rescaled tangent variables and a genuine Radon Gaussian random element; in a Hilbert space, the associated covariance must be trace class. A cylindrical Gaussian limit alone is therefore not a probability law on the tangent space. This obstruction explains why Wasserstein-space CLTs are more rigid than the weak laws above.

There are nevertheless important settings where such results can be proved. In one dimension, the quantile representation linearizes W2\mathcal W_2, so barycenter fluctuations can be studied through empirical averages of quantile functions. Another finite-dimensional case is the family of non-degenerate Gaussian measures in fixed dimension, where W2\mathcal W_2 reduces to the Bures geometry of means and covariance matrices. Agueh and Carlier Agueh & Carlier, 2017 formulate this Wasserstein-barycenter CLT precisely in tangent coordinates and prove it in a few special cases, including the one-dimensional non-atomic setting and finite laws supported on non-degenerate Gaussian measures. Entropic barycenters give a smoother variant for which central-limit theorems for empirical barycenters are also available Carlier et al., 2021. These results should be read as nonlinear analogues of the statistical limits discussed in Chapter Paragraph, not as a generic Hilbert-space CLT valid on all of P(Ω)\mathcal P(\Omega).

Multimarginal OT

Multi-marginal OT couples more than two measures at once. It is the natural language for barycenters, matching with teams and several-body costs, but its tensor dimension is the main computational obstacle.

Definition and Basic Structure

The multi-marginal formulation replaces a coupling between two measures by a joint distribution with several prescribed marginals. Given measures (αs)s=1S(\alpha_s)_{s=1}^S on spaces (Xs)s=1S(\Xx_s)_{s=1}^S and a lower-semicontinuous cost c:X1××XSR{+}c:\Xx_1\times\cdots\times\Xx_S\to\RR\cup\{+\infty\} bounded from below, the problem reads

infπΠ(α1,,αS)X1××XSc(x1,,xS)dπ(x1,,xS),\inf_{\pi\in\Couplings(\alpha_1,\ldots,\alpha_S)} \int_{\Xx_1\times\cdots\times\Xx_S} c(x_1,\ldots,x_S)\d\pi(x_1,\ldots,x_S),

where Π(α1,,αS)\Couplings(\alpha_1,\ldots,\alpha_S) is the set of probability measures whose ss-th marginal is αs\alpha_s. This is still a linear program in the discrete setting, but its ambient tensor has size sns\prod_s n_s.

Monge Structure and Splitting-Set Twist

As in the two-marginal case, one would like to know when the optimal joint law is induced by deterministic maps from one marginal. The relevant non-degeneracy assumption is stronger than pairwise twist, because the other S1S-1 variables have to be recovered simultaneously. The condition below is the standard multi-marginal analogue used in the Monge-structure theory of Gangbo--Swiech and Pass Gangbo & Swiech, 1998Pass, 2011Pass, 2012Pass, 2015.

Proof

Let (φs)s=1S(\varphi_s)_{s=1}^S be optimal dual potentials. Complementary slackness gives a Borel contact set Γ\Gamma of full π\pi^\star-measure on which sφs(xs)=c(x1,,xS)\sum_s\varphi_s(x_s)=c(x_1,\ldots,x_S). After disintegrating with respect to the first marginal, fix a point x1x_1 where φ1\varphi_1 is differentiable and where the conditional plan is concentrated on the fiber

M(x1)={(x2,,xS):(x1,x2,,xS)Γ}.M(x_1) = \{(x_2,\ldots,x_S):(x_1,x_2,\ldots,x_S)\in\Gamma\}.

For this fixed x1x_1, the fiber is a splitting set: indeed, the constant φ1(x1)\varphi_1(x_1) can be absorbed into one of the functions φs\varphi_s, s2s\geq2. Equivalently, set u2=φ2+φ1(x1)u_2=\varphi_2+\varphi_1(x_1) and us=φsu_s=\varphi_s for s3s\geq3. Dual feasibility gives s=2Sus(xs)c(x1,x2,,xS)\sum_{s=2}^S u_s(x_s)\leq c(x_1,x_2,\ldots,x_S), with equality on M(x1)M(x_1). If (x2,,xS)M(x1)(x_2,\ldots,x_S)\in M(x_1), the function

zc(z,x2,,xS)s=2Sφs(xs)z\longmapsto c(z,x_2,\ldots,x_S)-\sum_{s=2}^S\varphi_s(x_s)

touches φ1\varphi_1 from above at z=x1z=x_1. Differentiating at this contact point gives

φ1(x1)=x1c(x1,x2,,xS).\nabla\varphi_1(x_1)=\nabla_{x_1}c(x_1,x_2,\ldots,x_S).

All points in the fiber therefore have the same value of x1c\nabla_{x_1}c. Twist on splitting sets makes the fiber a singleton for α1\alpha_1-a.e. x1x_1. Disintegrating π\pi^\star with respect to its first marginal gives Dirac conditional measures, hence measurable maps (T2,,TS)(\T_2,\ldots,\T_S). If π1\pi^1 and π2\pi^2 are two optimal plans, their average is also optimal. The conditional measure of this average over x1x_1 is the average of the two Dirac conditionals, and it must again be a Dirac mass by the preceding argument. Hence the two Dirac masses coincide for α1\alpha_1-a.e. x1x_1, proving uniqueness.

Coulomb Cost and Density-Functional Theory

A second canonical example, besides barycenters, comes from electronic structure. For NN electrons in R3\RR^3, the repulsive Coulomb interaction is the multi-body cost

cCoul(x1,,xN):=1i<jN1xixj,c_{\mathrm{Coul}}(x_1,\ldots,x_N) \eqdef \sum_{1\leq i<j\leq N}\frac{1}{\norm{x_i-x_j}},

with the value ++\infty on the collision set. Proposition Proposition: Multi-Marginal Monge Structure therefore does not apply verbatim: the Coulomb cost is neither finite nor differentiable on the whole product space. Any finite-energy plan gives zero mass to exact collisions, so the cost is smooth at almost every point charged by the plan, but this removes only the singularity; one must still establish differentiability of the dual potential and twist on the relevant splitting sets. Away from collisions,

x1cCoul(x1,,xN)=j=2Nx1xjx1xj3.\nabla_{x_1}c_{\mathrm{Coul}}(x_1,\ldots,x_N) = -\sum_{j=2}^N\frac{x_1-x_j}{\norm{x_1-x_j}^3}.

For N=2N=2, the map from x2x_2 to this vector is injective, so the ordinary two-marginal twist argument can be recovered under the required existence, duality and differentiability hypotheses. For N3N\geq3, however, the displayed total force does not by itself determine the entire tuple (x2,,xN)(x_2,\ldots,x_N); twist on splitting sets, and hence a Monge representation, is not automatic. The previous proposition thus supplies a mechanism to verify in special Coulomb models, not a general existence theorem for co-motion maps.

If ρ\rho is an electron density with R3ρ(x)dx=N\int_{\RR^3}\rho(x)\d x=N and α=ρ/N\al=\rho/N is the associated probability density, the strictly-correlated-electrons relaxation of density-functional theory is the equal-marginal problem

VeeSCE[ρ]:=infπΠ(α,,α)(R3)NcCoul(x1,,xN)dπ(x1,,xN).V_{\mathrm{ee}}^{\mathrm{SCE}}[\rho] \eqdef \inf_{\pi\in\Couplings(\al,\ldots,\al)} \int_{(\RR^3)^N} c_{\mathrm{Coul}}(x_1,\ldots,x_N) \d\pi(x_1,\ldots,x_N).

Since the cost and constraints are permutation invariant, symmetrizing any admissible plan does not change its value, so one may equivalently minimize over symmetric plans. This functional gives the smallest possible electron--electron repulsion compatible with the prescribed one-particle density; it appears as the strong-interaction limit in density-functional theory and was connected to optimal transport in Gori-Giorgi et al., 2009Buttazzo et al., 2012Cotar et al., 2013Di Marino et al., 2015. The deterministic ansatz writes a plan through co-motion maps

π=(Id,T2,,TN)α,(Ti)α=α,\pi=(\Id,\T_2,\ldots,\T_N)_\sharp\al, \qquad (\T_i)_\sharp\al=\al,

so that the position of one electron determines the positions of the others. The following cyclic version is the most common structural form of this ansatz in the strictly-correlated-electrons literature.

Proof

Since Tα=α\T_\sharp\al=\al, all iterates Ti\T^i preserve α\al, so every marginal of πT\pi_\T is α\al. The plan πˉT\bar\pi_\T is an average of coordinate permutations of πT\pi_\T, hence has the same marginals and is invariant under coordinate permutations. The Coulomb cost is symmetric in its arguments, so its integral is unchanged by each RσR_\sigma. The last identity follows by evaluating cCoulc_{\mathrm{Coul}} on the graph (x,T(x),,TN1(x))(x,\T(x),\ldots,\T^{N-1}(x)).

The Monge-structure proposition above explains the general mechanism that can force graph solutions, while the cyclic co-motion proposition records the additional equal-marginal symmetry used by co-motion maps. For the Coulomb cost, however, the singular repulsion and permutation symmetry make the structure delicate: co-motion maps are optimal in special geometries, but they are not universally optimal, and counterexamples are known Colombo & Stra, 2015Bindini et al., 2020. Thus the DFT problem is both a central application and a warning that multi-marginal OT is richer than a naive deterministic matching problem.

Figure Div shows the same phenomenon in a deliberately small one-dimensional model.

<IPython.core.display.Image object>

Entropic three-marginal Coulomb transport in one dimension. The three marginals are equal and the pairwise cost is a softened Coulomb repulsion. Each panel shows the (X1,X2)(X_1,X_2) marginal of the tensor Sinkhorn solution: small regularization pushes mass away from the collision diagonal, while larger regularization blurs the repulsive structure toward the independent reference.

Interactive panel. Adjust the entropic temperature and repulsion strength to see the pairwise marginals of a three-marginal Coulomb plan move away from the diagonals.

Multi-Marginal Formulation of Barycenters

Wasserstein barycenters are the central example. For the squared Euclidean cost, one can introduce a latent barycenter point and eliminate it explicitly, leading to the multi-marginal cost

cbar(x1,,xS)=minxRds=1Sλsxxs2.c_{\mathrm{bar}}(x_1,\ldots,x_S) = \min_{x\in\RR^d} \sum_{s=1}^S\lambda_s\norm{x-x_s}^2.
Proof

For any candidate barycenter α\alpha and couplings πsΠ(α,βs)\pi_s\in\Couplings(\alpha,\beta_s), glue the couplings along their common α\alpha marginal to obtain a joint law of (X,Y1,,YS)(X,Y_1,\ldots,Y_S). Conditioning on (Ys)s(Y_s)_s and minimizing over XX gives

sλsEXYs2EminxsλsxYs2=Ecbar(Y1,,YS).\sum_s\lambda_s\mathbb E\norm{X-Y_s}^2 \geq \mathbb E \min_x \sum_s\lambda_s\norm{x-Y_s}^2 = \mathbb E c_{\mathrm{bar}}(Y_1,\ldots,Y_S).

Taking the infimum over the couplings gives that the barycenter value is at least the multi-marginal value. Conversely, from an optimal multi-marginal plan π\pi^\star, set X=B(Y1,,YS)X=B(Y_1,\ldots,Y_S). The couplings between XX and each YsY_s are feasible for the barycenter problem and attain exactly the multi-marginal cost.

If α\alpha^\star is any barycenter, choose optimal couplings between α\alpha^\star and each βs\beta_s and glue them along the common α\alpha^\star marginal. Since the barycenter and multi-marginal values are equal, the conditional minimization inequality above must be an equality. Thus X=B(Y1,,YS)X=B(Y_1,\ldots,Y_S) almost surely for the induced optimal multi-marginal plan.

Proof

Write a discrete multi-marginal plan as a nonnegative tensor P=(Pi1,,iS)\P=(\P_{i_1,\ldots,i_S}) and let Amarg\mathcal A_{\mathrm{marg}} collect its SS marginals:

(AmargΠ)s,is=(ir)rsPi1,,iS.\bigl(\mathcal A_{\mathrm{marg}}\Pi\bigr)_{s,i_s} = \sum_{(i_r)_{r\neq s}}\P_{i_1,\ldots,i_S}.

After vectorizing Π\Pi, Proposition Proposition: Rank-Controlled Sparse Minimizers applies to the multi-marginal linear program. Its constraint operator has rank

rank(Amarg)=s=1SnsS+1.\operatorname{rank}(\mathcal A_{\mathrm{marg}}) = \sum_{s=1}^S n_s-S+1.

Indeed, a family usRnsu_s\in\RR^{n_s} belongs to the annihilator of its image precisely when

s=1Sus,is=0for every (i1,,iS).\sum_{s=1}^S u_{s,i_s}=0 \qquad\text{for every }(i_1,\ldots,i_S).

Varying one index at a time shows that every usu_s is constant, say us=cs1nsu_s=c_s\mathbf 1_{n_s}, and the remaining condition is scs=0\sum_s c_s=0. The annihilator therefore has dimension S1S-1, proving the rank formula.

Consequently, one may choose an optimal multi-marginal tensor P\P^\star with at most snsS+1\sum_s n_s-S+1 positive entries. Proposition Proposition: Multi-Marginal Formula for Quadratic Barycenters gives α=BP\alpha^\star=B_\sharp\P^\star. Each positive tensor entry produces at most one atom under BB, and collisions can only reduce the support size.

This linear support bound, rather than the cardinality of the full product grid, is the standard sparsity estimate for discrete Wasserstein barycenters Anderes et al., 2016.

Entropic Regularization of Multi-Marginal OT

As in the two-marginal case, adding an entropic penalty with respect to the product measure α1αS\alpha_1\otimes\cdots\otimes\alpha_S leads to scaling algorithms:

infπΠ(α1,,αS)cdπ+ϵKL(πα1αS).\inf_{\pi\in\Couplings(\alpha_1,\ldots,\alpha_S)} \int c\d\pi + \epsilon\operatorname{KL} (\pi\mid\alpha_1\otimes\cdots\otimes\alpha_S).

The optimizer has the generalized Gibbs form

dπ(x1,,xS)=exp ⁣(sfs(xs)c(x1,,xS)ϵ)sdαs(xs),\d\pi^\star(x_1,\ldots,x_S) = \exp\!\left( \frac{\sum_s f_s(x_s)-c(x_1,\ldots,x_S)}{\epsilon} \right) \prod_s\d\alpha_s(x_s),

and generalized Sinkhorn iterations alternately update one potential fsf_s so that the ss-th marginal is correct. This formula is direct but, without additional structure, it is mostly a conceptual baseline. In the discrete case, even storing the Gibbs tensor or the coupling requires sns\prod_s n_s entries, and the unstructured multi-marginal Sinkhorn complexity inherits this exponential dependence on the number of marginals Lin et al., 2019.

Treewidth and Graphical Structure

The important exception is when the cost factors over a sparse interaction graph. Let G=(V,E)G=(V,E) be a finite undirected graph with V={1,,S}V=\{1,\ldots,S\} and suppose, for simplicity, that

c(x1,,xS)=(r,s)Ecr,s(xr,xs).c(x_1,\ldots,x_S) = \sum_{(r,s)\in E}c_{r,s}(x_r,x_s).

The relevant complexity parameter is not merely the number of edges, but the largest intermediate interaction created when variables are summed out.

The last condition is the running-intersection property. A tree decomposition equipped with factors assigned to its bags is also called a junction tree. Equivalently, choose an order in which to eliminate the vertices of GG. Just before eliminating a vertex, connect all of its remaining neighbors, thereby adding fill-in edges. The induced width of the order is the largest number of remaining neighbors encountered. Treewidth is the minimum induced width over all elimination orders, and the corresponding bags consist of each eliminated vertex together with those neighbors. This equivalent viewpoint explains why treewidth controls exact summation.

The same construction applies to higher-order factors cA(xA)c_A(x_A) indexed by subsets AVA\subseteq V: form the primal interaction graph by connecting every pair of variables occurring in a common factor, then compute the treewidth of that graph.

Junction-Tree Contractions Inside Sinkhorn

The treewidth reduction replaces each full tensor contraction in Sinkhorn by exact sum-product messages. In the discrete setting, define the edge Gibbs matrices and current unary factors

Kir,isr,s=exp ⁣(Cir,isr,sϵ),hs(is)=(as)is(us)is.K^{r,s}_{i_r,i_s} = \exp\!\left(-\frac{\C^{r,s}_{i_r,i_s}}{\epsilon}\right), \qquad h_s(i_s) = (a_s)_{i_s}(u_s)_{i_s}.

Under (86), the current scaled coupling is represented implicitly as

Pi1,,iS=sVhs(is)(r,s)EKir,isr,s.\P_{i_1,\ldots,i_S} = \prod_{s\in V}h_s(i_s) \prod_{(r,s)\in E}K^{r,s}_{i_r,i_s}.

When GG is a tree, let NG(r)N_G(r) denote the neighbors of rr. The directed sum-product messages satisfy

mrs(is)=ir=1nrKir,isr,shr(ir)qNG(r){s}mqr(ir).m_{r\to s}(i_s) = \sum_{i_r=1}^{n_r} K^{r,s}_{i_r,i_s}h_r(i_r) \prod_{q\in N_G(r)\setminus\{s\}} m_{q\to r}(i_r).

Cutting the edge (r,s)(r,s) separates the tree into two components: mrs(is)m_{r\to s}(i_s) is the total contribution of the component containing rr, conditional on the boundary state isi_s. Conditioning first on iri_r gives the message recursion. A leaf-to-root pass followed by a root-to-leaf pass computes every directed message and hence every current marginal,

(a^s)is=hs(is)rNG(s)mrs(is).(\widehat a_s)_{i_s} = h_s(i_s) \prod_{r\in N_G(s)}m_{r\to s}(i_s).

For the block ss currently selected by cyclic scaling, the exact coordinate update is

ususasa^s,u_s \leftarrow u_s\odot\frac{a_s}{\widehat a_s},

with componentwise products and quotients. This changes only the unary factor hsh_s. Updating all blocks at once would instead define a Jacobi scheme. Thus the expensive denominator of one generalized Sinkhorn block update is evaluated by messages rather than by enumerating all multi-indices.

For a general tree decomposition, choose one host bag for each unary factor, assign each edge factor in (88) to a bag containing both endpoints, and denote the product assigned to bag BqB_q by ψq(iBq)\psi_q(i_{B_q}). For adjacent bags q,qQq,q'\in Q, set Sq,q=BqBq\mathcal S_{q,q'}=B_q\cap B_{q'}. Junction-tree messages take the form

Mqq(iSq,q)=iBqSq,qψq(iBq)NT(q){q}Mq(iS,q).M_{q\to q'}(i_{\mathcal S_{q,q'}}) = \sum_{i_{B_q\setminus\mathcal S_{q,q'}}} \psi_q(i_{B_q}) \prod_{\ell\in N_{\mathcal T}(q)\setminus\{q'\}} M_{\ell\to q}(i_{\mathcal S_{\ell,q}}).

After a collect-distribute pass, the calibrated bag belief is

bq(iBq)=ψq(iBq)NT(q)Mq(iS,q).\mathfrak b_q(i_{B_q}) = \psi_q(i_{B_q}) \prod_{\ell\in N_{\mathcal T}(q)} M_{\ell\to q}(i_{\mathcal S_{\ell,q}}).

For any sBqs\in B_q, summing bq\mathfrak b_q over Bq{s}B_q\setminus\{s\} gives a^s\widehat a_s; the running-intersection property ensures that every bag containing ss gives the same result.

Redundant adjacent bags may be contracted, so one can assume that the decomposition is reduced. If its width is ww, every bag contains at most w+1w+1 variables and every separator contains at most ww. Consequently, if nsnn_s\leq n, one collect-distribute inference pass for fixed scalings costs

O ⁣(Qnw+1)time,O ⁣(Qnw)message memory.O\!\left(|Q|n^{w+1}\right)\quad\text{time}, \qquad O\!\left(|Q|n^w\right)\quad\text{message memory}.

More precisely, the time is bounded by

O ⁣(qQ(1+degT(q))sBqns),O\!\left( \sum_{q\in Q}(1+\deg_{\mathcal T}(q)) \prod_{s\in B_q}n_s \right),

and the stored messages occupy

O ⁣((q,q)FsSq,qns)O\!\left( \sum_{(q,q')\in F} \prod_{s\in\mathcal S_{q,q'}}n_s \right)

beyond the original factors and scaling vectors. The message-memory bound assumes streamed bag contractions; materializing every dense belief (93) instead requires O(Qnw+1)O(|Q|n^{w+1}) working memory.

These are fixed-scaling inference bounds, not the cost of an entire Sinkhorn solve. They also yield a sharper block implementation. Assign each constrained marginal ss to a host bag q(s)q(s). After updating usu_s, only the messages along the unique path from q(s)q(s) to the host bag of the next updated marginal must be refreshed. A path of length \ell costs O(nw+1)O(\ell n^{w+1}), hence at most O(diam(T)nw+1)O(\operatorname{diam}(\mathcal T)n^{w+1}) per block update. This is the junction-tree iterative-scaling mechanism analyzed in Haasler et al., 2020Fan et al., 2021. For a tree interaction graph, direct edge messages give O((r,s)Enrns)O(\sum_{(r,s)\in E}n_rn_s) for a full pass, or O(Sn2)O(Sn^2) with equal support sizes. A cycle admits O(Sn3)O(Sn^3) full junction-tree passes, while the complete graph still costs O(nS)O(n^S) in time.

The structured implementation never forms KK or P\P as full tensors. It stores the original local factors and separator messages, evaluates bag products on the fly, and replaces the explicit contraction in Algorithm: Multi-marginal Sinkhorn by (90) or (92), and returns the coupling through its factors and scalings. Materializing every entry of P\P would itself require sns\prod_s n_s operations, so the saving applies when only marginals, costs, samples, or other low-order statistics are needed. For small ϵ\epsilon, the same recursions are evaluated in the log domain with log-sum-exp operations. This connects entropic multi-marginal OT with exact inference in probabilistic graphical models and Schrodinger bridge computations Haasler et al., 2021Haasler et al., 2020Fan et al., 2021Altschuler & Boix-Adsera, 2023.

A representative fluid-mechanics example is the time discretization of Brenier’s generalized incompressible Euler problem: kinetic action couples neighboring time slices and periodic incompressibility closes the chain into a cycle, hence a graph of treewidth two. Entropic Bregman/Sinkhorn schemes exploit this circular structure through low-order contractions Benamou et al., 2015Benamou et al., 2019.

Practical barycenter solvers therefore exploit separability of the cost, low-rank structure, convolutional kernels, or a fixed barycenter support.

Low-Rank Optimal Transport

Low-rank OT reduces the size of a transport plan by forcing the coupling itself to pass through a small latent measure. This is useful when the mass exchange is expected to be organized by a few hidden clusters or prototypes, and it is distinct from approximating the Sinkhorn kernel by a low-rank matrix. The idea was introduced statistically through factored couplings by Forrow, Hütter, Nitzan, Rigollet, Schiebinger and Weed Forrow et al., 2019, and developed algorithmically for arbitrary costs by Scetbon, Cuturi and Peyré Scetbon et al., 2021.

The latent interpretation is immediate. The vector gg is the law of an intermediate variable Z{1,,r}Z\in\{1,\ldots,r\}; Q\Q is a coupling of the source index XX with ZZ; R\R is a coupling of the target index YY with the same ZZ. Formula (99) is the law of (X,Y)(X,Y) obtained by sampling ZgZ\sim g, then sampling XX and YY conditionally independently given ZZ. Equivalently, OT is replaced by a succession of two transports through an abstract intermediate measure η=k=1rgkδzk\eta=\sum_{k=1}^r g_k\delta_{z_k} on an rr-point space. The locations zkz_k only label the latent atoms and do not enter the original cost.

Proof

The marginal constraints follow by direct summation:

P1m=Qdiag(g)1R1m=Qdiag(g)1g=Q1r=a,\P\ones_m=\Q\operatorname{diag}(g)^{-1}\R^\top\ones_m =\Q\operatorname{diag}(g)^{-1}g=\Q\ones_r=a,

and similarly P1n=b\P^\top\ones_n=b. Since P\P is a sum of rr nonnegative rank-one matrices Q:,kR:,k/gk\Q_{:,k}\R_{:,k}^\top/g_k, its nonnegative rank is at most rr.

Conversely, suppose P=UV\P=UV^\top with UR+n×rU\in\RR_+^{n\times r} and VR+m×rV\in\RR_+^{m\times r}. Set qk=iUi,kq_k=\sum_i U_{i,k} and sk=jVj,ks_k=\sum_j V_{j,k}. Components with qksk=0q_ks_k=0 do not contribute and can be removed. Define gk=qkskg_k=q_ks_k, Qi,k=Ui,ksk\Q_{i,k}=U_{i,k}s_k and Rj,k=Vj,kqk\R_{j,k}=V_{j,k}q_k. Since P\P has total mass one, gΔrg\in\simplex_r. Moreover Q1r=P1m=a\Q\ones_r=\P\ones_m=a, R1r=P1n=b\R\ones_r=\P^\top\ones_n=b, and both column marginals are equal to gg. Finally,

kQi,kRj,kgk=kUi,kskVj,kqkqksk=Pi,j.\sum_k\frac{\Q_{i,k}\R_{j,k}}{g_k} = \sum_k\frac{U_{i,k}s_kV_{j,k}q_k}{q_ks_k} =\P_{i,j}.

For a cost matrix CRn×m\C\in\RR^{n\times m}, the low-rank constrained OT value is

min(Q,R,g)k=1rQ:,kCR:,kgk.\min_{(\Q,\R,g)} \sum_{k=1}^r \frac{\Q_{:,k}^\top \C \R_{:,k}}{g_k}.

The minimization is over triples satisfying Definition Definition: Low-Rank Factored Couplings.

This problem is non-convex. Scetbon, Cuturi and Peyré regularize the joint variables (Q,R,g)(\Q,\R,g) by the sum of their entropies and optimize them by constrained mirror descent Scetbon et al., 2021. To isolate the simpler block mechanism used in Figure Div, fix a positive latent law gΔrg\in\simplex_r and optimize only the two sub-couplings:

minQ1r=a,Q1n=gR1r=b,R1m=gk=1rQ:,kCR:,kgk+ϵKL(Qag)+ϵKL(Rbg).\min_{\substack{\Q\ones_r=a,\;\Q^\top\ones_n=g\\ \R\ones_r=b,\;\R^\top\ones_m=g}} \sum_{k=1}^r \frac{\Q_{:,k}^\top \C \R_{:,k}}{g_k} + \epsilon\KLD(\Q|a\otimes g) + \epsilon\KLD(\R|b\otimes g).

For fixed gg, this differs only by constants from adding the negative entropies of Q\Q and R\R to the factorized transport cost. Each block subproblem is a strictly convex entropic OT problem with an effective cost, although the joint objective remains non-convex because of its bilinear Q\Q--R\R term.

Each update exactly minimizes one factor block while keeping the other fixed, so the objective decreases monotonically. Positivity makes each block minimizer unique and keeps it in the relative interior of its transport polytope. Compactness and exact cyclic block-coordinate descent imply that every accumulation point is a coordinatewise minimizer, hence a stationary point of the constrained problem. The non-convexity does not guarantee a globally optimal rank-rr coupling.

Figure Div visualizes both the intermediate latent measure and the improvement of the factored coupling as the prescribed rank increases.

<IPython.core.display.Image object>

Low-rank entropic OT on a one-dimensional Gaussian-mixture example. The first view shows factorization through four latent atoms; the matrix panels compare the full entropic coupling with fixed-latent-mass low-rank couplings of increasing rank. This is deliberately not a favorable example for low rank: with a small entropic parameter, one-dimensional quadratic OT is close to a sparse Monge graph rather than to a genuinely low-rank matrix.

Interactive panel. Vary the latent rank and entropic scale to see the same one-dimensional problem as a two-stage transport through a small intermediate measure. The right matrix should approach the full entropic plan as the rank increases.

Capacity-Constrained Optimal Transport

Classical Kantorovich transport only fixes the marginals: if a pair (x,y)(x,y) is cheap, the optimizer may concentrate as much mass as the marginal constraints allow on this pair. Capacity-constrained OT adds a local congestion rule on the coupling itself. It is useful when edges, facilities or matchings have limited throughput, and it also gives a clean mathematical way to interpolate between a sparse OT plan and the independent product coupling. The systematic study of the continuous problem, including existence and the geometry of active saturated regions, was developed by Korman and McCann Korman & McCann, 2015.

Let αM+1(X)\alpha\in\Mm_+^1(\Xx), βM+1(Y)\beta\in\Mm_+^1(\Yy) and let κ:X×Y[0,+)\kappa:\Xx\times\Yy\to[0,+\infty) be a finite-valued measurable capacity. The capacity-constrained transport value is

Lcκ(α,β)=infπΠ(α,β){X×Yc(x,y)dπ(x,y):  παβ,dπd(αβ)(x,y)κ(x,y)}.\MK_c^\kappa(\alpha,\beta) = \inf_{\pi\in\Couplings(\alpha,\beta)} \left\{ \int_{\Xx\times\Yy} c(x,y)\,d\pi(x,y) :\; \pi\ll\alpha\otimes\beta,\quad \frac{d\pi}{d(\alpha\otimes\beta)}(x,y)\leq\kappa(x,y) \right\}.

The product coupling αβ\alpha\otimes\beta is feasible whenever κ1\kappa\geq1. Thus the constraint is not meant to promote the product plan; rather, it prevents the optimizer from using any pair more than the prescribed density ratio. Separately, we adopt the convention Lc+(α,β)=Lc(α,β)\MK_c^{+\infty}(\alpha,\beta)=\MK_c(\alpha,\beta): the symbol κ+\kappa\equiv+\infty removes both the density bound and the absolute-continuity requirement, and hence recovers the full Kantorovich problem. At the opposite extreme, κ=1\kappa=1 forces the independent coupling itself, because a density bounded by one and integrating to one must equal one almost everywhere. Values close to one therefore enforce diffuse plans close to this reference.

For discrete measures α=iaiδxi\alpha=\sum_i a_i\delta_{x_i} and β=jbjδyj\beta=\sum_j b_j\delta_{y_j}, a capacity is an upper matrix UR+n×mU\in\RR_+^{n\times m}. The density-ratio discretization of (104) is Ui,j=κi,jaibjU_{i,j}=\kappa_{i,j}a_i b_j, and the finite-dimensional problem is the linear program

minPU(a,b)C,Psubject to0Pi,jUi,j(i,j).\min_{\P\in\CouplingsD(a,b)} \langle \C,\P\rangle \quad\text{subject to}\quad 0\leq \P_{i,j}\leq U_{i,j}\quad\forall(i,j).

Feasibility is now a genuine issue: the upper matrix must contain enough mass in every row-column cut to support the prescribed marginals. The usual transport polytope is recovered when Ui,j=+U_{i,j}=+\infty, while small capacities select a smaller capped transportation polytope. For index sets II and JJ, write a(I)=iIaia(I)=\sum_{i\in I}a_i, b(J)=jJbjb(J)=\sum_{j\in J}b_j, and U(I,J)=iI,jJUijU(I,J)=\sum_{i\in I,j\in J}U_{ij}.

Proof

If P\P is feasible, then

P(I,J)=a(I)P(I,Jc)a(I)b(Jc)=a(I)+b(J)1,\P(I,J)=a(I)-\P(I,J^c)\geq a(I)-b(J^c)=a(I)+b(J)-1,

and P(I,J)U(I,J)\P(I,J)\leq U(I,J) proves necessity. Conversely, build a flow network with capacity aia_i from the source to row ii, capacity UijU_{ij} from row ii to column jj, and capacity bjb_j from column jj to the sink. A cut containing row set II and column set JcJ^c has capacity

1a(I)+U(I,J)+1b(J).1-a(I)+U(I,J)+1-b(J).

The cut condition makes every such capacity at least one. The max-flow/min-cut theorem therefore gives a unit flow, whose row-to-column edge values form the required matrix P\P.

Entropic smoothing gives a direct Sinkhorn-like algorithm. Assume the cut condition above. With Ki,j=aibjeCi,j/ϵK_{i,j}=a_i b_j e^{-\C_{i,j}/\epsilon}, the regularized problem is

minPU(a,b),0PUC,P+ϵKL(Pab).\min_{\P\in\CouplingsD(a,b),\,0\leq \P\leq U} \langle \C,\P\rangle + \epsilon\KLD(\P|a\otimes b).

Equivalently, up to additive constants, the objective is ϵKL(PK)\epsilon\KLD(\P|K). The problem is therefore the KL projection of KK onto the intersection of three convex sets: the row constraints, the column constraints and the box PU\P\leq U. Alternating KL projections with Dykstra correction factors Dykstra, 1985Bauschke & Lewis, 2000, in the same spirit as the Bregman projection formulation of Sinkhorn Benamou et al., 2015, gives a simple capacity-constrained scaling scheme.

On the active support, all iterates and correction factors are positive, so every division is defined. Finite-dimensional KL-Dykstra convergence shows that, whenever the capped polytope is nonempty, the iterates converge to the unique regularized minimizer. Deleting zero-capacity edges is essential: otherwise the correction step creates undefined products of zero and infinite factors.

Figure Div shows how lowering the entrywise cap progressively spreads a one-dimensional coupling while preserving both prescribed marginals.

<IPython.core.display.Image object>

Capacity-constrained entropic OT between two one-dimensional Gaussian-mixture histograms. The same source and target marginals are coupled with a density-ratio cap Uij=κaibjU_{ij}=\kappa a_i b_j. Large capacity leaves a nearly Monge-like graph, whereas small capacity saturates many entries and forces the coupling to spread.

Interactive panel. Vary the density-ratio cap and the entropic regularization to see how the upper bound turns a graph-like one-dimensional coupling into a saturated spread-out plan.

For the empirical self-coupling in Div, the cap is chosen to prescribe a minimum number of outgoing connections per source point. With uniform weights ai=1/na_i=1/n, imposing Pij1/(qn)\P_{ij}\leq1/(qn) is equivalent to the conditional bound Pij/ai1/q\P_{ij}/a_i\leq1/q. Since each row has total mass 1/n1/n, this forces each source row to use at least qq target atoms, up to the small extra spreading introduced by entropic smoothing.

For the empirical self-coupling in Figure Div, the cap is chosen to prescribe a minimum number of outgoing connections per source point.

<IPython.core.display.Image object>

Capacity-constrained local self-couplings on a two-dimensional empirical Gaussian mixture. The source and target are the same semi-regular uniform empirical measure, but the diagonal is removed to avoid the trivial identity plan. The three panels use off-diagonal caps Uij=1/(qn)U_{ij}=1/(qn) with q=1,3,5q=1,3,5, equivalently Pij/ai1/q\P_{ij}/a_i\leq1/q because ai=1/na_i=1/n. They therefore impose at least one, three and five outgoing connections per source atom.

Interactive panel. Change the admissible number of outgoing connections to see how the capacity bound turns a dense self-coupling into a local transport graph.

Metric Learning and Inverse OT

Metric learning differentiates a forward transport loss through a parameterized cost, whereas inverse OT starts from an observed plan and asks which cost makes it optimal. The first viewpoint is often bilevel; the second admits a direct convex formulation for affine cost families, provided the intrinsic cost invariances are removed.

Differentiating OT Losses

Inverse OT and metric learning repeatedly differentiate a forward OT value with respect to the input law and to the ground cost. The two resulting objects are precisely the two certificates of optimality: a Kantorovich potential for perturbations of the marginal and an optimal coupling for perturbations of the cost. The main caveat is non-uniqueness. In the unregularized case, the correct objects are one-sided directional derivatives, or equivalently subgradients in the measure variable and supergradients in the cost variable. Entropic regularization selects a unique plan and, for positive finite histograms, gives ordinary derivatives on the simplex interiors.

Proof

Kantorovich duality writes

Vc(α,β)=supfgcfdα+gdβ.\mathcal V_c(\alpha,\beta) = \sup_{f\oplus g\leq c} \int f\d\alpha+\int g\d\beta .

This is a supremum of affine functions of α\alpha, so Danskin’s theorem gives the one-sided directional derivative as the supremum over active maximizers, namely the optimal dual potentials. The condition χ(X)=0\chi(\Xx)=0 makes the formula independent of the additive gauge (f,g)(f+λ,gλ)(f,g)\mapsto(f+\lambda,g-\lambda).

For the cost variable,

Vct(α,β)=infπΠ(α,β)cdπ+thdπ\mathcal V_{c_t}(\alpha,\beta) = \inf_{\pi\in\Couplings(\alpha,\beta)} \int c\d\pi+t\int h\d\pi

is an infimum of affine functions of tt. Danskin’s theorem for a minimum gives the right directional derivative as the infimum of hdπ\int h\d\pi over the active minimizers. If the active dual potential or coupling is unique, the corresponding directional derivative is linear in the perturbation, which is the displayed first variation.

In the discrete case, this proposition says that any optimal dual vector ff^\star is a subgradient with respect to the source weights aa, while any optimal plan PP^\star is a supergradient with respect to the cost matrix CC, because the value is concave in CC:

faLC(a,b),PCsupLC(a,b).f^\star\in\partial_a\mathcal L_C(a,b), \qquad P^\star\in\partial_C^{\mathrm{sup}}\mathcal L_C(a,b).

Here Csup\partial_C^{\mathrm{sup}} denotes the superdifferential of the concave map CLC(a,b)C\mapsto\mathcal L_C(a,b). When the corresponding objects are unique, these inclusions become the gradients aLC(a,b)=f\nabla_a\mathcal L_C(a,b)=f^\star on the tangent space {1,χ=0}\{\dotp{\ones}{\chi}=0\} and CLC(a,b)=P\nabla_C\mathcal L_C(a,b)=P^\star. Without uniqueness, the exact directional derivative with respect to CC in a direction ΔC\Delta C is the minimum of ΔC,P\dotp{\Delta C}{P} over all optimal plans.

Proof

The cost derivative follows directly from the primal envelope theorem, because the entropic optimizer is unique. For the measure derivative, use the continuous entropic dual formula from the Sinkhorn chapter. At an optimal pair, the soft-transform equations imply the row normalization

Yexp ⁣(fϵ(x)+gϵ(y)c(x,y)ϵ)dβ(y)=1for all x.\int_{\Yy} \exp\!\left(\frac{f_\epsilon(x)+g_\epsilon(y)-c(x,y)}{\epsilon}\right) \d\beta(y) =1 \qquad\text{for all }x.

Differentiating the dual objective with respect to α\alpha at fixed optimal potentials gives

fϵdχϵX×Y(e(fϵ(x)+gϵ(y)c(x,y))/ϵ1)dχ(x)dβ(y).\int f_\epsilon\d\chi - \epsilon \int_{\Xx\times\Yy} \left( e^{(f_\epsilon(x)+g_\epsilon(y)-c(x,y))/\epsilon}-1 \right) \d\chi(x)\d\beta(y).

The second term vanishes by the previous normalization identity, leaving fϵdχ\int f_\epsilon\d\chi. The gauge ambiguity of (fϵ,gϵ)(f_\epsilon,g_\epsilon) again disappears because χ(X)=0\chi(\Xx)=0.

For a finite-dimensional parametrization cθc_\theta or Cθ\C_\theta, the entropic formula gives the backpropagation rule

θVcθ,ϵ=θcθ(x,y)dπϵ(x,y),\partial_{\theta}\mathcal V_{c_\theta,\epsilon} = \int \partial_\theta c_\theta(x,y)\d\pi_\epsilon(x,y),

where πϵ\pi_\epsilon is the entropic optimizer. For the unregularized value Vcθ\mathcal V_{c_\theta}, uniqueness of the optimal plan π\pi^\star gives θVcθ=θcθdπ\partial_\theta\mathcal V_{c_\theta} =\int\partial_\theta c_\theta\,\d\pi^\star. Without uniqueness, the directional derivative in a parameter direction θ˙\dot\theta is obtained by minimizing θ˙θcθdπ\int \dot\theta\cdot\partial_\theta c_\theta\,\d\pi over the optimal face, while any selected optimal plan gives a valid supergradient with respect to the cost. This is the calculus behind ground-metric learning, which was explicitly studied in Cuturi & Avis, 2014 and connects to the broader metric-learning literature Kulis, 2012Bellet et al., 2015. If one uses the entropy-only discrete convention of the Sinkhorn chapter instead of the KL-normalized value, then, for positive source weights,

LCϵ(a,b)=VC,ϵ(a,b)ϵH(a)ϵH(b),\mathcal L_C^\epsilon(a,b) = \mathcal V_{C,\epsilon}(a,b) - \epsilon H(a)-\epsilon H(b),

so its derivative with respect to aa is represented on the simplex tangent space by fϵ+ϵlogaf_\epsilon+\epsilon\log a, up to an irrelevant additive constant.

Figure Div gives the geometric counterpart of this differentiation rule: changing an anisotropic quadratic cost changes which transport segments are selected.

<IPython.core.display.Image object>

Changing the ground metric changes the optimal coupling. The same red and blue empirical measures are matched with cA(x,y)=(xy)A(xy)c_A(x,y)=(x-y)^\top A(x-y) for the Euclidean metric and two increasingly anisotropic Mahalanobis metrics. The small gray ellipse shows the unit ball of the metric: directions in which the ellipse is elongated are cheaper, and this deforms the transport segments selected by the OT plan.

The interactive demo lets the anisotropy and orientation of the Mahalanobis cost move. The transport plan is recomputed exactly for the displayed particles, so the segments show how the learned cost changes the matching.

Interactive panel. Use the metric and deformation controls to see how learning the ground cost changes the apparent transport geometry.

Inverse Optimal Transport

Inverse OT asks for a ground cost that explains observed matchings or flows as optimal transport plans. In its most direct form, one observes a plan π^\widehat\pi with marginals (α,β)(\alpha,\beta) and seeks a cost cc such that π^\widehat\pi is optimal for

infπΠ(α,β)c(x,y)dπ(x,y).\inf_{\pi\in\Couplings(\alpha,\beta)} \int c(x,y)\d\pi(x,y).

This is ill-posed without structure. Adding u(x)+v(y)u(x)+v(y) to a cost shifts every feasible objective by the same marginal-dependent constant, multiplying a cost by a positive scalar does not change its minimizers, and the zero cost rationalizes every feasible plan. An identifiable model must quotient or normalize these gauge and scale freedoms; a sparse observed plan can still be compatible with a nontrivial cone of normalized costs.

A useful statistical methodology is to measure the suboptimality of the observed plan through a Fenchel--Young loss. Write the score as s=cs=-c and define the convex regularized prediction value

Gϵ(s)=supπΠ(α,β)sdπϵKL(παβ).G_\epsilon(s) = \sup_{\pi\in\Couplings(\alpha,\beta)} \int s\d\pi - \epsilon\operatorname{KL}(\pi\mid\alpha\otimes\beta).

The Fenchel--Young loss

Lϵ(c;π^)=Gϵ(c)+Gϵ(π^)+cdπ^\mathcal L_\epsilon(c;\widehat\pi) = G_\epsilon(-c) + G_\epsilon^*(\widehat\pi) + \int c\d\widehat\pi

is nonnegative by Fenchel’s inequality and vanishes exactly when π^Gϵ(c)\widehat\pi\in\partial G_\epsilon(-c), i.e. when π^\widehat\pi satisfies the regularized optimality conditions for cc. Entropic regularization is important here because it makes the forward map smoother and provides gradients with respect to cc, at the price of a statistical bias Andrade et al., 2025Peyré et al., 2026.

In the discrete unregularized case, this loss reduces to the optimality gap of the observed coupling. For P^U(a,b)\widehat \P\in\mathbf U(a,b) and a cost matrix C\C, denote it by

LiOT(C;P^)=C,P^minPU(a,b)C,P.\mathcal L_{\mathrm{iOT}}(\C;\widehat \P) = \dotp{\C}{\widehat \P} - \min_{\P\in\mathbf U(a,b)}\dotp{\C}{\P}.

This inverse-OT gap loss is nonnegative and vanishes exactly when P^\widehat \P is optimal for C\C.

In practice, one restricts the cost to a finite-dimensional model class, often affine:

Cθ=r=1RθrC(r),θΘ,\C_\theta=\sum_{r=1}^R\theta_r \C^{(r)}, \qquad \theta\in\Theta,

where Θ\Theta is convex and the matrices C(r)\C^{(r)} encode features, graph distances or a Mahalanobis parameterization. This viewpoint appears in low-rank and sparse inverse OT models Dupuy et al., 2019Andrade et al., 2024 and in convex formulations for learning OT costs from observed plans Ma et al., 2020Peyré et al., 2026.

A minimal finite-dimensional model is obtained by learning a bilinear cost on Rd\RR^d,

cA(x,y)=Ax,y,ARd×d.c_A(x,y)=\dotp{Ax}{y}, \qquad A\in\RR^{d\times d}.

For empirical measures α=1niδxi\alpha=\frac1n\sum_i\delta_{x_i} and β=1njδyj\beta=\frac1n\sum_j\delta_{y_j}, this gives the cost matrix

C(A)i,j=Axi,yj,\C(A)_{i,j}=\dotp{Ax_i}{y_j},

so both maps AC(A)A\mapsto \C(A) and AcAA\mapsto c_A are linear. Inverse OT within this model asks which matrix AA makes an observed matching or coupling look optimal; learning the cost is thus reduced to estimating a linear parameter.

For a fixed matrix AA, the forward prediction is the optimal face

PA:=arg minPU(1n/n,1n/n)C(A),P.\mathcal P_A\eqdef \uargmin{\P\in\CouplingsD(\ones_n/n,\ones_n/n)} \dotp{\C(A)}{\P}.

When this face is a singleton, write its element as PA\P_A; otherwise PA\P_A denotes a deterministic tie-broken selection. Although AC(A)A\mapsto \C(A) is linear, the solution correspondence APAA\mapsto\mathcal P_A is polyhedral: changing AA changes the direction in which the transport polytope is probed, and a tie-broken selection is constant on normal-cone cells. The figure below illustrates this correspondence on the OT4ML point clouds. The construction follows the visual idea of the Python Optimal Transport logo Flamary et al., 2021: red source atoms, blue target atoms and straight segments show the selected optimal bijection. With e=(1,1)e=(1,1)^\top and δ=103\delta=10^{-3}, the first two rank-one matrices are

Ah=e1e+δe2e,Av=δe1ee2e.A_h=-e_1e^\top+\delta e_2e^\top, \qquad A_v=\delta e_1e^\top-e_2e^\top .

These small transverse terms break the large ties of the pure horizontal or vertical scores while preserving a rank-one cost. The matrix A=IA=-I gives the usual quadratic W2\Wass_2 assignment, up to the marginal-only terms discussed below, while A=+IA=+I reverses the correlation and produces an anti-W2\Wass_2 matching.

Figure Div illustrates this correspondence on the OT4ML point clouds.

<IPython.core.display.Image object>

Forward solutions of the bilinear cost cA(x,y)=Ax,yc_A(x,y)=\dotp{Ax}{y} on the OT4ML logo point clouds. Each panel solves the equal-weight assignment problem with a different matrix AA; the first two use δ=103\delta=10^{-3} to break rank-one ties. The source atoms are red, the target atoms are blue, and the gray segments give one deterministic optimal bijection.

This elementary model already contains the quadratic Wasserstein assignment. Adding to a cost matrix a term depending only on xix_i or only on yjy_j shifts all feasible couplings by the same constant, and therefore does not change the optimizer. Since

xy2=x2+y22x,y,\norm{x-y}^2=\norm{x}^2+\norm{y}^2-2\dotp{x}{y},

the usual quadratic Wasserstein assignment has the same optimizer as the bilinear cost with A=IA_\star=-I, up to these marginal-only terms and an irrelevant positive factor. The inverse problem goes in the opposite direction: after observing a coupling, one asks which matrices AA could have generated it. The next figure generates an observed coupling P^\widehat \P from this cost on two empirical mixtures of Gaussians, and then evaluates LiOT(C(At);P^)\mathcal L_{\mathrm{iOT}}(\C(A_t);\widehat \P) along the anisotropic path

At=diag(1+t,1t),1t1,A_t=-\diag(1+t,1-t), \qquad -1\leq t\leq 1,

so that t=0t=0 recovers the matrix that generated the observed coupling. Equivalently, with equal weights, P^U(1n/n,1n/n)=Bn/n\widehat \P\in\CouplingsD(\ones_n/n,\ones_n/n)=\mathcal B_n/n, and the plotted loss is the Kantorovich gap

LiOT(C(At);P^)=C(At),P^minPU(1n/n,1n/n)C(At),P,C(At)i,j=Atxi,yj.\mathcal L_{\mathrm{iOT}}(\C(A_t);\widehat \P) = \dotp{\C(A_t)}{\widehat \P} - \min_{\P\in\CouplingsD(\ones_n/n,\ones_n/n)} \dotp{\C(A_t)}{\P}, \qquad \C(A_t)_{i,j}=\dotp{A_t x_i}{y_j}.

Because tC(At)t\mapsto \C(A_t) is affine and the Kantorovich value is a minimum of affine functions over the fixed polytope U(1n/n,1n/n)\CouplingsD(\ones_n/n,\ones_n/n), this one-dimensional gap is convex and piecewise affine. Its zero set can contain an interval for a small sample, reflecting the fact that the same observed coupling remains optimal for a cone of nearby costs.

Figure Div generates an observed coupling P^\widehat \P from this cost on two empirical mixtures of Gaussians, and then evaluates LiOT(C(At);P^)\mathcal L_{\mathrm{iOT}}(\C(A_t);\widehat \P) along the anisotropic path

Interactive panel. Vary sample size and cost rotation to recompute the empirical Kantorovich gap along the one-parameter inverse-OT path.

<IPython.core.display.Image object>

Inverse-OT gap loss for a bilinear cost. Panel (a): two empirical mixtures of two Gaussians are matched with the cost cA(x,y)=Ax,yc_{A_\star}(x,y)=\dotp{A_\star x}{y} for A=IA_\star=-I, which gives the same optimizer as the quadratic W2\Wass_2 cost; red and blue level sets display the two sampling densities. Panels (b,c): the unregularized Fenchel--Young Kantorovich gap LiOT(C(At);P^)\mathcal L_{\mathrm{iOT}}(\C(A_t);\widehat \P) along At=diag(1+t,1t)A_t=-\diag(1+t,1-t) for n=10n=10 and n=100n=100, using the same vertical scale. The red dot marks the generating parameter t=0t=0; the curves are convex and piecewise affine.

The comparison between n=10n=10 and n=100n=100 illustrates a statistical effect: as the number of sampled points grows, the flat zero region can shrink to a sharper piecewise-affine minimum. A finite-sample linear-programming gap remains polyhedral and has no classical second derivative inside its cells. Curvature is instead a population phenomenon. Peyré, Poon and Tron Peyré et al., 2026 prove local curvature and identifiability modulo the natural cost invariances for smooth positive marginals under a nondegeneracy condition. They also identify affine-map settings, including Gaussian or elliptical examples, as genuinely degenerate cases. Larger samples can reveal population curvature, but do not remove structural non-identifiability by themselves.

Proof

For a fixed cost Cθ\C_\theta, Kantorovich duality gives

minPU(a,b)Cθ,P=maxfi+gj(Cθ)i,jf,a+g,b.\min_{\P\in\mathbf U(a,b)} \dotp{\C_\theta}{\P} = \max_{f_i+g_j\leq(\C_\theta)_{i,j}} \dotp{f}{a}+\dotp{g}{b}.

Since P^\widehat \P has marginals (a,b)(a,b), every dual feasible pair satisfies

Cθ,P^f,ag,b=i,jP^i,j((Cθ)i,jfigj)0.\dotp{\C_\theta}{\widehat \P} - \dotp{f}{a} - \dotp{g}{b} = \sum_{i,j}\widehat \P_{i,j} \big((\C_\theta)_{i,j}-f_i-g_j\big) \geq0.

This nonnegative quantity is exactly the primal-dual gap of P^\widehat \P. It vanishes if and only if P^\widehat \P reaches the dual value and is therefore optimal. If Cθ\C_\theta is affine, λ0\lambda\geq0, and Θ\Theta and RR are convex, the constraints and objective in the displayed program are convex. If Cθ=0\C_\theta=0 is allowed and minimizes RR, then (C,f,g)=(0,0,0)(\C,f,g)=(0,0,0) is a trivial minimizer; this proves the need for normalization.

The formulation avoids differentiating through a forward OT solver: it learns a normalized cost by making the observed plan nearly satisfy complementary slackness. In statistical settings, P^\widehat \P is only partially observed or noisy, so one adds sparsity, low-rank, smoothness or metric constraints to select a meaningful representative Dupuy et al., 2019Andrade et al., 2024. For entropic OT, the optimality condition becomes smoother:

P^i,jaibjexp ⁣(fi+gj(Cθ)i,jϵ),\widehat \P_{i,j} \approx a_i b_j \exp\!\left( \frac{f_i+g_j-(\C_\theta)_{i,j}}{\epsilon} \right),

which leads to likelihood-based or KL-based convex objectives when Cθ\C_\theta is affine, and connects inverse OT with generalized Sinkhorn iterations and transport-regularized inverse problems Karlsson & Ringh, 2017Ma et al., 2020.

Weak Optimal Transport

Weak OT relaxes the cost so that it depends on the conditional distribution of destinations rather than only on pointwise pairs. It is useful when a source point is allowed to choose a randomized response and the model only penalizes an aggregate of that response, such as its conditional mean.

Barycentric Projection of a Coupling

The first object to isolate is the map obtained by collapsing each conditional law to its barycenter.

The projected target βˉπ\bar\beta_\pi records the distribution of conditional means, not the full second marginal. Thus it is generally different from β\beta; if π=(Id,T)α\pi=(\Id,T)_\sharp\alpha is induced by a map, then Tˉπ=T\bar T_\pi=T and βˉπ=β\bar\beta_\pi=\beta. This projection is not an optimal map for an arbitrary coupling: a deterministic rotation of a radially symmetric source, for example, projects to the rotation itself, whereas the optimal map from the source to itself is the identity. The useful positive statement is attached to quadratic optimal plans, as in the tangent-space viewpoint on W2\Wass_2 developed by Ambrosio, Gigli and Savare Ambrosio et al., 2006.

Proof

By the cyclic-monotonicity characterization of quadratic optimality, π\pi is concentrated on a cc-cyclically monotone set Γ\Gamma for c(x,y)=xy2c(x,y)=\norm{x-y}^2. This means that every finite cycle (xi,yi)i=1mΓ(x_i,y_i)_{i=1}^m\subset\Gamma satisfies

i=1mxi,yii=1mxi,yi+1,ym+1=y1.\sum_{i=1}^m\dotp{x_i}{y_i} \geq \sum_{i=1}^m\dotp{x_i}{y_{i+1}}, \qquad y_{m+1}=y_1.

After changing the disintegration on an α\alpha-negligible set, πx\pi_x is supported on the section Γx={y:(x,y)Γ}\Gamma_x=\{y:(x,y)\in\Gamma\} for α\alpha-almost every xx. Choose x1,,xmx_1,\ldots,x_m in this full-measure set and independently sample YiπxiY_i\sim\pi_{x_i}. Applying the cyclic inequality to (xi,Yi)(x_i,Y_i) and taking expectations gives

i=1mxi,Tˉπ(xi)i=1mxi,Tˉπ(xi+1).\sum_{i=1}^m\dotp{x_i}{\bar T_\pi(x_i)} \geq \sum_{i=1}^m\dotp{x_i}{\bar T_\pi(x_{i+1})}.

Thus (Id,Tˉπ)α(\Id,\bar T_\pi)_\sharp\alpha is concentrated on a cyclically monotone graph. By the cyclic-monotonicity characterization of quadratic optimality, this plan is optimal between its two marginals.

Weak Transport Costs

Weak transport costs use the same disintegration but allow the objective to depend on the whole conditional law, or on summaries such as the barycentric projection (142). The framework was introduced through general transport costs and weak transport inequalities, with existence, duality and optimality conditions developed on Polish spaces Gozlan et al., 2017Backhoff Veraguas et al., 2019. For a weak cost C:X×P(Y)R{+}C:\Xx\times\mathcal P(\Yy)\to\RR\cup\{+\infty\}, the weak OT value is

WOTC(α,β):=infπΠ(α,β)C(x,πx)dα(x).\WOT_C(\alpha,\beta) \eqdef \inf_{\pi\in\Couplings(\alpha,\beta)} \int C(x,\pi_x)\d\alpha(x).

The classical Kantorovich problem is recovered when C(x,ν)=c(x,y)dν(y)C(x,\nu)=\int c(x,y)\d\nu(y), because the objective then becomes c(x,y)dπ(x,y)\int c(x,y)\d\pi(x,y). The genuinely weak behavior starts when CC is nonlinear in ν\nu.

Proof

The definition of gCg^C gives

C(x,πx)gC(x)+g(y)dπx(y).C(x,\pi_x)\geq g^C(x)+\int g(y)\d\pi_x(y).

Integration and the second-marginal constraint prove weak duality. For the converse, lift a kernel xπxx\mapsto\pi_x to α(dx)δπx(dν)\alpha(\d x)\delta_{\pi_x}(\d\nu) on X×P(Y)\Xx\times\mathcal P(\Yy). Relaxing the graph constraint gives probability measures PP whose first marginal is α\alpha and whose intensity satisfies

X×P(Y)νdP(x,ν)=β.\int_{\Xx\times\mathcal P(\Yy)}\nu\,\d P(x,\nu)=\beta.

This relaxation leaves the value unchanged. Disintegrate P(dx,dν)=Px(dν)α(dx)P(\d x,\d\nu)=P_x(\d\nu)\alpha(\d x) and replace PxP_x by its barycenter νˉx=νdPx(ν)\bar\nu_x=\int\nu\,\d P_x(\nu). The intensity is preserved and convexity of C(x,)C(x,\cdot) cannot increase the objective. The relaxed feasible set is compact and its integral objective is lower semicontinuous. Fenchel--Rockafellar duality for the affine intensity constraint therefore has no gap. Its continuous multiplier is gC(Y)g\in C(\Yy); minimization in ν\nu gives gC(x)g^C(x) and the constraint contributes gdβ\int g\d\beta. See Backhoff Veraguas et al., 2019 for the Polish-space formulation.

Proof

Let π\pi be any coupling and disintegrate it as πxα\pi_x\alpha. By Jensen’s inequality,

xTˉπ(x)2xy2dπx(y).\norm{x-\bar T_\pi(x)}^2 \leq \int\norm{x-y}^2\d\pi_x(y).

Integrating in xx gives Cbar(x,πx)dα(x)xy2dπ(x,y)\int C_{\mathrm{bar}}(x,\pi_x)\d\alpha(x)\leq \int\norm{x-y}^2\d\pi(x,y). Taking the infimum over π\pi proves the claim.

Figure Div separates the full conditional coupling from its barycentric projection, making explicit which part of each conditional law is retained by the weak cost.

<IPython.core.display.Image object>

Weak barycentric transport on a small disk-to-annulus coupling. The left panel shows the full conditional laws: each red source atom splits its mass among several blue target atoms, with segment thickness proportional to transported mass. The right panel collapses each conditional law πx\pi_x to its barycenter Tˉπ(x)=ydπx(y)\bar T_\pi(x)=\int y\d\pi_x(y), shown in violet. The barycentric weak cost only sees the red-to-violet displacement, and therefore ignores the conditional spread around each barycenter.

The interactive demo lets each source point split toward several targets. Increasing the split count or spread usually increases the full quadratic cost while the weak barycentric cost can remain much smaller.

Interactive panel. Use the spread and barycentric controls to compare full weak conditional laws with their barycentric projections.

The barycentric cost is the canonical example to keep in mind: admissibility still constrains the full conditional laws to have second marginal β\beta, but the objective only charges the displacement from xx to Tˉπ(x)\bar T_\pi(x) and ignores the conditional variance around this barycenter. This connects weak OT with martingale transport, Strassen-type convex-order constraints, barycentric projections and learning problems where conditional averages are meaningful objects.

Martingale Optimal Transport

Martingale OT is the extreme barycentric version of the weak viewpoint: a source point may split randomly, but the average destination must remain equal to the source point. This turns the barycentric projection from an object used in the cost into a hard constraint.

The terminology comes from probability: if (X,Y)π(X,Y)\sim\pi, then (153) is exactly E[YX]=X\mathbb E[Y|X]=X. Hence martingale OT is a Kantorovich problem with the usual two marginal constraints plus a barycentric constraint on the conditional laws. Equivalently, the barycentric projected coupling (Id,Tˉπ)α(\Id,\bar T_\pi)_\sharp\alpha must be the diagonal coupling (Id,Id)α(\Id,\Id)_\sharp\alpha. This is stronger than merely asking the projected target (Tˉπ)α(\bar T_\pi)_\sharp\alpha to equal α\alpha, since a nontrivial measure-preserving map could have the same projected marginal without satisfying Tˉπ(x)=x\bar T_\pi(x)=x pointwise. Martingale OT is central in robust finance, where one transports today prices to tomorrow prices without introducing drift, and has led to a rich martingale transport theory Beiglböck et al., 2013Galichon et al., 2014Dolinsky & Soner, 2014Guo & Obłój, 2019.

Stochastic Orders

The admissibility of constrained couplings is governed by stochastic order. The basic principle is that inequalities tested against a class of functions are equivalent to the existence of couplings satisfying a pointwise or conditional constraint. Strassen’s theorem is the canonical result of this kind Strassen, 1965.

Proof

A coupling supported on xyx\leq y immediately gives the integral inequality for every increasing φ\varphi. Conversely, testing approximate indicators of intervals (t,+)(t,+\infty) gives Fα(t)Fβ(t)F_\alpha(t)\geq F_\beta(t) for all continuity points of the distribution functions. If UU is uniform on (0,1)(0,1) and Fα1,Fβ1F_\alpha^{-1},F_\beta^{-1} are the generalized quantiles, then X=Fα1(U)X=F_\alpha^{-1}(U) and Y=Fβ1(U)Y=F_\beta^{-1}(U) have laws α\alpha and β\beta, and the inequality between distribution functions gives XYX\leq Y almost surely.

Convex Order and Martingale Feasibility

For martingale OT, the pointwise order constraint is replaced by a barycentric constraint on conditional laws. The corresponding order is the convex order. For α,βP1(Rd)\alpha,\beta\in\Pp_1(\RR^d),

αcxβφdαφdβfor every convex φ for which both integrals are defined.\alpha\preceq_{\mathrm{cx}}\beta \quad\Longleftrightarrow\quad \int\varphi\,\d\alpha\leq\int\varphi\,\d\beta \quad\text{for every convex }\varphi\text{ for which both integrals are defined}.

For finite-first-moment measures, it is enough to test continuous convex functions with at most linear growth. Testing affine functions gives equality of means, while the remaining convex tests say that β\beta is more spread out than α\alpha. Strassen’s martingale theorem says that this spread condition is exactly what is needed to realize β\beta from α\alpha by mean-preserving randomization.

Proof

If π\pi is a martingale coupling, then Jensen’s inequality gives, for every convex φ\varphi,

φ(x)=φ ⁣(ydπx(y))φ(y)dπx(y),\varphi(x) = \varphi\!\left(\int y\d\pi_x(y)\right) \leq \int \varphi(y)\d\pi_x(y),

and integration in xx gives φdαφdβ\int\varphi\d\alpha\leq\int\varphi\d\beta.

Conversely, assume αcxβ\alpha\preceq_{\mathrm{cx}}\beta. First suppose both measures are supported in a compact convex set KK. Separate β\beta from the closed convex set of probability measures on KK reachable from α\alpha by martingale kernels supported in KK. If β\beta were not in this set, a continuous separating function ψ:KR\psi:K\to\RR would satisfy

ψdβ>sup{ψdη:ηP(K),  Πmart(α,η)}.\int\psi\d\beta > \sup\left\{\int\psi\d\eta:\eta\in\mathcal P(K),\; \Couplings_{\mathrm{mart}}(\alpha,\eta)\neq\emptyset\right\}.

For fixed xKx\in K, optimizing over probability measures on KK with barycenter xx gives the concave envelope concKψ(x)\operatorname{conc}_K\psi(x). Thus the right-hand side is concKψdα\int\operatorname{conc}_K\psi\d\alpha. Convex order is equivalently the reverse inequality for concave functions, so

concKψdαconcKψdβψdβ,\int\operatorname{conc}_K\psi\d\alpha \geq \int\operatorname{conc}_K\psi\d\beta \geq \int\psi\d\beta,

a contradiction. For general measures in P1(Rd)\mathcal P_1(\RR^d), the same separation argument is carried out in the W1\Wass_1 topology, whose continuous test functions have at most linear growth. Compactness is replaced by tightness and uniform integrability of first moments; these properties also make the set of attainable second marginals closed and preserve the martingale constraint under limits. This is the standard extension in Strassen’s theorem Strassen, 1965.

The same theorem gives an exact geometric description of the barycentric weak cost: weak OT transports to the closest measure below β\beta in convex order.

Proof

Let (X,Y)πΠ(α,β)(X,Y)\sim\pi\in\Couplings(\alpha,\beta), set Z=E[YX]Z=\mathbb E[Y\mid X], and denote its law by η\eta. Conditional Jensen shows ηcxβ\eta\preceq_{\mathrm{cx}}\beta, while (X,Z)(X,Z) couples α\alpha and η\eta. Hence

W22(α,η)EXZ2=Cbar(x,πx)dα(x).\Wass_2^2(\alpha,\eta) \leq\mathbb E\norm{X-Z}^2 =\int C_{\mathrm{bar}}(x,\pi_x)\d\alpha(x).

Conversely, fix ηcxβ\eta\preceq_{\mathrm{cx}}\beta. Strassen’s theorem gives a martingale coupling from η\eta to β\beta. Glue it conditionally to an optimal coupling (X,Z)(X,Z) between α\alpha and η\eta. Then E[YX]=E[ZX]\mathbb E[Y\mid X]=\mathbb E[Z\mid X], and conditional Jensen gives

EXE[YX]2EXZ2=W22(α,η).\mathbb E\norm{X-\mathbb E[Y\mid X]}^2 \leq\mathbb E\norm{X-Z}^2 =\Wass_2^2(\alpha,\eta).

Taking the two infima proves the identity; see Backhoff Veraguas et al., 2019 for existence and finer structure of the projected measure.

Theorem Theorem: Strassen’s Martingale Theorem explains why convex order is the right admissibility notion for martingale OT: it is exactly the feasibility condition for the martingale constraint. If α̸cxβ\alpha\not\preceq_{\mathrm{cx}}\beta, then Πmart(α,β)=\Couplings_{\mathrm{mart}}(\alpha,\beta)=\emptyset and the martingale OT value is ++\infty, independently of the cost. If αcxβ\alpha\preceq_{\mathrm{cx}}\beta, then the optimization problem is nonempty and the cost selects, among all mean-preserving splittings of each source point, the martingale coupling best adapted to the application. This is the probabilistic meaning of the barycentric constraint: mass may branch, but it cannot drift on average.

For Gaussian measures with the same mean, convex order reduces to the Loewner order on covariance matrices:

N(m,Σ0)cxN(m,Σ1)Σ1Σ00.\mathcal N(m,\Sigma_0)\preceq_{\mathrm{cx}}\mathcal N(m,\Sigma_1) \quad\Longleftrightarrow\quad \Sigma_1-\Sigma_0\succeq0 .

Indeed, if Σ1Σ00\Sigma_1-\Sigma_0\succeq0, then N(m,Σ1)\mathcal N(m,\Sigma_1) is obtained from N(m,Σ0)\mathcal N(m,\Sigma_0) by adding independent centered Gaussian noise. Conversely, testing the convex quadratic functions xu,x2x\mapsto\langle u,x\rangle^2 gives the Loewner inequality.

Figure Div gives a discrete non-Gaussian counterpart: centered conditional kernels provide a feasible martingale plan, while optimizing the transport cost selects a much sparser plan with the same marginals and barycentric constraint.

<IPython.core.display.Image object>

A discrete one-dimensional martingale OT example. The source α\alpha is a red Gaussian mixture on a grid. A first feasible plan is generated by centered kernels Ki(yj)=κi(yjxi)K_i(y_j)=\kappa_i(y_j-x_i), whose discrete barycenter is xix_i. Keeping the same marginals, the third panel solves the martingale OT linear program with row, column, and constraints j(yjxi)Pij=0\sum_j(y_j-x_i)P_{ij}=0. The optimized plan is much sparser, while both plans have the identity barycentric projection.

Interactive panel. Change the space-varying kernel width and source skew to see how centered conditional kernels create a more spread target while preserving barycentric centering.

References
  1. Agueh, M., & Carlier, G. (2011). Barycenters in the Wasserstein space. SIAM Journal on Mathematical Analysis, 43(2), 904–924.
  2. Carlier, G., & Ekeland, I. (2010). Matching for teams. Economic Theory, 42(2), 397–418.
  3. Anderes, E., Borgwardt, S., & Miller, J. (2016). Discrete Wasserstein barycenters: optimal transport for discrete data. Mathematical Methods of Operations Research, 84(2), 389–409.
  4. Álvarez Esteban, P. C., del Barrio, E., Cuesta-Albertos, J., & Matrán, C. (2016). A fixed-point approach to barycenters in Wasserstein space. Journal of Mathematical Analysis and Applications, 441(2), 744–762. 10.1016/j.jmaa.2016.04.045
  5. Le Gouic, T., & Loubes, J.-M. (2016). Existence and consistency of Wasserstein barycenters. Probability Theory and Related Fields, 168, 901–917.
  6. Bhatia, R., Jain, T., & Lim, Y. (2019). On the Bures–Wasserstein distance between positive definite matrices. Expositiones Mathematicae, 37(2), 165–191. 10.1016/j.exmath.2018.01.002
  7. Rüschendorf, L., & Uckelmann, L. (2002). On the n-coupling problem. Journal of Multivariate Analysis, 81(2), 242–258.
  8. Herman, G. (1980). Image Reconstruction from Projections: the Fundamentals of Computerized Tomography. Academic Press.
  9. Bonneel, N., Rabin, J., Peyré, G., & Pfister, H. (2015). Sliced and Radon Wasserstein barycenters of measures. Journal of Mathematical Imaging and Vision, 51(1), 22–45.
  10. Cramér, H., & Wold, H. (1936). Some Theorems on Distribution Functions. Journal of the London Mathematical Society, s1-11(4), 290–294. 10.1112/jlms/s1-11.4.290
  11. Cuturi, M., & Doucet, A. (2014). Fast computation of Wasserstein barycenters. Proceedings of the 31st International Conference on Machine Learning, 32, 685–693. https://proceedings.mlr.press/v32/cuturi14.html
  12. Cuturi, M., & Peyré, G. (2016). A smoothed dual approach for variational Wasserstein problems. SIAM Journal on Imaging Sciences, 9(1), 320–343.
  13. Benamou, J.-D., Carlier, G., Cuturi, M., Nenna, L., & Peyré, G. (2015). Iterative Bregman projections for regularized transportation problems. SIAM Journal on Scientific Computing, 37(2), A1111–A1138.
  14. Solomon, J., De Goes, F., Peyré, G., Cuturi, M., Butscher, A., Nguyen, A., Du, T., & Guibas, L. (2015). Convolutional Wasserstein distances: efficient optimal transportation on geometric domains. ACM Transactions on Graphics, 34(4), 66:1-66:11.
  15. Bigot, J., & Klein, T. (2018). Characterization of barycenters in the Wasserstein space by averaging optimal transport maps. ESAIM: Probability and Statistics, 22, 35–57. 10.1051/ps/2017020