EFANNA : An Extremely Fast Approximate Nearest Neighbor Search Algorithm Based on kNN Graph

Cong Fu, Deng Cai
9/23/2016
cs.CV

Official code: ZJULearning/efanna (299 stars, last commit 2018-01-31).

Abstract

Approximate nearest neighbor (ANN) search is a fundamental problem in many areas of data mining, machine learning and computer vision. The performance of traditional hierarchical structure (tree) based methods decreases as the dimensionality of data grows, while hashing based methods usually lack efficiency in practice. Recently, the graph based methods have drawn considerable attention. The main idea is that \emph{a neighbor of a neighbor is also likely to be a neighbor}, which we refer as \emph{NN-expansion}. These methods construct a $k$-nearest neighbor ($k$NN) graph offline. And at online search stage, these methods find candidate neighbors of a query point in some way (\eg, random selection), and then check the neighbors of these candidate neighbors for closer ones iteratively. Despite some promising results, there are mainly two problems with these approaches: 1) These approaches tend to converge to local optima. 2) Constructing a $k$NN graph is time consuming. We find that these two problems can be nicely solved when we provide a good initialization for NN-expansion. In this paper, we propose EFANNA, an extremely fast approximate nearest neighbor search algorithm based on $k$NN Graph. Efanna nicely combines the advantages of hierarchical structure based methods and nearest-neighbor-graph based methods. Extensive experiments have shown that EFANNA outperforms the state-of-art algorithms both on approximate nearest neighbor search and approximate nearest neighbor graph construction. To the best of our knowledge, EFANNA is the fastest algorithm so far both on approximate nearest neighbor graph construction and approximate nearest neighbor search. A library EFANNA based on this research is released on Github.

View on arXivView PDF

Code Implementations(1)

ZJULearning/efannaOfficial100%

fast library for ANN search and KNN graph construction

29958C++, MATLABSep 1, 20168 years agoNOASSERTION

Similar Papers

Cite this paper

@article{fu2016efanna,
  title  = {EFANNA : An Extremely Fast Approximate Nearest Neighbor Search Algorithm Based on kNN Graph},
  author = {Cong Fu and Deng Cai},
  year   = {2016},
  eprint = {1609.07228},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/1609.07228}
}

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/1609.07228.svg)](https://codeofpaper.com/paper/1609.07228)

Discussion