NSG
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.
About this tool
title: NSG slug: nsg url: https://github.com/ZJULearning/nsg brand: zjulearning category: sdks-libraries featured: false images:
- https://opengraph.githubassets.com/1/ZJULearning/nsg Tags:
- ann
- graph-index
- similarity-search
Overview
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.
Features
-
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
- C++ source code under
srcandinclude/efanna2e - Python bindings under
pynsg - CMake-based build configuration (
CMakeLists.txt) - Dockerfile for containerized builds and experiments
- Test suite under
testsfor validation
- C++ source code under
-
Research-oriented codebase
Organized to support experimentation and benchmarking of NSG against other ANN algorithms, including figures and performance evaluation materials.
Technology
- Language: Primarily C++ (with Python bindings via
pynsg). - Build system: CMake; Docker support via provided
Dockerfile.
Licensing
- License file included (
LICENSE) in the repository; users should consult it directly for exact terms.
Pricing
- NSG is an open-source research implementation hosted on GitHub. No pricing or paid plans are specified in the available content.
Loading more......
Information
Categories
Tags
Similar Products
6 result(s)iRangeGraph is an ANN indexing approach and accompanying implementation for range-filtering nearest neighbor search. It provides a specialized graph-based index that supports vector similarity search under range constraints, making it directly useful as a component or reference implementation for advanced vector database indexing and retrieval.
Ruby gem for approximate nearest neighbor search that can integrate with pgvector and other backends to power vector similarity search in Ruby applications.
Reconfigurable Inverted Index (Rii) is a research project and open-source library for approximate nearest neighbor and similarity search over high-dimensional vectors. It focuses on flexible, reconfigurable inverted index structures that support efficient vector search, making it directly relevant as a vector-search engine component for AI and multimedia retrieval applications.
RTNN is a research prototype system and codebase that accelerates high-dimensional nearest neighbor search using hardware ray tracing units on modern GPUs. It targets vector similarity search workloads common in AI applications, exploring ray-tracing hardware as an alternative acceleration path to traditional CPU- or CUDA-based ANN indexes.
SymphonyQG is a research codebase and method that integrates vector quantization with graph-based indexing to build efficient approximate nearest neighbor (ANN) indexes for high-dimensional vector search. It targets vector database and similarity search scenarios where combining compact codes with navigable graphs can improve recall–latency tradeoffs and memory footprint.
FAISS (Facebook AI Similarity Search) is a popular open-source library for efficient similarity search and clustering of dense vectors. Developed by Facebook/Meta, it supports billions of vectors and is widely used to power vector search engines and databases, especially where raw speed and scalability are needed.