TL;DR
Cluster with Auctions (CwA) is a novel vector search method that decouples database partitioning from query routing, optimizing both jointly using an alternating neural training and auction-based assignment strategy. By tailoring the index directly to the query distribution while strictly enforcing cluster balance, CwA delivers up to a $4.7\times$ throughput improvement over state-of-the-art approximate nearest neighbor search (ANNS) methods, particularly in out-of-distribution scenarios.
What Problem Does This Paper Address?
Large-scale vector search commonly relies on partition-based indexing (like the classic Inverted File Index, or IVF). The database is split into clusters, and incoming queries only probe the most promising clusters.
Traditionally, the same mechanism (e.g., K-Means centroids) handles both tasks: assigning database vectors to clusters and routing queries to those clusters. The authors argue this conflation is fundamentally suboptimal for two reasons:
- Distribution Shift: In practice, user queries often follow a different distribution than the database vectors (out-of-distribution, or OOD). Indexes trained purely on database vectors poorly cover the regions where queries actually land.
- Cluster Imbalance: Standard clustering often creates highly unbalanced partitions. Large clusters create massive bottlenecks, inflating worst-case query latency.
Methods
CwA addresses these limitations by treating the database partition and the query routing function as separate but jointly optimized entities. It uses an alternating optimization framework that minimizes a unified cross-entropy loss:
- Step A (Neural Probing): Fixes the database partition and trains a neural network (the probing function) via standard backpropagation to predict which clusters contain a query's true nearest neighbors.
- Step B (Database Assignment via Auctions): Fixes the neural network and updates the database cluster assignments. This is formulated as a capacitated linear assignment problem and solved efficiently on the GPU using a parallelized auction algorithm. Database vectors iteratively "bid" on cluster slots, naturally enforcing a strict size quota ($Q$) to guarantee perfectly balanced clusters.
To scale up, the authors introduce two architectural variants:
- CwA-HNSW: Replaces exhaustive centroid search with an HNSW graph index to accelerate query routing when cluster counts exceed $10^4$.
- CwA-Prod: Decomposes cluster prediction into a Cartesian product of two smaller codebooks, enabling the method to scale to hundreds of thousands of clusters with a minimal parameter footprint.
Datasets
The authors evaluated CwA on four widely recognized large-scale vector search benchmarks across varying scales (1M, 10M, and 100M vectors):
- In-Distribution (ID): SIFT ($d=128$) and Deep ($d=96$), where queries and database vectors share the same distribution.
- Out-of-Distribution (OOD): Text-to-Image ($d=200$) and LAION ($d=512$), which exhibit significant query-database distribution discrepancies.
Key Insights and Ideas
- Asymmetric Roles: Partitioning database vectors is a discrete, offline task, whereas query routing is a continuous, online inference task. Separating their architectures allows each to specialize.
- Query-Driven Indexing: Instead of clustering database vectors based on geometric proximity alone, CwA shapes the clusters around the query distribution, maximizing recall where it matters most.
- Auctions Enforce Balance: The combinatorial auction algorithm acts as a hard constraint for cluster sizes. This eliminates the variance in query latency caused by oversized clusters, a notorious downside of vanilla K-Means.
Key Results
CwA consistently outperforms competitive learned partitioning baselines (such as USP, Neural LSH, and BLISS) across both ID and OOD settings.
- OOD Performance Leap: On the out-of-distribution LAION dataset, CwA achieves up to $4.7\times$ higher throughput (QPS) than K-Means at equal recall. While other neural baselines collapse under distribution shifts, CwA thrives because it trains directly on query distributions.
- Linear Superiority: Remarkably, even a simple linear probing function trained with CwA outperforms complex deep neural network baselines in the in-distribution setting.
- Billion-Scale Scaling: CwA-Prod successfully scales to 100M vectors and 262k clusters, delivering up to $2.5\times$ better throughput than traditional multi-codebook methods like Residual Quantization (RQ) and the Inverted Multi-Index (IMI).
Limitations and Future Work
- Single Partition Constraint: The current implementation evaluates only a single partition. Combining multiple complementary partitions (a standard practice in Locality-Sensitive Hashing) remains an open area for exploration.
- Static Databases: CwA is designed for fixed databases. It does not currently support an out-of-sample extension to dynamically assign newly arriving database vectors to existing clusters without retraining.
Summary updated