Gradient Flows

Eleven ideas from the theory of gradient flows, first in metric spaces and then in the Wasserstein space of probability measures, ending with the heat and Fokker–Planck equations as gradient flows of entropy. Run the schemes, drag the points, edit the histograms, draw a density, then check yourself with concept questions and practice problems.

Follows the chapter order of L. Ambrosio, N. Gigli and G. Savaré, Gradient Flows in Metric Spaces and in the Space of Probability Measures (Birkhäuser, Lectures in Mathematics ETH Zürich, 2005). Modules 1–4 follow Part I (Chapters 1–4) and modules 5–11 follow Part II (Chapters 5–11); the technical appendix (Chapter 12) is not covered. Chapter numbers refer to that book; the questions and examples here are written for this page.

InteractiveAmbrosio–Gigli–Savaré, Ch. 1: Curves and Gradients in Metric Spaces

Curves of maximal slope

In ℝd\R^d a gradient flow is u′=−∇φ(u)u'=-\nabla\varphi(u), an equation between vectors. A metric space has no vectors, but it still has speeds and slopes. The surprise is that one scalar inequality between speed, slope and energy already contains the whole equation.

The idea

Metric derivative. A curve u:(a,b)→Su:(a,b)\to S in a metric space (S,d)(S,d) is absolutely continuous if d(u(s),u(t))≤∫stm(r)drd(u(s),u(t))\le\int_s^t m(r)\,dr for some m∈L1(a,b)m\in L^1(a,b) and all s<ts<t. For such curves the limit
|u′|(t)=limh→0⁡d(u(t+h),u(t))|h||u'|(t)=\lim_{h\to0}\frac{d(u(t+h),u(t))}{|h|}
exists for almost every tt, and it is the smallest admissible mm. It is the speed of the curve; there is no velocity vector.
Local slope. For φ:S→(−∞,+∞]\varphi:S\to(-\infty,+\infty] and vv with φ(v)<∞\varphi(v)<\infty,
|∂φ|(v)=lim supw→v⁡(φ(v)−φ(w))+d(v,w).|\partial\varphi|(v)=\limsup_{w\to v}\frac{\big(\varphi(v)-\varphi(w)\big)^+}{d(v,w)}.
It is the steepest rate of descent from vv. For a C1C^1 function on ℝd\R^d it equals |∇φ(v)||\nabla\varphi(v)|, but it needs no differentiability.

In ℝd\R^d, the chain rule and two elementary inequalities give, along any smooth curve,

−ddtφ(u)=−⟨∇φ(u),u′⟩≤|∇φ(u)||u′|≤12|u′|2+12|∇φ(u)|2.-\frac{d}{dt}\varphi(u) = -\langle\nabla\varphi(u),u'\rangle \le |\nabla\varphi(u)|\,|u'| \le \tfrac12|u'|^2+\tfrac12|\nabla\varphi(u)|^2 .

Equality in Cauchy–Schwarz forces u′u' to point along −∇φ-\nabla\varphi; equality in Young's inequality forces |u′|=|∇φ||u'|=|\nabla\varphi|. Together: u′=−∇φ(u)u'=-\nabla\varphi(u). So the gradient flow is exactly the curve that makes the energy fall as fast as this bound allows.

Curve of maximal slope. An absolutely continuous uu along which φ∘u\varphi\circ u is nonincreasing and
φ(u(s))−φ(u(t)) ≥ 12∫st|u′|2(r)dr+12∫st|∂φ|2(u(r))dr(s≤t).\varphi(u(s))-\varphi(u(t)) \ \ge\ \frac12\int_s^t|u'|^2(r)\,dr+\frac12\int_s^t|\partial\varphi|^2(u(r))\,dr \qquad(s\le t).
(Ch. 1 allows any upper gradient gg in place of |∂φ||\partial\varphi|.)
Energy dissipation equality. If the slope is a strong upper gradient, meaning |φ(u(t))−φ(u(s))|≤∫st|∂φ|(u)|u′|dr|\varphi(u(t))-\varphi(u(s))|\le\int_s^t|\partial\varphi|(u)\,|u'|\,dr along every absolutely continuous curve, then the inequality above is automatically an equality. For φ∈C1(ℝd)\varphi\in C^1(\R^d), curves of maximal slope are exactly the solutions of u′=−∇φ(u)u'=-\nabla\varphi(u).

Below, the curve follows u′=αRθ(−∇φ(u))u'=\alpha R_\theta(-\nabla\varphi(u)): the true gradient flow sped up by α\alpha and turned by an angle θ\theta. Compare the energy it loses with the right-hand side.

Explore

Energy φ
the curve uu on [0,T][0,T] true gradient flow · drag the start point
energy lost φ(u0)−φ(u(t))\varphi(u_0)-\varphi(u(t)) 12∫0t|u′|2+12∫0t|∇φ(u)|2\tfrac12\int_0^t|u'|^2+\tfrac12\int_0^t|\nabla\varphi(u)|^2

Worked example

Take S=ℝS=\R and the nonsmooth energy φ(x)=|x|\varphi(x)=|x|. Which curves starting at u0=1u_0=1 are curves of maximal slope?

  1. Compute the local slope |∂φ|(x)|\partial\varphi|(x) at every xx, including x=0x=0.

    For x≠0x\neq0, φ\varphi is differentiable with |φ′(x)|=1|\varphi'(x)|=1, so the slope is 1. At x=0x=0: (φ(0)−φ(w))+=(−|w|)+=0\big(\varphi(0)-\varphi(w)\big)^+=(-|w|)^+=0 for every ww, so |∂φ|(0)=0|\partial\varphi|(0)=0. The minimum has slope zero even though φ\varphi has a corner there.

  2. Check that u(t)=(1−t)+u(t)=(1-t)^+ satisfies the energy inequality on [0,t][0,t], first for t≤1t\le1 and then for t>1t>1.

    For t≤1t\le1: energy lost =1−(1−t)=t=1-(1-t)=t; speed 1 and slope 1 give 12t+12t=t\tfrac12 t+\tfrac12 t=t. Equality.

    For t>1t>1: energy lost =1=1; the integrals are 12⋅1+12⋅1=1\tfrac12\cdot1+\tfrac12\cdot1=1, because after time 1 both speed and slope are zero. Equality again.

  3. Try the curve that moves twice as fast, u(t)=(1−2t)+u(t)=(1-2t)^+, on [0,12][0,\tfrac12].

    Energy lost =1=1. Right side: 12∫01/24dr+12∫01/21dr=1+14=54>1\tfrac12\int_0^{1/2}4\,dr+\tfrac12\int_0^{1/2}1\,dr=1+\tfrac14=\tfrac54>1. The inequality fails: going faster costs more in 12|u′|2\tfrac12|u'|^2 than it gains in energy.

  4. What about the curve that never moves, u≡1u\equiv1?

    Energy lost =0=0, but the slope term is 12∫0t1dr=t/2>0\tfrac12\int_0^t1\,dr=t/2>0. It fails too. The slope term is what forces the curve to move; the speed term is what stops it moving too fast. Only (1−t)+(1-t)^+ balances them, and it is exactly the solution of the differential inclusion u′∈−∂|u|u'\in-\partial|u|.

Check your understanding

Give ℝ2\R^2 the ℓ1\ell^1 distance d(x,y)=|x1−y1|+|x2−y2|d(x,y)=|x_1-y_1|+|x_2-y_2|. What is the metric derivative of u(t)=(t,t)u(t)=(t,t)?

  1. 2\sqrt2That is the Euclidean speed. The metric derivative is computed with the distance you are given.
  2. 22
  3. 11Each coordinate moves at speed 1, and the ℓ1\ell^1 distance adds the two.
d(u(t+h),u(t))=|h|+|h|=2|h|d(u(t+h),u(t))=|h|+|h|=2|h|, so |u′|(t)=2|u'|(t)=2. Speeds, and so curves of maximal slope, depend on the metric. In Part II the metric will be the Wasserstein distance, and changing the metric is exactly what turns one PDE into another.

In ℝd\R^d, a curve satisfies φ(u(s))−φ(u(t))=∫st|u′||∇φ(u)|dr\varphi(u(s))-\varphi(u(t))=\int_s^t|u'|\,|\nabla\varphi(u)|\,dr for all s≤ts\le t (speed times slope, instead of the two half-squares). Must it solve u′=−∇φ(u)u'=-\nabla\varphi(u)?

  1. Yes, this is the energy identity.Try u′=−2∇φ(u)u'=-2\nabla\varphi(u): the energy falls at rate 2|∇φ|2=|u′||∇φ|2|\nabla\varphi|^2=|u'|\,|\nabla\varphi|.
  2. No. It forces u′u' to point along −∇φ-\nabla\varphi, but not the speed.
  3. No. It does not even fix the direction.Equality in Cauchy–Schwarz, −⟨∇φ,u′⟩=|∇φ||u′|-\langle\nabla\varphi,u'\rangle=|\nabla\varphi||u'|, does force u′u' to be a nonnegative multiple of −∇φ-\nabla\varphi.
Any reparametrisation of a gradient-flow trajectory passes this test. Replacing |u′||∇φ||u'||\nabla\varphi| by 12|u′|2+12|∇φ|2\tfrac12|u'|^2+\tfrac12|\nabla\varphi|^2 adds equality in Young's inequality, |u′|=|∇φ||u'|=|\nabla\varphi|, which fixes the speed. In the explorer, α≠1\alpha\neq1 with θ=0\theta=0 is exactly this situation.

On ℝ\R, let φ(x)=−|x|\varphi(x)=-|x|. What is |∂φ|(0)|\partial\varphi|(0)?

  1. 00, since 00 is a critical point.The slope measures descent. From 00 you can go down at rate 1 in either direction.
  2. 11
  3. Undefined, since φ\varphi is not differentiable at 0.The slope is a limsup of difference quotients and is defined at every point of the domain.
(φ(0)−φ(w))+/|w|=|w|/|w|=1\big(\varphi(0)-\varphi(w)\big)^+/|w|=|w|/|w|=1. So the constant curve at 00 is not a curve of maximal slope (it loses no energy but pays 12∫1\tfrac12\int 1). Curves of maximal slope from 00 leave at speed 1, to the left or to the right: they exist, but they are not unique. Uniqueness needs convexity, which is the subject of Chapter 4.

Practice

The inequality implies the equationThe smooth case in ℝd\R^d

Let φ∈C1(ℝd)\varphi\in C^1(\R^d) and let uu be absolutely continuous on [0,T][0,T] with φ(u(0))−φ(u(T))≥12∫0T|u′|2+12∫0T|∇φ(u)|2\varphi(u(0))-\varphi(u(T))\ge\tfrac12\int_0^T|u'|^2+\tfrac12\int_0^T|\nabla\varphi(u)|^2. Show that u′=−∇φ(u)u'=-\nabla\varphi(u) almost everywhere.

Hint

Write φ(u(0))−φ(u(T))=−∫0T⟨∇φ(u),u′⟩dt\varphi(u(0))-\varphi(u(T))=-\int_0^T\langle\nabla\varphi(u),u'\rangle\,dt and compare integrands.

Solution

Pointwise, −⟨∇φ(u),u′⟩≤12|u′|2+12|∇φ(u)|2-\langle\nabla\varphi(u),u'\rangle\le\tfrac12|u'|^2+\tfrac12|\nabla\varphi(u)|^2, with equality iff u′=−∇φ(u)u'=-\nabla\varphi(u) (expand 12|u′+∇φ(u)|2≥0\tfrac12|u'+\nabla\varphi(u)|^2\ge0). Integrating, the hypothesis says the integral of the nonnegative function 12|u′+∇φ(u)|2\tfrac12|u'+\nabla\varphi(u)|^2 is ≤0\le0. So it vanishes almost everywhere.

A space with no moving curvesThe snowflake metric

On ℝ\R put d(x,y)=|x−y|1/2d(x,y)=|x-y|^{1/2}. Show that every absolutely continuous curve u:[a,b]→(ℝ,d)u:[a,b]\to(\R,d) is constant. What does that say about gradient flows in this space?

Hint

From |u(t)−u(s)|1/2≤∫stm|u(t)-u(s)|^{1/2}\le\int_s^t m, get |u(t)−u(s)|≤(∫stm)2|u(t)-u(s)|\le\big(\int_s^tm\big)^2, and sum over a fine partition.

Solution

Split [a,b][a,b] into intervals IkI_k. Then

|u(b)−u(a)|≤∑k(∫Ikm)2≤(maxk⁡∫Ikm)∫abm,|u(b)-u(a)|\le\sum_k\Big(\int_{I_k}m\Big)^2\le\Big(\max_k\int_{I_k}m\Big)\int_a^bm,
and the maximum tends to 0 as the mesh shrinks, since m∈L1m\in L^1. So u(b)=u(a)u(b)=u(a), and likewise on every subinterval. The only curves of maximal slope are constants, at points of zero slope. A metric theory of gradient flows needs a space with many rectifiable curves; the Wasserstein space will have plenty.

InteractiveAmbrosio–Gigli–Savaré, Ch. 2: Existence of Curves of Maximal Slope and their Variational Approximation

Minimizing movements

To build a gradient flow where there are no gradients, take small steps, each of which lowers the energy without moving too far. This is implicit Euler written as a minimization problem, and it makes sense in any metric space.

The idea

One step. For a step size τ>0\tau>0 and a point uu, minimize
Φ(τ,u;v)=φ(v)+d2(u,v)2τ.\Phi(\tau,u;v)=\varphi(v)+\frac{d^2(u,v)}{2\tau}.
A discrete solution starts at U0=u0U^0=u_0 and picks UnU^n among the minimizers of Φ(τ,Un−1;⋅)\Phi(\tau,U^{n-1};\cdot). Interpolating piecewise constantly in time gives a curve U‾τ\bar U_\tau.
Minimizing movement. A curve uu is a generalized minimizing movement if U‾τk(t)→u(t)\bar U_{\tau_k}(t)\to u(t) for some sequence τk↓0\tau_k\downarrow0 and every tt. ("Generalized" because the minimizers, and the limits, need not be unique.)

In ℝd\R^d with smooth φ\varphi the minimizer satisfies Un−Un−1τ=−∇φ(Un)\dfrac{U^n-U^{n-1}}{\tau}=-\nabla\varphi(U^n): this is implicit Euler. For convex nonsmooth φ\varphi it reads Un−1−Unτ∈∂φ(Un)\dfrac{U^{n-1}-U^n}{\tau}\in\partial\varphi(U^n). Comparing with v=Un−1v=U^{n-1} gives, for free, the discrete energy inequality

φ(Un)+d2(Un,Un−1)2τ≤φ(Un−1).\varphi(U^n)+\frac{d^2(U^n,U^{n-1})}{2\tau}\le\varphi(U^{n-1}).

