Abstract
The problem of estimating the $p$-th moment $F_p$ (where $p$ is non-negative and real) in data streams is a cornerstone of modern data analysis. Given a vector $x$ that evolves through a sequence of updates, the goal is to output an approximation with relative error at most $\epsilon$ to $F_p = \|x\|_p^p$. While it was previously established that polylogarithmic space is achievable if and only if $p \leq 2$, this work introduces several significant advancements in this regime. We present an optimal space algorithm for $0 < p < 2$ that avoids generic pseudorandom generators, near-optimal space algorithms for $p = 0$ (distinct elements) with optimal update and query times, and improved $L_2 \to L_2$ dimensionality reduction. Furthermore, we establish new 1-pass lower bounds to demonstrate the optimality of these and existing algorithms.
Introduction
In the streaming model, algorithms must process a massive sequence of data points in a single pass (or very few passes), maintaining a compact "sketch" of the data. A fundamental task in this model is Norm Estimation. Consider a vector $a$ where each coordinate $a_i$ represents the frequency of an item $i$. As updates arrive, we seek to estimate the $L_p$ norm: $\|a\|_p = (\sum |a_i|^p)^{1/p}$.
- $L_0$ (Hamming Norm): Estimates the number of distinct elements (e.g., unique users visiting a site).
- $L_1$: The total sum of absolute values.
- $L_2$: The Euclidean norm, critical for variance estimation and detecting "heavy hitters" in network traffic.
Prior to this work, existing algorithms often suffered from sub-optimal memory usage or slow update speeds, particularly due to their reliance on heavy-handed randomness tools like Nisan’s Pseudorandom Generator (PRG).
Methodology
The authors introduce several technical innovations to achieve theoretical efficiency limits by moving away from generic randomness tools:
1. Replacing Generic PRGs
Most previous streaming algorithms relied on Nisan’s PRG to simulate "true" randomness, which introduced a logarithmic overhead in memory. This paper proves that for $L_p$ estimation, simpler $k$-wise independent hash functions suffice when paired with the correct estimator, effectively removing the PRG bottleneck.
2. $p$-Stable Distributions
For $0 < p \leq 2$, the authors utilize sketches based on $p$-stable random variables. They develop a new estimator that is easily "derandomized," ensuring robustness even when the underlying randomness is not perfectly independent.
3. Multi-level Subsampling for $L_0$
To estimate distinct elements ($L_0$), a "balls-and-bins" approach is employed. By hashing items into a hierarchy of levels and observing bin occupancy at specific thresholds, the algorithm can accurately estimate the total count with minimal space and $O(1)$ update time.
4. Communication Complexity for Lower Bounds
To prove optimality, the authors leverage information theory, showing that any algorithm using less space would essentially be solving hard communication problems (like "Gap-Hamming") with fewer bits than theoretically possible.
Key Results
The primary contributions are summarized in the table below, highlighting the achieved upper bounds, lower bounds, and operational complexities for various streaming problems.
Key highlights include:
- Optimal $L_p$ Space: For $0 < p < 2$, the space bound of $O(\epsilon^{-2} \log(mM))$ bits matches the theoretical lower bound.
- Fast $L_0$ Estimation: The first algorithm for distinct elements achieving $O(1)$ update and reporting time with near-optimal space.
- Separations: The work establishes clear separations in complexity between 1-pass and 2-pass $F_0$ estimation, as well as between $p = 0$ and $p > 0$.
Conclusion
By developing specialized hashing techniques and proving the sufficiency of limited independence, this work provides the most efficient known methods for tracking data size in streaming systems. While the results for $0 \leq p \leq 2$ are near-optimal, future work remains in closing the minor $\log \log N$ gap for $L_0$ and exploring the fundamentally different polynomial space requirements for $p > 2$.
Summary updated