Cardinality sketches are compact data structures for representing sets or vectors, enabling efficient approximation of their cardinality (or the number of nonzero entries). These sketches are space-efficient, typically requiring only logarithmic storage relative to input size, and support incremental updates, allowing for dynamic modifications. A critical property of many cardinality sketches is composability, meaning that the sketch of a union of sets can be computed from individual sketches. Existing designs typically provide strong statistical guarantees, accurately answering an exponential number of queries in terms of sketch size $k$. However, these guarantees degrade to quadratic in $k$ when queries are adaptive and may depend on previous responses. Prior works on statistical queries (Steinke and Ullman, 2015) and specific MinHash cardinality sketches (Ahmadian and Cohen, 2024) established that the quadratic bound on the number of adaptive queries is, in fact, unavoidable. In this work, we develop a unified framework that generalizes these results across broad classes of cardinality sketches. We show that any union-composable sketching map is vulnerable to attack with $\tilde{O}(k^4)$ queries and, if the sketching map is also monotone (as for MinHash and statistical queries), we obtain a tight bound of $\tilde{O}(k^2)$ queries. Additionally, we demonstrate that linear sketches over the reals $\mathbb{R}$ and fields $\mathbb{F}_p$ can be attacked using $\tilde{O}(k^2)$ adaptive queries, which is optimal and strengthens some of the recent results by Gribelyuk et al. (2024), which required a larger polynomial number of rounds for such matrices.
翻译:基数草图是用于表示集合或向量的紧凑数据结构,能够高效地近似其基数(或非零条目数量)。这些草图具有空间效率,通常仅需相对于输入大小的对数级存储空间,并支持增量更新,允许动态修改。许多基数草图的一个关键特性是可组合性,即多个集合并集的草图可以从各个独立草图计算得出。现有设计通常提供强大的统计保证,能够以草图大小$k$的指数级数量准确回答查询。然而,当查询具有自适应性且可能依赖于先前响应时,这些保证会退化为$k$的二次方。先前关于统计查询(Steinke和Ullman,2015)以及特定MinHash基数草图(Ahmadian和Cohen,2024)的研究已证实,自适应查询数量的二次界实际上是不可避免的。在本研究中,我们建立了一个统一框架,将上述结果推广至广泛的基数草图类别。我们证明任何具有并集可组合性的草图映射都易受$\tilde{O}(k^4)$次查询的攻击;若该草图映射同时具有单调性(如MinHash和统计查询),则可获得$\tilde{O}(k^2)$次查询的紧界。此外,我们证明了实数域$\mathbb{R}$和有限域$\mathbb{F}_p$上的线性草图可通过$\tilde{O}(k^2)$次自适应查询被攻破,这一结果是最优的,并强化了Gribelyuk等人(2024)近期研究中的部分结论——该研究对此类矩阵的攻击需要更多轮次的多项式查询。