back to comfortable ground! - mit csailgroups.csail.mit.edu/.../13_optimal_transport.pdf · topics...

78
Justin Solomon MIT, Spring 2017

Upload: others

Post on 20-May-2020

1 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Back to comfortable ground! - MIT CSAILgroups.csail.mit.edu/.../13_optimal_transport.pdf · Topics in Optimal Transportation Villani, 2003. Example: Semi-discrete transport Lévy

Justin SolomonMIT, Spring 2017

Page 2: Back to comfortable ground! - MIT CSAILgroups.csail.mit.edu/.../13_optimal_transport.pdf · Topics in Optimal Transportation Villani, 2003. Example: Semi-discrete transport Lévy

Back to comfortable ground!

Page 3: Back to comfortable ground! - MIT CSAILgroups.csail.mit.edu/.../13_optimal_transport.pdf · Topics in Optimal Transportation Villani, 2003. Example: Semi-discrete transport Lévy

BIASED

…toward my own research!

Page 4: Back to comfortable ground! - MIT CSAILgroups.csail.mit.edu/.../13_optimal_transport.pdf · Topics in Optimal Transportation Villani, 2003. Example: Semi-discrete transport Lévy

Understand geometry from a

“softened” probabilisticstandpoint.

Secondary goal:Application of machinery from previous lectures

(vector fields, geodesics, metric spaces, optimization…)

Page 5: Back to comfortable ground! - MIT CSAILgroups.csail.mit.edu/.../13_optimal_transport.pdf · Topics in Optimal Transportation Villani, 2003. Example: Semi-discrete transport Lévy

x

½(x)

“Somewhere over here.”

Page 6: Back to comfortable ground! - MIT CSAILgroups.csail.mit.edu/.../13_optimal_transport.pdf · Topics in Optimal Transportation Villani, 2003. Example: Semi-discrete transport Lévy

x

½(x)

“Exactly here.”

Page 7: Back to comfortable ground! - MIT CSAILgroups.csail.mit.edu/.../13_optimal_transport.pdf · Topics in Optimal Transportation Villani, 2003. Example: Semi-discrete transport Lévy

x

½(x)

“One of these two places.”

Page 8: Back to comfortable ground! - MIT CSAILgroups.csail.mit.edu/.../13_optimal_transport.pdf · Topics in Optimal Transportation Villani, 2003. Example: Semi-discrete transport Lévy

Which is closer, 1 or 2?

Query 1 2

Page 9: Back to comfortable ground! - MIT CSAILgroups.csail.mit.edu/.../13_optimal_transport.pdf · Topics in Optimal Transportation Villani, 2003. Example: Semi-discrete transport Lévy

Which is closer, 1 or 2?

Query 1 2

Page 10: Back to comfortable ground! - MIT CSAILgroups.csail.mit.edu/.../13_optimal_transport.pdf · Topics in Optimal Transportation Villani, 2003. Example: Semi-discrete transport Lévy

Which is closer, 1 or 2?

Query 1 2

p(x; y)

p1(x; y) p2(x; y)

Page 11: Back to comfortable ground! - MIT CSAILgroups.csail.mit.edu/.../13_optimal_transport.pdf · Topics in Optimal Transportation Villani, 2003. Example: Semi-discrete transport Lévy

p1(x) p2(x)

Lp normKL divergence

Page 12: Back to comfortable ground! - MIT CSAILgroups.csail.mit.edu/.../13_optimal_transport.pdf · Topics in Optimal Transportation Villani, 2003. Example: Semi-discrete transport Lévy

Which is closer, 1 or 2?

Query 1 2

p(x; y)

p1(x; y) p2(x; y)

Page 13: Back to comfortable ground! - MIT CSAILgroups.csail.mit.edu/.../13_optimal_transport.pdf · Topics in Optimal Transportation Villani, 2003. Example: Semi-discrete transport Lévy

Neither!

Query 1 2

p(x; y)

p1(x; y) p2(x; y)

