Download presentation
Presentation is loading. Please wait.
1
Lecture 16: Earth-Mover Distance
COMS E F15 Lecture 16: Earth-Mover Distance Left to the title, a presenter can insert his/her own image pertinent to the presentation.
2
Administrivia, Plan Administrivia: Plan: Scriber?
NO CLASS next Tuesday 11/3 (holiday) Plan: Earth-Mover Distance Scriber?
3
Earth-Mover Distance Definition: Which metric space?
Given two sets π΄, π΅ of points in a metric space πΈππ·(π΄,π΅) = min cost bipartite matching between π΄ and π΅ Which metric space? Can be plane, β 2 , β 1 β¦ Applications in image vision Images courtesy of Kristen Grauman
4
Embedding EMD into β 1 Why β 1 ? At least as hard as β 1
Can embed 0,1 π into EMD with distortion 1 β 1 is richer than β 2 Will focus on integer grid Ξ 2 :
5
Embedding EMD into β 1 [Charikarβ02, Indyk-Thaperβ03] Theorem: Can embed EMD over Ξ 2 into β 1 with distortion π log Ξ . In fact, will construct a randomized π: 2 Ξ 2 β β 1 such that: for any π΄,π΅β Ξ 2 : πΈππ· π΄,π΅ β€π¬ ||π π΄ βπ π΅ | | 1 β€π log Ξ β
πΈππ·(π΄,π΅) time to embed a set of π points: π π log Ξ . Consequences: Nearest Neighbor Search: π(π log Ξ ) approximation with π(π π 1+1/π ) space, and π( π 1/π β
π log Ξ ) query time. Computation: π(logβ‘Ξ) approximation in π π log Ξ time Best known: 1+π approximation in π π time [ASβ12]
6
What if π΄ β |π΅| ? Suppose: Define where
π΄ =π π΅ =π<π Define πΈππ· β π΄,π΅ =Ξ πβπ + πππ π΄β²,π πβπ΄β² π(π,π π ) where π΄ β² ranges over all subsets of π΄ of size π π:π΄β²β π΅ ranges over all 1-to-1 mappings For optimal π΄β², call πβπ΄\ π΄ β² unmatched
7
Embedding EMD over small grid
Suppose ο=3 π(π΄) has nine coordinates, counting # points in each integer point π(π΄)=(2,1,1,0,0,0,1,0,0) π(π΅)=(1,1,0,0,2,0,0,0,1) Claim: distortion embedding
8
High level embedding Set in Ξ 2 box Embedding of set π΄: Want to prove
take a quad-tree grid of cell size Ξ/3 partition each cell in 3x3 recurse until of size 3x3 randomly shift it Each cell gives a coordinate: π (π΄)π=#points in the cell π Want to prove π¬ π π΄ βπ π΅ βπΈππ·(π΄,π΅) 2 1 1 1 2 2 2 1 2 1 π π¨ = β¦2210β¦ 0002β¦0011β¦0100β¦0000β¦ π π© = β¦1202β¦ 0100β¦0011β¦0000β¦1100β¦
9
Main idea: intuition Decompose EMD over [ο]2 into EMDs over smaller grids Recursively reduce to ο=π(1) β +
10
Decomposition Lemma π ο/π
For randomly-shifted cut-grid πΊ of side length π, will prove: 1) πΈππ·ο(π΄,π΅) β€ πΈπ π· π (π΄1, π΅1) + πΈπ π· π (π΄2,π΅2)+β¦ + πβ
πΈπ π· Ξ/π (π΄πΊ, π΅πΊ) 2) πΈπ π· Ξ π΄,π΅ β₯ 1 3 π¬[πΈπ π· π π΄ 1 , π΅ 1 +πΈπ π· π π΄ 2 , π΅ 2 +β¦] 3) πΈπ π· Ξ π΄,π΅ β₯π¬[πβ
πΈπ π· Ξ/π ( π΄ πΊ , π΅ πΊ )] The distortion will follow by applying the lemma recursively to (AG,BG) π ο/π
11
1 (lower bound) Claim 1: for a randomly-shifted cut-grid πΊ of side length π: πΈππ·ο(π΄,π΅) β€ πΈππ·π(π΄1, π΅1) + πΈππ·π(π΄2,π΅2)+β¦ + πβ
πΈπ π· Ξ/π ( π΄ πΊ , π΅ πΊ ) Construct a matching π for πΈπ π· Ξ π΄,π΅ from the matchings on RHS as follows For each ποπ΄ (suppose πο π΄ π ) it is either: 1) matched in πΈππ·( π΄ π , π΅ π ) to some πο π΅ π (if πβ π΄ π β²) then π π =π 2) or πβ π΄ π β², and then it is matched in πΈππ·( π΄ πΊ , π΅ πΊ ) to some πο π΅ π (πβ π) Cost? 1) paid by πΈππ·( π΄ π , π΅ π ) 2) Move π to center (ο) Charge to πΈππ·( π΄ π , π΅ π ) Move from cell π to cell π Charge π to πΈππ·( π΄ πΊ , π΅ πΊ ) If π΄ >|π΅|, extra |π΄|β|π΅| pay πβ
Ξ π =Ξ on LHS & RHS π ο/π
12
2 & 3 (upper bound) Claims 2,3: for a randomly-shifted cut-grid πΊ of side length π, we have: 2) πΈπ π· Ξ π΄,π΅ β₯ 1 3 π¬[πΈπ π· π π΄ 1 , π΅ 1 +πΈπ π· π π΄ 2 , π΅ 2 +β¦] 3) πΈπ π· Ξ π΄,π΅ β₯π¬[πβ
πΈπ π· Ξ/π ( π΄ πΊ , π΅ πΊ )] Fix a matching π minimizing πΈπ π· Ξ (π΄,π΅) Will construct matchings for each EMD on RHS Uncut pairs π,π βπ are matched in respective (π΄,π΅) Cut pairs π,π βπ : are unmatched in their mini-grids are matched in ( π΄ πΊ , π΅ πΊ )
13
3: Cost Claim 2: 3β
πΈπ π· Ξ π΄,π΅ β₯π¬[πΈπ π· π π΄ 1 , π΅ 1 +πΈπ π· π π΄ 2 , π΅ 2 +β¦] Uncut pairs (π,π) are matched in respective ( π΄ π , π΅ π ) Total contribution from uncut pairs β€πΈπ π· Ξ (π΄,π΅) Consider a cut pair (π,π) at distance πβπ=( π π₯ , π π¦ ) (π,π) can contribute to RHS as they may be unmatched in their own mini-grids Pr[(π,π) cut] =1β 1β π π₯ π β π π¦ π + β€ π π₯ π + π π¦ π β€ 1 π ||πβπ| | 2 Expected contribution of (π,π) to RHS: β€Pr[(π,π) cut] β
2πβ€2 πβπ 2 Total expected cost contributed to RHS: 2β
πΈπ π· Ξ (π΄,π΅) Total (cut & uncut pairs): 3β
πΈπ π· Ξ (π΄,π΅) π π π₯
14
3: Cost Claim: πΈπ π· Ξ π΄,π΅ β₯π¬[πβ
πΈπ π· Ξ/π ( π΄ πΊ , π΅ πΊ )]
πΈπ π· Ξ π΄,π΅ β₯π¬[πβ
πΈπ π· Ξ/π ( π΄ πΊ , π΅ πΊ )] Uncut pairs: contribute zero to RHS! Cut pair: π,π βπ with πβπ=( π π₯ , π π¦ ) if π π₯ = π₯π+ π π , and π π¦ =π¦π+ π π¦ , then expected cost contribution to πβ
πΈπ π· Ξ/π ( π΄ πΊ , π΅ πΊ ): β€ π₯+ π π₯ π β
π + π¦+ π π¦ π β
π = π π₯ + π π¦ = πβπ 2 Total expected cost β€ πΈπ π· Ξ (π΄,π΅) π π π π π₯
15
Recurse on decomposition
For randomly-shifted cut-grid πΊ of side length π, we have: 1) πΈππ·ο(π΄,π΅) β€ πΈπ π· π (π΄1, π΅1) + πΈπ π· π (π΄2,π΅2)+β¦ + πβ
πΈπ π· Ξ/π (π΄πΊ, π΅πΊ) 2) πΈπ π· Ξ π΄,π΅ β₯ 1 3 π¬[πΈπ π· π π΄ 1 , π΅ 1 +πΈπ π· π π΄ 2 , π΅ 2 +β¦] 3) πΈπ π· Ξ π΄,π΅ β₯π¬[πβ
πΈπ π· Ξ/π ( π΄ πΊ , π΅ πΊ )] We applying decomposition recursively for π=3 Choose randomly-shifted cut-grid πΊ 1 on [ο]2 Obtain many grids [3]2, and a big grid [ο/3]2 Then choose randomly-shifted cut-grid πΊ 2 on [ο/3]2 Obtain more grids [3]2, and another big grid [ο/9]2 Then choose randomly-shifted cut-grid πΊ 3 on [ο/9]2 β¦ Then, embed each of the small grids [3]2 into β1, using π(1) distortion embedding, and concatenate the embeddings Each grid occupies 9 coordinates on β 1 embedding
16
Proving recursion works
Claim: embedding contracts distances by π 1 : πΈππ·ο(π΄,π΅) β€ β€βπ πΈππ·π π΄π, π΅π +πβ
πΈπ π· Ξ/π ( π΄ πΊ 1 , π΅ πΊ 1 ) β€βπ πΈπ π· π π΄π, π΅π + πβπ πΈππ·π π΄ πΊ 1 ,π , π΅ πΊ 1 ,π +πβ
πΈπ π· Ξ π π΄ πΊ 2 , π΅ πΊ 2 β€ β¦ β€ sum of πΈπ π· 3 costs of 3Γ3 instances β€ ||π π΄ βπ π΅ | | 1 Claim: embedding distorts distances by π log Ξ in expectation: 3 log π Ξ β
πΈππ·ο(π΄,π΅) β₯3β
πΈππ·ο(π΄, π΅) + 3 log π Ξ π β
πΈπ π· Ξ (π΄, π΅) β₯π[ βπ πΈπ π· π (π΄π, π΅π) + 3 log π Ξ π β
πβ
πΈπ π· Ξ/π ( π΄ πΊ 1 , π΅ πΊ 1 ) ] β₯β¦ β₯ sum of πΈπ π· 3 costs of 3Γ3 instances β₯ ||π π΄ βπ π΅ | | 1
17
Final theorem Theorem: can embed EMD over [Ξ]2 into β 1 with π( log Ξ ) distortion in expectation. Notes: Dimension required: π( Ξ 2 ), but a set π΄ of size π maps to a vector that has only π(π β
log Ξ ) non-zero coordinates. Time: can compute in π(π β
logβ‘ο) By Markovβs, itβs π( log Ξ ) distortion with 90% probability Applications: Can compute πΈππ·(π΄,π΅) in time π(π β
log Ξ ) NNS: π(πβ
log Ξ) approximation, with π( π 1+1/π β
π ) space, and π( π 1/π β
π β
log Ξ) query time.
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.