TL;DR
This paper introduces "Neighborhood Stability" (NSM), a novel framework to analytically determine if a dataset is a good candidate for clustering-based search. By measuring how often a point's nearest neighbors reside within the same cluster, the authors provide a way to predict search accuracy and dataset "clusterability" using only the data itself, without needing expensive query-based experiments.
What Problem Does This Paper Address?
In the world of large-scale vector search, clustering-based Approximate Nearest Neighbor Search (ANNS)—often called Inverted File (IVF) indexing—is an industry standard. It works by partitioning data into shards and only searching the most relevant ones.
However, practitioners face a recurring headache: How do you know if a dataset is actually "searchable" via clustering? Currently, this is an empirical guessing game. You run expensive experiments with different algorithms and query sets to see what sticks. Existing internal clustering metrics (like the Dunn Index or Davies-Bouldin) are often poor predictors of actual search performance, particularly for non-Euclidean metrics like Maximum Inner Product Search (MIPS). The authors aim to fill this gap with an analytical tool that quantifies "searchability" directly from the dataset's geometric structure.
Methods
The authors propose two primary measures based on the concept of Neighborhood Stability:
- Clustering-NSM (Internal Quality): This measures the quality of a specific clustering. For a given cluster, it calculates the fraction of points whose 1-nearest neighbor is also inside that same cluster. The overall metric is a weighted average across all clusters.
- Point-NSM (Clusterability): This is a property of the dataset itself, independent of any specific clustering algorithm. For any point, it looks at its $r$ nearest neighbors and calculates their stability. If a dataset has high Point-NSM, it means the points naturally form "tight-knit" neighborhoods that are easy for any clustering algorithm to capture.
What’s new here? Unlike traditional metrics that rely on absolute distances (which can be skewed by outliers or high dimensionality), NSM is based on nearest neighbor relationships (ranks). This makes it "distance agnostic," allowing it to work seamlessly across Euclidean distance, Cosine similarity, and Inner Product.
Datasets
The authors validated their measures across a massive range of benchmarks:
- ANNS Benchmarks: Standard sets like MNIST, Fashion-MNIST, GIST, and SIFT (Euclidean); DeepImage, GloVe, LastFM, MSMARCO, and NQ (Cosine); and Text2Image and Music (Inner Product).
- Image Clustering: CIFAR10, CIFAR100, MNIST, Pets, and Caltech101, using state-of-the-art embeddings from models like CLIP-ViT and ReSSL.
Key Insights and Ideas
- Stability as a Proxy for Accuracy: The "aha moment" is the realization that search accuracy in an IVF system is fundamentally limited by whether a point and its true nearest neighbors end up in the same shard. NSM measures exactly this "togetherness" potential.
- Predicting the Future: Point-NSM allows researchers to estimate the "ceiling" of search performance for a dataset before they even begin the indexing process.
- Rank > Distance: By focusing on neighbor lists rather than raw distance values, the metric remains robust in high-dimensional spaces where distances often become "concentrated" and less meaningful.
- Efficiency: The authors show that you don't need to calculate exact neighbors for the whole dataset to get a good estimate. Using approximate neighbors or sub-sampling only 5% of the data yields nearly identical results, making the metric practical for billion-scale datasets.
Key Results
- Strong Correlation: Clustering-NSM shows a very high Spearman’s rank correlation (often > 0.8) with actual ANNS recall. In contrast, the Dunn Index was found to be almost entirely unpredictable.
- Superiority in MIPS: On the "Music" dataset (Inner Product), traditional metrics like Davies-Bouldin actually showed a negative correlation with accuracy, while NSM remained a strong positive predictor.
- Algorithm Agnostic: The relationship held true whether the researchers used standard K-Means or Spherical K-Means, and across various iteration counts.
- Beyond Clustering: Preliminary results (Appendix H) suggest that Point-NSM might even predict the performance of graph-based search algorithms like HNSW, suggesting "searchability" is a fundamental dataset property.
Limitations and Future Work
- Theoretical Constraints: The mathematical proofs for the relationship between Point-NSM and Clustering-NSM currently assume certain "spherical" or decomposable cluster structures. While empirical results show it works on real-world "messy" data, the theory needs to be generalized.
- Weighting Schemes: The current Clustering-NSM uses weights proportional to cluster size. The authors note that exploring different weighting schemes could further refine the metric's predictive power.
- Graph-based ANNS: While the paper focuses on clustering, the "speculation" that these measures apply to graph-based algorithms is a major avenue for future research. If proven, NSM could become a universal "difficulty score" for any vector search task.
Summary updated