Page 14: Back to comfortable ground! - MIT CSAILgroups.csail.mit.edu/.../13_optimal_transport.pdf · Topics in Optimal Transportation Villani, 2003. Example: Semi-discrete transport Lévy

Measured overlap, not displacement.

Page 15: Back to comfortable ground! - MIT CSAILgroups.csail.mit.edu/.../13_optimal_transport.pdf · Topics in Optimal Transportation Villani, 2003. Example: Semi-discrete transport Lévy

Smaller bins worsen histogram distances

Page 16: Back to comfortable ground! - MIT CSAILgroups.csail.mit.edu/.../13_optimal_transport.pdf · Topics in Optimal Transportation Villani, 2003. Example: Semi-discrete transport Lévy

Permuting histogram bins has

no effecton these distances.

Page 17: Back to comfortable ground! - MIT CSAILgroups.csail.mit.edu/.../13_optimal_transport.pdf · Topics in Optimal Transportation Villani, 2003. Example: Semi-discrete transport Lévy

Image courtesy M. Cuturi

Geometric theory of probability

Page 18: Back to comfortable ground! - MIT CSAILgroups.csail.mit.edu/.../13_optimal_transport.pdf · Topics in Optimal Transportation Villani, 2003. Example: Semi-discrete transport Lévy

Compare in this direction

Not in this direction

Page 19: Back to comfortable ground! - MIT CSAILgroups.csail.mit.edu/.../13_optimal_transport.pdf · Topics in Optimal Transportation Villani, 2003. Example: Semi-discrete transport Lévy

Match mass from the distributions

Page 20: Back to comfortable ground! - MIT CSAILgroups.csail.mit.edu/.../13_optimal_transport.pdf · Topics in Optimal Transportation Villani, 2003. Example: Semi-discrete transport Lévy

Match mass from the distributions

Cost to move mass 𝒎from 𝒙 to 𝒚:

𝒎 ⋅ 𝒅(𝒙, 𝒚)x

y

Page 21: Back to comfortable ground! - MIT CSAILgroups.csail.mit.edu/.../13_optimal_transport.pdf · Topics in Optimal Transportation Villani, 2003. Example: Semi-discrete transport Lévy

Supply distribution 𝒑𝟎 Demand distribution 𝒑𝟏

Page 22: Back to comfortable ground! - MIT CSAILgroups.csail.mit.edu/.../13_optimal_transport.pdf · Topics in Optimal Transportation Villani, 2003. Example: Semi-discrete transport Lévy

p q

𝒎 ⋅ 𝒅(𝒙, 𝒚)

Starts at 𝒑

Ends at 𝒒

Positive mass

Page 23: Back to comfortable ground! - MIT CSAILgroups.csail.mit.edu/.../13_optimal_transport.pdf · Topics in Optimal Transportation Villani, 2003. Example: Semi-discrete transport Lévy

EMD is a metric when d(x,y) satisfies the triangle inequality.

“The Earth Mover's Distance as a Metric for Image Retrieval”Rubner, Tomasi, and Guibas; IJCV 40.2 (2000): 99—121.

Revised in:

“Ground Metric Learning”Cuturi and Avis; JMLR 15 (2014)

Page 24: Back to comfortable ground! - MIT CSAILgroups.csail.mit.edu/.../13_optimal_transport.pdf · Topics in Optimal Transportation Villani, 2003. Example: Semi-discrete transport Lévy

Comparing histogram descriptorshttp://web.mit.edu/vondrick/ihog/

Page 25: Back to comfortable ground! - MIT CSAILgroups.csail.mit.edu/.../13_optimal_transport.pdf · Topics in Optimal Transportation Villani, 2003. Example: Semi-discrete transport Lévy

Min-cost flow

Page 26: Back to comfortable ground! - MIT CSAILgroups.csail.mit.edu/.../13_optimal_transport.pdf · Topics in Optimal Transportation Villani, 2003. Example: Semi-discrete transport Lévy

Step 1: Compute 𝑫𝒊𝒋

Step 2: Solve linear program

Simplex

Interior point

