Lune

ICML2024Top-tier venue

Unmasking Vulnerabilities: Cardinality Sketches under Adaptive Inputs

Sara Ahmadian, Edith Cohen

Abstract

Cardinality sketches are popular data structures that enhance the efficiency of working with large data sets. The sketches are randomized representations of sets that are only of logarithmic size but can support set merges and approximate cardinality (i.e., distinct count) queries. When queries are not adaptive, that is, they do not depend on preceding query responses, the design provides strong guarantees of correctly answering a number of queries exponential in the sketch size kk. In this work, we investigate the performance of cardinality sketches in adaptive settings and unveil inherent vulnerabilities. We design an attack against the ``standard'' estimators that constructs an adversarial input by post-processing responses to a set of simple non-adaptive queries of size linear in the sketch size kk. Empirically, our attack used only 4k4k queries with the widely used HyperLogLog (HLL++) sketch. The simple attack technique suggests it can be effective with post-processed natural workloads. Finally and importantly, we demonstrate that the vulnerability is inherent as any estimator applied to known sketch structures can be attacked using a number of queries that is quadratic in kk, matching a generic upper bound.

Ask Lune

Know this paper in minutes, not an afternoon.

Lune can read every page of it and the top-tier papers that cite it, and gives you its claims, its evidence and its limits, each one cited to the paper it comes from. No skimming, no AI slop.

6 top-tier papers have cited it since. Know what they found before your reviewers do.

Questions to start from

Lune can draw on

the full paper · the top-tier papers that cite it · related work

Get the answer

Free to start. No credit card required.

Lineage

  • Breaking the Quadratic Barrier: Robust Cardinality Sketches for Adaptive Queries cites Adversarially Robust Streaming Algorithms via Differential Privacy
  • Breaking the Quadratic Barrier: Robust Cardinality Sketches for Adaptive Queries cites On Adaptive Distance Estimation
  • Breaking the Quadratic Barrier: Robust Cardinality Sketches for Adaptive Queries cites A Strong Separation for Adversarially Robust ℓ0 Estimation for Linear Sketches
  • Breaking the Quadratic Barrier: Robust Cardinality Sketches for Adaptive Queries cites On the Robustness of CountSketch to Adaptive Inputs
  • Breaking the Quadratic Barrier: Robust Cardinality Sketches for Adaptive Queries cites Tight Bounds for Adversarially Robust Streams and Sliding Windows via Difference Estimators
  • Adaptively Robust Resettable Streaming cites Adversarially Robust Streaming Algorithms via Differential Privacy
  • Adaptively Robust Resettable Streaming cites On Adaptive Distance Estimation
  • Adaptively Robust Resettable Streaming cites A Strong Separation for Adversarially Robust ℓ0 Estimation for Linear Sketches
  • Adaptively Robust Resettable Streaming cites On the Robustness of CountSketch to Adaptive Inputs
  • Adaptively Robust Resettable Streaming cites Tight Bounds for Adversarially Robust Streams and Sliding Windows via Difference Estimators
  • A Strong Separation for Adversarially Robust ℓ0 Estimation for Linear Sketches cites Adversarially Robust Streaming Algorithms via Differential Privacy
  • A Strong Separation for Adversarially Robust ℓ0 Estimation for Linear Sketches cites On Adaptive Distance Estimation
  • A Strong Separation for Adversarially Robust ℓ0 Estimation for Linear Sketches cites On the Robustness of CountSketch to Adaptive Inputs
  • A Strong Separation for Adversarially Robust ℓ0 Estimation for Linear Sketches cites Tight Bounds for Adversarially Robust Streams and Sliding Windows via Difference Estimators
  • On the Robustness of CountSketch to Adaptive Inputs cites Adversarially Robust Streaming Algorithms via Differential Privacy
  • On the Robustness of CountSketch to Adaptive Inputs cites Tight Bounds for Adversarially Robust Streams and Sliding Windows via Difference Estimators
  • The Cost of Compression: Tight Quadratic Black-Box Attacks on Sketches for ℓ2 Norm Estimation cites Adversarially Robust Streaming Algorithms via Differential Privacy
  • The Cost of Compression: Tight Quadratic Black-Box Attacks on Sketches for ℓ2 Norm Estimation cites On Adaptive Distance Estimation
  • The Cost of Compression: Tight Quadratic Black-Box Attacks on Sketches for ℓ2 Norm Estimation cites A Strong Separation for Adversarially Robust ℓ0 Estimation for Linear Sketches
  • The Cost of Compression: Tight Quadratic Black-Box Attacks on Sketches for ℓ2 Norm Estimation cites On the Robustness of CountSketch to Adaptive Inputs
  • The Cost of Compression: Tight Quadratic Black-Box Attacks on Sketches for ℓ2 Norm Estimation cites Tight Bounds for Adversarially Robust Streams and Sliding Windows via Difference Estimators
  • Adversarial Robustness on Insertion-Deletion Streams cites Breaking the Quadratic Barrier: Robust Cardinality Sketches for Adaptive Queries
  • Adversarial Robustness on Insertion-Deletion Streams cites Adversarially Robust Streaming Algorithms via Differential Privacy
  • Adversarial Robustness on Insertion-Deletion Streams cites On Adaptive Distance Estimation
  • Adversarial Robustness on Insertion-Deletion Streams cites Tight Bounds for Adversarially Robust Streams and Sliding Windows via Difference Estimators
