Improving Compressed Counting

Ping Li

Introduction

In the era of "Big Data," processing massive, high-speed data streams requires efficient summarization techniques. One such technique is Compressed Counting (CC), which uses sketches—small, compressed summaries—to estimate statistical properties like the $\alpha$-th frequency moment ($F_{(\alpha)}$) and Shannon entropy. These metrics are critical for characterizing data distributions and detecting network anomalies, such as DDoS attacks.

Historically, estimating Shannon entropy via frequency moments (as $\alpha \to 1$) has been plagued by a "variance explosion." Previous methods required prohibitively large sketch sizes to maintain accuracy near the entropy limit. This paper introduces a significantly improved algorithm for CC that utilizes an "optimal power estimator," achieving a staggering 100-fold reduction in estimation variance and making real-time monitoring far more practical.

Methodology: The Optimal Power Estimator

The proposed method builds upon the framework of maximally-skewed stable random projections. By multiplying the data stream vector by a random matrix with entries drawn from a maximally-skewed $\alpha$-stable distribution ($S(\alpha, \beta=1, 1)$), the data is compressed into a smaller projected vector.

The core innovation is the Optimal Power Estimator: $$\hat{F}_{(\alpha),op} \propto \left( \sum |x_j|^{\lambda^* \alpha} \right)^{1/\lambda^*}$$ Unlike previous iterations of CC that used fixed geometric or harmonic means, this approach optimizes the parameter $\lambda^*$ to minimize asymptotic variance for any given $\alpha$. For instance, at $\alpha = 0.5$, the estimator becomes equivalent to the Maximum Likelihood Estimator (MLE), reaching the theoretical Cramér-Rao lower bound for statistical efficiency.

Figure 1: Asymptotic variance factor (left) and the variance ratio (right) comparing the Optimal Power estimator against Geometric and Harmonic means. The right panel highlights the 100-fold (and greater) improvement as $\alpha$ approaches 1.

Empirical Evaluation and Results

The algorithm was rigorously tested using real-world Web crawl data consisting of word occurrence frequencies across $2^{16}$ pages. The study focused on specific word vectors, such as "RICE," to evaluate performance on skewed distributions.

Key Findings

  • Variance Reduction: For $\alpha = 0.99$ (near Shannon entropy), the new algorithm reduces estimation variance by approximately 100 times compared to previous geometric mean (gm) or harmonic mean (hm) estimators. As $\alpha$ gets even closer to 1, the improvement ratio grows exponentially.
  • Sample Efficiency: The method is remarkably sample-efficient; achieving a 10% error rate in entropy estimation requires only $k=10$ samples, whereas older methods might require thousands.
  • Theoretical Alignment: Empirical tests on the Web crawl data perfectly matched the predicted theoretical asymptotic variances, confirming the robustness of the mathematical derivation.
Figure 4: Normalized Mean Square Error (MSE) for entropy estimation (H) on the RICE dataset. The 'op' (optimal power) estimator maintains significantly lower and more stable MSE as $\Delta \to 0$ compared to 'gm' or 'hm' methods.

Discussion and Future Work

The use of maximally-skewed distributions ($\beta=1$) provides significantly more information about the data scale near $\alpha=1$ than symmetric distributions. By dynamically optimizing $\lambda$, the noise inherent in the entropy limit is suppressed, allowing for high-precision monitoring with minimal memory footprints.

Despite these gains, some limitations remain. Currently, estimating moments for different values of $\alpha$ requires maintaining separate sketches. Furthermore, while the algorithm is a massive improvement, the absolute theoretical sample complexity bound for Compressed Counting remains an open question. Future work may focus on multi-moment sketches and further refining accuracy for extremely high-precision requirements (error < 1%).

Summary updated

BibTeX
@inproceedings{li2009improving,
  author = {Ping Li},
  title = {{Improving Compressed Counting}},
  booktitle = {Conference on Uncertainty in Artificial Intelligence},
  year = {2009},
}
Figure