Presentation is loading. Please wait.

Presentation is loading. Please wait.

Near-Optimal (Euclidean) Metric Compression

Similar presentations


Presentation on theme: "Near-Optimal (Euclidean) Metric Compression"β€” Presentation transcript:

1 Near-Optimal (Euclidean) Metric Compression
Piotr Indyk (MIT) Tal Wagner

2 Metric Sketching a.k.a. Distance Oracle
Task: Given a finite metric space, store all distances, approximately, with minimum space. Formally: 𝐷 πœ– Summ Input: Metric 𝐷 on 𝑋= 1,…,𝑛 , and πœ–>0 Summary: Given 𝑋,𝐷 and πœ–, output sπ‘˜βˆˆ{0,1 } 𝒃 Estimation: Given π‘₯,π‘¦βˆˆπ‘‹ and π‘ π‘˜, output 𝐷 (π‘₯,𝑦) 𝐷 π‘₯,𝑦 ≀ 𝐷 π‘₯,𝑦 ≀ 1+πœ– 𝐷(π‘₯,𝑦) Goal: Minimize 𝒃 sketch Est π‘₯,𝑦 𝐷 (π‘₯,𝑦)

3 Euclidean Metrics There is 𝑓:𝑋→ ℝ 𝑑 s.t. for all π‘₯,π‘¦βˆˆπ‘‹,
𝐷 π‘₯,𝑦 =‖𝑓 π‘₯ βˆ’π‘“ 𝑦 β€– 𝑓 is known during summary, unknown during estimation

4 Dimension Reduction For Euclidean metrics, dimension is reducible to 𝑑=𝑂( πœ– βˆ’2 log 𝑛 ) [Johnson-Lindenstrauss’84] Resulting sketch size: 𝑂( πœ– βˆ’2 𝑛 log 𝑛) numbers How many bits? Depends on numerics of input metric (has to!) The spread of (𝑋,𝐷) is Φ≔ max π‘₯,π‘¦βˆˆπ‘‹ 𝐷 π‘₯,𝑦 / min π‘₯β‰ π‘¦βˆˆπ‘‹ 𝐷(π‘₯,𝑦) We get (essentially): 𝑂( πœ– βˆ’2 𝑛 log 𝑛 log 𝑛Φ ) bits

5 Is JL Optimal? For dimension reduction? Yes [Larsen-Nelson’16]
Previously: Almost - up to a log⁑(1/πœ–) factor [Alon’03] For metric sketching? No [this work]

6 Results: Euclidean Metrics
Theorem: For Euclidean metrics, 𝑂 πœ– βˆ’2 log 1 πœ– 𝑛 log 𝑛 +𝑛 log log Ξ¦ bits. Lower bound: Ξ© πœ– βˆ’2 𝑛 log 𝑛 + 𝑛 log log Ξ¦ bits. (tight up to log 1/πœ– ) Compare with: 𝑂( πœ– βˆ’2 𝑛 log 𝑛 β‹…log 𝑛Φ ) (by JL) If Ξ¦=π‘π‘œπ‘™π‘¦(𝑛) and πœ–=Ξ© 1 : log 2 𝑛 vs. log 𝑛 bits per point. Same upper and lower bounds for β„“ 1 metrics.

7 𝑂 𝛼 βˆ’1 πœ– βˆ’2 log 1 πœ– 𝑛 log 𝑛 +𝑛 log log Ξ¦ bits.
Running Times Theorem: For Euclidean metrics, 𝑂 𝛼 βˆ’1 πœ– βˆ’2 log 1 πœ– 𝑛 log 𝑛 +𝑛 log log Ξ¦ bits. Construction time: 𝑂 𝑛 1+𝛼 + π‘›πœ– βˆ’2 for any 𝛼>0 (by LSH) Estimation time: 𝑂 πœ– βˆ’2 log 2 𝑛