Builds onCited byLeft to right by year; the more cited, the higher.

Cited by top-tier papers6

  1. A Strong Separation for Adversarially Robust ℓ0 Estimation for Linear SketchesElena Gribelyuk, Honghao Lin, David P. Woodruff, Huacheng Yu et al.FOCS 2024 · 2 citations
  2. Adversarial Robustness on Insertion-Deletion StreamsElena Gribelyuk, Honghao Lin, David P. Woodruff, Huacheng Yu et al.STOC 2026 · 2 citations
  3. The Cost of Compression: Tight Quadratic Black-Box Attacks on Sketches for ℓ2 Norm EstimationSara Ahmadian, Edith Cohen, Uri StemmerNeurIPS 2025 · 1 citation
  4. Breaking the Quadratic Barrier: Robust Cardinality Sketches for Adaptive QueriesEdith Cohen, Mihir Singhal, Uri StemmerICML 2025
  5. Adaptively Robust Resettable StreamingEdith Cohen, Elena Gribelyuk, Jelani Nelson, Uri StemmerICML 2026

Builds on11

  1. Adversarially Robust Streaming Algorithms via Differential PrivacyAvinatan Hassidim, Haim Kaplan, Yishay Mansour, Yossi Matias et al.NeurIPS 2020 · 85 citations
  2. The Flajolet-Martin Sketch Itself Preserves Differential Privacy: Private Counting with Minimal SpaceAdam D. Smith, Shuang Song, Abhradeep ThakurtaNeurIPS 2020 · 48 citations
  3. On Adaptive Distance EstimationYeshwanth Cherapanamjeri, Jelani NelsonNeurIPS 2020 · 34 citations
  4. On the Robustness of CountSketch to Adaptive InputsEdith Cohen, Xin Lyu, Jelani Nelson, Tamás Sarlós et al.ICML 2022 · 29 citations
  5. Tight Bounds for Adversarially Robust Streams and Sliding Windows via Difference EstimatorsDavid P. Woodruff, Samson ZhouFOCS 2021 · 25 citations

Related papers

  1. One Attack to Rule Them All: Tight Quadratic Bounds for Adaptive Queries on Cardinality SketchesEdith Cohen, Jelani Nelson, Tamás Sarlós, Mihir Singhal et al.SODA 2026
  2. Tricking the Hashing Trick: A Tight Lower Bound on the Robustness of CountSketch to Adaptive InputsEdith Cohen, Jelani Nelson, Tamás Sarlós, Uri StemmerAAAI 2023 · 14 citations
  3. A Better Cardinality Estimator with Fewer Bits, Constant Update Time, and MergeabilityYang Du, He Huang, Yu-e Sun, Kejian Li et al.INFOCOM 2023 · 6 citations
  4. Sketch-Flip-Merge: Mergeable Sketches for Private Distinct CountingJonathan Hehir, Daniel Ting, Graham CormodeICML 2023 · 12 citations
  5. HyperLogLogLog: Cardinality Estimation With One Log MoreMatti Karppa, Rasmus PaghKDD 2022 · 24 citations
Dusk over the sea between two cliffs drawn in fine vertical lines