Range-Filtering Approximate Nearest Neighbor Search
- RFANNS is a hybrid search model that couples vector embeddings with numeric range predicates, enabling efficient retrieval in high-dimensional spaces.
- It encompasses methods from filter-then-search to hybrid approaches, balancing selectivity and computational cost based on range width and data distribution.
- Recent developments include graph-based, tree-based, and learned strategies that offer significant speedups and optimized memory trade-offs for RFANNS tasks.
Searching arXiv for recent and foundational RFANNS papers to ground the article. Range-Filtering Approximate Nearest Neighbor Search (RFANNS) is a specialization of filtered approximate nearest neighbor search in which each data object couples a vector embedding with one or more ordered scalar attributes, and each query asks for nearest neighbors in vector space subject to numeric range predicates on those attributes. In the single-attribute form emphasized by much of the literature, the task is: given a query vector and a range , retrieve the nearest vectors whose associated scalar values lie in that range (Lin et al., 10 May 2025, Engels et al., 2024). More generally, RFANNS is naturally expressed in the vector–scalar hybrid data model, where a hybrid query combines a vector similarity function with a scalar filter , and range filtering corresponds to the case in which the active sub-filters are range constraints (Lin et al., 10 May 2025). The problem sits at the intersection of high-dimensional approximate search, hybrid database execution, and range-aware index design, and has produced a diverse family of pre-filtering, post-filtering, hybrid, graph-based, tree-based, and learned approaches (Shi et al., 9 Sep 2025).
1. Formal model and relation to general FANNS
The survey literature formalizes a hybrid dataset as
where each point has a scalar tuple and a vector (Lin et al., 10 May 2025). A scalar filter is a predicate
and the filtered subset is
(Lin et al., 10 May 2025). A hybrid query is
with scalar filter , vector similarity function 0, query vector 1, and target result size 2 (Lin et al., 10 May 2025).
Within that framework, RFANNS is the case in which the scalar predicate is a range condition. For simplified scalar filters in disjunctive normal form,
3
range filtering corresponds to active sub-filters of the form
4
(Lin et al., 10 May 2025). In the common single-attribute setting, each data object is 5, with 6 and a totally ordered numeric attribute 7, and an RFANN query is
8
where 9 is the numeric range predicate (Zou et al., 13 Mar 2026). The objective is to return the 0 objects satisfying 1 that minimize 2 (Zou et al., 13 Mar 2026).
A closely related formulation is the “3-approximate window search” model. There, each point has a numeric label 4, the query carries a window 5, and the goal is to return 6 such that
7
or 8 if 9 (Engels et al., 2024). This is explicitly characterized as RFANNS with one numeric filter (Engels et al., 2024). The literature also distinguishes top-0 range-filtered retrieval from pure range retrieval, where the objective is to find all points within a distance radius 1,
2
a problem that becomes especially relevant when output size is highly variable (Manohar et al., 18 Feb 2025).
Evaluation is usually centered on recall and efficiency. For filtered search, the standardized metric is
3
where 4 is the exact filtered result and 5 is the approximate output (Lin et al., 10 May 2025). The survey also fixes filter selectivity as
6
so narrower ranges correspond to higher selectivity (Lin et al., 10 May 2025).
2. Query difficulty, selectivity, and distribution effects
RFANNS difficulty is not determined by range width alone. The survey literature emphasizes two orthogonal factors: selectivity and distribution factor (Lin et al., 10 May 2025). Selectivity measures how many objects survive the range predicate, while the distribution factor characterizes the relationship between the vector distribution of the filtered subset and the distribution of queries. The survey names three regimes: ID (In-Distribution), OOD (Out-of-Distribution), and POD (Partially Overlapping Distribution) (Lin et al., 10 May 2025). Queries whose selected scalar range aligns with the vector neighborhood are easier; cross-range queries in clustered datasets can be substantially harder even when selectivity is similar (Lin et al., 10 May 2025).
System-oriented work refines this with Global Selectivity and Local Selectivity. Given a filter predicate 7, global selectivity is
8
while local selectivity for a query 9 and its true 0-NN set 1 is
2
(Amanbayev et al., 11 Feb 2026). Their ratio
3
is normalized into the GLS correlation
4
(Amanbayev et al., 11 Feb 2026). Positive GLS means enrichment of valid points in the local neighborhood; negative GLS means depletion (Amanbayev et al., 11 Feb 2026). This system-level analysis matters because a range filter that is globally modest may still be locally hostile to graph traversal if valid neighbors are sparse in the natural vector neighborhood.
A related measure appears in WoW, which defines the fraction of in-range objects as 5, where 6 is the number of attributes in range, and then defines selectivity as
7
(Wang et al., 26 Aug 2025). WoW also uses RFANNS-specific Local Intrinsic Dimensionality (LID): 8 (Wang et al., 26 Aug 2025). This suggests that RFANNS difficulty is jointly shaped by filter selectivity, vector geometry, and the degree to which the range predicate aligns with local neighborhood structure.
A common misconception is that narrower ranges are always easier because they leave fewer candidates. The system and survey evidence does not support that simplification. Narrow ranges can help pre-filtering, but they can also break graph navigability, produce candidate starvation in post-filtering, or create OOD workloads in which valid points are far from the unfiltered vector neighborhood (Lin et al., 10 May 2025, Amanbayev et al., 11 Feb 2026).
3. Algorithmic taxonomy
A unified benchmark organizes FANNS methods into filter-then-search, search-then-filter, and hybrid-search (Shi et al., 9 Sep 2025). This taxonomy applies directly to RFANNS.
Filter-then-search first computes the filtered subset
9
and then runs ANN only on that subset (Shi et al., 9 Sep 2025). For RFANNS, this means first retrieving all objects with 0, then searching among them. The survey’s pruning taxonomy places this within SSP or SJP, depending on whether vector pruning is later introduced (Lin et al., 10 May 2025). Pre-filtering is attractive when selectivity is high, but it can degenerate when the range is broad (Lin et al., 10 May 2025, Amanbayev et al., 11 Feb 2026).
Search-then-filter runs ANN on the full dataset to obtain a candidate set and filters afterward (Shi et al., 9 Sep 2025). This is conceptually simple and widely used in vector databases, but the literature consistently notes that it deteriorates under high-selectivity ranges because many visited or returned candidates are out of range (Engels et al., 2024, Shi et al., 9 Sep 2025, Amanbayev et al., 11 Feb 2026). Post-filter HNSW and post-filter IVF-PQ are canonical examples (Shi et al., 9 Sep 2025).
Hybrid-search integrates filtering into the search or index itself (Shi et al., 9 Sep 2025). In RFANNS, this includes segment-graph and range-aware graph designs that guide traversal toward in-range regions or reconstruct range-specific subgraphs (Xu et al., 2024, Liang et al., 2024, Yang et al., 5 Apr 2025). The survey’s pruning-centric classification places SeRF and iRangeGraph under VJP, while WST is categorized as SJP (Lin et al., 10 May 2025).
Another important distinction is between single-index and multi-index designs. Classical pre-, post-, and in-filtering methods run against a generic ANN index, whereas dedicated RFANNS structures often materialize multiple range-specific graphs or graph fragments. This can improve query performance, but at the cost of substantial index blowup and maintenance complexity (Zou et al., 13 Mar 2026, Li et al., 22 Apr 2026). Several later systems attempt to recover the benefits of range-aware indexing while reducing that blowup through structural reuse, learned penalties, or linear-space graph constructions (Sutradhar et al., 6 Nov 2025, Zou et al., 13 Mar 2026, Li et al., 22 Apr 2026).
4. Major index structures and search mechanisms
A major line of work uses range-dedicated graph organization. SeRF, described in survey and follow-up papers as a segment-graph approach, conceptually builds a graph for every possible interval 1 over an ordered scalar domain, then overlays and compresses them so that, for any query range 2, traversal behaves as if a dedicated graph had been built on
3
(Lin et al., 10 May 2025). Its worst-case space remains 4 (Lin et al., 10 May 2025).
iRangeGraph improves this space profile by using a segment tree. Each tree node 5 corresponds to a scalar interval 6 and stores a graph 7 over
8
(Lin et al., 10 May 2025). A query range is covered by a minimal disjoint set of segment-tree nodes, their results are searched and merged, and overall space becomes 9 (Lin et al., 10 May 2025). The original iRangeGraph paper presents the same design as an on-the-fly construction of a range-dedicated graph from elemental graphs stored at segment-tree nodes, with amortized edge-selection cost
0
per object and total space
1
WST and the 2-Window Search Tree generalize the segment-tree idea into a modular framework. In the 3-WST of “Approximate Nearest Neighbor Search with Window Filters,” one sorts the data by label, builds a multi-ary tree, and stores a full ANN index at each internal node (Engels et al., 2024). For a query window 4, the query algorithm descends into children whose label ranges intersect the window and directly queries a node’s ANN index whenever that node’s entire label range is contained in the window (Engels et al., 2024). Theoretical runtime is
5
while preserving the base ANN approximation factor 6 (Engels et al., 2024). WST variants such as Optimized Postfiltering, Three Split, and Super Postfiltering trade memory against blowup factor and query speed (Engels et al., 2024).
UNIFY takes a different route by constructing a unified proximity-graph-based index, SIG/HSIG, that supports pre-filtering, post-filtering, and hybrid filtering in one structure (Liang et al., 2024). HSIG combines segmented HNSW-like graphs, skip-list links for pre-filtering, and bitmap-marked global edges for post-filtering (Liang et al., 2024). Query execution uses range-aware strategy selection based on the estimated cardinality 7 of the filtered subset: Strategy A when 8, Strategy B when 9, and Strategy C otherwise (Liang et al., 2024).
ESG relaxes the exact-range reconstruction requirement. It defines an elastic factor 0 measuring how tightly a prebuilt superset range covers the query range and proves that controlled inclusion of out-of-range points does not compromise the bounded complexity of the search process (Yang et al., 5 Apr 2025). This allows the use of at most two superset ranges per query instead of the 1 exact decomposition used by existing methods (Yang et al., 5 Apr 2025). The paper’s HBIO and HBIT structures then eliminate the 2 query overhead inherent in prior reconstruction-based approaches (Yang et al., 5 Apr 2025).
WoW introduces hierarchical window graphs with varying window size 3 and a window-to-window mapping between query ranges and graph layers (Wang et al., 26 Aug 2025). It uses a Weighted Balanced Tree for range cardinality and window computation, then selects a landing layer
4
so that graph window size matches the range size (Wang et al., 26 Aug 2025). Query complexity is stated as
5
with 6 the in-range subset size (Wang et al., 26 Aug 2025).
RNSG pursues single-index graph design. It introduces the Range-aware Relative Neighborhood Graph (RRNG), proves monotonic searchability and structural heredity, and then approximates RRNG with RNSG (Zou et al., 13 Mar 2026). Structural heredity means that, for any query range 7, the induced subgraph 8 is exactly the RRNG on the in-range nodes (Zou et al., 13 Mar 2026). This motivates a single graph that can support arbitrary ranges without building many separate graphs (Zou et al., 13 Mar 2026).
For multi-attribute RFANNS, Garfield introduces a GPU-oriented GMG index. It partitions the dataset into 9 disjoint cells over a subset of partitioned attributes, builds local graph indexes inside each cell, and adds a constant number of inter-cell edges, giving total space
0
(Li et al., 22 Apr 2026). This is explicitly presented as a response to the “severe index inflation and construction overhead” of previous RFANNS indices (Li et al., 22 Apr 2026).
5. Learned and filter-aware scoring approaches
A separate line of work treats RFANNS and FANNS as a metric-learning problem rather than purely a structural indexing problem. In “Learning Filter-Aware Distance Metrics for Nearest Neighbor Search with Multiple Filters,” filtered ANN is formulated with discrete labels and the filter-aware distance
1
where
2
(Sutradhar et al., 6 Nov 2025). The scalar 3 is learned from training queries and ground-truth filtered neighbors using a constrained linear optimization problem with slack variables and a small margin 4 (Sutradhar et al., 6 Nov 2025). The same paper explicitly maps this construction to RFANNS by proposing
5
where each 6 is a predicate-satisfaction score for a range or label filter (Sutradhar et al., 6 Nov 2025). This suggests a data-driven alternative to hard range filtering or hand-tuned penalties.
FAVOR similarly modifies scoring, but does so at query time over a standard HNSW-style graph. It supports arbitrary filtering conditions, including range predicates and logical combinations, via an exclusion distance: 7 (Song et al., 8 May 2026). The exclusion distance is chosen as
8
with 9 the estimated selectivity and 0 a global average neighbor-distance parameter (Song et al., 8 May 2026). FAVOR also introduces a selectivity-driven search selector that routes low-selectivity queries to pre-filtering brute force and other queries to HNSW-based inline filtering (Song et al., 8 May 2026). Because its filtering model explicitly includes Range and Logic, it is directly applicable to RFANNS workloads (Song et al., 8 May 2026).
These learned or reweighted methods differ from range-dedicated graph families in that they leave the underlying graph generic or only mildly modified. A plausible implication is that they trade some of the strong structural guarantees of dedicated range-aware graphs for greater flexibility under evolving predicates and heterogeneous workloads. The literature states that such approaches are particularly appealing when filter support must remain general and range predicates coexist with other structured conditions (Sutradhar et al., 6 Nov 2025, Song et al., 8 May 2026).
6. Systems, benchmarks, and empirical trade-offs
The empirical literature repeatedly shows that RFANNS performance depends on workload composition, index design, and query execution policy. The WST paper reports up to a 1 speedup over existing solutions at the same level of recall on benchmark datasets with random labels, adversarial embeddings, and image search embeddings with real timestamps (Engels et al., 2024). Its detailed results list speedups at recall 2 of up to 3 on Deep, 4 on SIFT, 5 on GloVe, and 6 on RedCaps, at the cost of significant offline memory and build overhead (Engels et al., 2024).
ESG reports performance improvements of 7 to 8 over state-of-the-art approaches while maintaining high accuracy (Yang et al., 5 Apr 2025). WoW reports that, for index construction, its indexing time is on par with the most building-efficient index and 9 faster than the most query-efficient index with 00-01 smaller size, while for RFANNS query it is 02 faster than the most efficient incremental index and matches the performance of the best statically-built index (Wang et al., 26 Aug 2025). RNSG reports significantly higher query performance with a more compact index and lower construction cost than existing state-of-the-art methods, and gives concrete examples such as SIFT1M at recall@10 03: RNSG 04 QPS, iRangeGraph 05 QPS, and UNIFY 06 QPS (Zou et al., 13 Mar 2026).
System-level studies complicate the algorithmic picture. A vector-database analysis over FAISS, Milvus, and pgvector shows that engine behavior and optimizer decisions can dominate raw index characteristics (Amanbayev et al., 11 Feb 2026). It finds that Milvus achieves superior recall stability through hybrid approximate/exact execution, that pgvector’s optimizer frequently selects suboptimal execution plans, and that partition-based indexes such as IVFFlat can outperform graph-based indexes such as HNSW for low-selectivity queries (Amanbayev et al., 11 Feb 2026). In that work, highly selective range filters often favor exact fallback or partition-aware pruning, while graph-based post-filtering can fail to return enough valid neighbors unless search depth is increased (Amanbayev et al., 11 Feb 2026).
Benchmarking work also notes that comparisons in FANNS have often been distorted by inconsistent parameter tuning, disparate workloads, and dataset-dependent implementation choices (Shi et al., 9 Sep 2025). The resulting recommendation is not a single universally optimal RFANNS method, but a workload-sensitive choice among filter-then-search, search-then-filter, and hybrid-search, informed by selectivity, range width, 07, and dataset characteristics (Shi et al., 9 Sep 2025).
For multi-attribute RFANNS, Garfield extends the empirical frontier into GPU execution. It reports that its GPU-accelerated framework reduces index size by 08 while delivering 09 higher throughput than state-of-the-art RFANNS methods (Li et al., 22 Apr 2026). Because Garfield targets the multi-attribute setting where previous methods exhibit severe index inflation and CPU-bound execution, this result indicates that RFANNS research has moved beyond scalar single-attribute window search into hardware-aware, cell-partitioned, out-of-core architectures (Li et al., 22 Apr 2026).
7. Limitations and research directions
Several limitations recur across the literature. Many classic RFANNS methods assume a single numeric attribute and simple interval predicates (Engels et al., 2024, Lin et al., 10 May 2025, Zou et al., 13 Mar 2026). Extending segment graphs, tree decompositions, or range-aware proximity graphs to multiple attributes risks combinatorial or memory blowup (Lin et al., 10 May 2025, Li et al., 22 Apr 2026). Dynamic updates are another persistent challenge: WST and many range-dedicated graph methods are primarily static, while incremental support in WoW and HSIG is comparatively recent (Liang et al., 2024, Wang et al., 26 Aug 2025).
Another limitation is that strong graph-theoretic guarantees often come with substantial offline overhead. Exact RRNG construction is 10, prompting approximations such as RNSG (Zou et al., 13 Mar 2026). Segment-tree and range-dedicated graph schemes reduce online cost but can still consume several times the memory of a single ANN index (Engels et al., 2024, Xu et al., 2024). Learned penalty approaches avoid some of that duplication but introduce dependence on training queries and assumptions about the transferability of learned weights or selectivity models (Sutradhar et al., 6 Nov 2025, Song et al., 8 May 2026).
The literature points to several future directions. One is richer predicate support: continuous ranges, hierarchical filters, interval predicates, and mixed logical conditions. The interval-predicate ANNS work on Unified Dominance Graph (UDG) shows how RFANNS ideas can be lifted from one-dimensional scalar ranges to closed two-bound conjunctive interval predicates by mapping interval relations into a two-dimensional dominance space (Lau et al., 23 Jun 2026). Another direction is better workload-aware planning, combining range-specific indexes, generic ANN, and exact fallback according to learned estimates of selectivity, GLS, and distribution factor (Lin et al., 10 May 2025, Amanbayev et al., 11 Feb 2026, Song et al., 8 May 2026). A further direction is hardware-aware RFANNS, where GPU execution, cell scheduling, and out-of-core streaming become first-class design parameters rather than implementation details (Li et al., 22 Apr 2026).
A plausible implication of this trajectory is that RFANNS is evolving from a narrowly defined window-search problem into a broader family of hybrid retrieval tasks in which vector similarity, scalar predicates, execution planning, and hardware architecture are co-designed. The core problem, however, remains unchanged: retrieve nearest neighbors in vector space without losing the semantics or efficiency of numeric range filtering (Lin et al., 10 May 2025, Engels et al., 2024).