Existence (Ch. 2). If φ\varphi is lower semicontinuous, bounded below on bounded sets in a suitable sense, and its sublevels are (relatively) compact, then discrete solutions exist and generalized minimizing movements exist. If moreover the relaxed slope |∂−φ||\partial^-\varphi| (a lower semicontinuous relaxation of |∂φ||\partial\varphi|) is a strong upper gradient, every one of them is a curve of maximal slope for it and satisfies the energy dissipation equality (Theorem 2.3.3; Theorem 2.3.1 reaches the same conclusion, without the equality, from a weaker chain rule plus a continuity condition on φ\varphi).
The convex case. If φ\varphi is λ\lambda-convex along geodesics, the slope is lower semicontinuous and a strong upper gradient, so the theorem applies directly. Chapter 4 adds uniqueness and error bounds, under a slightly stronger convexity assumption (Module 4) that holds, for instance, in Hilbert spaces; for λ≥0\lambda\ge0, d(UN,u(Nτ))≤τ|∂φ|(u0)/2d(U^N,u(N\tau))\le\tau\,|\partial\varphi|(u_0)/\sqrt2.
Explicit Euler is not an option. Un=Un−1−τ∇φ(Un−1)U^n=U^{n-1}-\tau\nabla\varphi(U^{n-1}) needs a vector to step along, and even in ℝ\R it is unstable for stiff or nonsmooth φ\varphi. The explorer runs both.

Explore

Energy φ
minimizing movement explicit Euler · dashed: Φ(τ,U0;⋅)\Phi(\tau,U^0;\cdot) · drag u0u_0
exact gradient flow UnU^n explicit, against time t=nτt=n\tau

Worked example

Run the minimizing-movement scheme for φ(x)=|x|\varphi(x)=|x| on ℝ\R from u0=1u_0=1, and compare it with explicit Euler using the subgradient sign⁡(x)\operatorname{sign}(x).

  1. Solve one step: minimize |v|+(v−a)22τ|v|+\dfrac{(v-a)^2}{2\tau} for given a>0a>0.

    The optimality condition is a−vτ∈∂|v|\dfrac{a-v}{\tau}\in\partial|v|. If v>0v>0 this says v=a−τv=a-\tau, which is consistent when a>τa>\tau. If v=0v=0 it says a/τ∈[−1,1]a/\tau\in[-1,1], i.e. a≤τa\le\tau. So

    Un=max⁡(Un−1−τ,0)(soft thresholding).U^n=\max\big(U^{n-1}-\tau,\,0\big)\quad\text{(soft thresholding).}
  2. Write out UnU^n from u0=1u_0=1 and compare it with the exact flow u(t)=(1−t)+u(t)=(1-t)^+ from the previous module.

    Un=(1−nτ)+=u(nτ)U^n=(1-n\tau)^+=u(n\tau). The scheme is exact at the grid times, and in particular it lands on the minimum and stays there.

  3. Now explicit Euler with τ=0.3\tau=0.3: Un=Un−1−0.3sign⁡(Un−1)U^n=U^{n-1}-0.3\,\operatorname{sign}(U^{n-1}). What happens?

    1, 0.7, 0.4, 0.1, −0.2, 0.1, −0.2,…1,\ 0.7,\ 0.4,\ 0.1,\ -0.2,\ 0.1,\ -0.2,\dots It never settles: it oscillates around the minimum with amplitude of order τ\tau, and φ(Un)\varphi(U^n) goes up on every other step.

  4. Check the discrete energy inequality for the implicit step when a>τa>\tau.

    φ(Un)+|Un−a|22τ=(a−τ)+τ2=a−τ2≤a=φ(a)\varphi(U^n)+\dfrac{|U^n-a|^2}{2\tau}=(a-\tau)+\dfrac{\tau}{2}=a-\dfrac\tau2\le a=\varphi(a). The energy drops by at least the "kinetic" term d2/2τd^2/2\tau, which is the discrete version of 12∫|u′|2\tfrac12\int|u'|^2.

Check your understanding

For φ(x)=12x2\varphi(x)=\tfrac12x^2 on ℝ\R, what is one minimizing-movement step from xx?

  1. x/(1+τ)x/(1+\tau)
  2. x(1−τ)x(1-\tau)That is explicit Euler. Set the derivative of 12v2+(v−x)2/2τ\tfrac12v^2+(v-x)^2/2\tau to zero.
  3. xe−τx e^{-\tau}That is the exact flow after time τ\tau, which the scheme only approximates.
v+(v−x)/τ=0v+(v-x)/\tau=0 gives v=x/(1+τ)v=x/(1+\tau). After n=t/τn=t/\tau steps, x(1+t/n)−n→xe−tx(1+t/n)^{-n}\to xe^{-t}. Note 1/(1+τ)∈(0,1)1/(1+\tau)\in(0,1) for every τ>0\tau>0: the scheme never overshoots, unlike 1−τ1-\tau, which overshoots for τ>1\tau>1 and diverges for τ>2\tau>2.

Why is the minimizing-movement scheme, and not explicit Euler, the right starting point in a metric space?

  1. It only uses φ\varphi and dd; there is no vector −∇φ-\nabla\varphi to step along.
  2. It is more accurate.Both are first-order methods. The point is that one of them can be written down at all.
  3. Its minimizer is always unique.Not for nonconvex φ\varphi: see the next question. That is why the theory speaks of generalized minimizing movements.
Φ(τ,u;v)=φ(v)+d2(u,v)/2τ\Phi(\tau,u;v)=\varphi(v)+d^2(u,v)/2\tau is meaningful in any metric space. Its stability (the discrete energy inequality) also gives the compactness needed to pass to the limit, which is the content of Chapters 2 and 3.

Double well φ(x)=14(x2−1)2\varphi(x)=\tfrac14(x^2-1)^2, start at u0=0u_0=0 (a local maximum), step τ=2\tau=2. What is U1U^1?

  1. 00, since φ′(0)=0\varphi'(0)=0.Compare values: Φ(2,0;0)=14\Phi(2,0;0)=\tfrac14, while Φ(2,0;1/2)=116+18=316\Phi(2,0;1/\sqrt2)=\tfrac1{16}+\tfrac18=\tfrac3{16}.
  2. Either 1/21/\sqrt2 or −1/2-1/\sqrt2: there are two minimizers and the scheme must choose.
  3. 11, the bottom of a well.At v=1v=1, Φ=0+14=14\Phi=0+\tfrac14=\tfrac14, which is beaten by v=1/2v=1/\sqrt2.
The derivative of Φ\Phi is v(v2−1+1/τ)v(v^2-1+1/\tau). For τ<1\tau<1 its only zero is v=0v=0, and Φ\Phi is convex, so the scheme stays at 0 like the exact flow. For τ>1\tau>1 the minimizers are ±1−1/τ\pm\sqrt{1-1/\tau}. Try it in the explorer: drag u0u_0 to 0 and move τ\tau across 1.

Practice

A discrete Hölder estimateWhere compactness comes from

Let φ≥φmin⁡\varphi\ge\varphi_{\min} and UnU^n be a discrete solution. Show that ∑nd2(Un,Un−1)≤2τ(φ(u0)−φmin⁡)\sum_n d^2(U^n,U^{n-1})\le2\tau\,(\varphi(u_0)-\varphi_{\min}), and deduce d(Um,Un)≤2(φ(u0)−φmin⁡)|m−n|τd(U^m,U^n)\le\sqrt{2(\varphi(u_0)-\varphi_{\min})}\,\sqrt{|m-n|\tau}.

Hint

Sum the discrete energy inequality (it telescopes), then use Cauchy–Schwarz on ∑k=n+1md(Uk,Uk−1)\sum_{k=n+1}^m d(U^k,U^{k-1}).

Solution

Summing d2(Uk,Uk−1)/2τ≤φ(Uk−1)−φ(Uk)d^2(U^k,U^{k-1})/2\tau\le\varphi(U^{k-1})-\varphi(U^k) gives the first bound. Then

d(Um,Un)≤∑k=n+1md(Uk,Uk−1)≤m−n(∑kd2)1/2≤m−n2τ(φ(u0)−φmin⁡).d(U^m,U^n)\le\sum_{k=n+1}^m d(U^k,U^{k-1})\le\sqrt{m-n}\,\Big(\sum_k d^2\Big)^{1/2}\le\sqrt{m-n}\,\sqrt{2\tau(\varphi(u_0)-\varphi_{\min})}.
Since |m−n|τ|m-n|\tau is the time elapsed, the discrete curves are uniformly 12\tfrac12-Hölder, which (with compact sublevels) gives a convergent subsequence by an Arzelà–Ascoli argument.

A concave energyWhen does a step exist?

Let φ(x)=−12x2\varphi(x)=-\tfrac12x^2 on ℝ\R. For which τ\tau does Φ(τ,a;⋅)\Phi(\tau,a;\cdot) have a minimizer? Compute UnU^n and its limit as τ=t/n→0\tau=t/n\to0.

Solution

Φ=−12v2+(v−a)2/2τ\Phi=-\tfrac12v^2+(v-a)^2/2\tau has leading coefficient 12(1/τ−1)\tfrac12(1/\tau-1). It is bounded below, with the unique minimizer v=a/(1−τ)v=a/(1-\tau), exactly when τ<1\tau<1; for τ≥1\tau\ge1 it is unbounded below (or, at τ=1\tau=1 with a≠0a\neq0, linear). So Un=a(1−τ)−n→aetU^n=a(1-\tau)^{-n}\to ae^{t}, the exact flow of u′=uu'=u. The restriction τ<1/(−λ)\tau<1/(-\lambda) with λ=−1\lambda=-1 is the one that appears for λ\lambda-convex energies in Chapter 4.

InteractiveAmbrosio–Gigli–Savaré, Ch. 3: Proofs of the Convergence Theorems

The Moreau–Yosida envelope

The value of one minimizing-movement step, seen as a function of the starting point, is a smoothed version of the energy. How it changes with τ\tau is the key to the convergence proof: it turns the discrete energy inequality into a discrete energy identity.

The idea

Moreau–Yosida approximation.
φτ(u)=infv∈S⁡(φ(v)+d2(u,v)2τ),\varphi_\tau(u)=\inf_{v\in S}\Big(\varphi(v)+\frac{d^2(u,v)}{2\tau}\Big),
and Jτ[u]J_\tau[u] is the set of minimizers uτu_\tau. Taking v=uv=u shows φτ≤φ\varphi_\tau\le\varphi; the penalty shrinks as τ\tau grows, so τ↦φτ(u)\tau\mapsto\varphi_\tau(u) is nonincreasing, and φτ(u)↑φ(u)\varphi_\tau(u)\uparrow\varphi(u) as τ↓0\tau\downarrow0 when φ\varphi is lower semicontinuous (under the standing compactness assumptions).

The picture: lower the downward parabola v↦c−d2(u,v)/2τv\mapsto c-d^2(u,v)/2\tau until it touches the graph of φ\varphi. The highest cc that stays below φ\varphi is φτ(u)\varphi_\tau(u), and the touching points are Jτ[u]J_\tau[u].

Derivative in τ\tau. For almost every τ\tau,
ddτφτ(u)=−d2(u,uτ)2τ2.\frac{d}{d\tau}\varphi_\tau(u)=-\frac{d^2(u,u_\tau)}{2\tau^2}.
Slope estimate. For every uτ∈Jτ[u]u_\tau\in J_\tau[u],
|∂φ|(uτ)≤d(u,uτ)τ.|\partial\varphi|(u_\tau)\le\frac{d(u,u_\tau)}{\tau}.
In words: the endpoint of a step has slope at most the discrete speed of that step.