Hungarian algorithm

Page 27: Back to comfortable ground! - MIT CSAILgroups.csail.mit.edu/.../13_optimal_transport.pdf · Topics in Optimal Transportation Villani, 2003. Example: Semi-discrete transport Lévy

Underlying map!

Page 28: Back to comfortable ground! - MIT CSAILgroups.csail.mit.edu/.../13_optimal_transport.pdf · Topics in Optimal Transportation Villani, 2003. Example: Semi-discrete transport Lévy

Min-cost flow

Useful conclusions:

1. Practical

Can do better than generic solvers.

Page 29: Back to comfortable ground! - MIT CSAILgroups.csail.mit.edu/.../13_optimal_transport.pdf · Topics in Optimal Transportation Villani, 2003. Example: Semi-discrete transport Lévy

Min-cost flow

Useful conclusions:

1. Practical

2. Theoretical

Can do better than generic solvers.

𝑻 ∈ 𝟎, 𝟏 𝒏×𝒏 usuallycontains 𝑶(𝒏) nonzeros.

Page 30: Back to comfortable ground! - MIT CSAILgroups.csail.mit.edu/.../13_optimal_transport.pdf · Topics in Optimal Transportation Villani, 2003. Example: Semi-discrete transport Lévy
Page 31: Back to comfortable ground! - MIT CSAILgroups.csail.mit.edu/.../13_optimal_transport.pdf · Topics in Optimal Transportation Villani, 2003. Example: Semi-discrete transport Lévy

Can we optimize faster?

Is there a continuum interpretation?

What properties does this model exhibit?

We’ll answer them in parallel!

Page 32: Back to comfortable ground! - MIT CSAILgroups.csail.mit.edu/.../13_optimal_transport.pdf · Topics in Optimal Transportation Villani, 2003. Example: Semi-discrete transport Lévy

-1 +2

-1Supply

Demand

Page 33: Back to comfortable ground! - MIT CSAILgroups.csail.mit.edu/.../13_optimal_transport.pdf · Topics in Optimal Transportation Villani, 2003. Example: Semi-discrete transport Lévy

-1 +2

-1Supply

Demand

1

1

Page 34: Back to comfortable ground! - MIT CSAILgroups.csail.mit.edu/.../13_optimal_transport.pdf · Topics in Optimal Transportation Villani, 2003. Example: Semi-discrete transport Lévy

-1 +2

-1

1

1

Page 35: Back to comfortable ground! - MIT CSAILgroups.csail.mit.edu/.../13_optimal_transport.pdf · Topics in Optimal Transportation Villani, 2003. Example: Semi-discrete transport Lévy
Page 36: Back to comfortable ground! - MIT CSAILgroups.csail.mit.edu/.../13_optimal_transport.pdf · Topics in Optimal Transportation Villani, 2003. Example: Semi-discrete transport Lévy
Page 37: Back to comfortable ground! - MIT CSAILgroups.csail.mit.edu/.../13_optimal_transport.pdf · Topics in Optimal Transportation Villani, 2003. Example: Semi-discrete transport Lévy

Orient edges arbitrarily

-1 +2

-1 0

0 0

1

-1

00

2

0

Page 38: Back to comfortable ground! - MIT CSAILgroups.csail.mit.edu/.../13_optimal_transport.pdf · Topics in Optimal Transportation Villani, 2003. Example: Semi-discrete transport Lévy

In computer science:

Network flow problem

Page 39: Back to comfortable ground! - MIT CSAILgroups.csail.mit.edu/.../13_optimal_transport.pdf · Topics in Optimal Transportation Villani, 2003. Example: Semi-discrete transport Lévy

We used the structure of D.

Page 40: Back to comfortable ground! - MIT CSAILgroups.csail.mit.edu/.../13_optimal_transport.pdf · Topics in Optimal Transportation Villani, 2003. Example: Semi-discrete transport Lévy

Probabilities advectalong the surface

Think of probabilities like a fluid

