Abstract
This paper introduces a novel randomized data structure for Approximate Distance Estimation (ADE) that remains accurate even when queries are chosen adaptively by an adversary. By utilizing an ensemble of sketches and a median-based sampling technique, the authors achieve nearly optimal memory and query time while closing a major security loophole present in traditional dimensionality reduction methods.
The Challenge of Adaptive Queries
In numerous machine learning applications—such as nearest neighbor search or kernel regression—systems must estimate the distance between a query point $q$ and a large dataset $X = \{x_1, \dots, x_n\}$. Exact computation requires $O(nd)$ time, which is prohibitively slow for massive datasets. To accelerate computation, researchers typically rely on randomized linear sketching (e.g., the Johnson-Lindenstrauss lemma), which projects high-dimensional data into a much smaller space.
However, these standard methods suffer from a critical "Monte Carlo" flaw: they only guarantee correctness if the query $q$ is chosen independently of the random sketch. In modern adversarial settings, an attacker might choose a sequence of queries $q_1, q_2, \dots$ where each subsequent query depends on the answers provided to previous ones. This "adaptivity" can leak information about the internal random seed of the data structure, eventually allowing the adversary to craft a query that forces the system to output wildly incorrect distances.
Proposed Methodology
To counter this vulnerability, the authors propose a generic meta-algorithm that transforms non-adaptive data structures into robust, adaptive ones. The approach relies on three core components:
- Ensemble Sketching: Instead of creating one large sketch, the system constructs an ensemble of $l$ independent, smaller sketches (utilizing $p$-stable distributions for $\ell_p$ norms).
- Median-of-Means Sampling: When a query $q$ arrives, the data structure does not evaluate all $l$ sketches. Instead, it randomly samples a small subset of $r \approx \log n$ sketches, computes distance estimates from each, and returns the median of those estimates.
- The "Rep" Property: The core theoretical contribution is proving that if the system maintains enough independent sketches ($l \approx d$), then for any possible query in the entire space, the vast majority of those sketches will be accurate. Because the majority are "good," a random sample combined with a median operation will almost certainly yield a correct answer, regardless of how the adversary attempts to manipulate the system.
Experimental Setup and Key Results
Because the primary contributions are theoretical, the authors evaluate their method using synthetic adversarial attacks rather than standard large-scale benchmarks. They designed a specific attack on a small database and used a sequence of random inputs to probe a standard Johnson-Lindenstrauss sketch, accumulating enough information to construct a single adaptive query that breaks the sketch's accuracy.
Key Findings: * Empirical Robustness: In their experiments, a standard sketch fails (reported distances drop drastically) after only a few hundred adaptive queries. In contrast, the proposed adaptive method maintains stable, accurate distance estimates throughout the entire adversarial test. * Query Speedup: The query time is $\tilde{O}(\epsilon^{-2}(n + d))$, which is significantly faster than the naive linear scan $O(nd)$ when $n$ and $d$ are large. * Near-Optimal Space: The memory consumption is $\tilde{O}((n + d)d/\epsilon^2)$. The authors prove this is nearly optimal for any data structure providing these robust guarantees.
Limitations and Future Directions
While highly robust, the method has limitations regarding pre-processing. The main bottleneck is the time required to build the data structure, which scales as $O(nd^2/\epsilon^2)$. Although the authors suggest this can be improved using fast rectangular matrix multiplication, it remains superlinear and potentially expensive for massive datasets.
A major open question is whether it is possible to achieve these same adaptive guarantees with a data structure that can be built in nearly linear time ($O(nd)$). Additionally, while this work focuses on $\ell_p$ norms, exploring how this ensemble approach translates to other machine learning primitives—such as inner products or frequency estimation—remains a promising direction for future research.
Summary updated