Integrate the derivative from 00 to τ\tau and use the slope estimate along the family ur∈Jr[u]u_r\in J_r[u], 0<r≤τ0<r\le\tau (De Giorgi's variational interpolation). One step then satisfies

φ(u)−φ(uτ)=d2(u,uτ)2τ+∫0τd2(u,ur)2r2dr ≥ d2(u,uτ)2τ+12∫0τ|∂φ|2(ur)dr,\varphi(u)-\varphi(u_\tau)=\frac{d^2(u,u_\tau)}{2\tau}+\int_0^\tau\frac{d^2(u,u_r)}{2r^2}\,dr\ \ge\ \frac{d^2(u,u_\tau)}{2\tau}+\frac12\int_0^\tau|\partial\varphi|^2(u_r)\,dr,

the discrete counterpart of the energy inequality of Module 1, with both the speed and the slope terms. Passing to the limit in it is the heart of Chapter 3.

Explore

Energy φ
φ\varphi φτ\varphi_\tau parabola touching at uτu_\tau · drag u
r↦φr(u)r\mapsto\varphi_r(u) slope −d2(u,uτ)/2τ2-d^2(u,u_\tau)/2\tau^2 at r=τr=\tau

Worked example

Compute JτJ_\tau and φτ\varphi_\tau for φ(x)=|x|\varphi(x)=|x| on ℝ\R, and check the derivative formula and the slope estimate by hand.

  1. What is Jτ[x]J_\tau[x]? (You solved this in the previous module.)

    Soft thresholding: xτ=sign⁡(x)max⁡(|x|−τ,0)x_\tau=\operatorname{sign}(x)\max(|x|-\tau,0).

  2. Compute φτ(x)\varphi_\tau(x).

    If |x|≤τ|x|\le\tau, xτ=0x_\tau=0 and φτ(x)=x2/2τ\varphi_\tau(x)=x^2/2\tau. If |x|>τ|x|>\tau, φτ(x)=(|x|−τ)+τ2/2τ=|x|−τ/2\varphi_\tau(x)=(|x|-\tau)+\tau^2/2\tau=|x|-\tau/2. This is the Huber function: a parabola near the corner, joined to two lines. It is C1C^1 with φτ′(x)=(x−xτ)/τ\varphi_\tau'(x)=(x-x_\tau)/\tau.

  3. Check ddτφτ(x)=−|x−xτ|22τ2\dfrac{d}{d\tau}\varphi_\tau(x)=-\dfrac{|x-x_\tau|^2}{2\tau^2} in both regimes.

    For |x|>τ|x|>\tau: ddτ(|x|−τ/2)=−12\frac{d}{d\tau}(|x|-\tau/2)=-\tfrac12, and |x−xτ|=τ|x-x_\tau|=\tau gives −τ2/2τ2=−12-\tau^2/2\tau^2=-\tfrac12. For |x|<τ|x|<\tau: ddτx2/2τ=−x2/2τ2\frac{d}{d\tau}\,x^2/2\tau=-x^2/2\tau^2, and |x−xτ|=|x||x-x_\tau|=|x|. Both match.

  4. Check the slope estimate |∂φ|(xτ)≤|x−xτ|/τ|\partial\varphi|(x_\tau)\le|x-x_\tau|/\tau. When is it an equality?

    For |x|>τ|x|>\tau: slope at xτ≠0x_\tau\neq0 is 1, and |x−xτ|/τ=1|x-x_\tau|/\tau=1. Equality. For |x|≤τ|x|\le\tau: xτ=0x_\tau=0 has slope 0, while |x|/τ|x|/\tau can be up to 1. Strict inequality (unless |x|=τ|x|=\tau). The step ends at a point with less slope than its speed suggests; this slack is why Chapter 3 gets an inequality in general and needs extra structure for equality.

Check your understanding

Fix uu. How does φτ(u)\varphi_\tau(u) depend on τ\tau?

  1. It is nonincreasing in τ\tau, and tends to φ(u)\varphi(u) as τ↓0\tau\downarrow0 (for l.s.c. φ\varphi).
  2. It is nondecreasing in τ\tau.Larger τ\tau makes the penalty d2/2τd^2/2\tau smaller for every vv, so the infimum can only go down.
  3. It can go either way, depending on φ\varphi.The monotonicity holds for every φ\varphi: compare the two infima competitor by competitor.
For each fixed vv, φ(v)+d2(u,v)/2τ\varphi(v)+d^2(u,v)/2\tau decreases in τ\tau; an infimum of decreasing functions decreases. The derivative formula says more: the rate is exactly d2(u,uτ)/2τ2d^2(u,u_\tau)/2\tau^2, the squared discrete speed over 2.

A step from uu with τ=0.1\tau=0.1 lands at uτu_\tau with d(u,uτ)=0.3d(u,u_\tau)=0.3. What can you conclude in a general metric space?

  1. |∂φ|(uτ)≤3|\partial\varphi|(u_\tau)\le3
  2. |∂φ|(u)≤3|\partial\varphi|(u)\le3The estimate is at the endpoint uτu_\tau. At the start uu the slope can be anything; for the jump function in the explorer it can even be 00 at both ends.
  3. |∂φ|(uτ)=3|\partial\varphi|(u_\tau)=3Equality holds for C1C^1 energies in ℝd\R^d, where (u−uτ)/τ=∇φ(uτ)(u-u_\tau)/\tau=\nabla\varphi(u_\tau). In general only the inequality survives: see the worked example with |x|≤τ|x|\le\tau.
If ww is near uτu_\tau, minimality gives φ(uτ)−φ(w)≤(d2(u,w)−d2(u,uτ))/2τ≤d(uτ,w)(d(u,w)+d(u,uτ))/2τ\varphi(u_\tau)-\varphi(w)\le\big(d^2(u,w)-d^2(u,u_\tau)\big)/2\tau\le d(u_\tau,w)\,\big(d(u,w)+d(u,u_\tau)\big)/2\tau. Divide by d(uτ,w)d(u_\tau,w) and let w→uτw\to u_\tau.

φ\varphi is the jump function: 00 for x≤0x\le0 and 11 for x>0x>0. What is φτ(x)\varphi_\tau(x) for x>0x>0?

  1. min⁡(1, x2/2τ)\min\big(1,\ x^2/2\tau\big)
  2. 11You can also jump to v=0v=0, where φ=0\varphi=0, at cost x2/2τx^2/2\tau.
  3. x2/2τx^2/2\tauFor large xx it is cheaper to stay put and pay φ(x)=1\varphi(x)=1.
The only competitors worth considering are v=xv=x (value 1) and v=0v=0 (value x2/2τx^2/2\tau). The envelope is continuous even though φ\varphi is not; at x=2τx=\sqrt{2\tau} the minimizer jumps from 0 to xx and Jτ[x]J_\tau[x] has two points. Lower semicontinuity of φ\varphi (φ(0)=0\varphi(0)=0, not 1) is what makes v=0v=0 a minimizer at all.

Practice

The envelope of a quadraticEverything explicit

For φ(x)=a2x2\varphi(x)=\tfrac a2x^2 on ℝ\R with a>0a>0, compute xτx_\tau and φτ\varphi_\tau. Verify the derivative formula.

Solution

av+(v−x)/τ=0av+(v-x)/\tau=0 gives xτ=x/(1+aτ)x_\tau=x/(1+a\tau). Then

φτ(x)=a2x2(1+aτ)2+12τ(aτx1+aτ)2=a2x21+aτ.\varphi_\tau(x)=\frac a2\frac{x^2}{(1+a\tau)^2}+\frac{1}{2\tau}\Big(\frac{a\tau x}{1+a\tau}\Big)^2=\frac a2\,\frac{x^2}{1+a\tau}.
So ddτφτ=−a2x22(1+aτ)2\frac{d}{d\tau}\varphi_\tau=-\frac{a^2x^2}{2(1+a\tau)^2}, and |x−xτ|22τ2=(aτx)22τ2(1+aτ)2\frac{|x-x_\tau|^2}{2\tau^2}=\frac{(a\tau x)^2}{2\tau^2(1+a\tau)^2} is the same. The envelope is again quadratic, with the smaller coefficient a/(1+aτ)<1/τa/(1+a\tau)<1/\tau.

The discrete energy inequality with slopesDe Giorgi's interpolation

Assuming the derivative formula and φr(u)→φ(u)\varphi_r(u)\to\varphi(u) as r↓0r\downarrow0, prove

φ(u)−φ(uτ)≥d2(u,uτ)2τ+12∫0τ|∂φ|2(ur)dr\varphi(u)-\varphi(u_\tau)\ge\frac{d^2(u,u_\tau)}{2\tau}+\frac12\int_0^\tau|\partial\varphi|^2(u_r)\,dr
for any choice ur∈Jr[u]u_r\in J_r[u].

Hint

φτ(u)=φ(uτ)+d2(u,uτ)/2τ\varphi_\tau(u)=\varphi(u_\tau)+d^2(u,u_\tau)/2\tau. Write φ(u)−φτ(u)\varphi(u)-\varphi_\tau(u) as an integral in rr.

Solution

φ(u)−φτ(u)=∫0τd2(u,ur)2r2dr\varphi(u)-\varphi_\tau(u)=\int_0^\tau\frac{d^2(u,u_r)}{2r^2}dr by the derivative formula (r↦φr(u)r\mapsto\varphi_r(u) is monotone and locally Lipschitz on (0,∞)(0,\infty)). The slope estimate gives d2(u,ur)r2≥|∂φ|2(ur)\frac{d^2(u,u_r)}{r^2}\ge|\partial\varphi|^2(u_r). Substitute φτ(u)=φ(uτ)+d2(u,uτ)/2τ\varphi_\tau(u)=\varphi(u_\tau)+d^2(u,u_\tau)/2\tau and rearrange.

SimulationAmbrosio–Gigli–Savaré, Ch. 4: Uniqueness, Generation of Contraction Semigroups, Error Estimates

λ-convexity and contraction

Without convexity, gradient flows can split (Module 1, quiz 3). With λ\lambda-convexity they cannot: two flows drift apart at most like e−λte^{-\lambda t}, so the flow is unique and stable, and the minimizing-movement scheme converges with an explicit rate.

The idea

λ\lambda-convexity. φ\varphi is λ\lambda-convex along a constant-speed geodesic γ\gamma from v0v_0 to v1v_1 if
φ(γt)≤(1−t)φ(v0)+tφ(v1)−λ2t(1−t)d2(v0,v1).\varphi(\gamma_t)\le(1-t)\varphi(v_0)+t\varphi(v_1)-\frac\lambda2t(1-t)\,d^2(v_0,v_1).
In ℝd\R^d, for C2C^2 functions this means ∇2φ≥λI\nabla^2\varphi\ge\lambda I. λ\lambda may be negative: 14(x2−1)2\tfrac14(x^2-1)^2 is (−1)(-1)-convex.
Assumption of Ch. 4. Any two points are joined by some curve along which v↦Φ(τ,w;v)v\mapsto\Phi(\tau,w;v) is (1/τ+λ)(1/\tau+\lambda)-convex, for every base point ww and 0<τ<1/λ−0<\tau<1/\lambda^-. It holds for λ\lambda-convex φ\varphi on Hilbert spaces and on nonpositively curved spaces. In the Wasserstein space it holds along generalized geodesics (Module 9).
Evolution variational inequality (EVI). Under that assumption, with SS complete and φ\varphi proper, lower semicontinuous and coercive (bounded below as in Ch. 2), for every u0u_0 in the closure of the domain the scheme converges to a unique curve uu, and uu is characterised by
12ddtd2(u(t),v)+λ2d2(u(t),v)≤φ(v)−φ(u(t))for all v.\frac12\frac{d}{dt}d^2(u(t),v)+\frac\lambda2d^2(u(t),v)\le\varphi(v)-\varphi(u(t))\qquad\text{for all }v.
Contraction and error. Two solutions satisfy d(u(t),w(t))≤e−λtd(u0,w0)d(u(t),w(t))\le e^{-\lambda t}d(u_0,w_0). For λ≥0\lambda\ge0 and constant step τ\tau, the discrete solution obeys d(UN,u(Nτ))≤τ|∂φ|(u0)/2d(U^N,u(N\tau))\le\tau|\partial\varphi|(u_0)/\sqrt2, and d2≤τ(φ(u0)−inf⁡φ)d^2\le\tau\,(\varphi(u_0)-\inf\varphi) if only φ(u0)<∞\varphi(u_0)<\infty.

In ℝd\R^d the EVI is the first-order form of λ\lambda-convexity, φ(v)≥φ(u)+⟨∇φ(u),v−u⟩+λ2|v−u|2\varphi(v)\ge\varphi(u)+\langle\nabla\varphi(u),v-u\rangle+\tfrac\lambda2|v-u|^2, with −∇φ(u)=u′-\nabla\varphi(u)=u' substituted. Its advantage is that it involves only distances and energies, and it still makes sense when φ\varphi has corners.

Explore

Energy φ on ℝ²
flow from p flow from q · drag the start points, then run
d(u(t),w(t))d(u(t),w(t)) bound e−λtd(u0,w0)e^{-\lambda t}d(u_0,w_0)

Worked example

Prove the contraction estimate for a C2C^2 function φ\varphi on ℝd\R^d with ∇2φ≥λI\nabla^2\varphi\ge\lambda I, and show it cannot be improved.

  1. What inequality does ∇2φ≥λI\nabla^2\varphi\ge\lambda I give for ∇φ(x)−∇φ(y)\nabla\varphi(x)-\nabla\varphi(y)?

    Integrate the Hessian along the segment: ∇φ(x)−∇φ(y)=∫01∇2φ(y+s(x−y))(x−y)ds\nabla\varphi(x)-\nabla\varphi(y)=\int_0^1\nabla^2\varphi(y+s(x-y))\,(x-y)\,ds, so

    ⟨∇φ(x)−∇φ(y),x−y⟩≥λ|x−y|2.\langle\nabla\varphi(x)-\nabla\varphi(y),\,x-y\rangle\ge\lambda|x-y|^2.

  2. Let u,wu,w be two gradient flows. Differentiate 12|u−w|2\tfrac12|u-w|^2.

    ddt12|u−w|2=⟨u′−w′,u−w⟩=−⟨∇φ(u)−∇φ(w),u−w⟩≤−λ|u−w|2.\frac{d}{dt}\frac12|u-w|^2=\langle u'-w',u-w\rangle=-\langle\nabla\varphi(u)-\nabla\varphi(w),u-w\rangle\le-\lambda|u-w|^2.
  3. Conclude.

    With D=|u−w|2D=|u-w|^2, D′≤−2λDD'\le-2\lambda D, so (e2λtD)′≤0(e^{2\lambda t}D)'\le0 and |u(t)−w(t)|≤e−λt|u0−w0||u(t)-w(t)|\le e^{-\lambda t}|u_0-w_0|. For λ>0\lambda>0 the flows merge; for λ=0\lambda=0 they never separate; for λ<0\lambda<0 they may separate, but at a controlled rate, which is still enough for uniqueness.

  4. Show the bound is sharp.

    For φ(x)=λ2|x|2\varphi(x)=\tfrac\lambda2|x|^2 the flow is u(t)=e−λtu0u(t)=e^{-\lambda t}u_0, so |u(t)−w(t)|=e−λt|u0−w0||u(t)-w(t)|=e^{-\lambda t}|u_0-w_0| exactly. In the explorer, the saddle with both points on a vertical line shows equality with λ=−1\lambda=-1.

Check your understanding

What is the largest λ\lambda for which φ(x,y)=x2+y4\varphi(x,y)=x^2+y^4 is λ\lambda-convex on ℝ2\R^2?

  1. λ=2\lambda=2That is the xx-direction. In the yy-direction the second derivative 12y212y^2 vanishes at y=0y=0.
  2. λ=0\lambda=0
  3. None: φ\varphi is not convex.Both terms are convex functions, so φ\varphi is convex.
∇2φ=diag⁡(2,12y2)\nabla^2\varphi=\operatorname{diag}(2,12y^2), whose smallest eigenvalue has infimum 0. So flows contract (weakly) but nothing forces exponential convergence in yy: indeed y′=−4y3y'=-4y^3 decays only like t−1/2t^{-1/2}.

φ\varphi is convex (λ=0\lambda=0) but has corners, like |x|+12y2|x|+\tfrac12y^2. Two flows start at distance 1. After time 5 their distance is

  1. at most 1.
  2. exactly 1.Contraction is an upper bound. In the corner example, two points on the same side of the corner come together as they stick to it.
  3. possibly more than 1, because of the corners.The EVI needs no smoothness: convexity alone gives contraction. Try the corner in the explorer.
The EVI holds for every convex φ\varphi (for |x||x| the flow is soft thresholding, which is 1-Lipschitz), and EVI implies contraction. Corners can only make trajectories merge, never cross.

For the saddle 12(x2−y2)\tfrac12(x^2-y^2) (λ=−1\lambda=-1), what does the theory give?

  1. d(u(t),w(t))≤etd(u0,w0)d(u(t),w(t))\le e^{t}d(u_0,w_0): flows separate at most exponentially, so they are still unique.
  2. Nothing: uniqueness needs λ≥0\lambda\ge0.Any real λ\lambda gives uniqueness. Non-uniqueness needs a failure of semiconvexity, like −|x|-|x| at the origin.
  3. The distance still decreases.Two points separated vertically move apart like ete^{t}.
If u0=w0u_0=w_0 the bound gives d(u(t),w(t))≤et⋅0=0d(u(t),w(t))\le e^{t}\cdot0=0. Semiconvexity, λ∈ℝ\lambda\in\R, is all that uniqueness needs. Compare −|x|-|x|, whose slope jumps at the top and which is not λ\lambda-convex for any λ\lambda.

Practice

Exponential decay of the energyλ > 0 and the Łojasiewicz inequality

Let φ∈C1(ℝd)\varphi\in C^1(\R^d) be λ\lambda-convex with λ>0\lambda>0 and minimizer u‾\bar u. Show φ(u)−φ(u‾)≤|∇φ(u)|2/2λ\varphi(u)-\varphi(\bar u)\le|\nabla\varphi(u)|^2/2\lambda, and deduce φ(u(t))−φ(u‾)≤e−2λt(φ(u0)−φ(u‾))\varphi(u(t))-\varphi(\bar u)\le e^{-2\lambda t}\big(\varphi(u_0)-\varphi(\bar u)\big).

Hint

Minimize the right side of φ(v)≥φ(u)+⟨∇φ(u),v−u⟩+λ2|v−u|2\varphi(v)\ge\varphi(u)+\langle\nabla\varphi(u),v-u\rangle+\tfrac\lambda2|v-u|^2 over vv.

Solution

The minimum over vv of the right side is φ(u)−|∇φ(u)|2/2λ\varphi(u)-|\nabla\varphi(u)|^2/2\lambda, and the left side is at least φ(u‾)\varphi(\bar u). Along the flow, ddt(φ(u)−φ(u‾))=−|∇φ(u)|2≤−2λ(φ(u)−φ(u‾))\frac{d}{dt}(\varphi(u)-\varphi(\bar u))=-|\nabla\varphi(u)|^2\le-2\lambda(\varphi(u)-\varphi(\bar u)), and Gronwall finishes.

Step size and convexityWhen is one step convex?

For the double well φ(x)=14(x2−1)2\varphi(x)=\tfrac14(x^2-1)^2, find the best λ\lambda, and the range of τ\tau for which Φ(τ,a;⋅)\Phi(\tau,a;\cdot) is strictly convex for every aa. Relate this to quiz 3 of Module 2.

Solution

φ′′(x)=3x2−1≥−1\varphi''(x)=3x^2-1\ge-1, so λ=−1\lambda=-1. Φ′′=3v2−1+1/τ≥1/τ−1\Phi''=3v^2-1+1/\tau\ge1/\tau-1. For τ<1=1/(−λ)\tau<1=1/(-\lambda) this is bounded below by a positive constant; at τ=1\tau=1, Φ′′=3v2\Phi''=3v^2 vanishes only at v=0v=0, so Φ\Phi is still strictly convex; for τ>1\tau>1, Φ′′(0)<0\Phi''(0)<0. So the range is τ≤1\tau\le1, and for such τ\tau every step has exactly one minimizer, so the scheme is well defined. At τ=2\tau=2, outside this range, the step from 00 had two minimizers.

InteractiveAmbrosio–Gigli–Savaré, Ch. 5: Preliminary Results on Measure Theory

Push-forwards and narrow convergence

Part II moves from points to probability measures. Two tools carry most of the weight: pushing a measure forward through a map (how mass is moved), and narrow convergence (how measures are compared in the limit).

The idea

Push-forward. For a Borel map T:X→YT:X\to Y and μ∈𝒫(X)\mu\in\mathscr P(X), T#μ(B)=μ(T−1(B))T_\#\mu(B)=\mu(T^{-1}(B)). Equivalently ∫fd(T#μ)=∫f∘Tdμ\displaystyle\int f\,d(T_\#\mu)=\int f\circ T\,d\mu for bounded Borel ff.
Change of variables. If μ=ρℒd\mu=\rho\,\mathcal L^d and TT is injective and differentiable (approximate differentiability suffices, Ch. 5.5) with det⁡∇T>0\det\nabla T>0, then
T#μ=ρdet⁡∇T∘T−1ℒdon T(X).T_\#\mu=\frac{\rho}{\det\nabla T}\circ T^{-1}\;\mathcal L^d\quad\text{on }T(X).
In one dimension: T#μT_\#\mu has density ∑x:T(x)=yρ(x)/|T′(x)|\sum_{x:\,T(x)=y}\rho(x)/|T'(x)|, and a flat piece of TT creates an atom.
Narrow convergence. μn→μ\mu_n\to\mu narrowly if ∫fdμn→∫fdμ\int f\,d\mu_n\to\int f\,d\mu for every bounded continuous ff. Prokhorov: on a complete separable metric space, a family is relatively compact for narrow convergence iff it is tight: for each ε\varepsilon there is a compact KK with μ(X∖K)<ε\mu(X\smallsetminus K)<\varepsilon for all members.
Uniformly integrable moments. limR→∞⁡supn⁡∫|x|>R|x|pdμn=0\lim_{R\to\infty}\sup_n\int_{|x|>R}|x|^p\,d\mu_n=0. Narrow convergence plus this is exactly convergence in the Wasserstein distance WpW_p (Ch. 7). Without it, a vanishing amount of mass can run off far enough to keep the distance large.

Chapter 5 also covers disintegration (writing a plan on X×YX\times Y as a family of conditional measures γx\gamma_x) and when plans converging narrowly implies maps converging; those reappear in the next two modules.

Explore

Start from a map
source μ\mu (along xx) map TT · drag the knots up and down
density of T#μT_\#\mu atoms (mass written above)

Worked example

Let μn=(1−1n)δ0+1nδxn\mu_n=(1-\tfrac1n)\delta_0+\tfrac1n\delta_{x_n} on ℝ\R with xn→∞x_n\to\infty. Decide when μn→δ0\mu_n\to\delta_0, and in what sense.

  1. Show μn→δ0\mu_n\to\delta_0 narrowly, whatever xnx_n is.

    For bounded continuous ff, ∫fdμn=(1−1n)f(0)+1nf(xn)\int f\,d\mu_n=(1-\tfrac1n)f(0)+\tfrac1nf(x_n), and |f(xn)|/n≤‖f‖∞/n→0|f(x_n)|/n\le\|f\|_\infty/n\to0. So the integrals converge to f(0)f(0).

  2. Take xn=nx_n=n. Compute ∫|x|dμn\int|x|\,d\mu_n and ∫|x|2dμn\int|x|^2\,d\mu_n.

    ∫|x|dμn=1\int|x|\,d\mu_n=1 and ∫|x|2dμn=n\int|x|^2\,d\mu_n=n, while δ0\delta_0 has both equal to 0. The moments do not converge: the escaping mass 1/n1/n carries a fixed amount of first moment to infinity, so the moments are not uniformly integrable.

  3. The only plan from μn\mu_n to δ0\delta_0 sends everything to 0. Compute W1(μn,δ0)W_1(\mu_n,\delta_0) and W2(μn,δ0)W_2(\mu_n,\delta_0) for xn=nx_n=n.

    W1=1n⋅n=1W_1=\tfrac1n\cdot n=1 and W2=(1n⋅n2)1/2=nW_2=\big(\tfrac1n\cdot n^2\big)^{1/2}=\sqrt n. Neither tends to 0, even though the narrow limit is δ0\delta_0.

  4. For which powers xn=nax_n=n^a does W2(μn,δ0)→0W_2(\mu_n,\delta_0)\to0?

    W22=n2a−1→0W_2^2=n^{2a-1}\to0 iff a<12a<\tfrac12. At a=12a=\tfrac12 it stays equal to 1: narrow convergence holds, W2W_2 convergence fails, and the second moments are bounded but not uniformly integrable.

Check your understanding

Does δ1/n\delta_{1/n} converge narrowly to δ0\delta_0?

  1. Yes.
  2. No: δ1/n({0})=0\delta_{1/n}(\{0\})=0 for every nn, but δ0({0})=1\delta_0(\{0\})=1.Narrow convergence asks about integrals of continuous functions, not about the mass of every set. Mass may pile up on the boundary of a set in the limit.
f(1/n)→f(0)f(1/n)\to f(0) for every continuous ff. The general rule (Portmanteau): lim sup⁡μn(C)≤μ(C)\limsup\mu_n(C)\le\mu(C) for closed CC and lim inf⁡μn(U)≥μ(U)\liminf\mu_n(U)\ge\mu(U) for open UU. Here {0}\{0\} is closed and 0≤10\le1.

μ\mu is uniform on [−1,1][-1,1] and T(x)=x2T(x)=x^2. What is the density of T#μT_\#\mu on (0,1](0,1]?

  1. 12y\dfrac{1}{2\sqrt y}
  2. 14y\dfrac{1}{4\sqrt y}Each yy has two preimages, ±y\pm\sqrt y, and both contribute.
  3. 11 (uniform)TT compresses intervals near 00 (its derivative vanishes there), so mass piles up near y=0y=0.
Each preimage contributes ρ(x)/|T′(x)|=12/(2y)\rho(x)/|T'(x)|=\tfrac12/(2\sqrt y), and there are two. Check: ∫01dy2y=1\int_0^1\frac{dy}{2\sqrt y}=1. The "Fold" preset in the explorer shows the same sum over preimages.

Which sequence in 𝒫(ℝ)\mathscr P(\R) has no narrowly convergent subsequence?

  1. δ(−1)n\delta_{(-1)^n}It is tight (all mass in [−1,1][-1,1]); the even and odd subsequences converge.
  2. 12δ0+12δn\tfrac12\delta_0+\tfrac12\delta_n
  3. the Gaussians N(0,1/n)N(0,1/n)They converge to δ0\delta_0.
Half the mass escapes to infinity, so the family is not tight. A narrow limit would have to give mass 12\tfrac12 to {0}\{0\} and nothing elsewhere, which is not a probability measure. Prokhorov's theorem says tightness is exactly what is missing.

Practice

Affine images of GaussiansPush-forward in practice

Show that if μ=N(m,σ2)\mu=N(m,\sigma^2) on ℝ\R and T(x)=ax+bT(x)=ax+b with a≠0a\neq0, then T#μ=N(am+b,a2σ2)T_\#\mu=N(am+b,a^2\sigma^2).

Solution

By change of variables, T#μT_\#\mu has density ρ((y−b)/a)/|a|=12π|a|σexp⁡(−(y−b−am)22a2σ2)\rho\big((y-b)/a\big)/|a|=\frac{1}{\sqrt{2\pi}|a|\sigma}\exp\!\big(-\frac{(y-b-am)^2}{2a^2\sigma^2}\big). Every pair of Gaussians on ℝ\R is linked by such a map with a=σ1/σ0>0a=\sigma_1/\sigma_0>0; in Module 7 you will see it is the optimal one.

Moments are lower semicontinuousTruncation

Show that if μn→μ\mu_n\to\mu narrowly, then ∫|x|2dμ≤lim infn⁡∫|x|2dμn\int|x|^2\,d\mu\le\liminf_n\int|x|^2\,d\mu_n. Give an example with strict inequality.

Hint

min⁡(|x|2,R)\min(|x|^2,R) is bounded and continuous.

Solution

∫min⁡(|x|2,R)dμ=limn⁡∫min⁡(|x|2,R)dμn≤lim infn⁡∫|x|2dμn\int\min(|x|^2,R)\,d\mu=\lim_n\int\min(|x|^2,R)\,d\mu_n\le\liminf_n\int|x|^2\,d\mu_n. Let R→∞R\to\infty and use monotone convergence. The worked example with xn=nx_n=\sqrt n gives 0<10<1.

InteractiveAmbrosio–Gigli–Savaré, Ch. 6: The Optimal Transportation Problem

Optimal transport

Moving one distribution of mass onto another costs something; the cheapest way to do it is the optimal transport problem. Optimal plans are recognised by a simple local test: no small rearrangement of who goes where can save anything.

The idea

Monge and Kantorovich. Monge: minimize ∫c(x,T(x))dμ\int c(x,T(x))\,d\mu over maps with T#μ=νT_\#\mu=\nu. Such maps may not exist (μ=δ0\mu=\delta_0, ν=12δ−1+12δ1\nu=\tfrac12\delta_{-1}+\tfrac12\delta_1). Kantorovich relaxes to plans:
min⁡{∫cdγ: γ∈Γ(μ,ν)},Γ(μ,ν)={γ∈𝒫(X×Y): π#1γ=μ, π#2γ=ν}.\min\Big\{\int c\,d\gamma:\ \gamma\in\Gamma(\mu,\nu)\Big\},\qquad\Gamma(\mu,\nu)=\{\gamma\in\mathscr P(X\times Y):\ \pi^1_\#\gamma=\mu,\ \pi^2_\#\gamma=\nu\}.
A minimizer exists for lower semicontinuous costs bounded below: Γ(μ,ν)\Gamma(\mu,\nu) is narrowly compact.
Cyclical monotonicity. A set Γ⊂X×Y\Gamma\subset X\times Y is cc-cyclically monotone if for all (x1,y1),…,(xn,yn)∈Γ(x_1,y_1),\dots,(x_n,y_n)\in\Gamma and permutations σ\sigma, ∑c(xi,yi)≤∑c(xi,yσ(i))\sum c(x_i,y_i)\le\sum c(x_i,y_{\sigma(i)}).
Optimality (Ch. 6.1). For a continuous cost with finite optimal cost (and a mild integrability bound on cc), a plan is optimal iff its support is cc-cyclically monotone; equivalently, iff Kantorovich's dual problem has a matching pair of potentials.
Brenier (the case c=|x−y|2c=|x-y|^2). If μ\mu is absolutely continuous on ℝd\R^d (and both measures have finite second moments), the optimal plan is unique and induced by a map T=∇ψT=\nabla\psi with ψ\psi convex. Chapter 6 extends this to "regular" μ\mu and to Hilbert spaces.

For quadratic cost, the two-point test reads ⟨x1−x2,y1−y2⟩≥0\langle x_1-x_2,\,y_1-y_2\rangle\ge0: the plan is monotone. For c=|x−y|c=|x-y|, optimality forces the segments of a matching not to cross (except in degenerate collinear configurations). For quadratic cost they can cross, but the moving particles never collide.

Explore

sources xix_i targets yjy_j pairs that a swap would improve · drag points; click a source, then a target, to re-pair
Cost
Matching shown

Worked example

Let μ\mu be uniform on [0,1][0,1] and ν\nu uniform on [1,2][1,2]. Two maps push μ\mu to ν\nu: the translation T(x)=x+1T(x)=x+1 and the flip S(x)=2−xS(x)=2-x. Which is optimal, for c=|x−y|c=|x-y| and for c=|x−y|2c=|x-y|^2?

  1. Compute both costs for c=|x−y|c=|x-y|.

    Translation: ∫011dx=1\int_0^1 1\,dx=1. Flip: ∫01|2−2x|dx=1\int_0^1|2-2x|\,dx=1. Equal.

  2. Show that no plan does better than 1 for c=|x−y|c=|x-y|.

    For any γ∈Γ(μ,ν)\gamma\in\Gamma(\mu,\nu), ∫|x−y|dγ≥∫(y−x)dγ=∫ydν−∫xdμ=32−12=1\int|x-y|\,d\gamma\ge\int(y-x)\,d\gamma=\int y\,d\nu-\int x\,d\mu=\tfrac32-\tfrac12=1. So both maps are optimal: with linear cost the optimal plan need not be unique.

  3. Now c=|x−y|2c=|x-y|^2. Compute both costs.

    Translation: 1. Flip: ∫01(2−2x)2dx=43\int_0^1(2-2x)^2\,dx=\tfrac43. The translation is cheaper.

  4. Show the translation is the unique optimal plan for c=|x−y|2c=|x-y|^2.

    By Jensen, ∫(y−x)2dγ≥(∫(y−x)dγ)2=1\int(y-x)^2\,d\gamma\ge\big(\int(y-x)\,d\gamma\big)^2=1, with equality iff y−xy-x is γ\gamma-a.e. constant, i.e. γ\gamma is concentrated on y=x+1y=x+1. That plan is the translation. Strict convexity of the cost is what buys uniqueness, and the optimal map is monotone, as the two-point test predicts.

Check your understanding

μ\mu and ν\nu are each uniform on nn points. Must an optimal Kantorovich plan split mass?

  1. No: some optimal plan is a permutation (a perfect matching).
  2. Yes, in general.The plans form a polytope of doubly stochastic matrices (divided by nn); a linear cost attains its minimum at a vertex, and the vertices are permutations.
  3. Only for quadratic cost is there an optimal permutation.The vertex argument works for any cost.
That is the Birkhoff–von Neumann theorem. It is why the explorer only searches over the 5!=1205!=120 matchings. With unequal numbers of points or unequal weights, splitting can be forced (see practice problem 2).

For c=|x−y|2c=|x-y|^2 on ℝd\R^d, when is pairing x1→y1, x2→y2x_1\to y_1,\ x_2\to y_2 no worse than swapping the targets?

  1. When ⟨x1−x2, y1−y2⟩≥0\langle x_1-x_2,\ y_1-y_2\rangle\ge0.
  2. When the segments [x1,y1][x_1,y_1] and [x2,y2][x_2,y_2] do not cross.Not crossing is what optimality forces for c=|x−y|c=|x-y|. Press "Crossing example": for squared cost the crossing pairing is the optimal one.
  3. When |x1−x2|≤|y1−y2||x_1-x_2|\le|y_1-y_2|.Expand both costs: the squared norms cancel and only inner products remain.
|x1−y1|2+|x2−y2|2−|x1−y2|2−|x2−y1|2=−2⟨x1−x2,y1−y2⟩|x_1-y_1|^2+|x_2-y_2|^2-|x_1-y_2|^2-|x_2-y_1|^2=-2\langle x_1-x_2,y_1-y_2\rangle. Monotonicity of the support is the discrete shadow of Brenier's theorem: the gradient of a convex function is a monotone map.

μ\mu is uniform on the unit disc and ν\nu uniform on the disc of radius 2, both centred at 0. Which map is optimal for c=|x−y|2c=|x-y|^2?

  1. T(x)=2xT(x)=2x
  2. T(x)=2RxT(x)=2Rx, RR a rotation by 90∘90^\circIt also pushes μ\mu to ν\nu, but it is not the gradient of a convex function. Its cost is ∫|2Rx−x|2dμ=5∫|x|2dμ\int|2Rx-x|^2d\mu=5\int|x|^2d\mu, versus ∫|x|2dμ\int|x|^2d\mu for 2x2x.
  3. There are many optimal maps.μ\mu is absolutely continuous, so Brenier's theorem gives uniqueness.
2x=∇(|x|2)2x=\nabla(|x|^2) and |x|2|x|^2 is convex, so by Brenier it is the optimal map. Its cost is ∫|x|2dμ=12\int|x|^2\,d\mu=\tfrac12.

Practice

Monotone means optimal on the lineThe two-point test in 1-D

On ℝ\R with c=|x−y|2c=|x-y|^2, show that a plan whose support satisfies the two-point test is monotone: if (x1,y1),(x2,y2)(x_1,y_1),(x_2,y_2) are in the support and x1<x2x_1<x_2, then y1≤y2y_1\le y_2. Why does this single out one plan?

Solution

The test says (x1−x2)(y1−y2)≥0(x_1-x_2)(y_1-y_2)\ge0, so x1<x2x_1<x_2 forces y1≤y2y_1\le y_2. A monotone plan sends the uu-th quantile of μ\mu to the uu-th quantile of ν\nu, for every u∈(0,1)u\in(0,1), which determines it: γ=(Fμ−1,Fν−1)#ℒ1|(0,1)\gamma=(F_\mu^{-1},F_\nu^{-1})_\#\mathcal L^1|_{(0,1)}. That is the formula behind the next module.

When mass must splitThree atoms to two

Let μ=13(δ0+δ1+δ2)\mu=\tfrac13(\delta_0+\delta_1+\delta_2) and ν=12(δ1/2+δ3/2)\nu=\tfrac12(\delta_{1/2}+\delta_{3/2}). Find the optimal plan for c=|x−y|2c=|x-y|^2 and its cost.

Hint

By the previous problem the plan is monotone: fill the targets from left to right.

Solution

0→120\to\tfrac12 with mass 13\tfrac13; the atom at 1 splits, 16\tfrac16 to 12\tfrac12 and 16\tfrac16 to 32\tfrac32; 2→322\to\tfrac32 with mass 13\tfrac13. Every move has length 12\tfrac12, so the cost is 14\tfrac14 and W2(μ,ν)=12W_2(\mu,\nu)=\tfrac12. No map can do this: T#μT_\#\mu for a map gives each target a multiple of 13\tfrac13.

Edit it yourselfAmbrosio–Gigli–Savaré, Ch. 7: The Wasserstein Distance and its Behaviour along Geodesics

The Wasserstein distance

The optimal cost turns the probability measures into a metric space, the space where Part II's gradient flows live. On the line everything is explicit: sort the mass, and compare quantiles.

The idea

Wasserstein distance. On 𝒫p(X)={μ:∫|x|pdμ<∞}\mathscr P_p(X)=\{\mu:\int|x|^p\,d\mu<\infty\},
Wp(μ,ν)=(minγ∈Γ(μ,ν)⁡∫|x−y|pdγ)1/p.W_p(\mu,\nu)=\Big(\min_{\gamma\in\Gamma(\mu,\nu)}\int|x-y|^p\,d\gamma\Big)^{1/p}.
It is a complete separable metric, and Wp(μn,μ)→0W_p(\mu_n,\mu)\to0 iff μn→μ\mu_n\to\mu narrowly with uniformly integrable pp-moments.
On the line. With F−1F^{-1} the quantile function, the monotone plan is optimal (Module 6) and
Wpp(μ,ν)=∫01|Fμ−1(u)−Fν−1(u)|pdu,W1(μ,ν)=∫ℝ|Fμ−Fν|dx.W_p^p(\mu,\nu)=\int_0^1\big|F_\mu^{-1}(u)-F_\nu^{-1}(u)\big|^p\,du,\qquad W_1(\mu,\nu)=\int_\R|F_\mu-F_\nu|\,dx.
Geodesics. If γ\gamma is optimal for W2(μ0,μ1)W_2(\mu_0,\mu_1), then μt=((1−t)π1+tπ2)#γ\mu_t=\big((1-t)\pi^1+t\pi^2\big)_\#\gamma is a constant-speed geodesic: W2(μs,μt)=|t−s|W2(μ0,μ1)W_2(\mu_s,\mu_t)=|t-s|\,W_2(\mu_0,\mu_1). This is displacement interpolation: every bit of mass travels along a straight line. On the line, Fμt−1=(1−t)Fμ0−1+tFμ1−1F_{\mu_t}^{-1}=(1-t)F_{\mu_0}^{-1}+tF_{\mu_1}^{-1}.
Mixtures are not geodesics. The linear interpolation (1−t)μ0+tμ1(1-t)\mu_0+t\mu_1 fades one measure out while the other fades in. W2((1−t)δ0+tδ1, δ0)=tW_2\big((1-t)\delta_0+t\delta_1,\ \delta_0\big)=\sqrt t, so this curve is not even Lipschitz in W2W_2.
Curvature (Ch. 7.3). 𝒫2(X)\mathscr P_2(X) is positively curved: along a geodesic, W22(μt,ν)≥(1−t)W22(μ0,ν)+tW22(μ1,ν)−t(1−t)W22(μ0,μ1)W_2^2(\mu_t,\nu)\ge(1-t)W_2^2(\mu_0,\nu)+tW_2^2(\mu_1,\nu)-t(1-t)W_2^2(\mu_0,\mu_1). On ℝ\R the quantile map is an isometry into L2(0,1)L^2(0,1), so 𝒫2(ℝ)\mathscr P_2(\R) is flat and equality holds.

Explore

Edit
Interpolation
μ0\mu_0 μ1\mu_1 μt\mu_t · click or drag on the bars to edit
Quantile functions F−1(u)F^{-1}(u). W22W_2^2 is the mean squared vertical gap, W1W_1 the shaded area.

Worked example

Let μ0\mu_0 be uniform on [0,1][0,1] and μ1\mu_1 uniform on [2,4][2,4]. Compute W2(μ0,μ1)W_2(\mu_0,\mu_1), the geodesic midpoint, and compare with the mixture midpoint ν=12μ0+12μ1\nu=\tfrac12\mu_0+\tfrac12\mu_1.

  1. Write down the quantile functions and W2(μ0,μ1)W_2(\mu_0,\mu_1).

    F0−1(u)=uF_0^{-1}(u)=u, F1−1(u)=2+2uF_1^{-1}(u)=2+2u. So W22=∫01(2+u)2du=4+2+13=193W_2^2=\int_0^1(2+u)^2\,du=4+2+\tfrac13=\tfrac{19}3, and W2≈2.517W_2\approx2.517.

  2. Find the displacement midpoint μ1/2\mu_{1/2} and check W2(μ0,μ1/2)=12W2(μ0,μ1)W_2(\mu_0,\mu_{1/2})=\tfrac12W_2(\mu_0,\mu_1).

    F1/2−1=12u+12(2+2u)=1+32uF_{1/2}^{-1}=\tfrac12u+\tfrac12(2+2u)=1+\tfrac32u: uniform on [1,2.5][1,2.5]. Then W22(μ0,μ1/2)=∫01(1+u2)2du=1912=14⋅193W_2^2(\mu_0,\mu_{1/2})=\int_0^1(1+\tfrac u2)^2du=\tfrac{19}{12}=\tfrac14\cdot\tfrac{19}3. The midpoint is a single interval of intermediate length, not two bumps.

  3. Find the quantile function of the mixture ν\nu.

    ν\nu has mass 12\tfrac12 spread on [0,1][0,1] and 12\tfrac12 on [2,4][2,4]. So Fν−1(u)=2uF_\nu^{-1}(u)=2u for u<12u<\tfrac12 and 4u4u for u>12u>\tfrac12.

  4. Is ν\nu on a geodesic between μ0\mu_0 and μ1\mu_1?

    W22(μ0,ν)=∫01/2u2du+∫1/219u2du=124+6324=83W_2^2(\mu_0,\nu)=\int_0^{1/2}u^2\,du+\int_{1/2}^1 9u^2\,du=\tfrac1{24}+\tfrac{63}{24}=\tfrac83, and W22(ν,μ1)=∫01/24du+∫1/21(2u−2)2du=2+16=136W_2^2(\nu,\mu_1)=\int_0^{1/2}4\,du+\int_{1/2}^1(2u-2)^2du=2+\tfrac16=\tfrac{13}6. Then W2(μ0,ν)+W2(ν,μ1)≈1.633+1.472=3.105>2.517W_2(\mu_0,\nu)+W_2(\nu,\mu_1)\approx1.633+1.472=3.105>2.517. The triangle inequality is strict, so ν\nu lies on no geodesic between them. Load the "Split" preset and compare the two modes.

Check your understanding

μ=12δ0+12δ2\mu=\tfrac12\delta_0+\tfrac12\delta_2 and ν=δ1\nu=\delta_1. What is W2(μ,ν)W_2(\mu,\nu)?

  1. 00, since they have the same mean.W2=0W_2=0 only for equal measures. Matching the mean is not enough.
  2. 11
  3. 2\sqrt2There is only one plan, and every unit of mass moves distance 1.
The only plan to a Dirac sends everything to it: W22=12⋅1+12⋅1=1W_2^2=\tfrac12\cdot1+\tfrac12\cdot1=1. In general W22(μ,δy)=∫|x−y|2dμW_2^2(\mu,\delta_y)=\int|x-y|^2d\mu, which is the variance when yy is the mean.

Along the mixture μt=(1−t)δ0+tδ1\mu_t=(1-t)\delta_0+t\delta_1, what is W2(μ0,μt)W_2(\mu_0,\mu_t)?

  1. t\sqrt t
  2. ttThat is W2W_2 along the displacement geodesic δt\delta_t, where all the mass moves a distance tt. Here mass tt moves distance 1.
  3. t2t^2The squared cost is t⋅12=tt\cdot 1^2=t, and W2W_2 is its square root, not its square.
The cost is t⋅12t\cdot1^2, so W2=tW_2=\sqrt t. The average speed t/t\sqrt t/t blows up as t→0t\to0. In fact W2(μs,μt)=|t−s|W_2(\mu_s,\mu_t)=\sqrt{|t-s|} for all s,ts,t, so the metric derivative is infinite everywhere and the mixture has infinite W2W_2-length on every time interval, while W1=tW_1=t is perfectly linear. Linear in the "vertical" sense (mass) and linear in the "horizontal" sense (position) are different notions.

ν\nu is μ\mu translated by a vector h∈ℝdh\in\R^d. What is W2(μ,ν)W_2(\mu,\nu)?

  1. |h||h|, for every μ\mu
  2. at most |h||h|, and smaller when μ\mu is spread outSome other plan might move mass less far on average? Jensen says no: ∫|x−y|2dγ≥|∫(x−y)dγ|2=|h|2\int|x-y|^2d\gamma\ge|\int(x-y)\,d\gamma|^2=|h|^2.
  3. it depends on the shape of μ\muThe lower bound from the means is attained by the translation itself, whatever μ\mu is.
The translation achieves |h|2|h|^2 and Jensen shows nothing beats it. In general W22(μ,ν)≥|mμ−mν|2W_2^2(\mu,\nu)\ge|m_\mu-m_\nu|^2, with equality iff ν\nu is a translate of μ\mu.

Practice

Gaussians on the lineA closed form

Show W22(N(m0,σ02),N(m1,σ12))=(m0−m1)2+(σ0−σ1)2W_2^2\big(N(m_0,\sigma_0^2),N(m_1,\sigma_1^2)\big)=(m_0-m_1)^2+(\sigma_0-\sigma_1)^2 on ℝ\R, and describe the geodesic.

Solution

Quantiles are mi+σiz(u)m_i+\sigma_iz(u) with z=Φ−1z=\Phi^{-1}, and ∫01zdu=0\int_0^1z\,du=0, ∫01z2du=1\int_0^1z^2du=1. So W22=∫((m0−m1)+(σ0−σ1)z)2du=(m0−m1)2+(σ0−σ1)2W_2^2=\int\big((m_0-m_1)+(\sigma_0-\sigma_1)z\big)^2du=(m_0-m_1)^2+(\sigma_0-\sigma_1)^2. The geodesic is N(mt,σt2)N(m_t,\sigma_t^2) with mtm_t and σt\sigma_t (the standard deviation, not the variance) affine in tt.

W1W_1 as an areaCDFs versus quantiles

Explain why ∫01|Fμ−1−Fν−1|du=∫ℝ|Fμ−Fν|dx\int_0^1|F_\mu^{-1}-F_\nu^{-1}|\,du=\int_\R|F_\mu-F_\nu|\,dx.

Solution

Both are the area of the region between the graphs of FμF_\mu and FνF_\nu in the (x,u)(x,u) plane: integrating horizontally slice by slice (fixed uu) gives the left side, vertically (fixed xx) the right side. The graph of F−1F^{-1} is the graph of FF reflected in the diagonal, with vertical jumps filled in. For p>1p>1 there is no such formula in terms of FF alone.

Animated lessonAmbrosio–Gigli–Savaré, Ch. 8: A.C. Curves in 𝒫p(X)\mathscr P_p(X) and the Continuity Equation

The continuity equation

A curve of probability measures moves because its mass moves, with some velocity field. Many velocity fields can produce the same curve; the cheapest one is a gradient, and its kinetic energy is the curve's speed in W2W_2. That makes the Wasserstein space look like a Riemannian manifold.

The idea

Continuity equation. ∂tμt+∇⋅(vtμt)=0\partial_t\mu_t+\nabla\cdot(v_t\mu_t)=0 in the sense of distributions:
ddt∫ϕdμt=∫⟨∇ϕ,vt⟩dμtfor all ϕ∈Cc∞(ℝd).\frac{d}{dt}\int\phi\,d\mu_t=\int\langle\nabla\phi,v_t\rangle\,d\mu_t\qquad\text{for all }\phi\in C_c^\infty(\R^d).
If vv is smooth, μt=(Xt)#μ0\mu_t=(X_t)_\#\mu_0 where XtX_t is the flow of vv: mass is carried along the trajectories.
Absolutely continuous curves (Ch. 8.3). A curve μt\mu_t in 𝒫p(ℝd)\mathscr P_p(\R^d) is absolutely continuous iff it solves the continuity equation for some vtv_t with ∫‖vt‖Lp(μt)dt<∞\int\|v_t\|_{L^p(\mu_t)}dt<\infty. Every such vv satisfies ‖vt‖Lp(μt)≥|μ′|(t)\|v_t\|_{L^p(\mu_t)}\ge|\mu'|(t), and there is one with equality for a.e. tt.
Tangent space (Ch. 8.4). For p=2p=2, the optimal vtv_t is the unique one in
Tanμ⁡𝒫2={∇ϕ:ϕ∈Cc∞}L2(μ).\operatorname{Tan}_{\mu}\mathscr P_2=\overline{\{\nabla\phi:\phi\in C_c^\infty\}}^{\,L^2(\mu)}.
Two fields give the same curve iff their difference ww satisfies ∇⋅(wμ)=0\nabla\cdot(w\mu)=0; removing that part only lowers the kinetic energy.
Benamou–Brenier. W22(μ0,μ1)=min⁡{∫01∫|vt|2dμtdt}\displaystyle W_2^2(\mu_0,\mu_1)=\min\Big\{\int_0^1\!\!\int|v_t|^2\,d\mu_t\,dt\Big\} over all solutions of the continuity equation joining μ0\mu_0 to μ1\mu_1. Minimizers move along geodesics with tangent velocity.

Watch

moved by v=av=a moved by v=a+cJ(x−mt)v=a+c\,J(x-m_t) · rings: density level sets of μt\mu_t
  1. A probability measure μ0\mu_0: a Gaussian, drawn as a sample of particles with its density level sets.
  2. Move every particle with the constant field v=av=a, a gradient (of ⟨a,x⟩\langle a,x\rangle). The measure slides: μt=N(m0+ta,σ2I)\mu_t=N(m_0+ta,\sigma^2I).
  3. Start again with v=a+cJ(x−mt)v=a+c\,J(x-m_t), JJ the rotation by 90∘90^\circ. Particles now swirl around the moving centre.
  4. Yet the rings match: the swirl is divergence-free against the radial density, ∇⋅(J(x−mt)ρt)=0\nabla\cdot(J(x-m_t)\rho_t)=0. Same curve μt\mu_t, two velocity fields.
  5. The kinetic energies differ: |a|2|a|^2 versus |a|2+2c2σ2|a|^2+2c^2\sigma^2. The curve's speed is |μ′|=|a||\mu'|=|a|, achieved by the gradient field, which is the tangent vector.

Worked example

On ℝ\R, let μt=N(0,(1+t)2)\mu_t=N(0,(1+t)^2) for t∈[0,1]t\in[0,1]. Find a velocity field, check the continuity equation, and decide whether the curve is a geodesic.

  1. Write μt\mu_t as a push-forward of μ0\mu_0 and read off a velocity.

    Xt(x)=(1+t)xX_t(x)=(1+t)x pushes N(0,1)N(0,1) to N(0,(1+t)2)N(0,(1+t)^2). A particle at y=Xt(x)y=X_t(x) moves with speed X˙t(x)=x=y/(1+t)\dot X_t(x)=x=y/(1+t), so vt(y)=y/(1+t)v_t(y)=y/(1+t).

  2. Check the weak form of the continuity equation.

    With Z∼N(0,1)Z\sim N(0,1), ddt∫ϕdμt=ddt𝔼ϕ((1+t)Z)=𝔼[ϕ′((1+t)Z)Z]=∫ϕ′(y)y1+tdμt(y)\frac{d}{dt}\int\phi\,d\mu_t=\frac{d}{dt}\mathbb E\,\phi((1+t)Z)=\mathbb E\big[\phi'((1+t)Z)\,Z\big]=\int\phi'(y)\,\frac{y}{1+t}\,d\mu_t(y).

  3. Compute the kinetic energy ∫|vt|2dμt\int|v_t|^2d\mu_t. Is vtv_t tangent?

    ∫y2(1+t)2dμt=1\int\frac{y^2}{(1+t)^2}d\mu_t=1. And vt=∂y(y2/2(1+t))v_t=\partial_y\big(y^2/2(1+t)\big) is a gradient, so it is the tangent field and |μ′|(t)=1|\mu'|(t)=1.

  4. Compare the length of the curve with W2(μ0,μ1)W_2(\mu_0,\mu_1).

    Length =∫01|μ′|dt=1=\int_0^1|\mu'|\,dt=1, and W2(N(0,1),N(0,4))=|1−2|=1W_2\big(N(0,1),N(0,4)\big)=|1-2|=1 by the Gaussian formula of Module 7. Length equals distance, so the curve is a geodesic, and the Benamou–Brenier action ∫01∫|vt|2dμtdt=1=W22\int_0^1\!\int|v_t|^2d\mu_tdt=1=W_2^2 is minimal.

Check your understanding

On ℝ\R, suppose μt\mu_t has a smooth positive density for every tt. How many velocity fields in L2(μt)L^2(\mu_t) solve the continuity equation for this curve?

  1. Exactly one.
  2. Infinitely many, as with the swirl.In one dimension ∂x(wρ)=0\partial_x(w\rho)=0 means wρw\rho is constant, and integrability forces the constant to be 0.
  3. None, unless the curve is a geodesic.Every absolutely continuous curve has velocity fields; geodesics are the ones whose tangent field has constant norm and is "straight".
There is no room to swirl on the line. Indeed, vt(x)=−∂tFt(x)/ρt(x)v_t(x)=-\partial_tF_t(x)/\rho_t(x), where FtF_t is the CDF: the flux through xx is the rate at which mass to the left of xx decreases.

μt=δx(t)\mu_t=\delta_{x(t)} for a smooth path x(t)x(t) in ℝd\R^d. What is |μ′|(t)|\mu'|(t) in W2W_2?

  1. |x′(t)||x'(t)|
  2. 00, because a Dirac mass has no density to move.W2(δx,δy)=|x−y|W_2(\delta_x,\delta_y)=|x-y|, so the curve moves exactly as fast as the point.
  3. It is undefined: there is no velocity field on the complement of the support.Only the values of vtv_t on the support of μt\mu_t matter, since ‖vt‖L2(μt)\|v_t\|_{L^2(\mu_t)} only sees them.
x↦δxx\mapsto\delta_x is an isometric embedding of ℝd\R^d into 𝒫2(ℝd)\mathscr P_2(\R^d). Any field with vt(x(t))=x′(t)v_t(x(t))=x'(t) works, and ‖vt‖L2(μt)=|x′(t)|\|v_t\|_{L^2(\mu_t)}=|x'(t)|.

A curve on [0,1][0,1] solves the continuity equation with ∫|vt|2dμt=E\int|v_t|^2d\mu_t=E for every tt. What follows?

  1. W2(μ0,μ1)≤EW_2(\mu_0,\mu_1)\le\sqrt E
  2. W2(μ0,μ1)=EW_2(\mu_0,\mu_1)=\sqrt EAdd a swirl: the kinetic energy goes up and the curve stays the same.
  3. W2(μ0,μ1)≥EW_2(\mu_0,\mu_1)\ge\sqrt EThe kinetic energy bounds the speed from above, not below.
W2(μ0,μ1)≤∫01|μ′|dt≤∫01‖vt‖L2(μt)dt=EW_2(\mu_0,\mu_1)\le\int_0^1|\mu'|\,dt\le\int_0^1\|v_t\|_{L^2(\mu_t)}dt=\sqrt E. Equality needs both a geodesic and tangent velocities, which is the Benamou–Brenier statement.

Practice

The swirl is invisibleA divergence-free perturbation

Let ρ(x)=g(|x−m|)\rho(x)=g(|x-m|) be a radial density on ℝ2\R^2 and w(x)=J(x−m)w(x)=J(x-m). Show ∇⋅(wρ)=0\nabla\cdot(w\rho)=0, and compute ∫|w|2dμ\int|w|^2\,d\mu for μ=N(m,σ2I2)\mu=N(m,\sigma^2I_2).

Solution

∇⋅(wρ)=ρ∇⋅w+⟨w,∇ρ⟩\nabla\cdot(w\rho)=\rho\,\nabla\cdot w+\langle w,\nabla\rho\rangle. The rotation field has zero divergence, and ∇ρ\nabla\rho is parallel to x−mx-m, which is perpendicular to J(x−m)J(x-m). So both terms vanish. Then ∫|J(x−m)|2dμ=∫|x−m|2dμ=2σ2\int|J(x-m)|^2d\mu=\int|x-m|^2d\mu=2\sigma^2, the value in the animation's stats.

The velocity on the lineFrom the CDF

On ℝ\R, show that vt=−∂tFt/ρtv_t=-\partial_tF_t/\rho_t solves the continuity equation for a smooth curve of positive densities ρt\rho_t with CDFs FtF_t. Check it on the translation ρt(x)=ρ(x−t)\rho_t(x)=\rho(x-t).

Solution

Integrate ∂tρt=−∂x(vtρt)\partial_t\rho_t=-\partial_x(v_t\rho_t) from −∞-\infty to xx: ∂tFt(x)=−vt(x)ρt(x)\partial_tF_t(x)=-v_t(x)\rho_t(x), assuming the flux vanishes at −∞-\infty. For the translation, Ft(x)=F(x−t)F_t(x)=F(x-t), so ∂tFt=−ρ(x−t)\partial_tF_t=-\rho(x-t) and vt=1v_t=1.

InteractiveAmbrosio–Gigli–Savaré, Ch. 9: Convex Functionals in 𝒫p(X)\mathscr P_p(X)

Displacement convexity

Chapter 4 needs λ\lambda-convexity along geodesics. In the Wasserstein space geodesics move mass rather than mixing it, and a functional can be convex along one kind of interpolation and not the other. Here you test both.

The idea

Geodesic convexity in 𝒫2\mathscr P_2. ϕ\phi is λ\lambda-convex along geodesics if for every μ0,μ1\mu_0,\mu_1 there is a geodesic μt\mu_t with ϕ(μt)≤(1−t)ϕ(μ0)+tϕ(μ1)−λ2t(1−t)W22(μ0,μ1)\phi(\mu_t)\le(1-t)\phi(\mu_0)+t\phi(\mu_1)-\frac\lambda2t(1-t)W_2^2(\mu_0,\mu_1). McCann called this displacement convexity.

The model examples (Ch. 9.3), with μ=ρℒd\mu=\rho\,\mathcal L^d:

  • Potential energy 𝒱(μ)=∫Vdμ\mathcal V(\mu)=\int V\,d\mu is λ\lambda-convex iff VV is λ\lambda-convex. Along mixtures it is always affine.
  • Interaction energy 𝒲(μ)=12∬W(x−y)dμ(x)dμ(y)\mathcal W(\mu)=\tfrac12\iint W(x-y)\,d\mu(x)d\mu(y) is convex if WW is convex. With W(z)=|z|2W(z)=|z|^2 on ℝ\R it is the variance, which is concave along mixtures.
  • Internal energy ℱ(μ)=∫F(ρ)dx\mathcal F(\mu)=\int F(\rho)\,dx is convex if F(0)=0F(0)=0 and s↦sdF(s−d)s\mapsto s^dF(s^{-d}) is convex and nonincreasing on (0,∞)(0,\infty) (McCann's condition). This covers the entropy F(s)=slog⁡sF(s)=s\log s and sm/(m−1)s^m/(m-1) for m≥1−1/dm\ge1-1/d.
  • Relative entropy with respect to γ=e−Vℒd\gamma=e^{-V}\mathcal L^d is λ\lambda-convex iff VV is λ\lambda-convex (Ch. 9.4): the entropy of a log-concave reference measure.
Generalized geodesics (Ch. 9.2). Because 𝒫2(ℝd)\mathscr P_2(\R^d) is positively curved for d≥2d\ge2, 12W22(⋅,ν)\tfrac12W_2^2(\cdot,\nu) is not 1-convex along geodesics, and the assumption of Chapter 4 fails for plain geodesics. The fix is to interpolate between μ0\mu_0 and μ1\mu_1 using optimal plans from a third measure (the base point of the step). All the functionals above are convex along these generalized geodesics too, so Chapter 4's theory applies.

Explore

Endpoints
Functional
displacement μt\mu_t mixture (1−t)μ0+tμ1(1-t)\mu_0+t\mu_1 endpoints, and VV when used
along displacement along mixture · dashed: the chord

Worked example

Compute the entropy ℋ(μ)=∫ρlog⁡ρdx\mathcal H(\mu)=\int\rho\log\rho\,dx along the W2W_2 geodesic between two Gaussians on ℝ\R, and decide how convex it is.

  1. Compute ℋ(N(m,σ2))\mathcal H\big(N(m,\sigma^2)\big).

    log⁡ρ=−12log⁡(2πσ2)−(x−m)22σ2\log\rho=-\tfrac12\log(2\pi\sigma^2)-\frac{(x-m)^2}{2\sigma^2}, and the second term averages to −12-\tfrac12. So ℋ=−12log⁡(2πeσ2)=−log⁡σ−12log⁡(2πe)\mathcal H=-\tfrac12\log(2\pi e\sigma^2)=-\log\sigma-\tfrac12\log(2\pi e).

  2. Along the geodesic from N(m0,σ02)N(m_0,\sigma_0^2) to N(m1,σ12)N(m_1,\sigma_1^2), what is ℋ(μt)\mathcal H(\mu_t)?

    By Module 7 the geodesic is N(mt,σt2)N(m_t,\sigma_t^2) with σt=(1−t)σ0+tσ1\sigma_t=(1-t)\sigma_0+t\sigma_1. So ℋ(μt)=−log⁡σt+const\mathcal H(\mu_t)=-\log\sigma_t+\text{const}.

  3. Is it convex in tt? Is it λ\lambda-convex for some λ>0\lambda>0?

    d2dt2(−log⁡σt)=(σ1−σ0)2/σt2≥0\frac{d^2}{dt^2}(-\log\sigma_t)=(\sigma_1-\sigma_0)^2/\sigma_t^2\ge0, so it is convex. But if σ0=σ1\sigma_0=\sigma_1 and m0≠m1m_0\neq m_1 (a translation) it is constant along a geodesic of positive length, so no λ>0\lambda>0 works: the entropy is exactly 0-convex.

  4. Why is the entropy convex along every 1-D geodesic, Gaussian or not?

    With quantile QQ, ℋ(μ)=∫01log⁡ρ(Q(u))du=−∫01log⁡Q′(u)du\mathcal H(\mu)=\int_0^1\log\rho(Q(u))\,du=-\int_0^1\log Q'(u)\,du (because ρ(Q)Q′=1\rho(Q)\,Q'=1). Along a geodesic Qt′=(1−t)Q0′+tQ1′Q_t'=(1-t)Q_0'+tQ_1' is affine in tt for each uu, and −log⁡-\log is convex. In the explorer, the entropy curve is convex for every preset.

Check your understanding

For which VV is μ↦∫Vdμ\mu\mapsto\int V\,d\mu convex along every W2W_2 geodesic?

  1. Exactly the convex VV.
  2. Every VV, since μ↦∫Vdμ\mu\mapsto\int V\,d\mu is linear.It is linear along mixtures. Along the geodesic δxt\delta_{x_t} between two Dirac masses it equals V(xt)V(x_t), which is convex only if VV is.
  3. Every VV bounded below.Try the double well across the origin in the explorer.
If VV is λ\lambda-convex, ∫Vdμt=∫V((1−t)x+ty)dγ\int V\,d\mu_t=\int V\big((1-t)x+ty\big)\,d\gamma inherits λ\lambda-convexity from VV, with ∫|x−y|2dγ=W22\int|x-y|^2d\gamma=W_2^2. Conversely, test on Dirac masses.

Is the entropy ∫ρlog⁡ρ\int\rho\log\rho on ℝd\R^d λ\lambda-convex along geodesics for some λ>0\lambda>0?

  1. No: it is constant along translations, which are geodesics.
  2. Yes, with λ=1\lambda=1.That is the entropy relative to the standard Gaussian, where the added potential ∫|x|2/2dμ\int|x|^2/2\,d\mu supplies the 1-convexity.
  3. No, it is not even convex.It is convex (0-convex) by McCann's condition: sd⋅s−dlog⁡s−d=−dlog⁡ss^d\cdot s^{-d}\log s^{-d}=-d\log s is convex and nonincreasing.
Translating μ\mu by thth is a geodesic of length |h||h| along which ∫ρlog⁡ρ\int\rho\log\rho does not change. So the heat flow (Module 11) contracts with λ=0\lambda=0, not exponentially.

Var⁡(μ)=12∬|x−y|2dμdμ\operatorname{Var}(\mu)=\tfrac12\iint|x-y|^2d\mu\,d\mu. Between μ0=δ−1\mu_0=\delta_{-1} and μ1=δ1\mu_1=\delta_1, along which interpolation is it convex?

  1. Along the displacement interpolation only.
  2. Along both.Along the mixture (1−t)δ−1+tδ1(1-t)\delta_{-1}+t\delta_1 the variance is 4t(1−t)4t(1-t).
  3. Along the mixture only.The displacement interpolation is δ2t−1\delta_{2t-1}, with variance 0 throughout: that is convex.
W(z)=|z|2W(z)=|z|^2 is convex, so the interaction energy is displacement convex. Along mixtures, Var⁡=∫|x|2dμ−|∫xdμ|2\operatorname{Var}=\int|x|^2d\mu-|\int x\,d\mu|^2 is affine minus convex: concave. The "Variance" option shows both.

Practice

Entropy relative to a GaussianWhere λ = 1 comes from

Let γ=N(0,Id)\gamma=N(0,I_d). Show ℋ(μ|γ)=∫ρlog⁡ρdx+∫12|x|2dμ+const\mathcal H(\mu|\gamma)=\int\rho\log\rho\,dx+\int\tfrac12|x|^2d\mu+\text{const}, deduce that it is 1-convex along geodesics, and check the constant 1 is sharp using translations of γ\gamma.

Solution

log⁡(ρ/γ)=log⁡ρ+12|x|2+d2log⁡2π\log(\rho/\gamma)=\log\rho+\tfrac12|x|^2+\tfrac d2\log2\pi. The entropy is 0-convex and 12|x|2\tfrac12|x|^2 is 1-convex, so the sum is 1-convex. Along μt=N(th,I)\mu_t=N(th,I), ℋ(μt|γ)=12t2|h|2\mathcal H(\mu_t|\gamma)=\tfrac12t^2|h|^2, whose second derivative is |h|2=W22(μ0,μ1)|h|^2=W_2^2(\mu_0,\mu_1): equality with λ=1\lambda=1.

The quadratic internal energyQuantiles again

On ℝ\R, show μ↦∫ρ2dx\mu\mapsto\int\rho^2\,dx is convex along geodesics.

Hint

∫ρ2dx=∫01ρ(Q(u))du\int\rho^2dx=\int_0^1\rho(Q(u))\,du. Express ρ(Q(u))\rho(Q(u)) through Q′Q'.

Solution

ρ(Q(u))=1/Q′(u)\rho(Q(u))=1/Q'(u), so ∫ρ2dx=∫01duQ′(u)\int\rho^2dx=\int_0^1\frac{du}{Q'(u)}. Along a geodesic Qt′Q_t' is affine and positive, and s↦1/ss\mapsto1/s is convex on (0,∞)(0,\infty). This matches McCann's condition in d=1d=1: sF(1/s)=1/ssF(1/s)=1/s is convex and nonincreasing.

Draw it yourselfAmbrosio–Gigli–Savaré, Ch. 10: Metric Slope and Subdifferential Calculus in 𝒫p(X)\mathscr P_p(X)

The Wasserstein gradient

On 𝒫2\mathscr P_2 a gradient is a velocity field: the direction in which to move the mass to raise the functional fastest. For the entropy that field is ∇ρ/ρ\nabla\rho/\rho, and its kinetic energy is the Fisher information. Draw a density and see its gradient.

The idea

Subdifferential (Ch. 10.1). ξ∈L2(μ;ℝd)\xi\in L^2(\mu;\R^d) belongs to ∂ϕ(μ)\partial\phi(\mu) if, with 𝒕μν\boldsymbol t_\mu^\nu the optimal map from μ\mu to ν\nu,
ϕ(ν)−ϕ(μ)≥∫⟨ξ, 𝒕μν−id⟩dμ+o(W2(μ,ν)).\phi(\nu)-\phi(\mu)\ge\int\big\langle\xi,\ \boldsymbol t_\mu^\nu-\mathrm{id}\big\rangle\,d\mu+o\big(W_2(\mu,\nu)\big).
For λ\lambda-convex ϕ\phi the o(⋅)o(\cdot) can be replaced by λ2W22(μ,ν)\tfrac\lambda2W_2^2(\mu,\nu).
Slope = minimal subgradient. For λ\lambda-convex ϕ\phi, |∂ϕ|(μ)=min⁡{‖ξ‖L2(μ):ξ∈∂ϕ(μ)}|\partial\phi|(\mu)=\min\{\|\xi\|_{L^2(\mu)}:\xi\in\partial\phi(\mu)\}, and the minimizer ∂∘ϕ(μ)\partial^\circ\phi(\mu) lies in the tangent space.

For smooth densities the recipe is: take the first variation δϕδρ\frac{\delta\phi}{\delta\rho} (the L2L^2 derivative), then its spatial gradient. Ch. 10.4 makes this rigorous for the model functionals:

  • potential energy ∫Vdμ\int V\,d\mu:  ξ=∇V\ \xi=\nabla V;
  • interaction energy 12∬W(x−y)dμdμ\tfrac12\iint W(x-y)\,d\mu\,d\mu (WW even):  ξ=(∇W)*μ\ \xi=(\nabla W)*\mu;
  • internal energy ∫F(ρ)dx\int F(\rho)\,dx:  ξ=∇LF(ρ)/ρ\ \xi=\nabla L_F(\rho)/\rho with LF(s)=sF′(s)−F(s)L_F(s)=sF'(s)-F(s), which is ∇F′(ρ)\nabla F'(\rho) for smooth ρ\rho. For the entropy, ξ=∇ρ/ρ=∇log⁡ρ\xi=\nabla\rho/\rho=\nabla\log\rho.
Fisher information. |∂ℋ|2(μ)=∫|∇ρ|2ρdx|\partial\mathcal H|^2(\mu)=\int\frac{|\nabla\rho|^2}{\rho}\,dx, finite only if ρ∈Wloc1,1\rho\in W^{1,1}_{\mathrm{loc}} with ∇ρ/ρ∈L2(μ)\nabla\rho/\rho\in L^2(\mu). For the relative entropy with respect to e−Ve^{-V}, ξ=∇log⁡(ρeV)\xi=\nabla\log(\rho e^{V}), which vanishes exactly at ρ∝e−V\rho\propto e^{-V}.

The first-variation identity behind all of this: ddεϕ((id+εη)#μ)|ε=0=∫⟨ξ,η⟩dμ\frac{d}{d\varepsilon}\phi\big((\mathrm{id}+\varepsilon\eta)_\#\mu\big)\big|_{\varepsilon=0}=\int\langle\xi,\eta\rangle\,d\mu. The explorer measures the left side with η=−ξ\eta=-\xi.

Explore

Draw a density with your mouse or finger (it is smoothed and normalised). ρ\rho steepest-descent velocity −ξ-\xi e−Ve^{-V}, when used
Functional
Or start from

Worked example

On ℝ\R, take the relative entropy ϕ(μ)=∫ρlog⁡ρdx+∫12x2dμ\phi(\mu)=\int\rho\log\rho\,dx+\int\tfrac12x^2\,d\mu and μ=N(m,s2)\mu=N(m,s^2). Compute the Wasserstein gradient, the slope, and the steepest-descent motion.

  1. What is ξ\xi for a general smooth positive ρ\rho?

    The first variation is log⁡ρ+1+12x2\log\rho+1+\tfrac12x^2, so ξ=ρ′/ρ+x\xi=\rho'/\rho+x.

  2. Evaluate it for ρ=N(m,s2)\rho=N(m,s^2).

    ρ′/ρ=−(x−m)/s2\rho'/\rho=-(x-m)/s^2, so ξ(x)=(1−1s2)x+ms2\xi(x)=\big(1-\tfrac1{s^2}\big)x+\tfrac{m}{s^2}: an affine field.

  3. Compute |∂ϕ|2(μ)=∫ξ2dμ|\partial\phi|^2(\mu)=\int\xi^2\,d\mu.

    Write ξ=ax+b\xi=ax+b with a=1−1/s2a=1-1/s^2, b=m/s2b=m/s^2. Then ∫ξ2dμ=a2s2+(am+b)2\int\xi^2d\mu=a^2s^2+(am+b)^2, and am+b=mam+b=m. So

    |∂ϕ|2(μ)=(s−1s)2+m2,|\partial\phi|^2(\mu)=\Big(s-\frac1s\Big)^2+m^2,
    which vanishes only for N(0,1)N(0,1), the reference measure.

  4. Move every particle with velocity −ξ-\xi. What happens to mm and ss?

    A particle at m+szm+sz moves with velocity −a(m+sz)−b-a(m+sz)-b. Matching the parts with and without zz: m′=−mm'=-m and s′=−as=1s−ss'=-as=\tfrac1s-s. So Gaussians stay Gaussian, m(t)=m0e−tm(t)=m_0e^{-t} and (s2)′=2−2s2(s^2)'=2-2s^2, i.e. s(t)2=1+(s02−1)e−2ts(t)^2=1+(s_0^2-1)e^{-2t}. This is the Ornstein–Uhlenbeck flow you will run in the next module.

Check your understanding

What is the Wasserstein gradient of the potential energy ∫Vdμ\int V\,d\mu at μ\mu?

  1. The vector field ∇V\nabla V, viewed in L2(μ)L^2(\mu).
  2. The function VV.VV is the first variation (the L2L^2 gradient). The Wasserstein gradient is a velocity, so it is ∇V\nabla V.
  3. The measure ∇Vμ\nabla V\,\mu.That is the flux vμv\mu in the continuity equation, not the velocity vv.
Moving mass by id+εη\mathrm{id}+\varepsilon\eta changes ∫Vdμ\int V\,d\mu by ε∫⟨∇V,η⟩dμ+o(ε)\varepsilon\int\langle\nabla V,\eta\rangle\,d\mu+o(\varepsilon). The slope is ‖∇V‖L2(μ)\|\nabla V\|_{L^2(\mu)}, and the gradient flow is ∂tμ=∇⋅(μ∇V)\partial_t\mu=\nabla\cdot(\mu\nabla V): every particle follows x′=−∇V(x)x'=-\nabla V(x) independently.

What is the slope of the entropy at μ=\mu= uniform on [0,1][0,1]?

  1. 00, because ρ′=0\rho'=0 inside the interval.The jumps at 0 and 1 matter: ρ∉Wloc1,1(ℝ)\rho\notin W^{1,1}_{\mathrm{loc}}(\R). The heat flow spreads them at infinite initial speed.
  2. +∞+\infty
  3. 11There is no finite subgradient: any finite ξ\xi would make the entropy change at a finite rate under the heat flow, but it drops infinitely fast at first.
Finite Fisher information needs ρ∈Wloc1,1\rho\in W^{1,1}_{\mathrm{loc}}. The uniform measure has finite entropy (it is in the domain) but infinite slope; by the regularising effect of Chapter 4, the flow enters the set of finite slope immediately. Draw a box-shaped density in the explorer: smoothing keeps the number finite, but it is large.

For the relative entropy with respect to γ=e−Vℒd\gamma=e^{-V}\mathcal L^d (a probability measure), when is the slope zero?

  1. Exactly when μ=γ\mu=\gamma.
  2. When μ\mu is a Dirac mass at a minimum of VV.A Dirac mass has infinite entropy; it is not in the domain.
  3. Never: the entropy always pushes mass outward.The potential pushes inward. They balance when ∇log⁡ρ=−∇V\nabla\log\rho=-\nabla V.
ξ=∇log⁡(ρ/e−V)=0\xi=\nabla\log(\rho/e^{-V})=0 means ρ/e−V\rho/e^{-V} is constant on the (connected) support. Choose "Relative entropy" and the "N(0, 1)" preset in the explorer: the arrows vanish.

Practice

The gradient of an interaction energyA first-variation computation

Let 𝒲(μ)=12∬W(x−y)dμ(x)dμ(y)\mathcal W(\mu)=\tfrac12\iint W(x-y)\,d\mu(x)\,d\mu(y) with WW even and C1C^1. Compute ddε𝒲((id+εη)#μ)\frac{d}{d\varepsilon}\mathcal W\big((\mathrm{id}+\varepsilon\eta)_\#\mu\big) at ε=0\varepsilon=0 and identify ξ\xi.

Solution

𝒲((id+εη)#μ)=12∬W(x−y+ε(η(x)−η(y)))dμdμ\mathcal W\big((\mathrm{id}+\varepsilon\eta)_\#\mu\big)=\tfrac12\iint W\big(x-y+\varepsilon(\eta(x)-\eta(y))\big)\,d\mu\,d\mu. Differentiating gives 12∬⟨∇W(x−y),η(x)−η(y)⟩\tfrac12\iint\langle\nabla W(x-y),\eta(x)-\eta(y)\rangle. Since ∇W\nabla W is odd, the two halves are equal, giving ∫⟨(∇W*μ)(x),η(x)⟩dμ(x)\int\langle(\nabla W*\mu)(x),\eta(x)\rangle\,d\mu(x). So ξ=∇W*μ\xi=\nabla W*\mu.

Fisher information of a GaussianAnd the entropy's decay rate

Compute ∫(ρ′)2/ρdx\int(\rho')^2/\rho\,dx for ρ=N(m,s2)\rho=N(m,s^2) on ℝ\R. Along the heat flow s2(t)=s02+2ts^2(t)=s_0^2+2t, check that ddtℋ(μt)=−|∂ℋ|2(μt)\frac{d}{dt}\mathcal H(\mu_t)=-|\partial\mathcal H|^2(\mu_t).

Solution

ρ′/ρ=−(x−m)/s2\rho'/\rho=-(x-m)/s^2, so ∫(ρ′/ρ)2ρdx=s2/s4=1/s2\int(\rho'/\rho)^2\rho\,dx=s^2/s^4=1/s^2. With ℋ=−12log⁡(2πes2)\mathcal H=-\tfrac12\log(2\pi e s^2), ddtℋ=−12⋅2s2=−1s2\frac{d}{dt}\mathcal H=-\tfrac12\cdot\frac{2}{s^2}=-\frac1{s^2}. The energy falls at the rate "slope squared", as for any gradient flow.

SimulationAmbrosio–Gigli–Savaré, Ch. 11: Gradient Flows and Curves of Maximal Slope in 𝒫p(X)\mathscr P_p(X)

Heat and Fokker–Planck by JKO

Everything comes together: the minimizing-movement scheme of Module 2, run in the Wasserstein space with the free energy of Modules 9 and 10, produces the heat equation and the Fokker–Planck equation. Here it runs on particles, one minimization per step.

The idea

Gradient flow in 𝒫2\mathscr P_2 (Ch. 11.1). An absolutely continuous curve μt\mu_t whose tangent velocity satisfies vt=−∂∘ϕ(μt)v_t=-\partial^\circ\phi(\mu_t) (more generally −vt∈∂ϕ(μt)-v_t\in\partial\phi(\mu_t)), together with ∂tμt+∇⋅(vtμt)=0\partial_t\mu_t+\nabla\cdot(v_t\mu_t)=0. Under mild conditions this is the same as a curve of maximal slope for |∂ϕ||\partial\phi| in (𝒫2,W2)(\mathscr P_2,W_2).
The JKO scheme. The minimizing movement of Module 2 with d=W2d=W_2:
μn∈argminμ⁡ ϕ(μ)+W22(μ,μn−1)2τ.\mu^n\in\operatorname*{argmin}_{\mu}\ \phi(\mu)+\frac{W_2^2(\mu,\mu^{n-1})}{2\tau}.
Named after Jordan, Kinderlehrer and Otto, who used it for the Fokker–Planck equation.
Existence and uniqueness (Ch. 11.2). If ϕ\phi is proper, lower semicontinuous, bounded below on some W2W_2-ball (coercivity) and λ\lambda-convex along generalized geodesics, then for every μ0\mu_0 in the W2W_2-closure of its domain the JKO scheme converges, the limit is the unique gradient flow, it is characterised by the EVI in W2W_2, and W2(μt,νt)≤e−λtW2(μ0,ν0)W_2(\mu_t,\nu_t)\le e^{-\lambda t}W_2(\mu_0,\nu_0). The error estimates of Chapter 4 hold as stated there.

With the free energy ϕ(μ)=∫ρlog⁡ρdx+∫Vdμ\phi(\mu)=\int\rho\log\rho\,dx+\int V\,d\mu, Module 10 gives v=−∇ρ/ρ−∇Vv=-\nabla\rho/\rho-\nabla V, and the continuity equation becomes

∂tρ=Δρ+∇⋅(ρ∇V).\partial_t\rho=\Delta\rho+\nabla\cdot(\rho\nabla V).

V=0V=0 gives the heat equation (λ=0\lambda=0); V=12|x|2V=\tfrac12|x|^2 gives the Ornstein–Uhlenbeck equation (λ=1\lambda=1), whose solutions converge exponentially to N(0,I)N(0,I). Other free energies give the porous medium equation and nonlocal aggregation equations (Ch. 11.2.1).

How the simulation works. On the line, a measure made of NN equal particles x1<⋯<xNx_1<\dots<x_N has W22W_2^2 to another such measure equal to 1N∑|xi−yi|2\frac1N\sum|x_i-y_i|^2 (sorted order is optimal). The entropy is approximated by spreading mass 1/(N−1)1/(N-1) uniformly over each gap. Each JKO step is then a minimization in (x1,…,xN)(x_1,\dots,x_N), strictly convex as long as 1/τ+V′′>01/\tau+V''>0, solved by Newton's method.

Explore

Potential V
Initial datum
μn\mu^n (ticks: particles) exact solution, when known equilibrium e−V/Ze^{-V}/Z
free energy ϕ(μn)\phi(\mu^n) variance of μn\mu^n exact variance, when known

Worked example

Do one JKO step for the heat equation (ϕ=ℋ\phi=\mathcal H, V=0V=0) on ℝ\R, starting from μ0=N(0,s02)\mu^0=N(0,s_0^2), assuming the minimizer is a centred Gaussian N(0,s2)N(0,s^2).

  1. Write the JKO functional as a function of ss.

    W22=(s−s0)2W_2^2=(s-s_0)^2 (Module 7) and ℋ=−log⁡s+const\mathcal H=-\log s+\text{const} (Module 9). So minimize −log⁡s+(s−s0)22τ-\log s+\frac{(s-s_0)^2}{2\tau}.

  2. Solve for s1s_1.

    The derivative is −1s+s−s0τ=0-\frac1s+\frac{s-s_0}{\tau}=0, i.e. s2−s0s−τ=0s^2-s_0s-\tau=0, so s1=12(s0+s02+4τ)s_1=\tfrac12\big(s_0+\sqrt{s_0^2+4\tau}\big).

  3. Compare s12s_1^2 with the exact heat flow, s2(τ)=s02+2τs^2(\tau)=s_0^2+2\tau.

    From s12=s0s1+τs_1^2=s_0s_1+\tau and s1=s0+τ/s0+O(τ2)s_1=s_0+\tau/s_0+O(\tau^2): s12=s02+2τ+O(τ2)s_1^2=s_0^2+2\tau+O(\tau^2). One step is first-order accurate. In fact s1−s0τ=1s1\frac{s_1-s_0}{\tau}=\frac1{s_1} is implicit Euler for s′=1/ss'=1/s, the exact ODE for the standard deviation.

  4. Why is assuming a Gaussian minimizer harmless here?

    The entropy is convex along generalized geodesics, so the JKO functional is strictly convex along them and any critical point is the global minimizer. The Gaussian candidate satisfies the optimality condition (𝒕−id)/τ=∇ρ1/ρ1(\boldsymbol t-\mathrm{id})/\tau=\nabla\rho_1/\rho_1, where 𝒕(x)=(s0/s1)x\boldsymbol t(x)=(s_0/s_1)x is the optimal map back to μ0\mu^0: it reads (s0/s1−1)/τ=−1/s12(s_0/s_1-1)/\tau=-1/s_1^2, which is the equation of step 2.

Check your understanding

Which functional has ∂tρ=Δρ+∇⋅(ρ∇V)\partial_t\rho=\Delta\rho+\nabla\cdot(\rho\nabla V) as its W2W_2 gradient flow?

  1. ∫ρlog⁡ρdx+∫Vρdx\int\rho\log\rho\,dx+\int V\rho\,dx
  2. 12∫|∇ρ|2dx+∫Vρdx\tfrac12\int|\nabla\rho|^2dx+\int V\rho\,dxThe Dirichlet energy gives the heat equation as its L2L^2 gradient flow, not as a W2W_2 one. In W2W_2 it gives a fourth-order equation.
  3. ∫ρlog⁡ρdx−∫Vρdx\int\rho\log\rho\,dx-\int V\rho\,dxCheck the sign: the velocity is −∇V−∇log⁡ρ-\nabla V-\nabla\log\rho, so mass flows down VV.
ξ=∇log⁡ρ+∇V\xi=\nabla\log\rho+\nabla V, and ∂tρ=∇⋅(ρξ)=Δρ+∇⋅(ρ∇V)\partial_t\rho=\nabla\cdot(\rho\,\xi)=\Delta\rho+\nabla\cdot(\rho\nabla V). The same PDE is a gradient flow for different pairs (functional, metric); the Wasserstein choice is the one in which the free energy is convex and the flow contracts.

Two solutions of the heat equation on ℝd\R^d. What does Chapter 11 give for W2(μt,νt)W_2(\mu_t,\nu_t)?

  1. W2(μt,νt)≤W2(μ0,ν0)W_2(\mu_t,\nu_t)\le W_2(\mu_0,\nu_0)
  2. W2(μt,νt)≤e−tW2(μ0,ν0)W_2(\mu_t,\nu_t)\le e^{-t}W_2(\mu_0,\nu_0)That needs λ=1\lambda=1, as for Ornstein–Uhlenbeck. Two heat flows from translated data stay translates of each other, at constant distance.
  3. It may grow, since diffusion spreads mass.The entropy is 0-convex, so the flow is 0-contracting.
λ=0\lambda=0 for the entropy (Module 9, quiz 2). With the potential 12|x|2\tfrac12|x|^2 added, λ=1\lambda=1: in the explorer the mean and variance relax to those of N(0,1)N(0,1) like e−te^{-t} and e−2te^{-2t}.

Can the heat flow start from δ0∈𝒫2(ℝ)\delta_0\in\mathscr P_2(\R), where the entropy is +∞+\infty?

  1. Yes: δ0\delta_0 lies in the W2W_2-closure of the domain, and the flow is μt=N(0,2t)\mu_t=N(0,2t).
  2. No: the first JKO step needs ϕ(μ0)<∞\phi(\mu^0)<\infty.The step itself is fine: the minimization over μ\mu only needs ϕ(μ)<∞\phi(\mu)<\infty for some competitor. Chapter 4's theory covers initial data in the closure of the domain.
  3. Yes, but it stays at δ0\delta_0.The slope term in the energy inequality forces it to move, as in Module 1.
Gaussians N(0,ε)N(0,\varepsilon) have finite entropy and converge to δ0\delta_0 in W2W_2. By contraction the flows from them converge, and the limit is the heat kernel N(0,2t)N(0,2t), at distance W2(μt,δ0)=2tW_2(\mu_t,\delta_0)=\sqrt{2t}.

Practice

Exponential contraction for Ornstein–UhlenbeckChecking λ = 1 by hand

With m(t)=m0e−tm(t)=m_0e^{-t} and s(t)2=1+(s02−1)e−2ts(t)^2=1+(s_0^2-1)e^{-2t} (Module 10), verify W2(μt,γ)≤e−tW2(μ0,γ)W_2(\mu_t,\gamma)\le e^{-t}W_2(\mu_0,\gamma) for γ=N(0,1)\gamma=N(0,1).

Hint

W22(μt,γ)=m(t)2+(s(t)−1)2W_2^2(\mu_t,\gamma)=m(t)^2+(s(t)-1)^2. Write s−1=(s2−1)/(s+1)s-1=(s^2-1)/(s+1).

Solution

The mean term is m02e−2tm_0^2e^{-2t}. For the other, |s(t)−1|=|s02−1|e−2ts(t)+1|s(t)-1|=\frac{|s_0^2-1|e^{-2t}}{s(t)+1}, and we need this ≤e−t|s0−1|\le e^{-t}|s_0-1|, i.e. s(t)+1≥(s0+1)e−ts(t)+1\ge(s_0+1)e^{-t}. Since s(t)2≥s02e−2ts(t)^2\ge s_0^2e^{-2t} (expand) we have s(t)≥s0e−ts(t)\ge s_0e^{-t}, and 1≥e−t1\ge e^{-t}. Adding the two terms gives the claim.

The porous medium equationA different internal energy

Show that the W2W_2 gradient flow of ℱ(μ)=1m−1∫ρmdx\mathcal F(\mu)=\frac1{m-1}\int\rho^m\,dx (m>1m>1) is ∂tρ=Δ(ρm)\partial_t\rho=\Delta(\rho^m).

Solution

The first variation is mm−1ρm−1\frac{m}{m-1}\rho^{m-1}, so ξ=∇(mm−1ρm−1)=mρm−2∇ρ\xi=\nabla\big(\frac{m}{m-1}\rho^{m-1}\big)=m\rho^{m-2}\nabla\rho. Then ∂tρ=∇⋅(ρξ)=∇⋅(mρm−1∇ρ)=Δ(ρm)\partial_t\rho=\nabla\cdot(\rho\,\xi)=\nabla\cdot(m\rho^{m-1}\nabla\rho)=\Delta(\rho^m). McCann's condition m≥1−1/dm\ge1-1/d makes ℱ\mathcal F displacement convex, so Chapter 11's theory applies.