



NSG is an approximate nearest neighbor search algorithm based on a sparse navigable graph structure designed for high-dimensional vector similarity search. The reference implementation provides a graph-based ANN index that can be integrated into custom vector retrieval systems.
Loading more......
title: NSG slug: nsg url: https://github.com/ZJULearning/nsg brand: zjulearning category: sdks-libraries featured: false images:
NSG (Navigating Spread-out Graph) is a graph-based approximate nearest neighbor search (ANNS) algorithm designed for large-scale, high-dimensional vector similarity search. It builds a sparse navigable graph over dense real-valued vectors to enable efficient, metric-free approximate nearest neighbor queries, and is provided as a reference implementation that can be integrated into custom vector retrieval systems.
Graph-based ANN index
Builds a sparse navigable graph structure over vector datasets for approximate nearest neighbor search.
Approximate Nearest Neighbor Search (ANNS)
Implements ANNS for dense real-valued vectors, targeting high efficiency and scalability.
Metric-free design
Designed for metric-free, large-scale ANN search on dense vectors, not tied to a specific distance metric.
Reference implementation of NSG algorithm
Implements the algorithm from the PVLDB paper “Fast Approximate Nearest Neighbor Search With The Navigating Spread-out Graphs”.
Large-scale / billion-scale readiness
Used in production (e.g., Taobao search engine) for billion-scale ANN search in e-commerce scenarios, indicating suitability for very large datasets.
Library / SDK structure
src and include/efanna2epynsgCMakeLists.txt)tests for validationResearch-oriented codebase
Organized to support experimentation and benchmarking of NSG against other ANN algorithms, including figures and performance evaluation materials.
pynsg).Dockerfile.LICENSE) in the repository; users should consult it directly for exact terms.