TL;DR
Compass is the first encrypted semantic search system that achieves state-of-the-art accuracy without compromising security or performance. By co-designing graph-based search with Oblivious RAM (ORAM), it delivers sub-second latencies while keeping data, queries, and even access patterns hidden from a potentially malicious server.
What Problem Does This Paper Address?
As end-to-end encryption becomes standard for cloud storage (e.g., iCloud, WhatsApp), a major functionality gap has emerged: how do you search over data that the server can't see?
Existing solutions generally fall into two traps. "Leaky" systems are fast but reveal access patterns—which nodes are visited and how often—leaving them vulnerable to "leakage-abuse" attacks that can reconstruct the original data. On the other hand, highly secure systems often rely on trusted hardware (which has its own side-channel vulnerabilities) or are restricted to "lexical" search (simple keyword matching). Lexical search is increasingly outdated; modern "semantic" search uses high-dimensional embeddings to understand the intent and meaning of a query, but doing this over encrypted data has historically been too slow or too inaccurate for real-world use.
Methods
Compass bridges this gap by building a semantic search engine on top of Hierarchical Navigable Small World (HNSW) graphs and securing it with Ring ORAM. To make this combination performant, the authors introduced three core "white-box" co-design techniques:
- Directional Neighbor Filtering (DNF): Instead of fetching all neighbors of a node from the server, the client uses "Quantized Hints" (highly compressed versions of the embeddings stored locally) to identify which neighbors are in the "direction" of the query. This reduces bandwidth by only fetching the most promising candidates.
- Speculative Neighbor Prefetch (SNP): Network round trips are the primary bottleneck in ORAM. SNP predicts which nodes the search algorithm will likely visit next and fetches them in a single batch, drastically reducing the total number of round trips.
- Graph-Traversal Tailored ORAM: The authors modified the underlying Ring ORAM protocol to support "multi-hop lazy eviction." By delaying the ORAM's internal "cleanup" (eviction) until the end of a search, they significantly lower the user-perceived latency.
Datasets
The authors evaluated Compass on four diverse, widely-used benchmarks for Approximate Nearest Neighbor (ANN) search:
- MS MARCO: 8.8 million text passages (large-scale text).
- TripClick: 1.5 million health-related search logs (specialized text).
- SIFT1M: 1 million image feature vectors.
- LAION: 100,000 image-text pairs.
Key Insights and Ideas
- The Power of Co-design: You cannot simply "plug" a graph-based search into ORAM. A naive implementation is 920x slower than Compass. The "aha moment" is realizing that the search algorithm and the cryptographic backend must be aware of each other's constraints.
- Precision vs. Direction: You don't need full-precision embeddings to decide which path to take in a graph. Small, 1% sized "hints" on the client are sufficient to filter the search space without sacrificing final accuracy.
- Latency Over Bandwidth: In modern cross-region networks, the number of round trips (latency) is a much harsher penalty than the size of the data transferred (bandwidth). SNP prioritizes reducing the former at the slight expense of the latter.
Key Results
- Accuracy: Compass matches the accuracy of state-of-the-art plaintext semantic search (measured by MRR@10), outperforming existing secure lexical baselines.
- Performance: It achieves user-perceived latencies between 0.57 and 1.28 seconds across all datasets, even on slow cross-region networks.
- Efficiency: The system is orders of magnitude faster than prior encrypted search baselines like HE-Cluster (homomorphic encryption) and Inv-ORAM (lexical).
- Security: It provides strong protection against a fully compromised server, hiding data contents, query embeddings, and access patterns.
Limitations and Future Work
- Client-Side Memory: While the "Quantized Hints" are small (approx. 1% of the original data), they still require about 500 MB of RAM for a dataset as large as MS MARCO. This is fine for desktops but could be a limitation for older mobile devices.
- Global Scalability: Compass is optimized for "personal" search (searching one's own files on Dropbox or iCloud). Scaling this to global, multi-user web search remains an open challenge.
- Operation Hiding: While Compass hides what you search for, it does not currently hide the type of operation (e.g., the server can tell if you are searching versus inserting a new document). Future work could involve padding these operations to make them indistinguishable.
Summary updated