English

Beating CountSketch for Heavy Hitters in Insertion Streams

Data Structures and Algorithms 2015-11-03 v1

Abstract

Given a stream p1,,pmp_1, \ldots, p_m of items from a universe U\mathcal{U}, which, without loss of generality we identify with the set of integers {1,2,,n}\{1, 2, \ldots, n\}, we consider the problem of returning all 2\ell_2-heavy hitters, i.e., those items jj for which fjϵF2f_j \geq \epsilon \sqrt{F_2}, where fjf_j is the number of occurrences of item jj in the stream, and F2=i[n]fi2F_2 = \sum_{i \in [n]} f_i^2. Such a guarantee is considerably stronger than the 1\ell_1-guarantee, which finds those jj for which fjϵmf_j \geq \epsilon m. In 2002, Charikar, Chen, and Farach-Colton suggested the {\sf CountSketch} data structure, which finds all such jj using Θ(log2n)\Theta(\log^2 n) bits of space (for constant ϵ>0\epsilon > 0). The only known lower bound is Ω(logn)\Omega(\log n) bits of space, which comes from the need to specify the identities of the items found. In this paper we show it is possible to achieve O(lognloglogn)O(\log n \log \log n) bits of space for this problem. Our techniques, based on Gaussian processes, lead to a number of other new results for data streams, including (1) The first algorithm for estimating F2F_2 simultaneously at all points in a stream using only O(lognloglogn)O(\log n\log\log n) bits of space, improving a natural union bound and the algorithm of Huang, Tai, and Yi (2014). (2) A way to estimate the \ell_{\infty} norm of a stream up to additive error ϵF2\epsilon \sqrt{F_2} with O(lognloglogn)O(\log n\log\log n) bits of space, resolving Open Question 3 from the IITK 2006 list for insertion only streams.

Cite

@article{arxiv.1511.00661,
  title  = {Beating CountSketch for Heavy Hitters in Insertion Streams},
  author = {Vladimir Braverman and Stephen R. Chestnut and Nikita Ivkin and David P. Woodruff},
  journal= {arXiv preprint arXiv:1511.00661},
  year   = {2015}
}
R2 v1 2026-06-22T11:35:04.879Z