Compressed counting

Ping Li

TL;DR

Compressed Counting (CC) is a novel framework for estimating frequency moments in data streams using maximally skewed stable random projections. By exploiting the non-negativity of most real-world data, CC achieves a dramatic reduction in sample complexity—improving the required number of projections from $O(1/\epsilon^2)$ to $O(1/\epsilon)$ as the moment parameter $\alpha$ approaches 1.

What Problem Does This Paper Address?

In the world of "Big Data," we often deal with streams so massive that we cannot store them in their entirety. Instead, we use "sketches"—compact summaries that allow us to approximate statistics like the $\alpha$-th frequency moment: $F_{(\alpha)} = \sum_{i=1}^D |A_t[i]|^\alpha$.

When $\alpha=1$, the task is trivial: you just need a single counter to sum the elements. However, for any $\alpha \neq 1$ (even $\alpha = 1.01$), traditional methods like symmetric stable random projections require a much larger memory footprint, scaling with $1/\epsilon^2$ (where $\epsilon$ is the relative error). This creates a "discontinuity" in efficiency between simple counting and statistical sketching.

The author, Ping Li, tackles this gap. He asks: Can we design a system that behaves like a simple counter when $\alpha$ is near 1, providing a smooth transition in complexity?

Methods

The core innovation is the use of skewed stable random projections.

  1. Skewed vs. Symmetric: Standard sketching (like the Li-Hastie-Church algorithm) uses symmetric stable distributions. This paper argues that because most data streams are non-negative (e.g., IP traffic, financial deposits), we should use maximally skewed stable distributions ($\beta = 1$).
  2. Linear Projections: Like standard methods, CC multiplies the incoming data stream by a random matrix $R$. Because the process is linear, it works seamlessly with the "Turnstile" model, where data elements can be added or deleted.
  3. New Estimators: The paper introduces two primary statistical estimators to recover the frequency moment from the sketch:
  4. Geometric Mean (GM) Estimator: Highly flexible and unbiased.
  5. Harmonic Mean (HM) Estimator: Specifically optimized for $\alpha < 1$, offering even greater accuracy than the GM version.
  6. Logarithmic Norms: The paper also provides a clever algorithm for approximating the logarithmic norm ($\sum \log A_t[i]$) by taking the limit as $\alpha \to 0$.

Datasets

This is a theoretical paper focused on algorithmic complexity and statistical proofs. Consequently, it does not use empirical datasets for benchmarking. Instead, the "evaluation" consists of:

  • Rigorous Mathematical Proofs: Deriving the variance and tail bounds for the new estimators.
  • Numerical Plots: Comparing the "asymptotic variance factors" and tail bound constants of the proposed skewed estimators against traditional symmetric ones.

Key Insights and Ideas

  • The $1/\epsilon$ Breakthrough: The most significant "aha moment" is the proof that near $\alpha=1$, the sample complexity drops from $O(1/\epsilon^2)$ to $O(1/\epsilon)$. For a practitioner requiring 1% error ($\epsilon = 0.01$), this could mean a 100x reduction in memory usage.
  • Exploiting Non-Negativity: Most data stream research assumes data can be arbitrary. By assuming the state of the stream is non-negative at the time of evaluation (a very realistic assumption for databases and bank accounts), we can use skewed distributions that "capture" the intuition of a simple counter.
  • Infinite Improvement: As $\alpha \to 1$, the variance of the skewed estimators approaches zero, whereas the variance of symmetric estimators remains strictly positive. This is described as an "infinite improvement" in relative efficiency.
  • Entropy via Moments: The paper notes that because entropy can be approximated using moments where $\alpha = 1 \pm \Delta$, CC provides a highly efficient path for entropy estimation in streams.

Key Results

  • Sample Complexity: Proved that $k = O(\frac{1}{\epsilon} \log \frac{1}{\delta})$ projections are sufficient to achieve $1 \pm \epsilon$ accuracy near $\alpha=1$.
  • Unbiasedness: The Geometric Mean estimator is shown to be unbiased, making it robust for statistical inference.
  • Tail Bounds: The paper provides explicit, exponential tail bounds (Lemmas 4 and 7), ensuring that the probability of a large error decreases exponentially with the number of samples $k$.
  • Efficiency: The Harmonic Mean estimator is shown to be "considerably more accurate" than the Geometric Mean estimator for the range $0 < \alpha < 1$.

Limitations and Future Work

  • Non-Negativity Constraint: The primary limitation is that the underlying signal $A_t[i]$ must be non-negative at the time of evaluation. While it handles deletions (Turnstile model), it cannot handle "overdrafts" where the total count for an item becomes negative.
  • Range of $\alpha$: The method is strictly limited to $0 < \alpha \le 2$ due to the properties of stable distributions.
  • Implementation Complexity: While the theory is robust, implementing skewed stable generators and the associated non-linear estimators (like the HM estimator) is slightly more complex than simple symmetric projections.
  • Future Directions: The author suggests that these techniques could be extended to more complex machine learning tasks involving heavy-tailed data and logarithmic distances.

Summary updated

BibTeX
@inproceedings{li2009compressed,
  author = {Ping Li},
  title = {{Compressed counting}},
  booktitle = {SODA},
  year = {2009},
  doi = {10.1137/1.9781611973068.46},
}
Figure