Skip to main content
QUICK REVIEW

[Paper Review] Fast Approximate Nearest Neighbor Search With The Navigating Spreading-out Graph

Cong Fu, Chao Xiang|arXiv (Cornell University)|Jul 1, 2017
Data Management and AlgorithmsComputer Science25 citations
TL;DR

This paper proposes the Navigating Spreading-out Graph (NSG), a novel graph-based approximate nearest neighbor search (ANNS) index that achieves logarithmic search complexity and high scalability by simultaneously optimizing connectivity, low out-degree, short search paths, and compact index size. NSG outperforms state-of-the-art methods like Faiss and HNSW, achieving 430x speedup over serial search at 99% precision on 100M vectors and being deployed at scale in Taobao’s billion-node search engine with 5ms average response time.

ABSTRACT

Approximate nearest neighbor search (ANNS) is a fundamental problem in databases and data mining. A scalable ANNS algorithm should be both memory-efficient and fast. Some early graph-based approaches have shown attractive theoretical guarantees on search time complexity, but they all suffer from the problem of high indexing time complexity. Recently, some graph-based methods have been proposed to reduce indexing complexity by approximating the traditional graphs; these methods have achieved revolutionary performance on million-scale datasets. Yet, they still can not scale to billion-node databases. In this paper, to further improve the search-efficiency and scalability of graph-based methods, we start by introducing four aspects: (1) ensuring the connectivity of the graph; (2) lowering the average out-degree of the graph for fast traversal; (3) shortening the search path; and (4) reducing the index size. Then, we propose a novel graph structure called Monotonic Relative Neighborhood Graph (MRNG) which guarantees very low search complexity (close to logarithmic time). To further lower the indexing complexity and make it practical for billion-node ANNS problems, we propose a novel graph structure named Navigating Spreading-out Graph (NSG) by approximating the MRNG. The NSG takes the four aspects into account simultaneously. Extensive experiments show that NSG outperforms all the existing algorithms significantly. In addition, NSG shows superior performance in the E-commercial search scenario of Taobao (Alibaba Group) and has been integrated into their search engine at billion-node scale.

Motivation & Objective

  • To address the scalability and efficiency limitations of existing graph-based ANNS methods on billion-node datasets.
  • To design a graph structure that ensures fast, low-complexity search while maintaining high accuracy and low memory footprint.
  • To reduce indexing time complexity without sacrificing search performance, enabling practical deployment on massive datasets.
  • To provide a theoretically grounded, practical approximation of the Monotonic Relative Neighborhood Graph (MRNG) for real-world ANNS workloads.

Proposed method

  • Proposes the Monotonic Relative Neighborhood Graph (MRNG), a theoretical graph structure that guarantees approximately logarithmic search complexity by ensuring monotonic path progression toward the query.
  • Introduces the Navigating Spreading-out Graph (NSG) as a practical, approximate variant of MRNG that balances connectivity, low out-degree, short paths, and small index size.
  • Employs a greedy, best-first search algorithm on NSG, where nodes are iteratively expanded based on proximity to the query, with pruning via a fixed candidate pool size.
  • Uses a two-phase indexing strategy: first building a k-NN graph, then applying a spreading-out mechanism to rewire edges to improve connectivity and path efficiency.
  • Applies distributed indexing and search by partitioning large datasets into subsets, building independent NSGs, and merging results in parallel.
  • Employs a hierarchical, multi-layered structure inspired by HNSW but optimized for faster indexing and lower out-degree through edge pruning and spreading-out heuristics.

Experimental results

Research questions

  • RQ1Can a graph-based ANNS method achieve logarithmic search complexity while remaining scalable to billion-node datasets?
  • RQ2How can indexing time complexity be reduced without degrading search performance or accuracy?
  • RQ3What structural properties of a proximity graph are most critical for fast and accurate nearest neighbor search?
  • RQ4Can a practical approximation of a theoretically optimal graph (MRNG) be designed that balances connectivity, low out-degree, and compactness?

Key findings

  • NSG achieves 430x speedup over serial CPU search at 99% precision on the 100M subset of DEEP1B, outperforming Faiss-GPU and Faiss-16core.
  • NSG-16core, using 16 parallel NSGs on 6.25M subsets, completes indexing in 3.53 hours and achieves sub-5ms average response time on 2B vectors in a distributed setting.
  • NSG is 5–10 times faster than the IVFPQ baseline on e-commerce data at the same precision, meeting real-time response requirements on 45M vectors.
  • The distributed indexing strategy reduces total indexing time compared to monolithic indexing, as the complexity of building 16 NSGs is less than building one on the full dataset.
  • NSG outperforms HNSW in high-precision regions and avoids Out-of-Memory errors that HNSW encounters on large-scale data.
  • NSG has been successfully deployed in Taobao’s production search engine, handling billion-scale, high-dimensional vectors with low latency and high accuracy.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.