A Revisit of Hashing Algorithms for Approximate Nearest Neighbor Search

Deng Cai
12/22/2016
53 citations
cs.CV

Official code: ZJULearning/hashingSearch (33 stars, C++, last commit 2019-03-27). 1 more implementation below.

Abstract

Approximate Nearest Neighbor Search (ANNS) is a fundamental problem in many areas of machine learning and data mining. During the past decade, numerous hashing algorithms are proposed to solve this problem.

Show full abstract

Every proposed algorithm claims outperform other state-of-the-art hashing methods. However, the evaluation of these hashing papers was not thorough enough, and those claims should be re-examined. The ultimate goal of an ANNS method is returning the most accurate answers (nearest neighbors) in the shortest time. If implemented correctly, almost all the hashing methods will have their performance improved as the code length increases. However, many existing hashing papers only report the performance with the code length shorter than 128. In this paper, we carefully revisit the problem of search with a hash index, and analyze the pros and cons of two popular hash index search procedures. Then we proposed a very simple but effective two level index structures and make a thorough comparison of eleven popular hashing algorithms. Surprisingly, the random-projection-based Locality Sensitive Hashing (LSH) is the best performed algorithm, which is in contradiction to the claims in all the other ten hashing papers. Despite the extreme simplicity of random-projection-based LSH, our results show that the capability of this algorithm has been far underestimated. For the sake of reproducibility, all the codes used in the paper are released on GitHub, which can be used as a testing platform for a fair comparison between various hashing algorithms.

View on arXivView PDF

Code Implementations(2)

Code implementations of this paper
RepositoryTypeStarsLanguageLicenseLast commit
ZJULearning/hashingSearchOfficial33C++–2019-03-27
ZJULearning/RPLSHOfficial30C++–2019-04-02

Search with a hash index

336C++, MakefileJan 31, 20187 years agoNOASSERTION
ZJULearning/RPLSHOfficial100%

Kmeans Quantization + Random Projection based Locality Sensitive Hashing

306C++, MakefileJan 31, 20187 years agoNOASSERTION

Similar Papers

Cite this paper

@article{cai2016revisit,
  title  = {A Revisit of Hashing Algorithms for Approximate Nearest Neighbor Search},
  author = {Deng Cai},
  year   = {2016},
  eprint = {1612.07545},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/1612.07545}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/1612.07545.svg)](https://codeofpaper.com/paper/1612.07545)

Discussion