Neighbor-Sensitive Hashing Yongjoo Park (250, 3, 122, 130, 68, ) - - PowerPoint PPT Presentation

neighbor sensitive hashing
SMART_READER_LITE
LIVE PREVIEW

Neighbor-Sensitive Hashing Yongjoo Park (250, 3, 122, 130, 68, ) - - PowerPoint PPT Presentation

Michael Cafarella Barzan Mozafari University of Michigan, Ann Arbor Neighbor-Sensitive Hashing Yongjoo Park (250, 3, 122, 130, 68, ) What are the k most similar items? (109, 33, 92, 87, 161, ), database (50, 83, 22, 230, 98, ), (2, 183,


slide-1
SLIDE 1

Neighbor-Sensitive Hashing

Yongjoo Park Michael Cafarella Barzan Mozafari

University of Michigan, Ann Arbor

slide-2
SLIDE 2

k-Nearest Neighbors Problem (kNN)

query database What are the k most similar items?

(250, 3, 122, 130, 68, )

(109, 33, 92, 87, 161, ), (50, 83, 22, 230, 98, ), (2, 183, 59, 18, 178, ), (221, 183, 259, 88, 112, ), .

1

slide-3
SLIDE 3

k-Nearest Neighbors Problem (kNN)

query database What are the k most similar items?

(250, 3, 122, 130, 68, )

(109, 33, 92, 87, 161, ), (50, 83, 22, 230, 98, ), (2, 183, 59, 18, 178, ), (221, 183, 259, 88, 112, ), .

1

slide-4
SLIDE 4

k-Nearest Neighbors Problem (kNN)

query database What are the k most similar items?

(250, 3, 122, 130, 68, )

(109, 33, 92, 87, 161, ), (50, 83, 22, 230, 98, ), (2, 183, 59, 18, 178, ), (221, 183, 259, 88, 112, ), .

1

slide-5
SLIDE 5

k-Nearest Neighbors Problem (kNN)

query database What are the k most similar items?

(250, 3, 122, 130, 68, . . . )

(109, 33, 92, 87, 161, ), (50, 83, 22, 230, 98, ), (2, 183, 59, 18, 178, ), (221, 183, 259, 88, 112, ), .

1

slide-6
SLIDE 6

k-Nearest Neighbors Problem (kNN)

query database What are the k most similar items?

(250, 3, 122, 130, 68, . . . )

(109, 33, 92, 87, 161, . . . ), (50, 83, 22, 230, 98, . . . ), (2, 183, 59, 18, 178, . . . ), (221, 183, 259, 88, 112, . . . ), . . ..

1

slide-7
SLIDE 7

kNN is Heart of Key Applications Search Engine Classification Systems (kNN Classifiers) Recommender Systems (Collaborative Filtering)

2

slide-8
SLIDE 8

Naïve Approach to kNN

Naïve Approach: linear search with the original representations

user-dist(q, v1) user-dist(q, v2) user-dist(q, v3) user-dist(q, v4) user-dist(q, v5)

Pick the items with the k smallest user-defined distances Extremely slow Note: No known fast exact algorithms for dense, high-dimensional vectors

3

slide-9
SLIDE 9

Naïve Approach to kNN

Naïve Approach: linear search with the original representations

user-dist(q, v1) user-dist(q, v2) user-dist(q, v3) user-dist(q, v4) user-dist(q, v5)

Pick the items with the k smallest user-defined distances Extremely slow Note: No known fast exact algorithms for dense, high-dimensional vectors

3

slide-10
SLIDE 10

Naïve Approach to kNN

Naïve Approach: linear search with the original representations

user-dist(q, v1) user-dist(q, v2) user-dist(q, v3) user-dist(q, v4) user-dist(q, v5)

Pick the items with the k smallest user-defined distances Extremely slow Note: No known fast exact algorithms for dense, high-dimensional vectors

3

slide-11
SLIDE 11

Naïve Approach to kNN

Naïve Approach: linear search with the original representations

user-dist(q, v1) user-dist(q, v2) user-dist(q, v3) user-dist(q, v4) user-dist(q, v5)

Pick the items with the k smallest user-defined distances Extremely slow Note: No known fast exact algorithms for dense, high-dimensional vectors

3

slide-12
SLIDE 12

Naïve Approach to kNN

Naïve Approach: linear search with the original representations

user-dist(q, v1) user-dist(q, v2) user-dist(q, v3) user-dist(q, v4) user-dist(q, v5)

Pick the items with the k smallest user-defined distances Extremely slow Note: No known fast exact algorithms for dense, high-dimensional vectors

3

slide-13
SLIDE 13

Naïve Approach to kNN

Naïve Approach: linear search with the original representations

user-dist(q, v1) user-dist(q, v2) user-dist(q, v3) user-dist(q, v4) user-dist(q, v5)

Pick the items with the k smallest user-defined distances Extremely slow Note: No known fast exact algorithms for dense, high-dimensional vectors

3

slide-14
SLIDE 14

Naïve Approach to kNN

Naïve Approach: linear search with the original representations

user-dist(q, v1) user-dist(q, v2) user-dist(q, v3) user-dist(q, v4) user-dist(q, v5)

Pick the items with the k smallest user-defined distances Extremely slow Note: No known fast exact algorithms for dense, high-dimensional vectors

3

slide-15
SLIDE 15

Naïve Approach to kNN

Naïve Approach: linear search with the original representations

user-dist(q, v1) user-dist(q, v2) user-dist(q, v3) user-dist(q, v4) user-dist(q, v5)

Pick the items with the k smallest user-defined distances Extremely slow Note: No known fast exact algorithms for dense, high-dimensional vectors

3

slide-16
SLIDE 16

Naïve Approach to kNN

Naïve Approach: linear search with the original representations

user-dist(q, v1) user-dist(q, v2) user-dist(q, v3) user-dist(q, v4) user-dist(q, v5)

Pick the items with the k smallest user-defined distances Extremely slow Note: No known fast exact algorithms for dense, high-dimensional vectors

3

slide-17
SLIDE 17

Locality-Sensitive Hashing for kNN

LSH: Use similarity-preserving hash functions

Hamming-dist(h q h vi ) user-dist(q vi) First proposed by [Datar et al., 2004] and [Charikar, 2002]

h q

Hashed Query

h v1 h v2 h v3 h v4 h v5 h v6 h v7 h v8 h v9 h v10 h v11 h v12

Hashed DB

Let h be a function that produces a hashcode. Then, Hamming-dist(h q h vi ) user-dist(q vi)

Look up hashcodes lookup operations in a hash table fast. Perfect hash functions may not exist,

  • r extremely hard to find

approximate. Note: Longer hashcode makes the searching slower.

4

slide-18
SLIDE 18

Locality-Sensitive Hashing for kNN

LSH: Use similarity-preserving hash functions

Hamming-dist(h q h vi ) user-dist(q vi) First proposed by [Datar et al., 2004] and [Charikar, 2002]

h q

Hashed Query

h v1 h v2 h v3 h v4 h v5 h v6 h v7 h v8 h v9 h v10 h v11 h v12

Hashed DB

Let h(·) be a function that produces a hashcode. Then, Hamming-dist(h(q), h(vi)) ∝ user-dist(q, vi)

Look up hashcodes lookup operations in a hash table fast. Perfect hash functions may not exist,

  • r extremely hard to find

approximate. Note: Longer hashcode makes the searching slower.

4

slide-19
SLIDE 19

Locality-Sensitive Hashing for kNN

LSH: Use similarity-preserving hash functions

Hamming-dist(h(q), h(vi)) ∝ user-dist(q, vi) First proposed by [Datar et al., 2004] and [Charikar, 2002]

h q

Hashed Query

h v1 h v2 h v3 h v4 h v5 h v6 h v7 h v8 h v9 h v10 h v11 h v12

Hashed DB

Let h be a function that produces a hashcode. Then, Hamming-dist(h q h vi ) user-dist(q vi)

Look up hashcodes lookup operations in a hash table fast. Perfect hash functions may not exist,

  • r extremely hard to find

approximate. Note: Longer hashcode makes the searching slower.

4

slide-20
SLIDE 20

Locality-Sensitive Hashing for kNN

LSH: Use similarity-preserving hash functions

Hamming-dist(h(q), h(vi)) ∝ user-dist(q, vi) First proposed by [Datar et al., 2004] and [Charikar, 2002]

h(q)

Hashed Query

h(v1) h(v2) h(v3) h(v4) h(v5) h(v6) h(v7) h(v8) h(v9) h(v10) h(v11) h(v12)

Hashed DB

Let h be a function that produces a hashcode. Then, Hamming-dist(h q h vi ) user-dist(q vi)

Look up hashcodes lookup operations in a hash table fast. Perfect hash functions may not exist,

  • r extremely hard to find

approximate. Note: Longer hashcode makes the searching slower.

4

slide-21
SLIDE 21

Locality-Sensitive Hashing for kNN

LSH: Use similarity-preserving hash functions

Hamming-dist(h(q), h(vi)) ∝ user-dist(q, vi) First proposed by [Datar et al., 2004] and [Charikar, 2002]

h(q)

Hashed Query

h(v1) h(v2) h(v3) h(v4) h(v5) h(v6) h(v7) h(v8) h(v9) h(v10) h(v11) h(v12)

Hashed DB

Let h be a function that produces a hashcode. Then, Hamming-dist(h q h vi ) user-dist(q vi)

Look up hashcodes lookup operations in a hash table fast. Perfect hash functions may not exist,

  • r extremely hard to find

approximate. Note: Longer hashcode makes the searching slower.

4

slide-22
SLIDE 22

Locality-Sensitive Hashing for kNN

LSH: Use similarity-preserving hash functions

Hamming-dist(h(q), h(vi)) ∝ user-dist(q, vi) First proposed by [Datar et al., 2004] and [Charikar, 2002]

h(q)

Hashed Query

h(v1) h(v2) h(v3) h(v4) h(v5) h(v6) h(v7) h(v8) h(v9) h(v10) h(v11) h(v12)

Hashed DB

Let h be a function that produces a hashcode. Then, Hamming-dist(h q h vi ) user-dist(q vi)

Look up hashcodes → lookup operations in a hash table → fast. Perfect hash functions may not exist,

  • r extremely hard to find

approximate. Note: Longer hashcode makes the searching slower.

4

slide-23
SLIDE 23

Locality-Sensitive Hashing for kNN

LSH: Use similarity-preserving hash functions

Hamming-dist(h(q), h(vi)) ∝ user-dist(q, vi) First proposed by [Datar et al., 2004] and [Charikar, 2002]

h(q)

Hashed Query

h(v1) h(v2) h(v3) h(v4) h(v5) h(v6) h(v7) h(v8) h(v9) h(v10) h(v11) h(v12)

Hashed DB

Let h be a function that produces a hashcode. Then, Hamming-dist(h q h vi ) user-dist(q vi)

Look up hashcodes → lookup operations in a hash table → fast. Perfect hash functions may not exist,

  • r extremely hard to find

→ approximate. Note: Longer hashcode makes the searching slower.

4

slide-24
SLIDE 24

Locality-Sensitive Hashing for kNN

LSH: Use similarity-preserving hash functions

Hamming-dist(h(q), h(vi)) ∝ user-dist(q, vi) First proposed by [Datar et al., 2004] and [Charikar, 2002]

h(q)

Hashed Query

h(v1) h(v2) h(v3) h(v4) h(v5) h(v6) h(v7) h(v8) h(v9) h(v10) h(v11) h(v12)

Hashed DB

Let h be a function that produces a hashcode. Then, Hamming-dist(h q h vi ) user-dist(q vi)

Look up hashcodes → lookup operations in a hash table → fast. Perfect hash functions may not exist,

  • r extremely hard to find

→ approximate. Note: Longer hashcode makes the searching slower.

4

slide-25
SLIDE 25

Hashcodes Generation for LSH

Suppose LSH generates hashcodes of length 4. q v1 v2 v3 v4 v5 v6 v7 v8 h1 1 h2 00 10 11 h3 h4 0000 1000 1100 1110 1111 distance from q

query point

  • ther data points

Hamming distance = 0 Hamming distance = 1 Hamming distance = 2

neighbors assigned the same hashcode We can’t distinguish these two For 3-NN, approximate Hashcodes as a proxy Motivation A new scheme able to distinguish v3 and v4 based on their hashcodes?

5

slide-26
SLIDE 26

Hashcodes Generation for LSH

Suppose LSH generates hashcodes of length 4. q v1 v2 v3 v4 v5 v6 v7 v8 h1 1 h2 00 10 11 h3 h4 0000 1000 1100 1110 1111 distance from q

query point

  • ther data points

Hamming distance = 0 Hamming distance = 1 Hamming distance = 2

neighbors assigned the same hashcode We can’t distinguish these two For 3-NN, approximate Hashcodes as a proxy Motivation A new scheme able to distinguish v3 and v4 based on their hashcodes?

5

slide-27
SLIDE 27

Hashcodes Generation for LSH

Suppose LSH generates hashcodes of length 4. q v1 v2 v3 v4 v5 v6 v7 v8 h1 1 h2 00 10 11 h3 h4 0000 1000 1100 1110 1111 distance from q

query point

  • ther data points

Hamming distance = 0 Hamming distance = 1 Hamming distance = 2

neighbors assigned the same hashcode We can’t distinguish these two For 3-NN, approximate Hashcodes as a proxy Motivation A new scheme able to distinguish v3 and v4 based on their hashcodes?

5

slide-28
SLIDE 28

Hashcodes Generation for LSH

Suppose LSH generates hashcodes of length 4. q v1 v2 v3 v4 v5 v6 v7 v8 h1 1 h2 00 10 11 h3 h4 0000 1000 1100 1110 1111 distance from q

query point

  • ther data points

Hamming distance = 0 Hamming distance = 1 Hamming distance = 2

neighbors assigned the same hashcode We can’t distinguish these two For 3-NN, approximate Hashcodes as a proxy Motivation A new scheme able to distinguish v3 and v4 based on their hashcodes?

5

slide-29
SLIDE 29

Hashcodes Generation for LSH

Suppose LSH generates hashcodes of length 4. q v1 v2 v3 v4 v5 v6 v7 v8 h1 1 h2 00 10 11 h3 h4 0000 1000 1100 1110 1111 distance from q

query point

  • ther data points

Hamming distance = 0 Hamming distance = 1 Hamming distance = 2

neighbors assigned the same hashcode We can’t distinguish these two For 3-NN, approximate Hashcodes as a proxy Motivation A new scheme able to distinguish v3 and v4 based on their hashcodes?

5

slide-30
SLIDE 30

Hashcodes Generation for LSH

Suppose LSH generates hashcodes of length 4. q v1 v2 v3 v4 v5 v6 v7 v8 h1 1 h2 00 10 11 h3 h4 0000 1000 1100 1110 1111 distance from q

query point

  • ther data points

Hamming distance = 0 Hamming distance = 1 Hamming distance = 2

neighbors assigned the same hashcode We can’t distinguish these two For 3-NN, approximate Hashcodes as a proxy Motivation A new scheme able to distinguish v3 and v4 based on their hashcodes?

5

slide-31
SLIDE 31

Hashcodes Generation for LSH

Suppose LSH generates hashcodes of length 4. q v1 v2 v3 v4 v5 v6 v7 v8 h1 1 h2 00 10 11 h3 h4 0000 1000 1100 1110 1111 distance from q

query point

  • ther data points

Hamming distance = 0 Hamming distance = 1 Hamming distance = 2

neighbors assigned the same hashcode We can’t distinguish these two For 3-NN, approximate Hashcodes as a proxy Motivation A new scheme able to distinguish v3 and v4 based on their hashcodes?

5

slide-32
SLIDE 32

Hashcodes Generation for LSH

Suppose LSH generates hashcodes of length 4. q v1 v2 v3 v4 v5 v6 v7 v8 h1 1 h2 00 10 11 h3 h4 0000 1000 1100 1110 1111 distance from q

query point

  • ther data points

Hamming distance = 0 Hamming distance = 1 Hamming distance = 2

neighbors assigned the same hashcode We can’t distinguish these two For 3-NN, approximate Hashcodes as a proxy Motivation A new scheme able to distinguish v3 and v4 based on their hashcodes?

5

slide-33
SLIDE 33

Hashcodes Generation for LSH

Suppose LSH generates hashcodes of length 4. q v1 v2 v3 v4 v5 v6 v7 v8 h1 1 h2 00 10 11 h3 h4 0000 1000 1100 1110 1111 distance from q

query point

  • ther data points

Hamming distance = 0 Hamming distance = 1 Hamming distance = 2

neighbors assigned the same hashcode We can’t distinguish these two For 3-NN, approximate Hashcodes as a proxy Motivation A new scheme able to distinguish v3 and v4 based on their hashcodes?

5

slide-34
SLIDE 34

Hashcodes Generation for LSH

Suppose LSH generates hashcodes of length 4. q v1 v2 v3 v4 v5 v6 v7 v8 h1 1 h2 00 10 11 h3 h4 0000 1000 1100 1110 1111 distance from q

query point

  • ther data points

Hamming distance = 0 Hamming distance = 1 Hamming distance = 2

neighbors assigned the same hashcode We can’t distinguish these two For 3-NN, approximate Hashcodes as a proxy Motivation A new scheme able to distinguish v3 and v4 based on their hashcodes?

5

slide-35
SLIDE 35

Hashcodes Generation for LSH

Suppose LSH generates hashcodes of length 4. q v1 v2 v3 v4 v5 v6 v7 v8 h1 1 h2 00 10 11 h3 h4 0000 1000 1100 1110 1111 distance from q

query point

  • ther data points

Hamming distance = 0 Hamming distance = 1 Hamming distance = 2

neighbors assigned the same hashcode We can’t distinguish these two For 3-NN, approximate Hashcodes as a proxy Motivation A new scheme able to distinguish v3 and v4 based on their hashcodes?

5

slide-36
SLIDE 36

Hashcodes Generation for LSH

Suppose LSH generates hashcodes of length 4. q v1 v2 v3 v4 v5 v6 v7 v8 h1 1 h2 00 10 11 h3 h4 0000 1000 1100 1110 1111 distance from q

query point

  • ther data points

Hamming distance = 0 Hamming distance = 1 Hamming distance = 2

neighbors assigned the same hashcode We can’t distinguish these two For 3-NN, approximate Hashcodes as a proxy Motivation A new scheme able to distinguish v3 and v4 based on their hashcodes?

5

slide-37
SLIDE 37

Hashcodes Generation for LSH

Suppose LSH generates hashcodes of length 4. q v1 v2 v3 v4 v5 v6 v7 v8 h1 1 h2 00 10 11 h3 h4 0000 1000 1100 1110 1111 distance from q

query point

  • ther data points

Hamming distance = 0 Hamming distance = 1 Hamming distance = 2

neighbors assigned the same hashcode We can’t distinguish these two → For 3-NN, approximate Hashcodes as a proxy Motivation A new scheme able to distinguish v3 and v4 based on their hashcodes?

5

slide-38
SLIDE 38

Hashcodes Generation for LSH

Suppose LSH generates hashcodes of length 4. q v1 v2 v3 v4 v5 v6 v7 v8 h1 1 h2 00 10 11 h3 h4 0000 1000 1100 1110 1111 distance from q

query point

  • ther data points

Hamming distance = 0 Hamming distance = 1 Hamming distance = 2

neighbors assigned the same hashcode We can’t distinguish these two → For 3-NN, approximate Hashcodes as a proxy Motivation A new scheme able to distinguish v3 and v4 based on their hashcodes?

5

slide-39
SLIDE 39

Outline

  • 1. Background and Motivation
  • 2. NSH Intuition
  • 3. NSH Algorithm
  • 4. Experiments

6

slide-40
SLIDE 40

Neighbor-Sensitive Hashing Intuition

We are interested in 3-NN. Hash functions by LSH. q v1 v2 v3 v4 v5 v6 v7 v8 h1 h2 h3 h4

We care which one is closer We don’t care which one is closer We don’t care which one is closer Observation: h3 and h4 are wasted (for 3-NN). Our Idea Generating hash functions close to the query so that we can better distinguish the close items.

7

slide-41
SLIDE 41

Neighbor-Sensitive Hashing Intuition

We are interested in 3-NN. Hash functions by LSH. q v1 v2 v3 v4 v5 v6 v7 v8 h1 h2 h3 h4

We care which one is closer We don’t care which one is closer We don’t care which one is closer Observation: h3 and h4 are wasted (for 3-NN). Our Idea Generating hash functions close to the query so that we can better distinguish the close items.

7

slide-42
SLIDE 42

Neighbor-Sensitive Hashing Intuition

We are interested in 3-NN. Hash functions by LSH. q v1 v2 v3 v4 v5 v6 v7 v8 h1 h2 h3 h4

We care which one is closer We don’t care which one is closer We don’t care which one is closer Observation: h3 and h4 are wasted (for 3-NN). Our Idea Generating hash functions close to the query so that we can better distinguish the close items.

7

slide-43
SLIDE 43

Neighbor-Sensitive Hashing Intuition

We are interested in 3-NN. Hash functions by LSH. q v1 v2 v3 v4 v5 v6 v7 v8 h1 h2 h3 h4

We care which one is closer We don’t care which one is closer We don’t care which one is closer Observation: h3 and h4 are wasted (for 3-NN). Our Idea Generating hash functions close to the query so that we can better distinguish the close items.

7

slide-44
SLIDE 44

Neighbor-Sensitive Hashing Intuition

We are interested in 3-NN. Hash functions by LSH. q v1 v2 v3 v4 v5 v6 v7 v8 h1 h2 h3 h4

We care which one is closer We don’t care which one is closer We don’t care which one is closer Observation: h3 and h4 are wasted (for 3-NN). Our Idea Generating hash functions close to the query so that we can better distinguish the close items.

7

slide-45
SLIDE 45

Neighbor-Sensitive Hashing Intuition

We are interested in 3-NN. Hash functions by LSH. q v1 v2 v3 v4 v5 v6 v7 v8 h1 h2 h3 h4

We care which one is closer We don’t care which one is closer We don’t care which one is closer Observation: h3 and h4 are wasted (for 3-NN). Our Idea Generating hash functions close to the query so that we can better distinguish the close items.

7

slide-46
SLIDE 46

Neighbor-Sensitive Hashing Intuition (cont’d)

Suppose we could (somehow) generate hash functions in this way.

q v1 v2 v3 v4 v5 v6 v7 v8 0000 1000 1100 1110 1111 h1 h2 h3 h4

We could distinguish v3 and v4 based on their hashcodes. (thus, able to solve 3-NN accurately) Note: Could not distinguish v6 and v8 based on their hashcodes.

Not an issue for 3-NN

Difference in NSH’s Intuition:

A decade of existing work: small Hamming distance between close data items NSH: larger Hamming distance between close items Seemingly counter-intuitive; however, our paper proves that larger Hamming distance leads to higher accuracy in general.

different hashcodes same hashcodes

8

slide-47
SLIDE 47

Neighbor-Sensitive Hashing Intuition (cont’d)

Suppose we could (somehow) generate hash functions in this way.

q v1 v2 v3 v4 v5 v6 v7 v8 0000 1000 1100 1110 1111 h1 h2 h3 h4

We could distinguish v3 and v4 based on their hashcodes. (thus, able to solve 3-NN accurately) Note: Could not distinguish v6 and v8 based on their hashcodes.

Not an issue for 3-NN

Difference in NSH’s Intuition:

A decade of existing work: small Hamming distance between close data items NSH: larger Hamming distance between close items Seemingly counter-intuitive; however, our paper proves that larger Hamming distance leads to higher accuracy in general.

different hashcodes same hashcodes

8

slide-48
SLIDE 48

Neighbor-Sensitive Hashing Intuition (cont’d)

Suppose we could (somehow) generate hash functions in this way.

q v1 v2 v3 v4 v5 v6 v7 v8 0000 1000 1100 1110 1111 h1 h2 h3 h4

We could distinguish v3 and v4 based on their hashcodes. (thus, able to solve 3-NN accurately) Note: Could not distinguish v6 and v8 based on their hashcodes.

Not an issue for 3-NN

Difference in NSH’s Intuition:

A decade of existing work: small Hamming distance between close data items NSH: larger Hamming distance between close items Seemingly counter-intuitive; however, our paper proves that larger Hamming distance leads to higher accuracy in general.

different hashcodes same hashcodes

8

slide-49
SLIDE 49

Neighbor-Sensitive Hashing Intuition (cont’d)

Suppose we could (somehow) generate hash functions in this way.

q v1 v2 v3 v4 v5 v6 v7 v8 0000 1000 1100 1110 1111 h1 h2 h3 h4

We could distinguish v3 and v4 based on their hashcodes. (thus, able to solve 3-NN accurately) Note: Could not distinguish v6 and v8 based on their hashcodes.

Not an issue for 3-NN

Difference in NSH’s Intuition:

A decade of existing work: small Hamming distance between close data items NSH: larger Hamming distance between close items Seemingly counter-intuitive; however, our paper proves that larger Hamming distance leads to higher accuracy in general.

different hashcodes same hashcodes

8

slide-50
SLIDE 50

Neighbor-Sensitive Hashing Intuition (cont’d)

Suppose we could (somehow) generate hash functions in this way.

q v1 v2 v3 v4 v5 v6 v7 v8 0000 1000 1100 1110 1111 h1 h2 h3 h4

We could distinguish v3 and v4 based on their hashcodes. (thus, able to solve 3-NN accurately) Note: Could not distinguish v6 and v8 based on their hashcodes.

Not an issue for 3-NN

Difference in NSH’s Intuition:

A decade of existing work: small Hamming distance between close data items NSH: larger Hamming distance between close items Seemingly counter-intuitive; however, our paper proves that larger Hamming distance leads to higher accuracy in general.

different hashcodes same hashcodes

8

slide-51
SLIDE 51

Neighbor-Sensitive Hashing Intuition (cont’d)

Suppose we could (somehow) generate hash functions in this way.

q v1 v2 v3 v4 v5 v6 v7 v8 0000 1000 1100 1110 1111 h1 h2 h3 h4

We could distinguish v3 and v4 based on their hashcodes. (thus, able to solve 3-NN accurately) Note: Could not distinguish v6 and v8 based on their hashcodes.

Not an issue for 3-NN

Difference in NSH’s Intuition:

A decade of existing work: small Hamming distance between close data items NSH: larger Hamming distance between close items Seemingly counter-intuitive; however, our paper proves that larger Hamming distance leads to higher accuracy in general.

different hashcodes same hashcodes

8

slide-52
SLIDE 52

Neighbor-Sensitive Hashing Intuition (cont’d)

Suppose we could (somehow) generate hash functions in this way.

q v1 v2 v3 v4 v5 v6 v7 v8 0000 1000 1100 1110 1111 h1 h2 h3 h4

We could distinguish v3 and v4 based on their hashcodes. (thus, able to solve 3-NN accurately) Note: Could not distinguish v6 and v8 based on their hashcodes.

Not an issue for 3-NN

Difference in NSH’s Intuition:

A decade of existing work: small Hamming distance between close data items NSH: larger Hamming distance between close items Seemingly counter-intuitive; however, our paper proves that larger Hamming distance leads to higher accuracy in general.

different hashcodes same hashcodes

8

slide-53
SLIDE 53

Important Difference between LSH and NSH

to 10-NN to 100-NN max distance b

Original Distance Hamming Distance

A larger slope indicates higher distinguishing-power based on hashcodes.

LSH: uniform distinguishing-power over all distance ranges. NSH: Higher distinguishing-power for the points that are close each other. Key Challenge How to enlarge the Hamming distances selectively for close data items?

9

slide-54
SLIDE 54

Important Difference between LSH and NSH

to 10-NN to 100-NN max distance b

LSH Original Distance Hamming Distance

A larger slope indicates higher distinguishing-power based on hashcodes.

LSH: uniform distinguishing-power over all distance ranges. NSH: Higher distinguishing-power for the points that are close each other. Key Challenge How to enlarge the Hamming distances selectively for close data items?

9

slide-55
SLIDE 55

Important Difference between LSH and NSH

to 10-NN to 100-NN max distance b

LSH NSH Original Distance Hamming Distance

A larger slope indicates higher distinguishing-power based on hashcodes.

LSH: uniform distinguishing-power over all distance ranges. NSH: Higher distinguishing-power for the points that are close each other. Key Challenge How to enlarge the Hamming distances selectively for close data items?

9

slide-56
SLIDE 56

Important Difference between LSH and NSH

to 10-NN to 100-NN max distance b

LSH NSH Original Distance Hamming Distance

A larger slope indicates higher distinguishing-power based on hashcodes.

LSH: uniform distinguishing-power over all distance ranges. NSH: Higher distinguishing-power for the points that are close each other. Key Challenge How to enlarge the Hamming distances selectively for close data items?

9

slide-57
SLIDE 57

Important Difference between LSH and NSH

to 10-NN to 100-NN max distance b

LSH NSH Original Distance Hamming Distance

A larger slope indicates higher distinguishing-power based on hashcodes.

LSH: uniform distinguishing-power over all distance ranges. NSH: Higher distinguishing-power for the points that are close each other. Key Challenge How to enlarge the Hamming distances selectively for close data items?

9

slide-58
SLIDE 58

Important Difference between LSH and NSH

to 10-NN to 100-NN max distance b

LSH NSH Original Distance Hamming Distance

A larger slope indicates higher distinguishing-power based on hashcodes.

LSH: uniform distinguishing-power over all distance ranges. NSH: Higher distinguishing-power for the points that are close each other. Key Challenge How to enlarge the Hamming distances selectively for close data items?

9

slide-59
SLIDE 59

Important Difference between LSH and NSH

to 10-NN to 100-NN max distance b

LSH NSH Original Distance Hamming Distance

A larger slope indicates higher distinguishing-power based on hashcodes.

LSH: uniform distinguishing-power over all distance ranges. NSH: Higher distinguishing-power for the points that are close each other. Key Challenge How to enlarge the Hamming distances selectively for close data items?

9

slide-60
SLIDE 60

Outline

  • 1. Background and Motivation
  • 2. NSH Intuition
  • 3. NSH Algorithm
  • 4. Experiments

10

slide-61
SLIDE 61

Neighbor-Sensitive Hashing Overview

q v1 v2 v3 v4 v5 v6 v7 v8

Transform data points to expand the space around the query.

(before generating hash functions) q v1 v2 v3 v4 v5 v6 v7 v8 h1 h2 h3 h4

We call this new space the transformed space. Then, generate hash functions on this transformed space.

(thus, convert data points to hashcodes accordingly)

Key Questions How can we expand the space around a query? Is it easier if we know the query a priori ? How can we expand the space around an arbitrary query?

11

slide-62
SLIDE 62

Neighbor-Sensitive Hashing Overview

q v1 v2 v3 v4 v5 v6 v7 v8

Transform data points to expand the space around the query.

(before generating hash functions) q v1 v2 v3 v4 v5 v6 v7 v8 h1 h2 h3 h4

We call this new space the transformed space. Then, generate hash functions on this transformed space.

(thus, convert data points to hashcodes accordingly)

Key Questions How can we expand the space around a query? Is it easier if we know the query a priori ? How can we expand the space around an arbitrary query?

11

slide-63
SLIDE 63

Neighbor-Sensitive Hashing Overview

q v1 v2 v3 v4 v5 v6 v7 v8

Transform data points to expand the space around the query.

(before generating hash functions) q v1 v2 v3 v4 v5 v6 v7 v8 h1 h2 h3 h4

We call this new space the transformed space. Then, generate hash functions on this transformed space.

(thus, convert data points to hashcodes accordingly)

Key Questions How can we expand the space around a query? Is it easier if we know the query a priori ? How can we expand the space around an arbitrary query?

11

slide-64
SLIDE 64

Neighbor-Sensitive Hashing Overview

q v1 v2 v3 v4 v5 v6 v7 v8

Transform data points to expand the space around the query.

(before generating hash functions) q v1 v2 v3 v4 v5 v6 v7 v8 h1 h2 h3 h4

We call this new space the transformed space. Then, generate hash functions on this transformed space.

(thus, convert data points to hashcodes accordingly)

Key Questions How can we expand the space around a query? Is it easier if we know the query a priori ? How can we expand the space around an arbitrary query?

11

slide-65
SLIDE 65

Neighbor-Sensitive Hashing Overview

q v1 v2 v3 v4 v5 v6 v7 v8

Transform data points to expand the space around the query.

(before generating hash functions) q v1 v2 v3 v4 v5 v6 v7 v8 h1 h2 h3 h4

We call this new space the transformed space. Then, generate hash functions on this transformed space.

(thus, convert data points to hashcodes accordingly)

Key Questions How can we expand the space around a query? Is it easier if we know the query a priori ? How can we expand the space around an arbitrary query?

11

slide-66
SLIDE 66

Neighbor-Sensitive Hashing Overview

q v1 v2 v3 v4 v5 v6 v7 v8

Transform data points to expand the space around the query.

(before generating hash functions) q v1 v2 v3 v4 v5 v6 v7 v8 h1 h2 h3 h4

We call this new space the transformed space. Then, generate hash functions on this transformed space.

(thus, convert data points to hashcodes accordingly)

Key Questions How can we expand the space around a query? Is it easier if we know the query a priori ? How can we expand the space around an arbitrary query?

11

slide-67
SLIDE 67

Neighbor-Sensitive Hashing Overview

q v1 v2 v3 v4 v5 v6 v7 v8

Transform data points to expand the space around the query.

(before generating hash functions) q v1 v2 v3 v4 v5 v6 v7 v8 h1 h2 h3 h4

We call this new space the transformed space. Then, generate hash functions on this transformed space.

(thus, convert data points to hashcodes accordingly)

Key Questions How can we expand the space around a query? Is it easier if we know the query a priori ? How can we expand the space around an arbitrary query?

11

slide-68
SLIDE 68

Neighbor-Sensitive Hashing Overview

q v1 v2 v3 v4 v5 v6 v7 v8

Transform data points to expand the space around the query.

(before generating hash functions) q v1 v2 v3 v4 v5 v6 v7 v8 h1 h2 h3 h4

We call this new space the transformed space. Then, generate hash functions on this transformed space.

(thus, convert data points to hashcodes accordingly)

Key Questions How can we expand the space around a query? Is it easier if we know the query a priori ? How can we expand the space around an arbitrary query?

11

slide-69
SLIDE 69

Neighbor-Sensitive Transformation

We expand the space around an arbitrary query using

  • ur proposed Neighbor-Sensitive Transformation (NST).

(e.g., f(v1), f(v2), . . .)

Visual illustration of NST Our Formal Claim (Theorem 2) Using NST with regular hash functions produces higher accuracy than LSH.

12

slide-70
SLIDE 70

Neighbor-Sensitive Transformation

We expand the space around an arbitrary query using

  • ur proposed Neighbor-Sensitive Transformation (NST).

(e.g., f(v1), f(v2), . . .)

Visual illustration of NST Our Formal Claim (Theorem 2) Using NST with regular hash functions produces higher accuracy than LSH.

12

slide-71
SLIDE 71

Neighbor-Sensitive Transformation

We expand the space around an arbitrary query using

  • ur proposed Neighbor-Sensitive Transformation (NST).

(e.g., f(v1), f(v2), . . .)

Visual illustration of NST

pivot 1 pivot 2

Our Formal Claim (Theorem 2) Using NST with regular hash functions produces higher accuracy than LSH.

12

slide-72
SLIDE 72

Neighbor-Sensitive Transformation

We expand the space around an arbitrary query using

  • ur proposed Neighbor-Sensitive Transformation (NST).

(e.g., f(v1), f(v2), . . .)

Visual illustration of NST

pivot 1 pivot 2 query

Our Formal Claim (Theorem 2) Using NST with regular hash functions produces higher accuracy than LSH.

12

slide-73
SLIDE 73

Neighbor-Sensitive Transformation

We expand the space around an arbitrary query using

  • ur proposed Neighbor-Sensitive Transformation (NST).

(e.g., f(v1), f(v2), . . .)

Visual illustration of NST

pivot 1 pivot 2 query

Our Formal Claim (Theorem 2) Using NST with regular hash functions produces higher accuracy than LSH.

12

slide-74
SLIDE 74

Neighbor-Sensitive Transformation

We expand the space around an arbitrary query using

  • ur proposed Neighbor-Sensitive Transformation (NST).

(e.g., f(v1), f(v2), . . .)

Visual illustration of NST

pivot 1 pivot 2 query

Our Formal Claim (Theorem 2) Using NST with regular hash functions produces higher accuracy than LSH.

12

slide-75
SLIDE 75

Big Picture: NSH Workflow

Offline Processing LSH Workflow Our Contribution

Original Database

Transformed DB

NST

Hashed DB

hash

Online Processing

Original Query Transformed Query

NST

Hashed Query

hash Search

13

slide-76
SLIDE 76

Big Picture: NSH Workflow

Offline Processing LSH Workflow Our Contribution

Original Database

Transformed DB

NST

Hashed DB

hash

Online Processing

Original Query Transformed Query

NST

Hashed Query

hash Search

13

slide-77
SLIDE 77

Big Picture: NSH Workflow

Offline Processing LSH Workflow Our Contribution

Original Database

Transformed DB

NST

Hashed DB

hash

Online Processing

Original Query Transformed Query

NST

Hashed Query

hash Search

13

slide-78
SLIDE 78

Big Picture: NSH Workflow

Offline Processing LSH Workflow Our Contribution

Original Database

Transformed DB

NST

Hashed DB

hash

Online Processing

Original Query Transformed Query

NST

Hashed Query

hash Search

13

slide-79
SLIDE 79

Big Picture: NSH Workflow

Offline Processing LSH Workflow Our Contribution

Original Database

Transformed DB

NST

Hashed DB

hash

Online Processing

Original Query Transformed Query

NST

Hashed Query

hash Search

13

slide-80
SLIDE 80

Big Picture: NSH Workflow

Offline Processing LSH Workflow Our Contribution

Original Database

Transformed DB

NST

Hashed DB

hash

Online Processing

Original Query Transformed Query

NST

Hashed Query

hash Search

13

slide-81
SLIDE 81

Big Picture: NSH Workflow

Offline Processing LSH Workflow Our Contribution

Original Database

Transformed DB

NST

Hashed DB

hash

Online Processing

Original Query Transformed Query

NST

Hashed Query

hash Search

13

slide-82
SLIDE 82

Big Picture: NSH Workflow

Offline Processing LSH Workflow Our Contribution

Original Database

Transformed DB

NST

Hashed DB

hash

Online Processing

Original Query Transformed Query

NST

Hashed Query

hash Search

13

slide-83
SLIDE 83

Big Picture: NSH Workflow

Offline Processing LSH Workflow Our Contribution

Original Database

Transformed DB

NST

Hashed DB

hash

Online Processing

Original Query Transformed Query

NST

Hashed Query

hash Search

13

slide-84
SLIDE 84

Big Picture: NSH Workflow

Offline Processing LSH Workflow Our Contribution

Original Database

Transformed DB

NST

Hashed DB

hash

Online Processing

Original Query Transformed Query

NST

Hashed Query

hash Search

13

slide-85
SLIDE 85

Big Picture: NSH Workflow

Offline Processing LSH Workflow Our Contribution

Original Database

Transformed DB

NST

Hashed DB

hash

Online Processing

Original Query Transformed Query

NST

Hashed Query

hash Search

13

slide-86
SLIDE 86

Neighbor-Sensitive Hashing Visualized

We visualized the hash functions in the original space. LSH NSH

Dataset: five 2D normal distributions, Generated 4 hash functions Hash functions for NSH were generated in the transformed space.

14

slide-87
SLIDE 87

Neighbor-Sensitive Hashing Visualized

We visualized the hash functions in the original space. LSH NSH

Dataset: five 2D normal distributions, Generated 4 hash functions Hash functions for NSH were generated in the transformed space.

14

slide-88
SLIDE 88

Neighbor-Sensitive Hashing Visualized

We visualized the hash functions in the original space. LSH NSH

Dataset: five 2D normal distributions, Generated 4 hash functions Hash functions for NSH were generated in the transformed space.

14

slide-89
SLIDE 89

Outline

  • 1. Background and Motivation
  • 2. NSH Intuition
  • 3. NSH Algorithm
  • 4. Experiments

15

slide-90
SLIDE 90

Experiment Setup

Quality Metric

recall(k)@r = (# of true kNN in the retrieved) k × 100. Note: Higher recall means either (i) more accurate searching for the same time budget, or (ii) faster searching for the same target recall.

Compared Methods: three well-known and five state-of-the-arts

  • 1. Locality Sensitive Hashing (LSH) [Datar et al., 2004]
  • 2. Spectral Hashing (SH) [Weiss et al., 2009]
  • 3. Spherical Hashing (SpH) [Heo et al., 2012]
  • 4. Data Sensitive Hashing (CPH) [Gao et al., 2014]
  • 5. Anchor Graph Hashing (AGH) [Liu et al., 2011]
  • 6. Compressed Hashing (CH) [Lin et al., 2013]
  • 7. Complementary Projection Hashing (CPH) [Jin et al., 2013]
  • 8. Kernelized Supervised Hashing (KSH) [Kulis and Grauman, 2012]

Involves data transformations for different purposes

16

slide-91
SLIDE 91

Experiment Setup

Quality Metric

recall(k)@r = (# of true kNN in the retrieved) k × 100. Note: Higher recall means either (i) more accurate searching for the same time budget, or (ii) faster searching for the same target recall.

Compared Methods: three well-known and five state-of-the-arts

  • 1. Locality Sensitive Hashing (LSH) [Datar et al., 2004]
  • 2. Spectral Hashing (SH) [Weiss et al., 2009]
  • 3. Spherical Hashing (SpH) [Heo et al., 2012]
  • 4. Data Sensitive Hashing (CPH) [Gao et al., 2014]
  • 5. Anchor Graph Hashing (AGH) [Liu et al., 2011]
  • 6. Compressed Hashing (CH) [Lin et al., 2013]
  • 7. Complementary Projection Hashing (CPH) [Jin et al., 2013]
  • 8. Kernelized Supervised Hashing (KSH) [Kulis and Grauman, 2012]

Involves data transformations for different purposes

16

slide-92
SLIDE 92

Experiment Setup

Quality Metric

recall(k)@r = (# of true kNN in the retrieved) k × 100. Note: Higher recall means either (i) more accurate searching for the same time budget, or (ii) faster searching for the same target recall.

Compared Methods: three well-known and five state-of-the-arts

  • 1. Locality Sensitive Hashing (LSH) [Datar et al., 2004]
  • 2. Spectral Hashing (SH) [Weiss et al., 2009]
  • 3. Spherical Hashing (SpH) [Heo et al., 2012]
  • 4. Data Sensitive Hashing (CPH) [Gao et al., 2014]
  • 5. Anchor Graph Hashing (AGH) [Liu et al., 2011]
  • 6. Compressed Hashing (CH) [Lin et al., 2013]
  • 7. Complementary Projection Hashing (CPH) [Jin et al., 2013]
  • 8. Kernelized Supervised Hashing (KSH) [Kulis and Grauman, 2012]

Involves data transformations for different purposes

16

slide-93
SLIDE 93

Experiment Setup

Quality Metric

recall(k)@r = (# of true kNN in the retrieved) k × 100. Note: Higher recall means either (i) more accurate searching for the same time budget, or (ii) faster searching for the same target recall.

Compared Methods: three well-known and five state-of-the-arts

  • 1. Locality Sensitive Hashing (LSH) [Datar et al., 2004]
  • 2. Spectral Hashing (SH) [Weiss et al., 2009]
  • 3. Spherical Hashing (SpH) [Heo et al., 2012]
  • 4. Data Sensitive Hashing (CPH) [Gao et al., 2014]
  • 5. Anchor Graph Hashing (AGH) [Liu et al., 2011]
  • 6. Compressed Hashing (CH) [Lin et al., 2013]
  • 7. Complementary Projection Hashing (CPH) [Jin et al., 2013]
  • 8. Kernelized Supervised Hashing (KSH) [Kulis and Grauman, 2012]

Involves data transformations for different purposes

16

slide-94
SLIDE 94

Experiment Setup

Quality Metric

recall(k)@r = (# of true kNN in the retrieved) k × 100. Note: Higher recall means either (i) more accurate searching for the same time budget, or (ii) faster searching for the same target recall.

Compared Methods: three well-known and five state-of-the-arts

  • 1. Locality Sensitive Hashing (LSH) [Datar et al., 2004]
  • 2. Spectral Hashing (SH) [Weiss et al., 2009]
  • 3. Spherical Hashing (SpH) [Heo et al., 2012]
  • 4. Data Sensitive Hashing (CPH) [Gao et al., 2014]
  • 5. Anchor Graph Hashing (AGH) [Liu et al., 2011]
  • 6. Compressed Hashing (CH) [Lin et al., 2013]
  • 7. Complementary Projection Hashing (CPH) [Jin et al., 2013]
  • 8. Kernelized Supervised Hashing (KSH) [Kulis and Grauman, 2012]

Involves data transformations for different purposes

16

slide-95
SLIDE 95

Experimental Claim and Datasets

Our Experimental Claim:

  • 1. NSH achieved “larger Hamming distances between close data

items”

  • 2. NSH showed higher recalls (for fixed hashcode sizes) than

compared methods.

  • 3. NSH showed faster search speed (for target recalls) than

compared methods.

  • 4. NSH’s hash function generation was reasonably fast.

Real-World Datasets:

  • 1. MNIST: 69K hand-written digit images
  • 2. TINY: 80 million image (GIST) descriptors
  • 3. SIFT: 50 million image (SIFT) descriptors

17

slide-96
SLIDE 96

Experimental Claim and Datasets

Our Experimental Claim:

  • 1. NSH achieved “larger Hamming distances between close data

items”

  • 2. NSH showed higher recalls (for fixed hashcode sizes) than

compared methods.

  • 3. NSH showed faster search speed (for target recalls) than

compared methods.

  • 4. NSH’s hash function generation was reasonably fast.

Real-World Datasets:

  • 1. MNIST: 69K hand-written digit images
  • 2. TINY: 80 million image (GIST) descriptors
  • 3. SIFT: 50 million image (SIFT) descriptors

17

slide-97
SLIDE 97

Experimental Claim and Datasets

Our Experimental Claim:

  • 1. NSH achieved “larger Hamming distances between close data

items”

  • 2. NSH showed higher recalls (for fixed hashcode sizes) than

compared methods.

  • 3. NSH showed faster search speed (for target recalls) than

compared methods.

  • 4. NSH’s hash function generation was reasonably fast.

Real-World Datasets:

  • 1. MNIST: 69K hand-written digit images
  • 2. TINY: 80 million image (GIST) descriptors
  • 3. SIFT: 50 million image (SIFT) descriptors

17

slide-98
SLIDE 98

Experimental Claim and Datasets

Our Experimental Claim:

  • 1. NSH achieved “larger Hamming distances between close data

items”

  • 2. NSH showed higher recalls (for fixed hashcode sizes) than

compared methods.

  • 3. NSH showed faster search speed (for target recalls) than

compared methods.

  • 4. NSH’s hash function generation was reasonably fast.

Real-World Datasets:

  • 1. MNIST: 69K hand-written digit images
  • 2. TINY: 80 million image (GIST) descriptors
  • 3. SIFT: 50 million image (SIFT) descriptors

17

slide-99
SLIDE 99

Experimental Claim and Datasets

Our Experimental Claim:

  • 1. NSH achieved “larger Hamming distances between close data

items”

  • 2. NSH showed higher recalls (for fixed hashcode sizes) than

compared methods.

  • 3. NSH showed faster search speed (for target recalls) than

compared methods.

  • 4. NSH’s hash function generation was reasonably fast.

Real-World Datasets:

  • 1. MNIST: 69K hand-written digit images
  • 2. TINY: 80 million image (GIST) descriptors
  • 3. SIFT: 50 million image (SIFT) descriptors

17

slide-100
SLIDE 100

Experimental Claim and Datasets

Our Experimental Claim:

  • 1. NSH achieved “larger Hamming distances between close data

items”

  • 2. NSH showed higher recalls (for fixed hashcode sizes) than

compared methods.

  • 3. NSH showed faster search speed (for target recalls) than

compared methods.

  • 4. NSH’s hash function generation was reasonably fast.

Real-World Datasets:

  • 1. MNIST: 69K hand-written digit images
  • 2. TINY: 80 million image (GIST) descriptors
  • 3. SIFT: 50 million image (SIFT) descriptors

17

slide-101
SLIDE 101

Experimental Claim and Datasets

Our Experimental Claim:

  • 1. NSH achieved “larger Hamming distances between close data

items”

  • 2. NSH showed higher recalls (for fixed hashcode sizes) than

compared methods.

  • 3. NSH showed faster search speed (for target recalls) than

compared methods.

  • 4. NSH’s hash function generation was reasonably fast.

Real-World Datasets:

  • 1. MNIST: 69K hand-written digit images
  • 2. TINY: 80 million image (GIST) descriptors
  • 3. SIFT: 50 million image (SIFT) descriptors

17

slide-102
SLIDE 102

Experimental Claim and Datasets

Our Experimental Claim:

  • 1. NSH achieved “larger Hamming distances between close data

items”

  • 2. NSH showed higher recalls (for fixed hashcode sizes) than

compared methods.

  • 3. NSH showed faster search speed (for target recalls) than

compared methods.

  • 4. NSH’s hash function generation was reasonably fast.

Real-World Datasets:

  • 1. MNIST: 69K hand-written digit images
  • 2. TINY: 80 million image (GIST) descriptors
  • 3. SIFT: 50 million image (SIFT) descriptors

17

slide-103
SLIDE 103

Experimental Claim and Datasets

Our Experimental Claim:

  • 1. NSH achieved “larger Hamming distances between close data

items”

  • 2. NSH showed higher recalls (for fixed hashcode sizes) than

compared methods.

  • 3. NSH showed faster search speed (for target recalls) than

compared methods.

  • 4. NSH’s hash function generation was reasonably fast.

Real-World Datasets:

  • 1. MNIST: 69K hand-written digit images
  • 2. TINY: 80 million image (GIST) descriptors
  • 3. SIFT: 50 million image (SIFT) descriptors

17

slide-104
SLIDE 104

Neighbor-Sensitive Hashing Property

We measured the relationship between (i) the original distances between pairs of original data items, (ii) the Hamming distance between pairs of hashcodes.

5 10 15 5 10 15 20 Original Distance Hamming Distance LSH NSH Dataset: MNIST

18

slide-105
SLIDE 105

Neighbor-Sensitive Hashing Property

We measured the relationship between (i) the original distances between pairs of original data items, (ii) the Hamming distance between pairs of hashcodes.

5 10 15 5 10 15 20 Original Distance Hamming Distance LSH NSH Dataset: MNIST

18

slide-106
SLIDE 106

Neighbor-Sensitive Hashing Property

We measured the relationship between (i) the original distances between pairs of original data items, (ii) the Hamming distance between pairs of hashcodes.

5 10 15 5 10 15 20 Original Distance Hamming Distance LSH NSH Dataset: MNIST

18

slide-107
SLIDE 107

Neighbor-Sensitive Hashing Property

We measured the relationship between (i) the original distances between pairs of original data items, (ii) the Hamming distance between pairs of hashcodes.

5 10 15 5 10 15 20

Average distance to 10-NN

Original Distance Hamming Distance LSH NSH Dataset: MNIST

18

slide-108
SLIDE 108

Neighbor-Sensitive Hashing Property

We measured the relationship between (i) the original distances between pairs of original data items, (ii) the Hamming distance between pairs of hashcodes.

5 10 15 5 10 15 20

Average distance to 50-NN

Original Distance Hamming Distance LSH NSH Dataset: MNIST

18

slide-109
SLIDE 109

Neighbor-Sensitive Hashing Property

We measured the relationship between (i) the original distances between pairs of original data items, (ii) the Hamming distance between pairs of hashcodes.

5 10 15 5 10 15 20

Average distance to 100-NN

Original Distance Hamming Distance LSH NSH Dataset: MNIST

18

slide-110
SLIDE 110

Neighbor-Sensitive Hashing Property

We measured the relationship between (i) the original distances between pairs of original data items, (ii) the Hamming distance between pairs of hashcodes.

5 10 15 5 10 15 20

Average distance to 1000-NN

Original Distance Hamming Distance LSH NSH Dataset: MNIST

18

slide-111
SLIDE 111

Recall Improvement for Fixed Hashcode Size

Compared search accuracy of 9 different methods (including NSH).

10 20 30 40 50 60

Improvement Over:

Recall Improvement (%) LSH AGH CH SH CPH SpH DSH KSH Dataset: TINY, Hashcode size: 64 bits

19

slide-112
SLIDE 112

Time Reduction for Fixed Recall

Measured search time of 9 different methods (including NSH).

20 40 60 80 100

Improvement Over:

Time Reduction (%) LSH AGH CH SH CPH SpH DSH KSH Dataset: SIFT, Hashcode size: 64 bits, Target recall: 50%

20

slide-113
SLIDE 113

Offline Computation Time

Method Hash Function Generation (sec) Hashcode Generation (min) 32bit 64bit 32bit 64bit LSH 0.38 0.29 22 23 SH 28 36 54 154 AGH 786 873 105 95 SpH 397 875 18 23 CH 483 599 265 266 CPH 34,371 63,398 85 105 DSH 3.14 1.48 24 23 KSH 2,028 3,502 24 29 NSH (Ours) 231 284 37 46

Some learning-based methods (e.g., CPH, KSH) were extremely slow. Our method was among the fastest.

Dataset: TINY

21

slide-114
SLIDE 114

Offline Computation Time

Method Hash Function Generation (sec) Hashcode Generation (min) 32bit 64bit 32bit 64bit LSH 0.38 0.29 22 23 SH 28 36 54 154 AGH 786 873 105 95 SpH 397 875 18 23 CH 483 599 265 266 CPH 34,371 63,398 85 105 DSH 3.14 1.48 24 23 KSH 2,028 3,502 24 29 NSH (Ours) 231 284 37 46

Some learning-based methods (e.g., CPH, KSH) were extremely slow. Our method was among the fastest.

Dataset: TINY

21

slide-115
SLIDE 115

Offline Computation Time

Method Hash Function Generation (sec) Hashcode Generation (min) 32bit 64bit 32bit 64bit LSH 0.38 0.29 22 23 SH 28 36 54 154 AGH 786 873 105 95 SpH 397 875 18 23 CH 483 599 265 266 CPH 34,371 63,398 85 105 DSH 3.14 1.48 24 23 KSH 2,028 3,502 24 29 NSH (Ours) 231 284 37 46

Some learning-based methods (e.g., CPH, KSH) were extremely slow. Our method was among the fastest.

Dataset: TINY

21

slide-116
SLIDE 116

Neighbor-Sensitive Effect

NSH was more effective for relatively small k.

1 10 100 1000 (1.4% of DB) 40 60 80 100

NSH recall decreased here!

k recall(k)@10k LSH SH SpH NSH

With a bigger dataset, this “recall-dropping effect” was not observed.

22

slide-117
SLIDE 117

Neighbor-Sensitive Effect

NSH was more effective for relatively small k.

1 10 100 1000 (1.4% of DB) 40 60 80 100

NSH recall decreased here!

k recall(k)@10k LSH SH SpH NSH

With a bigger dataset, this “recall-dropping effect” was not observed.

22

slide-118
SLIDE 118

Conclusion

  • 1. We have formally shown that counter-intuitive idea can lead to

improved kNN accuracy.

  • 2. Based on the idea, we have proposed a novel hashing-based

search method—Neighbor-Sensitive Hashing.

  • 3. We have empirically demonstrated that our proposed method

could achieve better kNN performance (faster or more accurate) compared to existing methods.

23

slide-119
SLIDE 119

Conclusion

  • 1. We have formally shown that counter-intuitive idea can lead to

improved kNN accuracy.

  • 2. Based on the idea, we have proposed a novel hashing-based

search method—Neighbor-Sensitive Hashing.

  • 3. We have empirically demonstrated that our proposed method

could achieve better kNN performance (faster or more accurate) compared to existing methods.

23

slide-120
SLIDE 120

Conclusion

  • 1. We have formally shown that counter-intuitive idea can lead to

improved kNN accuracy.

  • 2. Based on the idea, we have proposed a novel hashing-based

search method—Neighbor-Sensitive Hashing.

  • 3. We have empirically demonstrated that our proposed method

could achieve better kNN performance (faster or more accurate) compared to existing methods.

23

slide-121
SLIDE 121

Thank You!

23

slide-122
SLIDE 122

References I

Charikar, M. S. (2002). Similarity estimation techniques from rounding algorithms. In SOTC. Datar, M., Immorlica, N., Indyk, P., and Mirrokni, V. S. (2004). Locality-sensitive hashing scheme based on p-stable distributions. In SoCG. Gao, J., Jagadish, H. V., Lu, W., and Ooi, B. C. (2014). Dsh: data sensitive hashing for high-dimensional k-nnsearch. In SIGMOD. Heo, J.-P., Lee, Y., He, J., Chang, S.-F., and Yoon, S.-E. (2012). Spherical hashing. In CVPR.

24

slide-123
SLIDE 123

References II

Jin, Z., Hu, Y., Lin, Y., Zhang, D., Lin, S., Cai, D., and Li, X. (2013). Complementary projection hashing. In ICCV. Kulis, B. and Grauman, K. (2012). Kernelized locality-sensitive hashing. TPAM. Lin, Y., Jin, R., Cai, D., Yan, S., and Li, X. (2013). Compressed hashing. In CVPR. Liu, W., Wang, J., Kumar, S., and Chang, S.-F. (2011). Hashing with graphs. In ICML.

25

slide-124
SLIDE 124

References III

Weiss, Y., Torralba, A., and Fergus, R. (2009). Spectral hashing. In NIPS.

26

slide-125
SLIDE 125

Backup: Neighbor-Sensitive Transformation

We expand the space around a query using Neighbor-Sensitive Transformation. A Neighbor-Sensitive Transformation (NST) is simply a function of data points

(e.g., f v1 f v2 )

The function f qualifies for NST if f satisfies some technical requirements.

(please see our paper)

Our Formal Claim (Theorem 2) Using NST with regular hash functions produces higher accuracy than LSH.

27

slide-126
SLIDE 126

Backup: Neighbor-Sensitive Transformation

We expand the space around a query using Neighbor-Sensitive Transformation. A Neighbor-Sensitive Transformation (NST) is simply a function of data points

(e.g., f(v1), f(v2), . . .)

The function f qualifies for NST if f satisfies some technical requirements.

(please see our paper)

Our Formal Claim (Theorem 2) Using NST with regular hash functions produces higher accuracy than LSH.

27

slide-127
SLIDE 127

Backup: Neighbor-Sensitive Transformation

We expand the space around a query using Neighbor-Sensitive Transformation. A Neighbor-Sensitive Transformation (NST) is simply a function of data points

(e.g., f(v1), f(v2), . . .)

The function f(·) qualifies for NST if f(·) satisfies some technical requirements.

(please see our paper)

Our Formal Claim (Theorem 2) Using NST with regular hash functions produces higher accuracy than LSH.

27

slide-128
SLIDE 128

Backup: Neighbor-Sensitive Transformation

We expand the space around a query using Neighbor-Sensitive Transformation. A Neighbor-Sensitive Transformation (NST) is simply a function of data points

(e.g., f(v1), f(v2), . . .)

The function f(·) qualifies for NST if f(·) satisfies some technical requirements.

(please see our paper)

Our Formal Claim (Theorem 2) Using NST with regular hash functions produces higher accuracy than LSH.

27

slide-129
SLIDE 129

Backup: Neighbor-Sensitive Transformation (cont’d)

We formally prove that this function is NST We don’t formally prove, but show empirically that this is NST for arbitrary queries.

Let us assume a query q is known Then, the following function works as NST for q: fp v exp p v 2

2

where pivot p is a data point close to q. Of course, q is unknown a priori Then, the following function is NST for arbitrary q: f v fp1 v fpm v with multiple pivots p1 pm.

28

slide-130
SLIDE 130

Backup: Neighbor-Sensitive Transformation (cont’d)

We formally prove that this function is NST We don’t formally prove, but show empirically that this is NST for arbitrary queries.

Let us assume a query q is known Then, the following function works as NST for q: fp(v) = exp ( −∥p − v∥2 η2 ) where pivot p is a data point close to q. Of course, q is unknown a priori Then, the following function is NST for arbitrary q: f v fp1 v fpm v with multiple pivots p1 pm.

28

slide-131
SLIDE 131

Backup: Neighbor-Sensitive Transformation (cont’d)

We formally prove that this function is NST We don’t formally prove, but show empirically that this is NST for arbitrary queries.

Let us assume a query q is known Then, the following function works as NST for q: fp(v) = exp ( −∥p − v∥2 η2 ) where pivot p is a data point close to q. Of course, q is unknown a priori Then, the following function is NST for arbitrary q: f v fp1 v fpm v with multiple pivots p1 pm.

28

slide-132
SLIDE 132

Backup: Neighbor-Sensitive Transformation (cont’d)

We formally prove that this function is NST We don’t formally prove, but show empirically that this is NST for arbitrary queries.

Let us assume a query q is known Then, the following function works as NST for q: fp(v) = exp ( −∥p − v∥2 η2 ) where pivot p is a data point close to q. Of course, q is unknown a priori Then, the following function is NST for arbitrary q: f v fp1 v fpm v with multiple pivots p1 pm.

28

slide-133
SLIDE 133

Backup: Neighbor-Sensitive Transformation (cont’d)

We formally prove that this function is NST We don’t formally prove, but show empirically that this is NST for arbitrary queries.

Let us assume a query q is known Then, the following function works as NST for q: fp(v) = exp ( −∥p − v∥2 η2 ) where pivot p is a data point close to q. Of course, q is unknown a priori Then, the following function is NST for arbitrary q: f(v) = (fp1(v), . . . , fpm(v)) with multiple pivots p1, . . . , pm.

28

slide-134
SLIDE 134

Backup: Neighbor-Sensitive Transformation (cont’d)

We formally prove that this function is NST We don’t formally prove, but show empirically that this is NST for arbitrary queries.

Let us assume a query q is known Then, the following function works as NST for q: fp(v) = exp ( −∥p − v∥2 η2 ) where pivot p is a data point close to q. Of course, q is unknown a priori Then, the following function is NST for arbitrary q: f(v) = (fp1(v), . . . , fpm(v)) with multiple pivots p1, . . . , pm.

28