Table of Contents
Fetching ...

Optimally detecting uniformly-distributed $\ell_2$ heavy hitters in data streams

Santhoshini Velusamy, Huacheng Yu

TL;DR

The paper advances $ ext{l}_2$-heavy hitter detection in data streams under partially random order by extending BGW20’s sample-and-check paradigm. It achieves the space bound $Oigl( rac{\, extlog n}{\, extepsilon}igr)$ for identifying $ ext{l}_2$-$ ext{ε}$-heavy hitters in insertion-only streams, given a constant approximation to the second moment $F_2$ and access to a random oracle, under a uniform distribution of heavy hitters. A key contribution is the introduction of the $K$-super heavy hitter (K-SHH) framework and a multi-level execution forest that manages many candidates with limited space, enabling robust detection in partially random order streams. The results bridge random-order and adversarial streaming models and have implications for memory-efficient heavy-hitter detection in practical data environments with partial randomness.

Abstract

Given a stream $x_1,x_2,\dots,x_n$ of items from a Universe $U$ of size poly$(n)$, and a parameter $ε>0$, an item $i\in U$ is said to be an $\ell_2$ heavy hitter if its frequency $f_i$ in the stream is at least $\sqrt{εF_2}$, where $F_2={\sum_{i\in U} f_i^2}$. Efficiently detecting such heavy hitters is a fundamental problem in data streams and has several applications in both theory and in practice. The classical $\mathsf{CountSketch}$ algorithm due to Charikar, Chen, and Farach-Colton [2004], was the first algorithm to detect $\ell_2$ heavy hitters using $O\left(\frac{\log^2 n}ε\right)$ bits of space, and their algorithm is optimal for streams with deletions. A work due to Braverman, Chestnut, Ivkin, Nelson, Wang, and Woodruff [2017] gave the $\mathsf{BPTree}$ algorithm which detects $\ell_2$ heavy hitters in insertion-only streams using only $O\left(\frac{\log(1/ε)}ε\log n \right)$ space. Note that any algorithm requires at least $Ω\left(\frac{1}ε \log n\right)$ space to output $O(1/ε)$ heavy hitters in the worst case. While $\mathsf{BPTree}$ achieves optimal space bound for constant $ε$, their bound could be sub-optimal for $ε=o(1)$. For $\textit{random order}$ streams, where the stream elements can be adversarial but their order of arrival is uniformly random, Braverman, Garg, and Woodruff [2020] showed that it is possible to achieve the optimal space bound of $O\left(\frac{1}ε \log n\right)$ for every $ε= Ω\left(\frac{1}{2^{\sqrt{\log n}}}\right)$. In this work, we generalize their result to $\textit{partially random order}$ streams where only the heavy hitters are required to be uniformly distributed in the stream. We show that it is possible to achieve the same space bound, but with an additional assumption that the algorithm is given a constant approximation to $F_2$ in advance.

Optimally detecting uniformly-distributed $\ell_2$ heavy hitters in data streams

TL;DR

The paper advances -heavy hitter detection in data streams under partially random order by extending BGW20’s sample-and-check paradigm. It achieves the space bound for identifying --heavy hitters in insertion-only streams, given a constant approximation to the second moment and access to a random oracle, under a uniform distribution of heavy hitters. A key contribution is the introduction of the -super heavy hitter (K-SHH) framework and a multi-level execution forest that manages many candidates with limited space, enabling robust detection in partially random order streams. The results bridge random-order and adversarial streaming models and have implications for memory-efficient heavy-hitter detection in practical data environments with partial randomness.

Abstract

Given a stream of items from a Universe of size poly, and a parameter , an item is said to be an heavy hitter if its frequency in the stream is at least , where . Efficiently detecting such heavy hitters is a fundamental problem in data streams and has several applications in both theory and in practice. The classical algorithm due to Charikar, Chen, and Farach-Colton [2004], was the first algorithm to detect heavy hitters using bits of space, and their algorithm is optimal for streams with deletions. A work due to Braverman, Chestnut, Ivkin, Nelson, Wang, and Woodruff [2017] gave the algorithm which detects heavy hitters in insertion-only streams using only space. Note that any algorithm requires at least space to output heavy hitters in the worst case. While achieves optimal space bound for constant , their bound could be sub-optimal for . For streams, where the stream elements can be adversarial but their order of arrival is uniformly random, Braverman, Garg, and Woodruff [2020] showed that it is possible to achieve the optimal space bound of for every . In this work, we generalize their result to streams where only the heavy hitters are required to be uniformly distributed in the stream. We show that it is possible to achieve the same space bound, but with an additional assumption that the algorithm is given a constant approximation to in advance.

Paper Structure

This paper contains 14 sections, 21 theorems, 66 equations, 1 figure, 5 algorithms.

Key Result

theorem 1.1

$\exists n_0,c_0\in \mathbb{N}$ such that for every $n\ge n_0$ and $\epsilon\ge c_0\left(\frac{1}{2^{\sqrt{\log n}}}\right)$, there is a single-pass streaming algorithm that with probability at least $9/10$, finds every $\ell_2$$\epsilon$-heavy hitter and reports no element that is not an $\ell_2$$\

Figures (1)

  • Figure 1: Execution forest of $\mathsf{check}$. An example execution path of a $\mathsf{check}$ function initiated at one of the leaf nodes is highlighted in blue.

Theorems & Definitions (51)

  • theorem 1.1: Partially random order streams
  • definition 3.1: Adversarial streams
  • definition 3.2: Random order streams
  • definition 3.3: Partially random order streams
  • theorem 3.4: Chebyshev's inequality
  • theorem 3.5: Chernoff bound
  • theorem 3.6: Hoeffding's inequality
  • theorem 3.7: Azuma-Hoeffding style concentration inequality
  • proof
  • theorem 3.8: Sampling without replacement
  • ...and 41 more