Approximate Nearest Neighbor Search for Modern AI: A Projection-Augmented Graph Approach
Organizations: University of Yamanashi · Beijing Institute of Technology, Zhuhai · Shenzhen University · Nagoya University ·
Abstract
Approximate Nearest Neighbor Search (ANNS) is fundamental to modern AI applications. Most existing solutions optimize query efficiency but fail to align with the practical requirements of modern workloads. In this paper, we outline six critical demands of modern AI applications: high query efficiency, fast indexing, low memory footprint, scalability to high dimensionality, robustness across varying retrieval sizes, and support for online insertions. To satisfy all these demands, we introduce Projection-Augmented Graph (PAG), a new ANNS framework that integrates projection techniques into a graph index. PAG reduces unnecessary exact distance computations through asymmetric comparisons between exact and approximate distances as guided by projection-based statistical tests. Three key components are designed and integrated into the graph index to optimize indexing and searching. Experiments on six modern datasets demonstrate that PAG consistently achieves superior queries per second (QPS)-recall performance -- up to 5x faster than HNSW -- while offering fast indexing speed and moderate memory footprint. PAG remains robust as dimensionality and retrieval size increase and naturally supports online insertions.
Figures & tables
| Graph-Based | Quantization-Based | QG | PG | PAG | |||||
|---|---|---|---|---|---|---|---|---|---|
| Criteria | HNSW | Vamana | IVFPQFS 1 | ScaNN 1 | RaBitQ+ | SymQG | HNSW+KS2 | PAG-Base | PAG-Lite |
| D1. QPS-recall | Tier-2 | Tier-2 | Tier-1 | Tier-1 | Tier-1 | Tier-3 | Tier-3 | Tier-4 | Tier-3 |
| D2. Indexing time | Tier-1 | Tier-1 | Tier-3 | Tier-3 | Tier-3 | Tier-2 | Tier-1 | Tier-2 | Tier-4 |
| D3. Memory footprint 2 | Tier-3 | Tier-3 | Tier-4 | Tier-4 | Tier-4 | Tier-1 | Tier-2 | Tier-3 | Tier-4 |
| D4. High-dim. scalability | ✓ | ✓ | ✓ | ✓ | ✓ | ✗ | ✓ | ✓ | ✓ |
| D5. Retrieval size robustness | ✓ | ✓ | ✓ | ✓ | ✓ | ✗ | ✓ | ✓ | ✓ |
| Name/Source | Dataset Size | Query Size | Dim. | OOD | Type | Embedding Model | Distance Measure |
|---|---|---|---|---|---|---|---|
| Modern Datasets | |||||||
| DBpedia1536 | 999,000 | 1,000 | 1,536 | No | Text | text-embedding-3-large ( OpenAI, 2024 ) | Euclidean |
| DBpedia3072 | 999,000 | 1,000 | 3,072 | No | Text | text-embedding-3-large ( OpenAI, 2024 ) | Euclidean |
| WoltFood | 1,719,611 | 1,000 | 512 | No | Image | clip-ViT-B-32 ( Radford et al., 2021 ) | Euclidean |
| DataCompDr | 12,779,520 | 1,000 | 1,536 | Yes | Text-to-Image | coca_ViT-L-14 ( Yu et al., 2022 ) | Euclidean |
| AmazonBooks | 15,928,208 | 1,000 | 384 | No | Text | all-MiniLM-L12-v2 ( Wang et al., 2020 ) | Euclidean |
Appendix figures & tables22 assets
Supplementary material from the paper’s appendix.
Appendix
| Symbol | Description |
|---|---|
| Dataset of vectors | |
| Dimension of vectors | |
| Dataset size | |
| Query vector | |
| Retrieval size | |
| Node to be inserted to a graph index |
| Dataset | PAG-Base | PAG-Lite |
|---|---|---|
| Modern Datasets | ||
| DBpedia1536 | ||
| DBpedia3072 | ||
| WoltFood | ||
| DataCompDr | ||
| AmazonBooks | ||
Approximate Nearest Neighbor Search
Approximate nearest neighbor search finds close vectors without exhaustive comparisons, enabling scalable retrieval in high-dimensional datasets.
See all 42 papers