Approximate Nearest Line Search in High Dimensions
Sepideh Mahabadi
1
Approximate Nearest Line Search in High Dimensions Sepideh Mahabadi - - PowerPoint PPT Presentation
Approximate Nearest Line Search in High Dimensions Sepideh Mahabadi 1 The NLS Problem Given: a set of lines in 2 The NLS Problem Given: a set of lines in Goal: build a data structure s.t.
1
2
3
4
5
Nearest Neighbor Problems Motivation Previous Work Our result Notation
6
NN: Given a set of π points π, build a data structure s.t. given a query point π, finds the closest point πβ to π.
7
NN: Given a set of π points π, build a data structure s.t. given a query point π, finds the closest point πβ to π.
pattern recognition, computer vision
β Features: dimensions β Objects: points β Similarity: distance between points
8
NN: Given a set of π points π, build a data structure s.t. given a query point π, finds the closest point πβ to π.
pattern recognition, computer vision
β Features: dimensions β Objects: points β Similarity: distance between points
dimensionalityβ:
β Either space or query time is exponential in π β Little improvement over linear search
9
10
β Space: ππ π
1 π2
β Query time: π log π
π π 1
11
12
13
β Varying light gain parameter of images β Each image/point becomes a line β Search for the closest line to the query image
14
15
1 π π 1
16
1 π π 1
1 π2+ 1 π’2
17
1 π π 1
1 π2+ 1 π’2
π π+1βπ+π’
1+
ππ π+1βπ + π logπ 1 π’ π)
1 π2
1 π π 1
18
1 π2
1 π π 1
19
1 π2
1 π π 1
20
1 π2
1 π π 1
21
22
23
24
25
26
27
Unbounded Module Net Module Parallel Module
28
29
30
31
32
ππ , the returned line βπ is
33
ππ , the returned line βπ is
34
38
β Either the returned line βπ is an approximate closest line β Or πππ‘π’ π, βπ β€ π¦/π
39
42
43
44
perpendicular to βπ
45
perpendicular to βπ
Lemma: if πππ‘π’ π, π β€
πΈπ π , then
line
β€ πΈ
46
perpendicular to βπ
Lemma: if πππ‘π’ π, π β€
πΈπ π , then
line
β€ πΈ Thus, for a set of almost parallel lines, we can use a set
47
51
52
53
54
β Use βπ to find a much closer line βπβ² β Update βπ with βπ
β²
55
Improvement step
β Use βπ to find a much closer line βπβ² β Update βπ with βπ
β²
56
Improvement step
β Use βπ to find a much closer line βπβ² β Update βπ with βπ
β²
57
Improvement step
β Use βπ to find a much closer line βπβ² β Update βπ with βπ
β²
58
Improvement step
β Use βπ to find a much closer line βπβ² β Update βπ with βπ
β²
β πππ‘π’ π, βπ β€ πππ‘π’ π, βlog π (1 + π) β log π improvement steps suffices to find an approximate closest line
59
Improvement step
60
61
62
63
64
65
66
67
68
69
70
π¦ π from πβ²
71
π¦ π from πβ²
π π ) touches all such lines
72
For each β β π
73
For each β β π
74
For each β β π
β Sort all lines in ππ such as ββ² according to the position of π·πββββ²
75
For each β β π
β Sort all lines in ππ such as ββ² according to the position of π·πββββ² β For each interval of lines π΅ in sorted ππ
76
For each β β π
β Sort all lines in ππ such as ββ² according to the position of π·πββββ² β For each interval of lines π΅ in sorted ππ
center on β which intersects all lines in π΅
π΅ β€ π( π¦ π))
77
For each β β π
β Sort all lines in ππ such as ββ² according to the position of π·πββββ² β For each interval of lines π΅ in sorted ππ
center on β which intersects all lines in π΅
π΅ β€ π( π¦ π))
π΅/π2) with separation π π΅π3
(#samples = O(π π
π΅/(π2π π΅π3)) = π(π/π5))
78
For each β β π
β Sort all lines in ππ such as ββ² according to the position of π·πββββ² β For each interval of lines π΅ in sorted ππ
center on β which intersects all lines in π΅
π΅ β€ π( π¦ π))
π΅/π2) with separation π π΅π3
(#samples = O(π π
π΅/(π2π π΅π3)) = π(π/π5))
1 π2 π π΅
79
Given query point π
80
Given query point π β Project π on β to get πβ² β Use binary search to find the set π΅ of all lines ββ² that are within distance 2π¦ of β, and that π·πββββ² is within distance 2π¦/π of πβ²
81
Given query point π β Project π on β to get πβ² β Use binary search to find the set π΅ of all lines ββ² that are within distance 2π¦ of β, and that π·πββββ² is within distance 2π¦/π of πβ²
82
Given query point π β Project π on β to get πβ² β Use binary search to find the set π΅ of all lines ββ² that are within distance 2π¦ of β, and that π·πββββ² is within distance 2π¦/π of πβ² β Let πΆπ΅(ππ΅, π
π΅) be the corresponding ball
83
Given query point π β Project π on β to get πβ² β Use binary search to find the set π΅ of all lines ββ² that are within distance 2π¦ of β, and that π·πββββ² is within distance 2π¦/π of πβ² β Let πΆπ΅(ππ΅, π
π΅) be the corresponding ball
β If π¦ β πΆπ΅(ππ΅,
π π΅ π2) use net module:
π
π΅π2 β€ π¦π (π π΅ β€ π¦/π) -> we improved
84
Given query point π β Project π on β to get πβ² β Use binary search to find the set π΅ of all lines ββ² that are within distance 2π¦ of β, and that π·πββββ² is within distance 2π¦/π of πβ² β Let πΆπ΅(ππ΅, π
π΅) be the corresponding ball
β If π¦ β πΆπ΅(ππ΅,
π π΅ π2) use net module:
π
π΅π2 β€ π¦π (π π΅ β€ π¦/π) -> we improved
β Otherwise use unbounded module to find the approximate closest line -> done!
85
86
slab
β In each slab the relative order of distπΌ β,π β, β1 and πππ‘π’πΌ β,π (β, β2) on the hyper-plane remains the same as we move π on β in the slab There is a unique ordering of the lines
87
β In each slab the relative order of distπΌ β,π β, β1 and πππ‘π’πΌ β,π (β, β2) on the hyper-plane remains the same as we move π on β in the slab There is a unique ordering of the lines β πππ‘π’πΌ β,π β1,β2 on the hyper-plane is monotone
88
β In each slab the relative order of distπΌ β,π β, β1 and πππ‘π’πΌ β,π (β, β2) on the hyper-plane remains the same as we move π on β in the slab There is a unique ordering of the lines β πππ‘π’πΌ β,π β1,β2 on the hyper-plane is monotone The minimum ball intersecting any prefix of lines have its center on the boundary of slab
89
β In each slab the relative order of distπΌ β,π β, β1 and πππ‘π’πΌ β,π (β, β2) on the hyper-plane remains the same as we move π on β in the slab There is a unique ordering of the lines β πππ‘π’πΌ β,π β1,β2 on the hyper-plane is monotone The minimum ball intersecting any prefix of lines have its center on the boundary of slab.
90
touching the closest ππ’β lines s.t. π β β. We know π would be on the boundary of slab.
91
touching the closest ππ’β lines s.t. π β β. We know π would be on the boundary of slab.
92
touching the closest ππ’β lines s.t. π β β. We know π would be on the boundary of slab.
93
touching the closest ππ’β lines s.t. π β β. We know π would be on the boundary of slab.
π ππ0 , β¦ , ππ’ = π πππ’
94
touching the closest ππ’β lines s.t. π β β. We know π would be on the boundary of slab.
π ππ0 , β¦ , ππ’ = π πππ’
95
touching the closest ππ’β lines s.t. π β β. We know π would be on the boundary of slab.
π ππ0 , β¦ , ππ’ = π πππ’
96
touching the closest ππ’β lines s.t. π β β. We know π would be on the boundary of slab.
π ππ0 , β¦ , ππ’ = π πππ’
β Build unbounded module on it
97
touching the closest ππ’β lines s.t. π β β. We know π would be on the boundary of slab.
π ππ0 , β¦ , ππ’ = π πππ’
β Build unbounded module on it β For each line βπ
as their base line for all the lines that are ππ-close to βπ , so that they cover the space between πΆ(π, ππ) and πΆ(π, ππ+1) with separation ππ+1π
98
99
100
101
102
103
104
105
106
107
ππ π π 1
Γ π―
π π π 1
, π = π π + π π
1 π2
π log π π 1 Γ π°(
π π π 1
, π) = π + log π +
1 π π 1
108
109
110
111
112