8 Results: Arbitrary Metrics
Theorem: For arbitrary metrics, 𝑂 𝑛 2 log 1 πœ– +𝑛 log log Ξ¦ bits. Lower bound: Ξ© 𝑛 2 log 1 πœ– +𝑛 log log Ξ¦ (tight) Compare with: 𝑂 𝑛 2 log 1 πœ– + 𝑛 2 log log Ξ¦ (naΓ―ve rounding) If Ξ¦=π‘π‘œπ‘™π‘¦(𝑛) and πœ–=Ξ© 1 : 𝑛 log log 𝑛 vs. 𝑛 bits per point. (Same algorithm)

9 Related Work 𝑂(𝑛 πœ– βˆ’2 log 𝑛 log 𝑛Φ ) 𝑂( π‘›πœ– βˆ’2 log 𝑛 log Ξ¦ )
Euclidean metrics JL (essentially) 𝑂(𝑛 πœ– βˆ’2 log 𝑛 log 𝑛Φ ) [Kushilevitz-Ostrovsky-Rabani’98] [Alon-Klartag’16] 𝑂( π‘›πœ– βˆ’2 log 𝑛 log Ξ¦ ) [Molinaro-Woodruff-Yaroslavtsev’13] Ξ© π‘›πœ– βˆ’2 log 𝑛 log Ξ¦ But in a different communication model This work 𝑂 𝑛 πœ– βˆ’2 log 𝑛 log 1 πœ– +𝑛 log log Ξ¦ Ξ© 𝑛 πœ– βˆ’2 log 𝑛 +𝑛 log log Ξ¦

10 Related Work 𝑂 𝑛 1+1/k for stretch 2π‘˜βˆ’1β‰₯3 Arbitrary metrics
[AlthΓΆfer-Das-Dobkin-Joseph-Soares’93] [MatouΕ‘ek’96] [Thorup-Zwick’00] […] 𝑂 𝑛 1+1/k for stretch 2π‘˜βˆ’1β‰₯3 Tight by ErdΕ‘s Girth Conjecture Bipartite graphs Ξ© 𝑛 2 for stretch <3 This work Θ 𝑛 2 log 1 πœ– +𝑛 log log Ξ¦ for stretch 1+πœ–

11 𝐷 πœ– Summ Algorithm Overview sketch Est π‘₯,𝑦 𝐷 (π‘₯,𝑦)

12 Surrogates π‘₯ 2 ℝ 𝑑 π‘₯ 1 π‘Ÿ Fix π‘Ÿ Store each point as displacement from a nearby point

13 Surrogates ℝ 𝑑 π‘₯ 2 π‘₯ 1 𝑠 1 βˆ— 𝑠 2 βˆ— Fix π‘Ÿ
π‘₯ 2 βˆ’ 𝑠 1 βˆ— 𝑠 1 βˆ— π‘₯ 2 βˆ’ 𝑠 1 βˆ— 𝑠 2 βˆ— Fix π‘Ÿ Store each point as displacement from a nearby point Define a surrogate for every π‘₯ 𝑖 𝑠 1 βˆ— ≔ π‘₯ 1 𝑠 𝑖 βˆ— ≔ 𝑠 π‘–βˆ’1 βˆ— + π‘₯ 𝑖 βˆ’ 𝑠 π‘–βˆ’1 βˆ— 𝑣 is 𝑣 rounded to πœ–-net 𝑣 βˆ’π‘£ ≀ 𝑣 β‹…πœ–

14 Surrogates ℝ 𝑑 π‘₯ 2 π‘Ÿ π‘₯ 3 π‘₯ 1 𝑠 1 βˆ— 𝑠 2 βˆ— Fix π‘Ÿ
Store each point as displacement from a nearby point Define a surrogate for every π‘₯ 𝑖 𝑠 1 βˆ— ≔ π‘₯ 1 𝑠 𝑖 βˆ— ≔ 𝑠 π‘–βˆ’1 βˆ— + π‘₯ 𝑖 βˆ’ 𝑠 π‘–βˆ’1 βˆ— 𝑣 is 𝑣 rounded to πœ–-net 𝑣 βˆ’π‘£ ≀ 𝑣 β‹…πœ–

