Efficient Algorithms for Adversarially Robust Approximate Nearest Neighbor Search

Alexandr Andoni, Themistoklis Haris, Esty Kelman, Krzysztof Onak · Submission to ICLR 2026 · Rejected

TL;DR

This paper introduces the first set of algorithms for Approximate Nearest Neighbor (ANN) search that are provably robust against "adaptive" adversaries—attackers who craft new queries based on the algorithm's previous answers. By bridging the gap between algorithmic fairness and differential privacy, the authors develop techniques that break the long-standing $\sqrt{n}$ query time barrier for robust search.

What Problem Does This Paper Address?

Approximate Nearest Neighbor (ANN) search is a cornerstone of modern AI, used in everything from recommendation systems to Retrieval-Augmented Generation (RAG). Most efficient ANN algorithms (like Locality-Sensitive Hashing, or LSH) rely on internal randomness to achieve sublinear query times.

In a classical "oblivious" setting, we assume the queries are fixed. However, in the real world, an adaptive adversary can observe the results of previous queries to "reverse-engineer" the algorithm's internal random state. Once the adversary knows which "random" hash functions you are using, they can craft malicious queries that force the algorithm to fail or perform poorly.

While researchers have made progress in robust estimation (outputting a single value), robust search (returning a specific data point) is much harder. You can't simply add noise to a data point without potentially returning the wrong neighbor or an invalid result.

Methods

The authors propose a suite of algorithms tailored to different dimensionality regimes:

  1. Fairness as a Shield: They prove a novel connection: if an ANN algorithm is "fair" (meaning it returns a neighbor chosen uniformly at random from all valid candidates), it is inherently robust. Because the output is uniform, it leaks no information about the specific internal hash functions used.
  2. Search-to-Decision via Bucketing: To remove dependencies on data density, they reduce the search problem to a "weak decision" problem (simply asking: "Is there a neighbor here?"). They protect this decision using Differential Privacy (DP) by maintaining multiple copies of the data structure and adding Laplacian noise to the results.
  3. Concentric Annuli LSH: This is the paper's flagship contribution. The bucketing approach above hits a performance wall at $\sqrt{n}$ query time. To break this, the authors partition the search space into concentric rings (annuli). They use DP to hide which ring is being searched and "Fair ANN" to search within the rings, achieving purely sublinear query times.
  4. Metric Coverings (Low-Dim): For low-dimensional spaces, they use a discretization technique. By creating a "net" of points over the entire space and ensuring the algorithm works for every point in the net, they provide a "for-all" guarantee—correctness on every possible query with high probability.

Datasets

This is a theoretical paper focused on algorithmic complexity and provable guarantees. As such, it does not evaluate on empirical datasets like SIFT or GLOVE. Instead, the proofs and complexity analyses are conducted on:

  • The Hamming Hypercube: $\{0, 1\}^d$ under Hamming distance.
  • $\ell_p$ Spaces: Continuous metric spaces.

Key Insights and Ideas

  • Fairness = Security: The realization that "fairness" (uniformity of output) provides information-theoretic privacy against an adversary is a powerful conceptual bridge.
  • Hiding the "Where" and "When": In the concentric annuli approach, the algorithm must hide not just which point it found, but how long it took to find it. The authors treat "termination time" as a sensitive variable and protect it using DP.
  • Breaking the $\sqrt{n}$ Barrier: Previous robust search methods were often stuck with a query time of at least $O(\sqrt{n})$. This paper shows that by combining fairness and DP, we can achieve the same exponential efficiency as standard, non-robust LSH.

Key Results

  • Theorem 1.2 (Bucketing): Achieves robustness for $Q$ queries with $O(n^{1/(2-\rho)})$ query time.
  • Theorem 1.3 (Concentric Annuli): Successfully breaks the $\sqrt{n}$ barrier. For the Hamming cube, the query time exponent $\beta$ approaches 0 as the approximation factor $c$ increases, matching the behavior of the best non-robust algorithms.
  • Theorem 1.4 (For-all): Provides a $1 - 1/n^2$ probability of being correct on every possible query in low-dimensional Hamming space.
Method Query Time Space Complexity
Fairness (Thm 1.1) Data-dependent $O(n^{1+\rho})$
Bucketing (Thm 1.2) $O(n^{1/(2-\rho)})$ $O(\sqrt{Q} \cdot n^{2/(2-\rho)})$
Concentric Annuli (Thm 1.3) $O(n^\beta)$ (Sublinear) $O(\sqrt{Q} \cdot n^{1+\beta})$

Limitations and Future Work

  • Space Overhead: The robust algorithms require a space increase by a factor of $\sqrt{Q}$ (where $Q$ is the number of queries). For very long sequences of queries, this could become prohibitive.
  • Theoretical vs. Practical: While the exponents are optimized, the constant factors involved in DP-based robustification (like maintaining hundreds or thousands of copies of a data structure) may make these algorithms difficult to implement in production systems today.
  • Future Directions: The authors suggest investigating whether the link between fairness and robustness can be extended to other search problems beyond ANN, such as graph problems.

Summary updated

BibTeX
@misc{andoni2026efficient,
  author = {Alexandr Andoni and Themistoklis Haris and Esty Kelman and Krzysztof Onak},
  title = {{Efficient Algorithms for Adversarially Robust Approximate Nearest Neighbor Search}},
  year = {2026},
  eprint = {2601.00272},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2601.00272},
}
Figure