The Cost of Compression: Tight Quadratic Black-Box Attacks on Sketches for ℓ2 Norm Estimation

Sara Ahmadian, Edith Cohen, Uri Stemmer · DOI

Abstract

Dimensionality reduction via linear sketching is a cornerstone of modern big data processing, yet it remains fundamentally vulnerable to adversarial exploitation. This work introduces a universal, "single-batch" black-box attack that requires only a quadratic number of queries ($O(k^2)$ relative to the sketch size $k$) to compromise any linear sketch. This result matches the theoretical limits of robustness for these systems, proving that $O(k^2)$ queries are sufficient to break any linear sketching system, even those employing robust estimation techniques.

Introduction

In the era of massive datasets, "sketches"—compressed, low-dimensional representations of high-dimensional vectors—are essential for estimating properties like the Euclidean ($\ell_2$) norm. Techniques such as the Johnson-Lindenstrauss (JL) transform map vectors from high-dimensional spaces down to a few thousand while preserving their length within a small error margin.

While these sketches are efficient, they are vulnerable. In a white-box setting, where the sketching matrix is known, an attacker can easily find perturbations that cause significant estimation errors. This paper addresses the more challenging black-box setting: can an attacker break the system just by submitting queries and seeing the estimated results? Previous research suggested that robust estimators could handle up to $O(k^2)$ queries, but existing attacks were either super-quadratic or limited to specific estimators. This work closes this gap, providing a universal attack that achieves the $O(k^2)$ bound.

Methodology

The authors propose a universal, nonadaptive (single-batch) attack. It is universal because it works against any estimator, including standard scaled norms or "robustified" versions that add noise. It is nonadaptive because all queries are generated at once, rather than through an iterative process.

The Attack Mechanism

  1. Query Generation: The attacker sends $r$ queries of the form $v = \text{signal} + \text{noise}$. The signal is a sparse vector, and the noise is Gaussian.
  2. Response Collection: The system returns estimates (or binary "gap" responses) for the norm of each query.
  3. Aggregation: The attacker takes the noise vectors from the queries and sums them, multiplying each noise vector by the sign of the system's response.
  4. Adversarial Construction: This "signed sum" of noise aligns itself with the hidden structure of the sketching matrix, creating a new vector that causes the estimator to fail significantly.
Algorithm 1: Universal Attack on Sketching Matrix A; $\ell_2$ norm gap responder

Key Insights

The core mathematical insight is the "Gain Lemma," which posits that even if an estimator is highly accurate and tries to hide information, its small errors are inevitably correlated with the input noise. By aggregating many queries, the attacker "distills" this correlation to find the sketch's blind spots.

The attack exploits the fact that linear sketches have a "null space"—directions where the input can change significantly without the sketch noticing. Furthermore, the authors found that a large enough "single-batch" of random queries contains enough leaked information to construct a devastating adversarial input, paralleling adversarial attacks on image classifiers where small, seemingly random perturbations lead to systematic failure.

Results and Empirical Efficiency

The authors prove that $O(k^2)$ queries are sufficient to cause a failure, matching the known upper bounds for robust estimators. This means the attack is as efficient as theoretically possible.

Empirically, the attack is even more potent than the theory suggests. While the proof requires the noise to be spread across $n = \Omega(k^2)$ dimensions, experiments showed the attack succeeds even when the noise support is as small as $2k$. Importantly, the research shows that adding noise to the estimator (a standard defense) merely delays the attack rather than preventing it; the failure still follows the predicted quadratic pattern.

Conclusion

This work establishes that linear sketching is fundamentally limited in its robustness to black-box attacks. While defenses can increase the query cost, they cannot overcome the inherent quadratic vulnerability. Future work includes closing the gap between theoretical noise support requirements and empirical findings, as well as extending these tight quadratic bounds to other metrics like $\ell_1$ or $\ell_\infty$ norms.

Summary updated

BibTeX
@inproceedings{ahmadian2025cost,
  author = {Sara Ahmadian and Edith Cohen and Uri Stemmer},
  title = {{The Cost of Compression: Tight Quadratic Black-Box Attacks on Sketches for ℓ2 Norm Estimation}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2025},
  url = {https://openreview.net/forum?id=Nk61RqtN9y},
}
Figure