Introduction
In the field of streaming statistics, the challenge of estimating distributional properties under extreme memory constraints is a central problem. This research, conducted by a collaborative team from Boston University, UMass Amherst, UC Berkeley, and Stanford, addresses the estimation of Shannon entropy when memory is restricted to a constant number of machine words ($O(1)$).
Shannon entropy, defined as $H(D) = \sum_{i=1}^k p_i \log(1/p_i)$, is a fundamental measure of uncertainty. While entropy estimation is well-understood in settings with ample memory, the "constant space" regime—where memory does not scale with the alphabet size $k$ or the number of samples—presents significant algorithmic hurdles. This paper makes a significant stride by improving the sample complexity required for such estimations.
The Challenge of Constant Space
In traditional streaming algorithms, one typically processes a fixed database. This paper shifts the focus toward statistical inference from a stream of independent and identically distributed (i.i.d.) samples drawn from an unknown distribution $D$ over an alphabet of size $k$. The objective is to produce an estimate $\hat{H}$ such that $|H(D) - \hat{H}| \leq \epsilon$ with high probability.
Previous state-of-the-art constant-space algorithms required $O(k/\epsilon^3)$ samples. This work aims to bridge the gap between memory-constrained and memory-unconstrained estimation by improving the sample complexity's dependence on the error parameter $\epsilon$. The goal is to move closer to theoretical optimality while maintaining a minimal memory footprint.
Methodology
The authors propose a novel estimator that combines three key techniques to refine the entropy estimate:
1. Negative Binomial Sampling
Unlike prior methods that relied on fixed-size batches (Binomial sampling), this approach utilizes Negative Binomial sampling. The algorithm selects a random element $i$ and continues to draw samples until that specific element has been observed $t$ additional times. The total number of samples $X$ required to reach this threshold serves as a proxy for $1/p_i$. This shift simplifies the mathematical relationship between the samples and the logarithmic terms in the entropy formula, turning the problem of estimating $p_i$ into one of estimating its reciprocal.
2. Polynomial Bias Correction
The primary innovation lies in the treatment of estimator bias. Estimating $\log(1/p_i)$ via $\log(X/t)$ inherently introduces systematic error. Rather than seeking a perfectly unbiased estimator—which is often unattainable in constant space—the authors employ a Taylor expansion of the logarithm function. They construct a low-degree polynomial to approximate the bias and subtract it from the raw estimate. This "bias-correction" allows for higher accuracy without increasing the memory footprint, treating bias as a manageable feature rather than a bug.
3. Bucketing
To manage variance and optimize the dependence on the alphabet size $k$, the algorithm employs a bucketing scheme. The possible values of the samples are partitioned into intervals (buckets), and the contribution to the total entropy is estimated for each bucket independently. This prevents high-variance outliers from disproportionately skewing the final average, leading to a more robust and efficient estimator.
Key Results
The proposed algorithm achieves a sample complexity of:
$$O\left(\frac{k}{\epsilon^2} \cdot \text{polylog}\left(\frac{1}{\epsilon}\right)\right)$$
This represents a significant $1/\epsilon$ factor improvement over the previous benchmark of $O(k/\epsilon^3)$ established by Acharya et al. (2019). Crucially, the algorithm maintains a memory footprint of $O(1)$ machine words. In practical terms, this means the memory requirement is essentially independent of the size of the data stream or the complexity of the distribution being analyzed.
Conclusion and Future Directions
This work demonstrates that sophisticated statistical properties can be inferred with minimal memory through clever bias-correction and sampling strategies. It reinforces the idea that one does not need to store the history of a stream to learn complex properties; one simply needs to maintain the right counters.
The authors conjecture that the $1/\epsilon^2$ dependence is optimal for constant-space entropy estimation, though a formal lower-bound proof remains an open problem. Additionally, the polynomial bias-correction technique is quite general and may be applicable to other distribution testing problems, such as estimating support size or Rényi entropy. Future work may also focus on reducing the remaining polylogarithmic factors to reach the absolute theoretical limit of efficiency.
Summary updated