Attribute Filtering in Approximate Nearest Neighbor Search: An In-depth Experimental Study
Mocheng LiXiao YanBaotong LuYue ZhangJames ChengChenhao Ma
Presents a unified taxonomy and large-scale experimental evaluation of filtered approximate nearest neighbor search algorithms across datasets with up to ten million vectors, delivering actionable guidelines on how indexing strategies and attribute selectivity govern retrieval performance.
Modern artificial intelligence applications, including recommendation systems and search engines, increasingly require retrieving unstructured vector data while simultaneously applying relational database filters, such as price ranges or category tags. While numerous algorithms for this hybrid task—termed Filtering Approximate Nearest Neighbor (Filtering ANN) search—have emerged recently, they rely on divergent designs, lack standardized evaluation, and present unclear performance trade-offs for production deployment.
The article provides a systematic experimental survey and unified benchmarking framework to evaluate 12 Filtering ANN methods across 10 recent algorithms. It aims to clarify the structural mechanics of these methods, assess their practical performance across diverse filtering workloads, and identify design guidelines for system architects and developers.
The authors established a standardized benchmarking interface and evaluated state-of-the-art methods on four standard datasets scaling up to 10 million vectors, using both synthetic and real attributes. The evaluation assessed search throughput (queries per second) and navigation efficiency while strictly maintaining a 90% recall target across selectivity levels ranging from 0.1% (highly restrictive filters) to 100% (unrestricted search). The study also conducted detailed component breakdowns focusing on indexing structures, graph pruning mechanisms, and entry point selection strategies.
The key findings reveal critical performance trade-offs across different query conditions. First, for numerical range filtering, segmented subgraph structures organized as binary search trees (such as iRangeGraph) achieve superior search speeds and robustness under highly restrictive filters (0.1% selectivity), whereas segmented edge methods (such as SeRF) fail at low selectivity because graph connectivity breaks down during index construction. Second, label filtering algorithms remain underdeveloped and unstable across datasets; stitching specialized subgraphs improves recall but can still fail depending on underlying graph quality, while joint-distance methods suffer severe performance degradation below 1% selectivity. Third, for arbitrary and multi-predicate filtering, standard single-index graphs (such as Faiss-HNSW) dominate when selectivity exceeds 50%, whereas dataset partitioning strategies (such as Milvus-HNSW) maintain reliable query execution at selectivities under 1% by falling back to efficient localized scans. Fourth, hierarchical multi-layer graphs provide minimal benefit over single-layer graphs under moderate-to-low selectivity, while increasing the number of entry points at the base layer (from 3 to 30 or 300) consistently reduces required vector comparisons across all methods.
These findings have direct operational implications for database architecture, memory sizing, and query latency. Highly specialized filtering indexes incur substantial index construction time and memory overheads compared to traditional vector indexes. Furthermore, the standard geometric pruning techniques used in vector search fail under sparse filtering constraints, meaning systems that rely on naive graph traversal risk severe query failures or unacceptable latency spikes under strict filters.
For practitioners, the source supports concrete architectural recommendations: deploy segmented subgraph methods (such as UNIFY or iRangeGraph) for numerical range filtering, utilize partition-based scanning (such as Milvus) for arbitrary filters with selectivity below 1%, and rely on standard unpartitioned graph indexes for queries passing more than 50% of the dataset. For label filtering, Filtered-DiskANN is recommended for single-label constraints, while simpler KGraph-based pruning is preferred when multiple labels are queried. Prior to production rollout, engineering teams should optimize entry point selection by sampling broader sets at the base layer rather than relying on complex multi-layer hierarchies.
The conclusions carry high confidence within static, uniformly distributed benchmark environments. However, decision-makers should note key limitations: most evaluated algorithms do not support real-time incremental updates, exhibit high sensitivity to manual hyperparameter tuning, and rely on uniform attribute distributions that may not fully reflect real-world data skew. Further research is necessary to develop robust arbitrary filtering indexes and adaptive tuning mechanisms for dynamic production databases.
- Paper: Efficient and robust approximate nearest neighbor search using Hierarchical Navigable Small World graphs, Yu. A. Malkov et al. (2016). Its hierarchical graph search is a key base index for filtering methods, so understanding HNSW clarifies how attribute constraints interact with graph traversal and pruning.
- Paper: DiskANN: Fast Accurate Billion-point Nearest Neighbor Search on a Single Node, Suhas Jayaram Subramanya et al. (2019). DiskANN’s graph construction and search provide essential context for filtering approaches built on graph indexes, especially their tradeoffs in pruning and search cost.
- Paper: Similarity Search in High Dimensions via Hashing, Aristides Gionis et al. (1999). Its foundational locality-sensitive hashing framework helps explain the hashing-based ANN methods that filtering strategies adapt.
- Paper: Scalable Nearest Neighbor Algorithms for High Dimensional Data, Marius Muja et al. (2014). Its comparison of scalable ANN algorithms and tuning tradeoffs prepares readers to interpret the base-index choices evaluated in the filtering study.
No sufficiently relevant recommendations were found.
