Theoretical and Empirical Analysis of Adaptive Entry Point Selection for Graph-based Approximate Nearest Neighbor Search

Yutaro Oguri, Yusuke MatsuiarXiv 2024

Graph-based Approximate Nearest Neighbor Search (ANNS) has become the industry standard for high-dimensional vector retrieval in applications ranging from recommendation engines to Large Language Models (LLMs). While these algorithms are highly efficient, most rely on a single, fixed "entry point" to begin their graph traversal. Recent research from the University of Tokyo challenges this convention, demonstrating that adaptive entry point selection significantly enhances performance and robustness.

The Limitation of Fixed Entry Points

In graph-based ANNS, the database is represented as a graph where nodes are vectors and edges connect proximal neighbors. To find the nearest neighbor to a query $q$, the search starts at a predefined entry point and traverses the graph, greedily moving to nodes closer to $q$.

Traditionally, algorithms like NSG or DiskANN use the dataset's "medoid" or center as a fixed starting point. However, if a query is far from this center, the search requires many "hops" to reach the target, increasing latency. More critically, in complex data distributions or "hard instances," a distant starting point can lead the search into local minima or dead ends, severely degrading accuracy.

Bridging Theory and Practice: The $B$-MSNET Framework

Previous theoretical models for graph search often relied on "Monotonic Search Networks" (MSNET), which assume a path always exists that moves strictly closer to the target at every step. Real-world graphs rarely satisfy this strict condition.

To address this gap, the authors introduced the concept of a $b$-monotonic path, which allows for up to $b$ "backward" steps—moves that temporarily increase the distance to the target to navigate around graph obstacles. This leads to the definition of a $B$-MSNET, a more realistic model for practical graph indices.

Figure 1: Illustration of a $b$-monotonic path where some steps (like $x_4$) move further from the target, yet the overall path reaches the destination.

By proving that adaptive entry point selection provides a better upper bound for the "hop count" under the $B$-MSNET framework, the researchers established a rigorous foundation for why starting closer to the query is mathematically superior.

Adaptive Selection via k-means

The proposed method uses k-means clustering to partition the database into $K$ clusters. The centroids of these clusters serve as potential entry points. For each query, the algorithm performs a rapid brute-force search against these $K$ centroids to identify the closest one, then initiates the graph traversal from that specific point. This ensures the search begins in the same Voronoi cell as the target, transforming a long-distance traversal into a localized search.

Empirical Results and Robustness

The authors evaluated their approach across eight diverse datasets, including standard benchmarks (SIFT, GIST), neural embeddings (OpenAI, CLIP), and adversarial "hard instances."

Performance Gains

Adaptive entry point selection consistently outperformed the fixed-point baseline. On standard datasets, it achieved speedups in Queries Per Second (QPS) ranging from 1.2x to 2.3x. This improvement comes with negligible memory overhead, typically less than 0.1% of the total index size.

Figure 6: QPS vs. Recall@10 for the CLIP T2I 1M dataset, demonstrating the performance advantage of adaptive entry points in out-of-distribution scenarios.

Handling Out-of-Distribution (OOD) Data

The method proved particularly effective for OOD tasks, such as text-to-image search (CLIP T2I), where query distributions often deviate significantly from the database distribution. In these scenarios, a central entry point is frequently poorly positioned, making adaptive selection vital for maintaining high throughput and accuracy.

Rescuing "Hard Instances"

On synthetic datasets designed to be "graph-breakers," traditional fixed-point searches often fail completely (0% accuracy). Adaptive selection effectively "rescues" these indices by placing entry points across disconnected or poorly connected "islands" of data, achieving 100% accuracy and representing a massive effective speedup.

Conclusion

This research provides the first comprehensive theoretical and empirical validation for adaptive entry point selection in graph-based ANNS. By introducing the $B$-MSNET framework, the authors have aligned theory with practical graph behavior. The resulting method offers a simple yet powerful optimization for real-world vector search applications, ensuring high performance even in the face of challenging data distributions.

Summary updated

BibTeX
@misc{oguri2024theoretical,
  author = {Yutaro Oguri and Yusuke Matsui},
  title = {{Theoretical and Empirical Analysis of Adaptive Entry Point Selection for Graph-based Approximate Nearest Neighbor Search}},
  year = {2024},
  eprint = {2402.04713},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2402.04713},
}
Figure