Introduction
In modern Information Retrieval (IR), documents and queries are frequently represented as high-dimensional dense vector embeddings. Retrieving relevant documents involves finding the $k$ vectors closest to a query vector, a process known as $k$-Nearest Neighbor ($k$NN) search. To handle the computational demands of searching millions of vectors, systems typically employ Approximate $k$NN (A-$k$NN) techniques, such as clustering documents offline and searching only the $N$ clusters with centroids closest to the query.
However, standard A-$k$NN implementations use a fixed value for $N$ across all queries. This approach is inherently inefficient: "easy" queries may find their optimal matches within the first few clusters, while "hard" queries require more extensive searching. This paper introduces adaptive "patience-based" early exit strategies designed to optimize this process by stopping the search as soon as the results stabilize, achieving significant speedups with minimal impact on retrieval quality.
Methodology
The authors propose three primary strategies to introduce adaptiveness into the A-$k$NN search process:
1. Patience-based Approach (Unsupervised)
This core innovation monitors the "stability" of the result set as the system iteratively visits clusters. By tracking the intersection size between consecutive result sets, the system can determine when it has reached a point of diminishing returns. If the top-$k$ results remain unchanged over a predefined number of clusters ($\Delta$), the search terminates.
2. Classification Approach (Supervised)
Analysis of query difficulty reveals a power-law distribution, where approximately 50% of queries find their nearest neighbor in the very first cluster. The authors trained a classifier to categorize queries as either "Exit" (requiring $\le \tau$ clusters) or "Continue" (requiring more).
3. Cascade Approach
This hybrid method combines the classifier with a second-stage decision process. A classifier first identifies "easy" queries for immediate exit. For the remaining queries, either a regression model or the patience-based heuristic determines the optimal stopping point.
Experimental Setup
The strategies were evaluated using the MS-MARCO Passage (ver. 1) dataset, comprising roughly 8.8 million document vectors. Testing was conducted across three state-of-the-art dense retrieval models: STAR, CONTRIEVER, and TAS-B.
Key Results and Insights
The proposed methods demonstrate that query difficulty is highly imbalanced, with 80% of queries requiring fewer than 10 clusters. Standard A-$k$NN systems spend significant resources "over-searching" these queries. The patience-based heuristic proves remarkably effective without requiring complex learned models, leveraging the fact that result sets often saturate long before the search concludes.
As shown in the results table, the proposed methods significantly outperform fixed FAISS-based A-$k$NN baselines:
- Speedups: The patience-based approach achieved speedups between 4.71x and 5.27x.
- Efficiency: For the STAR model, the patience-based method reduced the average clusters visited from 80 to 18.7 while maintaining nearly identical Mean Reciprocal Rank (mRR@10).
- Optimal Performance: The "Cascade" approach (Classifier + Patience) yielded the highest efficiency, particularly for the CONTRIEVER model, reaching a 6.13x speedup over the baseline.
Conclusion
While early exit strategies offer substantial efficiency gains, the authors noted that aggressive cascade methods can occasionally lead to minor, though statistically significant, drops in effectiveness. Future research will investigate the generalization of these patterns across different vector space topologies and index structures, as well as their behavior when targeting higher levels of approximation tolerance.
Summary updated