Solomon, Rustamov, Guibas, and Butscher.“Earth Mover’s Distances on Discrete Surfaces.”

SIGGRAPH 2014

“Eulerian”

Page 41: Back to comfortable ground! - MIT CSAILgroups.csail.mit.edu/.../13_optimal_transport.pdf · Topics in Optimal Transportation Villani, 2003. Example: Semi-discrete transport Lévy

Total work

Advects from 𝝆𝟎 to 𝝆𝟏

“Beckmann problem”

Scales linearly

Page 42: Back to comfortable ground! - MIT CSAILgroups.csail.mit.edu/.../13_optimal_transport.pdf · Topics in Optimal Transportation Villani, 2003. Example: Semi-discrete transport Lévy

http://users.cms.caltech.edu/~keenan/pdf/DGPDEC.pdf

Curl free

Page 43: Back to comfortable ground! - MIT CSAILgroups.csail.mit.edu/.../13_optimal_transport.pdf · Topics in Optimal Transportation Villani, 2003. Example: Semi-discrete transport Lévy

Curl-free Div-free

Page 44: Back to comfortable ground! - MIT CSAILgroups.csail.mit.edu/.../13_optimal_transport.pdf · Topics in Optimal Transportation Villani, 2003. Example: Semi-discrete transport Lévy

1.

2.

Sparse SPD linear solve for 𝒇

Unconstrained and convex optimization for 𝒈

Page 45: Back to comfortable ground! - MIT CSAILgroups.csail.mit.edu/.../13_optimal_transport.pdf · Topics in Optimal Transportation Villani, 2003. Example: Semi-discrete transport Lévy

x y

Page 46: Back to comfortable ground! - MIT CSAILgroups.csail.mit.edu/.../13_optimal_transport.pdf · Topics in Optimal Transportation Villani, 2003. Example: Semi-discrete transport Lévy

Proposition: Satisfies triangle inequality.

0 eigenfunctions 100 eigenfunctions

Page 47: Back to comfortable ground! - MIT CSAILgroups.csail.mit.edu/.../13_optimal_transport.pdf · Topics in Optimal Transportation Villani, 2003. Example: Semi-discrete transport Lévy

No “displacement interpolation”McCann. “A Convexity Principle for Interacting Gases.” Advances in Mathematics 128 (1997).

Page 48: Back to comfortable ground! - MIT CSAILgroups.csail.mit.edu/.../13_optimal_transport.pdf · Topics in Optimal Transportation Villani, 2003. Example: Semi-discrete transport Lévy

Monge-Kantorovich Problem

TRICKY

NOTATION

Page 49: Back to comfortable ground! - MIT CSAILgroups.csail.mit.edu/.../13_optimal_transport.pdf · Topics in Optimal Transportation Villani, 2003. Example: Semi-discrete transport Lévy

Function from sets to probability

Page 50: Back to comfortable ground! - MIT CSAILgroups.csail.mit.edu/.../13_optimal_transport.pdf · Topics in Optimal Transportation Villani, 2003. Example: Semi-discrete transport Lévy

x

y

Page 51: Back to comfortable ground! - MIT CSAILgroups.csail.mit.edu/.../13_optimal_transport.pdf · Topics in Optimal Transportation Villani, 2003. Example: Semi-discrete transport Lévy

Continuous analog of EMDhttp://www.sciencedirect.com/science/article/pii/S152407031200029X#

Shortest path distance

Expectation

Geodesic distance d(x,y)

Page 52: Back to comfortable ground! - MIT CSAILgroups.csail.mit.edu/.../13_optimal_transport.pdf · Topics in Optimal Transportation Villani, 2003. Example: Semi-discrete transport Lévy

Not always well-posed!Image courtesy M. Cuturi

Page 53: Back to comfortable ground! - MIT CSAILgroups.csail.mit.edu/.../13_optimal_transport.pdf · Topics in Optimal Transportation Villani, 2003. Example: Semi-discrete transport Lévy

http://realgl.blogspot.com/2013/01/pdf-cdf-inv-cdf.html

PDF [CDF] CDF-1

