- The paper introduces EMA, a robust algorithm integrating dynamic updates with multi-attribute filtering for approximate nearest neighbor search.
- It employs edge-centric markers and codebook discretization to maintain both geometric proximity and predicate-aware connectivity during graph traversal.
- Empirical results demonstrate up to 12.25× QPS speedup and 95% recall under low-selectivity queries, outperforming existing state-of-the-art methods.
EMA: A General Attribute-Filtering Graph Index for Robust Approximate Nearest Neighbor Search
The proliferation of embedding-based applications, spanning RAG, recommendation, and semantic search, necessitates high-performance Approximate Nearest Neighbor (ANN) frameworks that not only maximize vector similarity retrieval but also enforce structured attribute constraints. Conventional graph-based ANN indices (e.g., HNSW) excel in high-dimensional vector spaces but are insufficient when filtering predicates must be imposed, such as temporal, categorical, or multi-field constraints. Existing Filtering ANN (FANN) approaches partition into range-based, label-based, and predicate-agnostic categories, but none offer robust, low selectivity, and general attribute support with efficient dynamic update capabilities.
EMA is introduced to bridge this gap, providing a unified FANN algorithm that supports expressive multi-predicate queries over both numerical and categorical domains, with strong robustness across selectivity regimes and efficient dynamic data update operations. The algorithm leverages edge-centric Markers to encode attribute-relevant neighborhood information during graph construction and traversal, preserving navigability in scenarios where predicate-compatible points are locally sparse.
Graph-based Indexing and Structural Challenges
Graph-based ANN search organizes data points into proximity graphs, commonly employing RNG-style pruning for neighbor diversity and navigability. However, classical pruning is geometry-only and disregards attribute predicates, leading to connectivity failures when node neighborhoods contain no predicate-satisfying points (Figure 1).



Figure 1: Classical RNG pruning retains geometric diversity but fails under joint filtering due to lack of attribute-aware connectivity.
Existing relaxations (e.g., two-hop pruning in ACORN, attribute-set pruning in Filtered DiskANN) compromise graph diversity or scalability, demonstrating the necessity for a design that maintains both geometric proximity and attribute-level reachability.
Marker and Codebook Construction
EMA augments standard HNSW graph layers by attaching Markers to each edge, which are compact bit arrays summarizing attribute presence within dominated geometric neighborhoods. Marker encoding is key: attribute values are discretized using a Codebook—frequency-balanced partitions for both numerical and categorical columns—enabling bit-vector representation and conservative aggregation during pruning.
Figure 2: EMA workflow demonstrates two-layer HNSW construction, Marker augmentation, and joint search traversal under predicate filtering.
Figure 3: Codebook-based Marker encoding maps attribute values into fixed bit regions, facilitating efficient predicate prechecking.
During bottom-layer index construction, dominated neighbor attributes are merged into dominating edge Markers, ensuring that search traversals receive predicate cues even after graph sparsification. Diversity-aware retention is also employed, only accepting neighbors that activate previously underrepresented Marker buckets, thereby sustaining attribute diversity and connectivity.
Joint Search and Edge Recovery Mechanism
EMA's search proceeds in two stages: unrestricted top-layer navigation for rapid entry point discovery, followed by Marker-guided expansion in the bottom graph. Predicate compatibility is checked at the edge level via bitwise operations, leveraging SIMD for efficiency. If valid edges drop below a minimum threshold due to restrictive predicates (low selectivity), EMA restores the closest mismatched edges to recover connectivity, preventing query termination.
The Marker prechecking is conservative—never introducing false negatives, though admitting false positives due to attribute aggregation and Codebook discretization. Exact predicate verification is performed on the accessed node attributes post-expansion.
Dynamic Update and Patch Support
EMA is engineered for dynamic environments, with insertions, lazy deletions, and efficient modifications. Attribute-only updates require local edge Marker OR operations; vector-attribute modifications utilize delete-and-insert, leveraging query-guided patch mechanisms to repair the graph efficiently and delay full rebuilds, yielding low amortized maintenance cost.



Figure 4: EMA preserves throughput stability during intensive insertion operations.
Complexity and Theoretical Guarantees
EMA’s computational complexity matches HNSW asymptotically. Marker encoding, pruning, and checking require O(m) to O(M⋅m) time per operation, with constant-factor space overhead proportional to edge count and attribute dimension.
False positive rates are theoretically bounded: aggregation-induced errors grow with dominated set size (typically small, μ=2–$3$), and granularity-induced errors are controlled by Codebook resolution. For low selectivity, increasing per-attribute buckets reduces false positives. Conservative Marker design ensures query recall is unaffected, with trade-offs between search efficiency and storage/memory footprint.
Empirical Evaluation
EMA delivers robust throughputs across datasets (RedCaps, SIFT, YouTube-RGB, Wiki), selectivities, and predicate complexities—with QPS speedups ranging from 1.68× to 12.25× relative to state-of-the-art baselines (Milvus, NaviX, ACORN, Filtered DiskANN, iRangeGraph). The QPS performance remains stable even under highly restrictive (1% selectivity) label+range queries or complex Boolean predicates.
Figure 5: EMA achieves the highest QPS for multi-predicate queries with 10\%-100\% selectivity, maintaining 95\% recall@10.
Figure 6: EMA throughput remains robust at low selectivity (1–10\%), outperforming all baselines in QPS.
Figure 7: EMA sustains high QPS under AND/OR-composed multi-predicate queries, exhibiting insensitivity to predicate complexity.
Range-only and label-only filtered queries corroborate EMA’s strong performance, matching or surpassing dedicated range-graph methods and outperforming joint-filtering baselines.

Figure 8: EMA maintains competitive QPS for range-only queries, even as selectivity decreases.
EMA’s edge recovery mechanism enables successful navigation in off-cluster query (OCQ) scenarios, where conventional methods lose recall.
Figure 9: EMA sustains recall and QPS under OCQ workloads; other methods fail to reach target recall.
Practical and Theoretical Implications
EMA’s architecture is suitable for large-scale vector database systems underpinning RAG, recommendation, and memory-intensive agent applications. It provides a scalable, recall-preserving, and efficient platform for mixed predicate filtering, allowing high-fidelity recall even when predicate-attribute distributions are skewed or sparse.
Its Marker-centric design is theoretically sound, with bounded false positive rates and no false negatives, ensuring reliable filtering. The dynamic patch system enables real-time maintenance for streaming or evolving datasets, suitable for scenarios with frequent insertions and modifications.
Future directions include adaptive Codebook learning to optimize for attribute selectivity distributions, Marker compression schemes to further reduce index size, and hardware-aware optimizations for vectorized predicate checking.
Conclusion
EMA constitutes a general, robust, and efficient attribute-filtering ANN index, supporting diverse multi-predicate queries, robust low-selectivity scenarios, and dynamic updates. Leveraging edge-centric Markers and diversity-aware neighbor retention, EMA achieves high throughput and recall, with theoretical guarantees on complexity and filtering efficacy. Its performance and adaptability make it a strong candidate for integration in advanced vector database systems and embedding-centric AI infrastructures (2606.00734).