Download presentation
Presentation is loading. Please wait.
Published bySusanto Jayadi Modified over 6 years ago
1
Lecture 10: Sketching S3: Nearest Neighbor Search
Left to the title, a presenter can insert his/her own image pertinent to the presentation.
2
Plan PS2 due yesterday, 7pm Sketching Nearest Neighbor Search Scriber?
3
Sketching π: β π β short bit-strings β 2 , β 1 norm: π( π β2 ) words
given π(π₯) and π(π¦), should be able to estimate some function of π₯ and π¦ With 90% success probability (πΏ=0.1) β 2 , β 1 norm: π( π β2 ) words Decision version: given π in advanceβ¦ Lemma: β 2 , β 1 norm: π( π β2 ) bits π¦ π₯ π π 010110 010101 Distinguish between ||π₯βπ¦||β€π ||π₯βπ¦||> 1+π π Estimate ||π₯βπ¦| | 2
4
Sketching: decision version
Consider Hamming space: π₯,π¦β 0,1 π Lemma: for any π>0, can achieve π(1/ π 2 ) -bit sketch. [on blackboard]
5
Conclusion Dimension reduction: In β 1 : no dimension reduction
[Johnson-Lindenstraussβ84]: a random linear projection into π dimensions preserves ||π₯βπ¦| | 2 , up to 1+π approximation with probability β₯1β π βΞ© π 2 π Random linear projection: Can be πΊπ₯ where πΊ is Gaussian, or Β±1 entry-wise Hence: preserves distance between π points as long as π=Ξ 1 π 2 log π Can do faster than π(ππ) time Using Fast Fourier Transform In β 1 : no dimension reduction But can do sketching Using π-stable distributions (Cauchy for π=1) Sketching: decision version, constant πΏ=0.1: For β 1 , β 2 , can do with π 1 π 2 bits!
6
Section 3: Nearest Neighbor Search
7
Approximate NNS π-approximate π-near neighbor: given a query point π
assuming there is a point π β within distance π, report a point π β² βπ· s.t. πβ²βπ πβ²βπ β€ππ π π β ππ π π β²
8
NNS: approach 1 Boosted sketch:
Let π = sketch for the decision version (90% success probability) new sketch π : keep π=π( log π ) copies of π estimator is the majority answer of the π estimators Sketch size: π( π β2 log π ) bits Success probability: 1β π β2 (Chernoff) Preprocess: compute sketches π(π) for all the points πβπ· Query: compute sketch π(π), and compute distance to all points using sketch Time: improved from π(ππ) to π(π π β2 log π )
9
NNS: approach 2 Query time below π ?
Theorem [KOR98]: π(π π β2 log π) query time and π π 1/ π 2 space for 1+π approximation. Proof: Note that π(π) has π€=π π β2 log π bits Only 2 π€ possible sketches! Store an answer for each of 2 π€ = π π π β2 possible inputs In general: if a distance has constant-size sketch, admits a poly-space NNS data structure! Space closer to linear? approach 3 will require more specialized sketchesβ¦
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.