15 Surrogates ℝ 𝑑 π‘₯ 2 π‘₯ 3 π‘₯ 1 𝑠 1 βˆ— 𝑠 2 βˆ— 𝑠 3 βˆ— Fix π‘Ÿ
π‘₯ 3 βˆ’ 𝑠 2 βˆ— 𝑠 1 βˆ— 𝑠 2 βˆ— π‘₯ 3 βˆ’ 𝑠 2 βˆ— Fix π‘Ÿ 𝑠 3 βˆ— Store each point as displacement from a nearby point Define a surrogate for every π‘₯ 𝑖 𝑠 1 βˆ— ≔ π‘₯ 1 𝑠 𝑖 βˆ— ≔ 𝑠 π‘–βˆ’1 βˆ— + π‘₯ 𝑖 βˆ’ 𝑠 π‘–βˆ’1 βˆ— 𝑣 is 𝑣 rounded to πœ–-net 𝑣 βˆ’π‘£ ≀ 𝑣 β‹…πœ–

16 Surrogates ℝ 𝑑 π‘₯ 4 π‘₯ 2 π‘₯ 3 π‘Ÿ π‘₯ 1 𝑠 1 βˆ— 𝑠 2 βˆ— 𝑠 3 βˆ— Fix π‘Ÿ
Store each point as displacement from a nearby point Define a surrogate for every π‘₯ 𝑖 𝑠 1 βˆ— ≔ π‘₯ 1 𝑠 𝑖 βˆ— ≔ 𝑠 π‘–βˆ’1 βˆ— + π‘₯ 𝑖 βˆ’ 𝑠 π‘–βˆ’1 βˆ— 𝑣 is 𝑣 rounded to πœ–-net 𝑣 βˆ’π‘£ ≀ 𝑣 β‹…πœ–

17 Surrogates ℝ 𝑑 π‘₯ 4 π‘₯ 2 π‘₯ 3 π‘₯ 1 𝑠 1 βˆ— 𝑠 2 βˆ— 𝑠 4 βˆ— 𝑠 3 βˆ— Fix π‘Ÿ
π‘₯ 4 βˆ’ 𝑠 3 βˆ— 𝑠 1 βˆ— 𝑠 2 βˆ— π‘₯ 4 βˆ’ 𝑠 3 βˆ— 𝑠 4 βˆ— Fix π‘Ÿ 𝑠 3 βˆ— Store each point as displacement from a nearby point Define a surrogate for every π‘₯ 𝑖 𝑠 1 βˆ— ≔ π‘₯ 1 𝑠 𝑖 βˆ— ≔ 𝑠 π‘–βˆ’1 βˆ— + π‘₯ 𝑖 βˆ’ 𝑠 π‘–βˆ’1 βˆ— 𝑣 is 𝑣 rounded to πœ–-net 𝑣 βˆ’π‘£ ≀ 𝑣 β‹…πœ–

18 Surrogates ℝ 𝑑 Estimation: π‘₯ 4 π‘₯ 2 π‘₯ 3 π‘₯ 1 𝑠 1 βˆ— 𝑠 2 βˆ— 𝑠 4 βˆ— 𝑠 3 βˆ—
Claim: π‘₯ 𝑖 βˆ’ 𝑠 𝑖 βˆ— ≀2πœ–β‹…π‘Ÿ (Proof: by induction) Corollary: 𝑠 𝑖 βˆ— βˆ’ 𝑠 𝑗 βˆ— = 1Β±4πœ– β€– π‘₯ 𝑖 βˆ’ π‘₯ 𝑗 β€–

