Breaking the Quadratic Barrier: Robust Cardinality Sketches for Adaptive Queries
Edith Cohen, Mihir Singhal, Uri Stemmer
TL;DR
This paper addresses the robustness of cardinality sketches under adaptive queries, where prior work exhibits a quadratic barrier in the number of queries $t$ relative to the sketch size $k$. By reframing robustness through an adaptive data analysis (ADA) lens and introducing fine-grained per-key participation control via the parameter $r$, the authors design robust estimators for the bottom-$k$ sketch that can handle an exponential number of adaptive queries as long as each key participates in at most $r= ilde{O}(k^2)$ sketches. They present two estimators: a Basic Robust Estimator and a Tracking estimator, both grounded in a refined ADA framework and a reinterpretation of the Hassidim wrapper; tracking additionally deactivates overexposed keys to preserve accuracy. Empirical results on Uniform and Pareto query patterns demonstrate large practical gains, illustrating the approach's potential to broaden the toolkit for robust, composable sketching in adaptive environments.
Abstract
Cardinality sketches are compact data structures that efficiently estimate the number of distinct elements across multiple queries while minimizing storage, communication, and computational costs. However, recent research has shown that these sketches can fail under {\em adaptively chosen queries}, breaking down after approximately $\tilde{O}(k^2)$ queries, where $k$ is the sketch size. In this work, we overcome this \emph{quadratic barrier} by designing robust estimators with fine-grained guarantees. Specifically, our constructions can handle an {\em exponential number of adaptive queries}, provided that each element participates in at most $\tilde{O}(k^2)$ queries. This effectively shifts the quadratic barrier from the total number of queries to the number of queries {\em sharing the same element}, which can be significantly smaller. Beyond cardinality sketches, our approach expands the toolkit for robust algorithm design.
