Entropy Estimation via Compressed Counting

This direction is no longer present in the current build. Its last version stays readable and citable here.

Version 1 of 114 papers27 conceptsfrozen 2026-10-04

In the analysis of massive data streams, calculating Shannon entropy is a fundamental requirement for tasks like anomaly detection and network monitoring. However, tracking the exact frequency of every item in a high-speed stream is memory-prohibitive. Researchers have addressed this by using Compressed Counting (CC), a framework that leverages stable random projections to estimate frequency moments and entropy with minimal memory.

The Bridge Between Moments and Entropy

The core intuition behind this research direction is that Shannon entropy ($H = -\sum p_i \log p_i$) can be viewed as the limit of frequency moments. Specifically, as the power parameter $\alpha$ approaches 1, the $\alpha$-th frequency moment ($F_\alpha = \sum x_i^\alpha$) can be used to derive entropy.

Ping Li and Cun-Hui Zhang demonstrate that Shannon entropy is effectively the limit of Rényi or Tsallis entropies. By estimating moments $F_\alpha$ where $\alpha$ is very close to 1, we can infer the logarithmic statistics of the stream without ever storing the full frequency vector. As shown in A New Algorithm for Compressed Counting with Applications in Shannon Entropy Estimation in Dynamic Data, this allows entropy to be computed through linear aggregations (sketches) rather than individual item tracking.

Exploiting Skewness for Variance Reduction

Traditional sketching methods often use symmetric stable distributions (like the Gaussian or Cauchy distributions) to estimate $L_2$ or $L_1$ norms. However, these symmetric projections suffer from extreme variance when the moment parameter $\alpha$ is near 1—the exact region needed for entropy estimation.

To solve this, Ping Li introduced maximally skewed stable random projections. Because real-world data frequencies are non-negative, using a "fully skewed" distribution allows the estimator to act as a "generalized counter." In On Approximating Frequency Moments of Data Streams with Skewed Projections, Li demonstrates that this shift provides an "infinite improvement" in estimation variance as $\alpha \to 1$. This breakthrough reduces the sample complexity from $O(1/\epsilon^2)$ to $O(1/\epsilon)$, making high-precision estimation possible with far fewer samples.

The Fractional Power Estimator

Once the data is projected into a lower-dimensional sketch, the next challenge is extracting the moment estimate with minimal error. Ping Li and Trevor Hastie developed a fractional power estimator that sums the sketched entries raised to a specific power $p$.

The choice of $p$ is critical. In Improving Compressed Counting, Li proves that the variance function of these estimators is convex. This mathematical property allows researchers to pre-calculate an optimal power $p$ that minimizes the asymptotic variance for any given $\alpha$. By using these optimized powers, the variance in entropy estimation can be reduced by 20x to 100x compared to standard methods, as detailed in A Very Efficient Scheme for Estimating Entropy of Data Streams Using Compressed Counting.

Balancing Bias and Noise

Estimating entropy involves a delicate trade-off:

  1. Intrinsic Bias: To get closer to the true Shannon entropy, $\alpha$ must be very close to 1.
  2. Statistical Variance: As $\alpha$ approaches 1, the noise in traditional estimators typically explodes.

Compressed Counting breaks this trade-off. By eliminating the variance explosion near $\alpha = 1$, it allows the selection of an $\alpha$ much closer to unity than previously possible. Ping Li showed in On Practical Algorithms for Entropy Estimation and the Improved Sample Complexity of Compressed Counting that this approach can reduce sample complexity to a constant $O(1)$ relative to the approximation gap. This means accurate entropy tracking becomes feasible even in high-volume, dynamic environments where memory is at a premium.

Recent extensions of this work, such as those by Qi Pang and Wenting Zheng, have applied these principles to Secure Federated Learning, using finite differences between moments to estimate entropy across distributed, private datasets. This demonstrates that the linear aggregation framework of Compressed Counting is not only efficient for streaming but also highly compatible with secure multi-party computation.

Papers in this version

History & citationVersion 1 · 2026-10-04

No longer present in the current build · Permanent link

View frozen version 1

Cite this direction

Latest version (a living page):

@misc{lacuna_entropy_estimation_via_compressed_counti_15f1b366,
  title = {Entropy Estimation via Compressed Counting},
  author = {{Lacuna}},
  howpublished = {Lacuna research direction},
  year = {2026},
  url = {https://lacuna.tiptreesystems.com/direction/entropy-estimation-via-compressed-counting/rdr_15f1b3661f1243f998261e7e647b1548},
  note = {Latest version of a living research direction; cite a version for a fixed text. Accessed 2026-12-05},
}

This exact version (version 1, frozen text):

@misc{lacuna_entropy_estimation_via_compressed_counti_15f1b366_v1,
  title = {Entropy Estimation via Compressed Counting},
  author = {{Lacuna}},
  howpublished = {Lacuna research direction},
  year = {2026},
  url = {https://lacuna.tiptreesystems.com/direction/entropy-estimation-via-compressed-counting/rdr_15f1b3661f1243f998261e7e647b1548/v/1},
  note = {Version 1, frozen 2026-10-04. Accessed 2026-12-05},
}