Abstract
Estimating Shannon entropy in massive, dynamic data streams is a critical task for network monitoring and data mining. Traditional methods suffer from a sample complexity that scales poorly with the approximation parameter $\Delta$. This paper presents a novel estimator for Compressed Counting that achieves a constant sample complexity of $O(1)$ relative to $\Delta$. By leveraging maximally skewed stable random projections and a new power-mean-style estimator, the proposed algorithm enables accurate entropy estimation with as few as 10 samples, representing a significant leap in practical feasibility for real-time applications.
Introduction
Shannon entropy ($H = -\sum p_i \log p_i$) serves as a fundamental metric for characterizing the diversity and predictability of data distributions. In high-speed network environments, entropy estimation is vital for detecting anomalies such as DDoS attacks or worm propagation. However, the "Turnstile model"—where data arrives as a stream of updates to high-dimensional vectors—presents significant computational challenges. Standard approaches approximate entropy by estimating the $\alpha$-th frequency moment ($F_\alpha = \sum A_i^\alpha$) where $\alpha = 1 - \Delta$. Historically, these methods required a sample size $k$ proportional to $1/\Delta^2$. Given that $\Delta$ must be as small as $10^{-5}$ for accurate results, the resulting requirement of billions of samples has rendered these techniques impractical for real-time use.
Methodology: Compressed Counting with Power-Mean Estimators
The proposed approach builds upon Compressed Counting (CC), utilizing maximally skewed stable random projections. The core innovation is a "clean" power-mean-style estimator designed to overcome the high variance associated with previous geometric or harmonic mean estimators:
$$\hat{F}_{(\alpha)} = \frac{1}{\Delta^\Delta} \left[ \frac{k}{\sum_{j=1}^k x_j^{-\alpha/\Delta}} \right]^\Delta$$
where $x_j$ represents the projected data points and $k$ is the sample size. The mathematical foundation of this work proves that the variance of this specific estimator is $O(\Delta^2)$. This property is crucial: since entropy estimation involves dividing by $\Delta^2$, a variance proportional to $\Delta^2$ allows the $\Delta$ terms to cancel out, leading to a sample complexity that is independent of the precision parameter.
Key Insights: Variance Cancellation and Stability
The breakthrough lies in the variance cancellation effect. By ensuring the estimator's variance shrinks at the same rate as the required precision, the total sample complexity becomes $O(1/\nu^2)$, where $\nu$ is the relative error, effectively removing the dependency on $\Delta$.
Furthermore, the paper addresses numerical stability. Calculating values when $\alpha \approx 1$ (e.g., $\Delta = 10^{-10}$) typically induces catastrophic floating-point errors. The author provides a reformulated version of the estimator using logarithms and exponents, maintaining stability even at extreme precision levels ($\Delta = 10^{-14}$). Interestingly, as $\Delta \to 0$, this estimator converges to the sample minimum of the projected data, providing an intuitive link between stable distribution theory and simple order statistics.
Experimental Results and Theoretical Tightness
The algorithm was evaluated using real-world data from a Web crawl corpus, testing vectors with varying degrees of sparsity. The results demonstrate a massive efficiency gain: for a precision of $\Delta = 10^{-5}$, the new algorithm is approximately $10^{10}$ times more efficient than traditional symmetric stable random projections and $10^5$ times more efficient than prior CC estimators.
As shown in Figure 1, the theoretical tail bounds (the probability of the estimate deviating from the true value) match the exact distribution of the estimator with remarkable precision. This tightness ensures that the algorithm's performance in practice closely follows the derived theoretical guarantees.
Conclusion
By introducing a novel power-mean estimator for Compressed Counting, this work resolves a long-standing bottleneck in stream processing. The reduction of sample complexity from $O(1/\Delta^2)$ to $O(1)$ allows for accurate entropy estimation with minimal memory overhead. While the current proofs focus on the relaxed strict-Turnstile model, the algorithm's efficiency and numerical stability make it a prime candidate for deployment in high-bandwidth network hardware and large-scale data mining systems.
Summary updated