19 Surrogates ℝ 𝑑 π‘₯ 4 π‘₯ 2 π‘₯ 3 π‘₯ 1 𝑠 4 βˆ— 𝑠 2 βˆ— 𝑠 3 βˆ— Sketch: For π‘₯ 𝑖 store
π‘₯ 4 βˆ’ 𝑠 3 βˆ— 𝑠 4 βˆ— π‘₯ 2 βˆ’ 𝑠 1 βˆ— 𝑠 2 βˆ— π‘₯ 3 βˆ’ 𝑠 2 βˆ— 𝑠 3 βˆ— Sketch: For π‘₯ 𝑖 store Ingress label: π‘–βˆ’1 Rounded displacement: π‘₯ 𝑖 βˆ’ 𝑠 π‘–βˆ’1 βˆ— Size: 𝑂 log 𝑛 +𝑑 log 1 πœ– = 𝑂 πœ– log 𝑛 bits per point

20 Scheme works because all displacements have length 𝒓
Surrogates π‘₯ 4 π‘₯ 2 ℝ 𝑑 π‘Ÿ π‘₯ 3 π‘Ÿ π‘₯ 1 π‘Ÿ Scheme works because all displacements have length 𝒓 Sketch: For π‘₯ 𝑖 store Ingress label: π‘–βˆ’1 Rounded displacement: π‘₯ 𝑖 βˆ’ 𝑠 π‘–βˆ’1 βˆ— Size: 𝑂 log 𝑛 +𝑑 log 1 πœ– = 𝑂 πœ– log 𝑛 bits per point

21 Multiple Distance Scales
ℝ 𝑑 π‘₯ 2 𝑦 2 𝑦 1 π‘Ÿ π‘…β‰«π‘Ÿ π‘₯ 1 𝑅 π‘Ÿ

22 Multiple Distance Scales
ℝ 𝑑 π‘₯ 2 𝑦 2 𝑦 1 π‘Ÿ π‘…β‰«π‘Ÿ π‘₯ 1 𝑅 πœ–π‘… π‘Ÿ Previous scheme breaks down Error πœ–π‘… too big for distance π‘Ÿ

23 Multiple Distance Scales
ℝ 𝑑 π‘₯ 2 𝑦 2 𝑦 1 π‘Ÿ π‘…β‰«π‘Ÿ π‘₯ 1 𝑅 π‘Ÿ Previous scheme breaks down What can we do? Option 1: Use better precision: πœ– 𝑅 β‰”πœ–β‹… π‘Ÿ 𝑅 (costs more bits)

24 Multiple Distance Scales
ℝ 𝑑 π‘₯ 2 𝑦 2 𝑦 1 π‘Ÿ π‘…β‰«π‘Ÿ π‘₯ 1 𝑅 π‘Ÿ Previous scheme breaks down What can we do? Option 1: Use better precision: πœ– 𝑅 β‰”πœ–β‹… π‘Ÿ 𝑅 (costs more bits) Option 2: Contract pairs to single points (saves bits, works if π‘Ÿ<πœ–π‘…)

25 General Case: Overview
Store each point as displacement from a nearby point Tune precision individually per cluster Contract isolated clusters into single point (from external pov)

26 Hierarchical Clustering
Step 1: Construct cluster tree. In level 𝑖, draw edges of length < 2 𝑖 , and take connected components. ℝ 𝑑 4 5 6 1 3 2 7 8

27 Hierarchical Clustering
Step 1: Construct cluster tree. In level 𝑖, draw edges of length < 2 𝑖 , and take connected components. ℝ 𝑑 4 5 6 1 3 2 7 1 2 3 4 5 6 7 8 8

28 Hierarchical Clustering
Step 1: Construct cluster tree. In level 𝑖, draw edges of length < 2 𝑖 , and take connected components. ℝ 𝑑 4 5 6 1 3 2 1 4 7 7 1 2 3 4 5 6 7 8 8

