[Paper Review] BPTree: an $\ell_2$ heavy hitters algorithm using constant memory
This paper introduces BPTree, the first $ε^{-2}\log \varepsilon^{-1}$-space, $O(\log \varepsilon^{-1})$-update-time algorithm for $\ell_2$ heavy hitters in insertion-only streams, achieving optimal space and time complexity independent of $n$ and $m$. It uses a novel chaining argument with limited-independence Rademacher processes to derandomize a compressed-sensing-inspired filtering mechanism.
The task of finding heavy hitters is one of the best known and well studied problems in the area of data streams. One is given a list $i_1,i_2,\ldots,i_m\in[n]$ and the goal is to identify the items among $[n]$ that appear frequently in the list. In sub-polynomial space, the strongest guarantee available is the $\ell_2$ guarantee, which requires finding all items that occur at least $ε\|f\|_2$ times in the stream, where the vector $f\in\mathbb{R}^n$ is the count histogram of the stream with $i$th coordinate equal to the number of times~$i$ appears $f_i:=\#\{j\in[m]:i_j=i\}$. The first algorithm to achieve the $\ell_2$ guarantee was the CountSketch of [CCF04], which requires $O(ε^{-2}\log n)$ words of memory and $O(\log n)$ update time and is known to be space-optimal if the stream allows for deletions. The recent work of [BCIW16] gave an improved algorithm for insertion-only streams, using only $O(ε^{-2}\logε^{-1}\log\log n)$ words of memory. In this work, we give an algorithm \bptree for $\ell_2$ heavy hitters in insertion-only streams that achieves $O(ε^{-2}\logε^{-1})$ words of memory and $O(\logε^{-1})$ update time, which is the optimal dependence on $n$ and $m$. In addition, we describe an algorithm for tracking $\|f\|_2$ at all times with $O(ε^{-2})$ memory and update time. Our analyses rely on bounding the expected supremum of a Bernoulli process involving Rademachers with limited independence, which we accomplish via a Dudley-like chaining argument that may have applications elsewhere.
Motivation & Objective
- To close the gap in space complexity for $\ell_2$ heavy hitters in insertion-only streams, where prior algorithms required $O(\varepsilon^{-2}\log n)$ or $O(\varepsilon^{-2}\log \varepsilon^{-1}\log\log n)$ space.
- To achieve optimal space and time complexity, matching the trivial lower bounds of $\Omega(\varepsilon^{-2})$ space and $O(1)$ update time for constant $\varepsilon$.
- To develop a new derandomization technique for Bernoulli processes using limited-independence Rademacher variables, applicable beyond heavy hitters.
- To enable practical deployment of $\ell_2$ heavy hitters via a one-pass, adaptive filtering scheme that reduces the number of required hash functions and median computations.
- To provide a new method for tracking $\|f\|_2$ at all times with $O(\varepsilon^{-2})$ memory and update time, a key primitive for moment estimation.
Proposed method
- Proposes BPTree, a data structure that maintains a hierarchical tree of sketches using $O(\varepsilon^{-2}\log \varepsilon^{-1})$ words of memory, independent of $n$ and $m$.
- Employs a multi-round adaptive filtering process where items are incrementally removed based on estimated frequencies, making the true heavy hitter more prominent.
- Uses a novel chaining argument with $4$-wise independent hash functions to bound the expected supremum of a Rademacher process, enabling derandomization.
- Introduces a one-pass implementation of a compressed-sensing-inspired scheme that dynamically adjusts the filtering threshold as the stream progresses.
- Leverages the fact that after filtering out non-heavy items, the remaining frequency of the true heavy hitter increases, improving detection accuracy.
- Designs a $\|f\|_2$ tracking module that maintains a sketch with $O(\varepsilon^{-2})$ memory and $O(\log \varepsilon^{-1})$ update time, using the same core technique as BPTree.
Experimental results
Research questions
- RQ1Can the space complexity of $\ell_2$ heavy hitters in insertion-only streams be reduced to $O(\varepsilon^{-2}\log \varepsilon^{-1})$ words, independent of $n$?
- RQ2Is it possible to achieve $O(\log \varepsilon^{-1})$ update time while maintaining $\ell_2$-guarantee correctness with constant memory per update?
- RQ3Can a chaining argument with limited-independence Rademacher variables be used to derandomize Bernoulli processes in streaming algorithms?
- RQ4Does adaptive filtering in insertion-only streams significantly reduce the number of hash function evaluations and median computations compared to CountSketch?
- RQ5Can a single data structure efficiently support both $\ell_2$ heavy hitters and real-time $\|f\|_2$ tracking with optimal space and time?
Key findings
- BPTree achieves $O(\varepsilon^{-2}\log \varepsilon^{-1})$ space and $O(\log \varepsilon^{-1})$ update time for $\ell_2$ heavy hitters, matching the theoretical lower bounds up to constant factors.
- The algorithm uses only $O(\varepsilon^{-2})$ memory to track $\|f\|_2$ at all times, with $O(\log \varepsilon^{-1})$ update time, improving on prior methods.
- Experiments show that BPTree outperforms CountSketch in both speed and memory usage, especially when heavy hitters are sufficiently frequent (e.g., $K$-heavy hitters with $K \geq 32$).
- The use of $4$-wise independence in the hash functions suffices for correctness, reducing the number of required random bits and improving efficiency.
- The adaptive filtering mechanism in BPTree reduces the number of active hash functions over time, leading to faster updates as the stream progresses.
- The chaining argument with limited independence provides a general technique for bounding suprema of Bernoulli processes, with potential applications beyond heavy hitters.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.