Efficient Privacy-Preserving Range Filtered Approximate Nearest Neighbor Search

Haoyu Wang, Yandi Zhang, Jiadong Xie, Yingfan Liu, Hui Li, Jeffrey Xu Yu, Jiangtao CuiarXiv 2026

TL;DR

This paper introduces the first systematic approach to privacy-preserving range-filtered approximate nearest neighbor search (PP-RFANNS) for encrypted outsourced vector databases. By decoupling range filtering (handled locally by the user) from encrypted vector search (executed by the server), the proposed method eliminates expensive online encrypted range checks, achieving a two-orders-of-magnitude speedup over baseline secure adaptations while maintaining high search accuracy.

What Problem Does This Paper Address?

Vector databases are widely used to perform $k$-approximate nearest neighbor search ($k$-ANNS) for applications like image retrieval and retrieval-augmented generation (RAG). However, real-world queries often require structured constraints—for instance, an e-commerce user searching for visually similar products within a specific price range. This is known as Range-Filtered ANNS (RFANNS).

When data management is outsourced to a cloud server, protecting data privacy becomes paramount. Existing plaintext RFANNS methods expose vectors, attributes, and queries to the server. While privacy-preserving ANNS exists, it cannot efficiently handle range predicates. Straightforward secure adaptations suffer from severe bottlenecks: they either require exhaustive encrypted vector searches over all qualified objects (pre-filtering), massive over-fetching under low selectivity (post-filtering), or expensive, repetitive homomorphic range checks during graph traversal (PP-iRangeGraph). This paper tackles the challenge of performing RFANNS securely and efficiently on an honest-but-curious cloud server without sacrificing accuracy or throughput.

Methods

The authors propose a practical PP-RFANNS scheme that separates range localization from encrypted vector search using a hybrid index structure and a filter-and-refine query strategy.

  1. N-ary Tree–HNSW Hybrid Index: The data owner builds a range-aware N-ary tree over the numerical attribute domain. Each node in this tree corresponds to an attribute interval and maintains an HNSW (Hierarchical Navigable Small World) sub-index over the encrypted vectors falling into that interval. The tree structure is shared with the authorized Query User (QU), while the encrypted HNSW sub-indices are outsourced to the Cloud Server (CS).
  2. Local Range Localization: Instead of the server performing encrypted range checks, the QU locally maps the query range predicate to a compact set of matching nodes in their local N-ary tree. The QU then sends only the identifiers of these matched nodes along with the encrypted query trapdoors to the CS.
  3. Filter-and-Refine Query Pipeline: To minimize expensive exact cryptographic operations on the server, the authors design a two-stage process:
  4. Filtering: The CS searches only the HNSW sub-indices of the matched nodes using Scale-and-Perturb Distance-Comparison-Preserving Encryption (DCPE)—which approximately preserves distance ordering—to quickly retrieve a coarse candidate set.
  5. Refinement: The CS merges these candidates and applies exact Distance-Comparison Encryption (DCE) to rerank only this small, refined candidate set, returning the final top-$k$ results.
Figure 4: The workflow of secure query processing

Datasets

The method was evaluated on four widely used benchmark vector datasets, with numerical attributes uniformly assigned to each vector:

  • Sift1M (128 dimensions, 1,000,000 objects)
  • Gist (960 dimensions, 1,000,000 objects)
  • GloVe (100 dimensions, 1,183,514 objects)
  • Deep1M (96 dimensions, 1,000,000 objects)

For scalability tests, the authors also used random samples of Sift1B and Deep1B containing up to 25 million vectors.

Key Insights and Ideas

  • Decoupling is Key: Shifting the responsibility of range filtering to the user side completely bypasses the need for the cloud server to perform expensive online homomorphic range checks (like iSHE), which is the primary bottleneck in secure baseline adaptations.
  • Asymmetric Indexing: Sharing a lightweight attribute tree with the user while keeping the heavy encrypted vector indices on the server strikes an excellent balance between local client computation and server-side storage.
  • Two-Tiered Encryption: Combining an approximate, fast distance-preserving encryption scheme (DCPE) for graph traversal with an exact, more expensive scheme (DCE) for final candidate reranking prevents the accuracy loss typically caused by approximate encryption alone.

Key Results

  • Massive Throughput Gains: At a high accuracy target of $Recall@10 = 0.95$, PP-RFANNS achieves query throughputs of 68 to 1,288 QPS across different datasets. This represents a speedup of at least two orders of magnitude (and up to 2600$\times$ under certain selectivities) compared to secure pre-filtering, post-filtering, and PP-iRangeGraph baselines, whose throughputs often drop below 0.2 QPS due to cryptographic overhead.
  • Selectivity Robustness: Unlike baseline methods that degrade drastically at either very low or very high range selectivities, the proposed method maintains stable and superior performance across all query selectivities (tested from 1% to 40%).
  • Scalability: In tests scaling up to 25 million vectors, the query latency scales gracefully, remaining below 17 ms.

Limitations and Future Work

  • Static Database Assumption: The current index design assumes a static dataset. The paper does not address dynamic data updates, such as real-time insertions or deletions of vectors and attributes.
  • Leakage Profile: While it completely hides plaintext values and query bounds, the scheme reveals structural access patterns, such as which sub-indices are accessed and the set of object identifiers covered by a query range.
  • Security Model: The scheme operates under an honest-but-curious threat model; it does not account for malicious server behavior or provide mechanisms for result verifiability.

Summary updated

BibTeX
@misc{wang2026efficient,
  author = {Haoyu Wang and Yandi Zhang and Jiadong Xie and Yingfan Liu and Hui Li and Jeffrey Xu Yu and Jiangtao Cui},
  title = {{Efficient Privacy-Preserving Range Filtered Approximate Nearest Neighbor Search}},
  year = {2026},
  eprint = {2608.16488},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2608.16488},
}
Figure