29 Hierarchical Clustering
Step 1: Construct cluster tree. In level 𝑖, draw edges of length < 2 𝑖 , and take connected components. ℝ 𝑑 4 5 6 1 3 1 7 2 1 4 7 7 1 2 3 4 5 6 7 8 8

30 Hierarchical Clustering
Step 1: Construct cluster tree. In level 𝑖, draw edges of length < 2 𝑖 , and take connected components. ℝ 𝑑 4 1 7 5 6 1 3 1 7 2 1 4 7 7 1 2 3 4 5 6 7 8 8

31 Hierarchical Clustering
Step 1: Construct cluster tree. In level 𝑖, draw edges of length < 2 𝑖 , and take connected components. ℝ 𝑑 1 4 1 7 5 6 1 3 1 7 2 1 4 7 7 1 2 3 4 5 6 7 8 8

32 Surrogates Step 2: Store each point as displacement from a nearby point. Tune precision individually per cluster (based on its level and diameter). Claim: Amortized 𝑂( πœ– βˆ’2 log 𝑛 ) bits per cluster. ℝ 𝑑 1 4 πœ– 1 7 5 πœ– 6 1 3 1 7 πœ– πœ– 2 1 4 7 πœ– 7 1 2 πœ– 3 4 5 6 7 8 8

33 Tree Compression Step 3: Contract isolated clusters (from external pov). Compresses long degree-1 paths in cluster tree. ℝ 𝑑 1 4 1 7 5 6 1 3 1 7 2 1 4 7 7 1 2 3 4 5 6 7 8 8

34 Tree Compression Step 3: Contract isolated clusters (from external pov). Compresses long degree-1 paths in cluster tree. Claim: Tree size becomes 𝑂 𝑛 log 1 πœ– . ℝ 𝑑 1 4 1 7 5 6 β€œlong edge” 1 3 1 2 1 4 7 7 1 2 3 4 5 6 7 8 8

35 The Sketch Store the tree: #nodes: 𝑂 𝑛 log 1 πœ–
Lengths of long edges: 𝑂(𝑛 log log Ξ¦) bits For each node, store: Center label: 𝑂( log 𝑛) bits Ingress label: 𝑂( log 𝑛) bits Approx. displacement: 𝑂 πœ– βˆ’2 log 𝑛 bits (amortized) 7 8 1 2 3 5 6 4 ℝ 𝑑 1 2 3 4 5 6 7 8

36 Estimation ℝ 𝑑 Given a pair of point labels,
Compute best surrogates available in sketch. Return distance between them. ℝ 𝑑 1 4 1 7 5 6 1 3 1 2 1 4 7 7 1 2 3 4 5 6 7 8 8

37 Estimation ℝ 𝑑 Dist(2,8) = ? Given a pair of point labels,
Compute best surrogates available in sketch. Return distance between them. Dist(2,8) = ? ℝ 𝑑 1 4 1 7 5 6 1 3 1 2 1 4 7 7 2 7 1 2 3 4 5 6 7 8 8

38 Estimation ℝ 𝑑 Dist(7,8) = ? Given a pair of point labels,
Compute best surrogates available in sketch. Return distance between them. Dist(7,8) = ? ℝ 𝑑 1 4 1 7 5 6 1 3 1 2 1 4 7 8 7 7 1 2 3 4 5 6 7 8 8

39 Subsequent Extensions
Recover low-dimensional embedding Approximate nearest neighbor of a new query point Estimate all distances from a new query point Open problem: log 1 πœ– gap for Euclidean metrics 𝑂 πœ– βˆ’2 𝑛 log 𝑛 log 1 πœ– +𝑛 log log Ξ¦ Ξ© πœ– βˆ’2 𝑛 log 𝑛 +𝑛 log log Ξ¦ Thank you


Download ppt "Near-Optimal (Euclidean) Metric Compression"

Similar presentations


Ads by Google