Page 54: Back to comfortable ground! - MIT CSAILgroups.csail.mit.edu/.../13_optimal_transport.pdf · Topics in Optimal Transportation Villani, 2003. Example: Semi-discrete transport Lévy

W1 ineffective for averaging tasks

Page 55: Back to comfortable ground! - MIT CSAILgroups.csail.mit.edu/.../13_optimal_transport.pdf · Topics in Optimal Transportation Villani, 2003. Example: Semi-discrete transport Lévy

Mass moves along shortest paths

“Explains” shortest path.Image from “Optimal Transport with Proximal Splitting” (Papadakis, Peyré, and Oudet)

Page 56: Back to comfortable ground! - MIT CSAILgroups.csail.mit.edu/.../13_optimal_transport.pdf · Topics in Optimal Transportation Villani, 2003. Example: Semi-discrete transport Lévy
Page 57: Back to comfortable ground! - MIT CSAILgroups.csail.mit.edu/.../13_optimal_transport.pdf · Topics in Optimal Transportation Villani, 2003. Example: Semi-discrete transport Lévy

Cuturi. “Sinkhorn distances: Lightspeed computation of optimal transport” (NIPS 2013)

Page 58: Back to comfortable ground! - MIT CSAILgroups.csail.mit.edu/.../13_optimal_transport.pdf · Topics in Optimal Transportation Villani, 2003. Example: Semi-discrete transport Lévy

Prove on the board:

Page 59: Back to comfortable ground! - MIT CSAILgroups.csail.mit.edu/.../13_optimal_transport.pdf · Topics in Optimal Transportation Villani, 2003. Example: Semi-discrete transport Lévy

Alternating projection

Sinkhorn & Knopp. "Concerning nonnegative matrices and doubly stochastic matrices". Pacific J. Math. 21, 343–348 (1967).

Page 60: Back to comfortable ground! - MIT CSAILgroups.csail.mit.edu/.../13_optimal_transport.pdf · Topics in Optimal Transportation Villani, 2003. Example: Semi-discrete transport Lévy

1. Supply vector p2. Demand vector q

3. Multiplication by K

Page 61: Back to comfortable ground! - MIT CSAILgroups.csail.mit.edu/.../13_optimal_transport.pdf · Topics in Optimal Transportation Villani, 2003. Example: Semi-discrete transport Lévy

Gaussian convolutionFish image from borisfx.com

Page 62: Back to comfortable ground! - MIT CSAILgroups.csail.mit.edu/.../13_optimal_transport.pdf · Topics in Optimal Transportation Villani, 2003. Example: Semi-discrete transport Lévy

No need to store K

Page 63: Back to comfortable ground! - MIT CSAILgroups.csail.mit.edu/.../13_optimal_transport.pdf · Topics in Optimal Transportation Villani, 2003. Example: Semi-discrete transport Lévy

No need to store K

Page 64: Back to comfortable ground! - MIT CSAILgroups.csail.mit.edu/.../13_optimal_transport.pdf · Topics in Optimal Transportation Villani, 2003. Example: Semi-discrete transport Lévy

“Geodesics in heat”Crane, Weischedel, and Wardetzky; TOG 2013

Page 65: Back to comfortable ground! - MIT CSAILgroups.csail.mit.edu/.../13_optimal_transport.pdf · Topics in Optimal Transportation Villani, 2003. Example: Semi-discrete transport Lévy

Replace K with heat kernel

Solomon et al. "Convolutional Wasserstein Distances: Efficient Optimal Transportation on

Geometric Domains." SIGGRAPH 2015.

Page 66: Back to comfortable ground! - MIT CSAILgroups.csail.mit.edu/.../13_optimal_transport.pdf · Topics in Optimal Transportation Villani, 2003. Example: Semi-discrete transport Lévy

Similar problems, different algorithms

Page 67: Back to comfortable ground! - MIT CSAILgroups.csail.mit.edu/.../13_optimal_transport.pdf · Topics in Optimal Transportation Villani, 2003. Example: Semi-discrete transport Lévy

