HackerPapers

arXiv:1603.09320cs.DS

Efficient and robust approximate nearest neighbor search using Hierarchical Navigable Small World graphs

Yu. A. Malkov, D. A. Yashunin

Abstract

We present a new approach for the approximate K-nearest neighbor search based on navigable small world graphs with controllable hierarchy (Hierarchical NSW, HNSW). The proposed solution is fully graph-based, without any need for additional search structures, which are typically used at the coarse search stage of the most proximity graph techniques. Hierarchical NSW incrementally builds a multi-layer structure consisting from hierarchical set of proximity graphs (layers) for nested subsets of the stored elements. The maximum layer in which an element is present is selected randomly with an exponentially decaying probability distribution. This allows producing graphs similar to the previously studied Navigable Small World (NSW) structures while additionally having the links separated by their characteristic distance scales. Starting search from the upper layer together with utilizing the scale separation boosts the performance compared to NSW and allows a logarithmic complexity scaling. Additional employment of a heuristic for selecting proximity graph neighbors significantly increases performance at high recall and in case of highly clustered data. Performance evaluation has demonstrated that the proposed general metric space search index is able to strongly outperform previous opensource state-of-the-art vector-only approaches. Similarity of the algorithm to the skip list structure allows straightforward balanced distributed implementation.

arXiv comments
13 pages, 15 figures
Journal reference
DOI
Subjects
cs.DSData Structures and Algorithms cs.CVComputer Vision and Pattern Recognition cs.IRInformation Retrieval cs.SISocial and Information Networks

On Hacker News

Linked by 3 identifiable commenters in 3 comments across 3 threads, from Jul 2022 to Sep 2024.

Comments linking this paper, per year.

Discussed in comments3 threads

    • This could of course be a bug, but it's worth noting that vector searching in general is a semantic ("meaning based") search technique, but it doesn't operate on the actual text, it operates on the resulting embedding so it may well make sense to include a (possibly fuzzy) full…

      seanhunterView on HNParent context

    • the Hamming distance in the article is about twice the number of moves to get from one position to the other, mate in 4 is important? A better criticism might be: this metric defines position as close even if can only be reached by reversing moves. There's some discussion in the…

      bazzarghView on HNParent context

    • HNSW, or Hierarchical Navigable Small World is a graph data structure for approximate nearest neighbor search of vectors. https://arxiv.org/abs/1603.09320 The problem space of ANN is one of those really deep holes you can go down. It’s a game of balancing time and space, and…

      binarymaxView on HNParent context

Submitted to Hacker News

Connected through shared HN threads, not inferred similarity or a recommendation.