Abstract
Filtered Approximate Nearest Neighbor Search (FANNS) is essential for modern AI applications that require searching high-dimensional vectors under scalar constraints. This survey provides a unified framework for FANNS, introducing a pruning-focused taxonomy that classifies algorithms into four distinct strategies: Vector-Solely, Vector-Centric Joint, Scalar-Centric Joint, and Scalar-Solely Pruning. Furthermore, the authors identify the "distribution factor"—the spatial relationship between query vectors and filtered data—as a critical determinant of search performance, challenging the traditional reliance on selectivity alone.
Introduction
In the era of Large Language Models (LLMs) and massive vector databases, data is frequently represented as high-dimensional embeddings. While standard Approximate Nearest Neighbor Search (ANNS) excels at finding similar items, real-world scenarios often demand hybrid search. For instance, an e-commerce platform might need to find images similar to a query but only within a specific price range. This intersection of vector similarity and scalar filtering is the domain of FANNS. Despite its importance, the field has lacked standardized definitions and a robust evaluation framework until now.
A Pruning-Focused Taxonomy
The authors propose a new classification system based on how algorithms prune the search space. This taxonomy moves beyond the simple "when" (pre- vs. post-filtering) to the "how" of the search process.
The four categories are:
- Vector-Solely Pruning (VSP): Standard vector indices are used, and scalar filters are applied to the results (post-filtering).
- Vector-Centric Joint Pruning (VJP): Scalar filters are integrated into the vector search traversal, allowing the algorithm to skip non-compliant nodes dynamically.
- Scalar-Centric Joint Pruning (SJP): Scalar filters narrow down the dataset into sub-indices before vector search begins.
- Scalar-Solely Pruning (SSP): The dataset is filtered first, followed by a brute-force scan of the remaining vectors (pre-filtering).
Mapping the Algorithm Landscape
The survey classifies 17 prominent algorithms within this framework, highlighting the diversity of approaches across general, graph, and IVF-based indices.
The Distribution Factor
A key contribution of this work is the introduction of the distribution factor. Traditionally, query difficulty was measured by selectivity (the fraction of data removed). However, the authors demonstrate that a query's difficulty also depends on its spatial location relative to the filtered subset. They categorize queries into:
- In-Distribution (ID): The query vector is within the region of the filtered data.
- Partially-Overlapping (POD): The query vector is near the boundary.
- Out-of-Distribution (OOD): The query vector is far from the filtered subset.
Experimental Insights
Experiments on datasets like MNIST-8M and MTG reveal that OOD queries are significantly harder to resolve than ID queries, even at the same selectivity level. Graph-based indices (e.g., HNSW) show high efficiency for ID queries but struggle with OOD scenarios compared to Inverted File (IVF) indices. The authors suggest that future systems should be "distribution-aware," potentially switching algorithms based on real-time estimates of both selectivity and spatial distribution.
Conclusion
This survey unifies the fragmented landscape of FANNS. By providing a clear taxonomy and identifying the distribution factor, it offers a roadmap for practitioners to select appropriate algorithms and for researchers to develop more robust, general-purpose hybrid search indices.
Summary updated