Benamou & Brenier“A computational fluid mechanics solution of the

Monge-Kantorovich mass transfer problem”Numer. Math. 84 (2000), pp. 375-393

Page 68: Back to comfortable ground! - MIT CSAILgroups.csail.mit.edu/.../13_optimal_transport.pdf · Topics in Optimal Transportation Villani, 2003. Example: Semi-discrete transport Lévy

Tangent space/inner product at 𝝁

Page 69: Back to comfortable ground! - MIT CSAILgroups.csail.mit.edu/.../13_optimal_transport.pdf · Topics in Optimal Transportation Villani, 2003. Example: Semi-discrete transport Lévy

Consider set of distributions as a manifold

Tangent spaces from advection

Geodesics from displacement interpolation

Page 70: Back to comfortable ground! - MIT CSAILgroups.csail.mit.edu/.../13_optimal_transport.pdf · Topics in Optimal Transportation Villani, 2003. Example: Semi-discrete transport Lévy

Giant field in modern math

Topics in Optimal TransportationVillani, 2003

Page 71: Back to comfortable ground! - MIT CSAILgroups.csail.mit.edu/.../13_optimal_transport.pdf · Topics in Optimal Transportation Villani, 2003. Example: Semi-discrete transport Lévy

Example: Semi-discrete transport

Lévy. “A numerical algorithm for L2 semi-discrete optimal transport in 3D.” (2014)

Page 72: Back to comfortable ground! - MIT CSAILgroups.csail.mit.edu/.../13_optimal_transport.pdf · Topics in Optimal Transportation Villani, 2003. Example: Semi-discrete transport Lévy

Slide courtesy M. Cuturi

Page 73: Back to comfortable ground! - MIT CSAILgroups.csail.mit.edu/.../13_optimal_transport.pdf · Topics in Optimal Transportation Villani, 2003. Example: Semi-discrete transport Lévy

Slide courtesy M. Cuturi

Page 74: Back to comfortable ground! - MIT CSAILgroups.csail.mit.edu/.../13_optimal_transport.pdf · Topics in Optimal Transportation Villani, 2003. Example: Semi-discrete transport Lévy

Learning

𝑣 ∈ 𝑉0

𝑣 ∉ 𝑉0“Wasserstein Propagation for Semi-Supervised Learning” (Solomon et al.)

“Fast Computation of Wasserstein Barycenters” (Cuturi and Doucet)

Page 75: Back to comfortable ground! - MIT CSAILgroups.csail.mit.edu/.../13_optimal_transport.pdf · Topics in Optimal Transportation Villani, 2003. Example: Semi-discrete transport Lévy

Morphing and registration

“Displacement Interpolation Using Lagrangian Mass Transport” (Bonneel et al.)

“An Optimal Transport Approach to Robust Reconstruction and Simplification of 2D Shapes” (de Goes et al.)

Page 76: Back to comfortable ground! - MIT CSAILgroups.csail.mit.edu/.../13_optimal_transport.pdf · Topics in Optimal Transportation Villani, 2003. Example: Semi-discrete transport Lévy

Graphics

“Earth Mover’s Distances on Discrete Surfaces” (Solomon et al.)

“Blue Noise Through Optimal Transport” (de Goes et al.)

Page 77: Back to comfortable ground! - MIT CSAILgroups.csail.mit.edu/.../13_optimal_transport.pdf · Topics in Optimal Transportation Villani, 2003. Example: Semi-discrete transport Lévy

Vision and image processing

“Geodesic Shape Retrieval via Optimal Mass Transport” (Rabin, Peyré, and Cohen)

“Adaptive Color Transfer with Relaxed Optimal Transport” (Rabin, Ferradans, and Papadakis)

Page 78: Back to comfortable ground! - MIT CSAILgroups.csail.mit.edu/.../13_optimal_transport.pdf · Topics in Optimal Transportation Villani, 2003. Example: Semi-discrete transport Lévy

Justin SolomonMIT, Spring 2017