Filtered-DiskANN delivers up to 7.5x higher query throughput than IVF inline-filtering at 90% recall@10 and preserves 90%+ recall down to 10^-6 label specificity by making Vamana graph construction label-aware. In a two-week live A/B test on a sponsored search engine across 47 geographical ad regions, replacing post-filtered vector retrieval with its FilteredVamana index raised ad clicks by 34.61% (p = 0.03) and revenue by 48.95% (p = 0.009), with rare regions under 1% of index share jumping 70.67% in clicks and 79.77% in revenue.
Gollapudi et al. (Microsoft and Microsoft Research, WWW ‘23) built two algorithms on top of DiskANN (FilteredVamana for streaming inserts and StitchedVamana for batch indexing) because filtering only at query time breaks graph navigation whenever eligible nodes are sparse.
- Real-world speedups (90% recall@10): On
DANN(3.3M points, 47 labels),FilteredVamanaruns 3x faster andStitchedVamanaruns 7.5x faster than 4,096-cluster FAISS-IVF inline processing (2.5xand6xonPrep). - Extreme selectivity survival: On
Turing(2.6M points, 3,070 filters, specificity down to7.7e-6), both reach 90%+ recall@10, while post- and inline-filtering drop nearly 1,000x in QPS and stall on recall. - Low unfiltered penalty: On unfiltered queries at 95% recall@10 (
PrepandDANN),StitchedVamanaretains 0.9x andFilteredVamana0.8x of standard Vamana QPS. - SSD scale: Placing the graph in DiskANN’s hybrid DRAM-SSD engine scales to 28 million
DANNpoints on a single local SSD at thousands of QPS and 90%+ recall@10.
How It Works
Standard post-filtering searches an unfiltered HNSW or Vamana graph and discards non-matching candidates afterward, which misses eligible points when filters are selective. Pre-filtering via an inverted index (as in Weaviate or Milvus) still leaves queries stranded if standard geometric edges bypass eligible nodes, while building one index per label explodes storage when each point carries dozens of overlapping labels (8.84 filters/point on Prep).
Both algorithms replace standard Vamana pruning (RobustPrune) with FilteredRobustPrune: a directed edge (a, c) is pruned in favor of (a, b) only when alpha * d(b, c) <= d(a, c) and F_a ∩ F_c ⊆ F_b. That third condition guarantees shortcut nodes keep all shared filter labels, preserving navigable subgraphs inside one shared index. At query time, FilteredGreedySearch starts from a load-balanced per-filter medoid (FindMedoid) and pushes only out-neighbors matching the query label.
- FilteredVamana: Inserts points incrementally, running
FilteredGreedySearchover the new point’s labels and pruning both out-edges and overflowing back-edges on the fly (L = 90,R = 96). - StitchedVamana: Builds a compact per-label Vamana graph (
R_small = 32,L_small = 100) for every label, takes the union of all edges, and prunes each vertex down toR_stitched = 64(alpha = 1.2) withFilteredRobustPrune.
Key Findings
Across Turing, Prep, and DANN, StitchedVamana consistently doubles FilteredVamana’s QPS at 90% recall because stitching full per-label subgraphs lets FilteredRobustPrune choose from a richer candidate pool before bounding out-degree. Conversely, FilteredVamana builds roughly 3x faster and barely lost throughput when the authors randomly shuffled labels on Prep to destroy vector-label correlation, whereas StitchedVamana slowed down on the shuffled corpus.
Compared against NHQ-KGraph on five semi-synthetic NHQ datasets (which effectively partition points into 12 disjoint labels), both Vamana variants delivered an order of magnitude higher QPS at 100% recall, even in build-time-normalized runs.
Caveats and Builder Takeaway
- Filter expressiveness limits: The algorithms natively support single-label exact match and
ORdisjunctions (by querying each label and merging results by distance). Multi-labelANDconjunctions, continuous range filters, and SQL predicates remain open problems, and the label vocabulary must fit in the low thousands. - Streaming deletions untested: While
FilteredVamanasupports incremental insertions cleanly, full dynamic deletions (as in FreshDiskANN) are left to future work. - Authorization safety: When labels represent ACLs or tenant boundaries, the serving tier must still verify eligibility before returning results, especially if approximate or hybrid fallback paths run alongside FAISS or post-filters.
Pick StitchedVamana for static or nightly-rebuilt catalogs chasing maximum QPS, and FilteredVamana when your index ingests live updates or sees shifting attribute distributions.


