Fast computations of Wasserstein gradient flows
Joint works with Matt Jacobs and Wonjun Lee


Flavien Léger (inria)
Outline
1. Optimal transport
2. Wasserstein gradient flows
3. Numerical method
4. Movies
1. Optimal transport
2. Wasserstein gradient flows
3. Numerical method
4. Movies
Setting
Two mass densities over Ω⊂Rd, with same total mass,
∫Ωμ(x)dx=∫Ων(y)dy


μ
ν
How to optimally transport μ to ν?
Map T:Ω→Ω, measure μ
Pushforward: (T#μ)(A)=μ(T−1(A))
D E F I N I T I O N


μ
T#μ
T(x)

Tinf∫Ω∣T(x)−x∣2μ(dx)=:W22(μ,ν)

subject to: T#μ=ν
Cost to move mass μ(dx) from x to T(x) is
∣T(x)−x∣2μ(dx)
T(x)
Tinf∫Ω∣T(x)−x∣2μ(dx)=:W22(μ,ν)
subject to: T#μ=ν
Features:
1) A distance between μ and ν
2) An optimal map T
3) Formally a Riemannian metric on the manifold of measures with geodesics ρt=((1−t)x+tT(x))#μ

Numerically: not easy to solve
Example 1
2048×2048 points
Example 2
Caffarelli's counterexample
2048×2048 points
Summary
A distance W2 over measures, with “Riemannian” structure
1. Optimal transport
2. Wasserstein gradient flows
3. Numerical method
4. Movies
“ρ˙t=−gradW2U(ρt)”
Functional U(ρ), want to make sense of
ρ(t+τ)=ρargminU(ρ)+2τ1W22(ρ(t),ρ)
Look at ”implicit Euler”
(JKO)
The right approach, theoretically and numerically
The PDEs
∂tρ+div(ρv)=0,
v=−∇ϕ,
ϕ=δU(ρ)
on domain Ω⊂Rd, no flux out and with initial condition ρ(t=0)=ρ0.
When τ→0,
Slow diffusion
U(ρ)=∫Ωm−11ρ(x)m+V(x)ρ(x)dx,
m>1. V(x) can be +∞.

Incompressible energy
U(ρ)=∫Ωu∞(ρ(x))+V(x)ρ(x)dx,
Aggregation-diffusion
U(ρ)=∫Ωρ(x)mdx+∬Ω∣x−y∣2ρ(x)ρ(y)dxdy

porous medium equation
∂tρ=Δρm.
m→1:U(ρ)=∫Ωρlogρ+Vρ
Dual formulation
Primal, numerically difficult:
ϕ,ψsup⟨ψ,μ⟩−U∗(ϕ)
over (ϕ,ψ) s.t.
ψ(x)−ϕ(y)≤2τ∣x−y∣2.
ρinfU(ρ)+2τ1W22(μ,ρ).
Dual:
Dual formulations
with ϕc(x)=infyϕ(y)+2τ∣x−y∣2,
ψc(y)=supxψ(x)−2τ∣x−y∣2.
☇
ϕsup⟨ϕc,μ⟩−U∗(ϕ)=:J(ϕ)
ψsup⟨ψ,μ⟩−U∗(ψc)=:I(ψ)
Dual formulations
→ unconstrained concave maximization problems
→ Recover ρ∗ from ϕ∗ by
ρ∗=δU∗(ϕ∗)
ϕsup⟨ϕc,μ⟩−U∗(ϕ)=:J(ϕ)
ψsup⟨ψ,μ⟩−U∗(ψc)=:I(ψ)
The power of duality
U(ρ)=∫Ωu∞(ρ(x))+V(x)ρ(x)dx.


ρ(x)=(u∞∗)′(ϕ(x)−V(x)) guaranteed to be 0 on obstacle.
Remark

U∗(ϕ)=∫Ωu∞∗(ϕ(x)−V(x))dx
☇
Summary
- Wasserstein gradient flow: ρinfU(ρ)+2τ1W22(μ,ρ)
- Dual problem is better behaved: ϕsupJ(ϕ) or ψsupI(ψ)
1. Optimal transport
2. Wasserstein gradient flows
3. Numerical method
4. Movies
Back-and-forth algorithm
H is the Sobolev space
∥h∥H2=∫Ωα1∣∇h(x)∣2+α2∣h(x)∣2dx
J(ϕ)=⟨ϕc,μ⟩−U∗(ϕ)
I(ψ)=⟨ψ,μ⟩−U∗(ψc)
Recall
Jacobs, Lee, L. (’21)
A L G O R I T H M
Why H ?
Assume that
0≤−δ2J(ϕ)(h,h)≤ ∥h∥H2
for any ϕ,h∈H. Then the iterations
ϕk+1=ϕk+∇HJ(ϕk)
converge to the supremum of J.
Fundamental lemma in optimization:

Why H ?
Want Hessian bound
0≤−δ2J(ϕ)(h,h)≤∥h∥H2
J=F−U∗ with F(ϕ)=∫Ωϕcdμ.
−δ2F(ϕ)(h,h)=τ∫Ω∣∇h(x)∣g(ϕ)2(Tϕ#μ)(dx)
Why H ?
U∗(ϕ)=∫Ωu∞∗(ϕ(x))dx

δ2U∗(ϕ)(h,h)≤Ctrace∫Ω~∣∇h(x)∣2+∣h(x)∣2dx

δ2U∗(ϕ)(h,h)=∫{ϕ=0}∣h(z)∣2dσ(z)
Back-and-forth is fast
Operations on a grid with N points:
- c-transform: O(N)
- Tϕn:O(N)
- Δ−1:O(NlnN)
Summary
Novelty of the approach:
1) a careful analysis of the Hessian of the objective function
2) the back-and-forth scheme which boosts the convergence
4. Movies!
Slow diffusion (porous medium eq)
V(x)=−sin(5πx1)sin(3πx2)
512×512 points
m=2
m=4

Slow diffusion
m=4
V(x)=∥x−a∥2
512×512 points
Incompressible
V(x)=∥x−a∥2
1024×1024 points
Aggregation-diffusion
U(ρ)=∫ρ(x)3dx+∬∣x−y∣2ρ(x)ρ(y)dxdy
Thanks!
(inria-ljll 2021-12-06) Fast computations of Wasserstein gradient flows
By Flavien Léger
(inria-ljll 2021-12-06) Fast computations of Wasserstein gradient flows
- 586