Tricking the Hashing Trick: A Tight Lower Bound on the Robustness of CountSketch to Adaptive Inputs
Edith Cohen, Jelani Nelson, Tamás Sarlós, Uri Stemmer
Abstract
CountSketch and Feature Hashing (the "hashing trick") are popular randomized dimensionality reduction methods that support recovery of ℓ2-heavy hitters (keys i where v 2 i > ǫ v 2 2 ) and approximate inner products. When the inputs are not adaptive (do not depend on prior outputs), classic estimators applied to a sketch of size O(ℓ/ǫ) are accurate for a number of queries that is exponential in ℓ. When inputs are adaptive, however, an adversarial input can be constructed after O(ℓ) queries with the classic estimator and the best known robust estimator only supports Õ(ℓ 2 ) queries. In this work we show that this quadratic dependence is in a sense inherent: We design an attack that after O(ℓ 2 ) queries produces an adversarial input vector whose sketch is highly biased. Our attack uses "natural" non-adaptive inputs (only the final adversarial input is chosen adaptively) and universally applies with any correct estimator, including one that is unknown to the attacker. In that, we expose inherent vulnerability of this fundamental method.
Ask about this paper
Your agent reads all of it.
Lune indexed this paper to the last equation, along with the top-tier papers that cite it. Ask a question and the answer quotes them.
Your agent calls
Luneget_paper_fulltext
Free to start. No credit card required.
Terminal
Install the CLIlune papers fulltext 7d030ed1-cd83-45b5-a2af-b2729bdc10ecCited by top-tier papers10
- Unmasking Vulnerabilities: Cardinality Sketches under Adaptive InputsSara Ahmadian, Edith CohenICML 2024 · 7 citations
- Learning Together Securely: Prototype-Based Federated Multi-Modal Hashing for Safe and Efficient Multi-Modal RetrievalRuifan Zuo, Chaoqun Zheng, Lei Zhu, Wenpeng Lu et al.AAAI 2025 · 4 citations
- 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
- Adversarial Robustness on Insertion-Deletion StreamsElena Gribelyuk, Honghao Lin, David P. Woodruff, Huacheng Yu et al.STOC 2026 · 2 citations
- The Cost of Compression: Tight Quadratic Black-Box Attacks on Sketches for ℓ2 Norm EstimationSara Ahmadian, Edith Cohen, Uri StemmerNeurIPS 2025 · 1 citation
Builds on11
- FetchSGD: Communication-Efficient Federated Learning with SketchingDaniel Rothchild, Ashwinee Panda, Enayat Ullah, Nikita Ivkin et al.ICML 2020 · 425 citations
- Adaptive Machine UnlearningVarun Gupta, Christopher Jung, Seth Neel, Aaron Roth et al.NeurIPS 2021 · 262 citations
- Adversarially Robust Streaming Algorithms via Differential PrivacyAvinatan Hassidim, Haim Kaplan, Yishay Mansour, Yossi Matias et al.NeurIPS 2020 · 85 citations
- Oblivious Sketching of High-Degree Polynomial KernelsThomas D. Ahle, Michael Kapralov, Jakob Bæk Tejs Knudsen, Rasmus Pagh et al.SODA 2020 · 42 citations
- On the Robustness of CountSketch to Adaptive InputsEdith Cohen, Xin Lyu, Jelani Nelson, Tamás Sarlós et al.ICML 2022 · 29 citations
Related papers
- CountSketches, Feature Hashing and the Median of ThreeKasper Green Larsen, Rasmus Pagh, Jakub TetekICML 2021 · 10 citations
- Breaking the Quadratic Barrier: Robust Cardinality Sketches for Adaptive QueriesEdith Cohen, Mihir Singhal, Uri StemmerICML 2025
- Lifting Linear Sketches: Optimal Bounds and Adversarial RobustnessElena Gribelyuk, Honghao Lin, David P. Woodruff, Huacheng Yu et al.STOC 2025 · 1 citation
- 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
- Compact Frequency Estimators in Adversarial EnvironmentsSam A. Markelon, Mia Filic, Thomas ShrimptonCCS 2023 · 4 citations
