Abstract
The estimation of coverage probabilities, particularly the "missing mass," is a fundamental statistical challenge with applications ranging from genomics to network security. This paper investigates this problem within the context of randomized data compression, or sketching. We address scenarios where coverage probabilities must be estimated from a compressed, imperfect summary (a sketch) because the full dataset or empirical frequencies are unavailable. We propose a Bayesian nonparametric (BNP) methodology to estimate coverage probabilities from data sketched via random hashing. Our approach also addresses the recovery of the number of distinct counts in the original data. While the proposed estimators are computationally efficient under a Dirichlet process prior, they present significant computational challenges under the more general Pitman-Yor process prior. We demonstrate the effectiveness of our methodology through numerical experiments and applications to Covid DNA sequences, English literature, and IP address datasets.
Introduction
In modern large-scale data analysis, it is often impractical to store or process every individual data point. Instead, researchers rely on sketches—probabilistic data structures like the Count-Min Sketch that use hash functions to map items into a fixed number of buckets. While sketching significantly reduces memory requirements and can enhance privacy, it introduces hash collisions, where multiple distinct items are mapped to the same bucket.
These collisions obscure the true frequency of items, making it difficult to apply classical statistical tools. Specifically, answering questions about the "missing mass" (the probability that the next observed item is one not yet seen) or the total number of distinct items becomes a complex inverse problem. This paper provides the first BNP framework designed to perform these estimations directly from the "imperfect" sketched summary.
The Problem: Estimating from Compressed Summaries
Traditional estimators, such as the Good-Turing estimator, require access to the full data or at least an accurate count of distinct symbols and their frequencies. When data is hashed, we only observe the aggregate counts in each bucket. If we denote the number of buckets as $J$, and the total sample size as $n$, the challenge is to infer the underlying population characteristics from the distribution of these $J$ bucket counts.
Key questions addressed include:
- The Missing Mass Problem: What is the probability of encountering a new species or item in the next draw?
- Distinct Counts ($K_n$): How many unique items exist in the original, uncompressed data?
- Frequency Estimation: How many items appeared exactly $r$ times in the original stream?
Methodology: A Bayesian Nonparametric Approach
The authors utilize Bayesian Nonparametrics to model the unknown distribution of symbols. By placing a prior on the space of all possible distributions, they can derive posterior estimates based on the observed sketch.
1. The Dirichlet Process (DP) Prior
The Dirichlet Process serves as the primary model for the paper. The authors leverage the DP's finite-dimensional projective property, which reveals that sketched data follows a Dirichlet-Multinomial distribution. This mathematical symmetry allows for the derivation of closed-form estimators that are computationally efficient and highly scalable. A notable finding is that under a DP prior, the estimate for the missing mass ($p_{0,n}$) depends primarily on the total sample size $n$ and a prior parameter, remaining largely invariant to the sketching process itself.
2. The Pitman-Yor Process (PYP) Prior
For datasets exhibiting "heavy-tailed" behavior—where a few items appear frequently and many appear rarely (common in natural language and genomics)—the Pitman-Yor Process is more appropriate. While the PYP offers greater flexibility, it lacks the DP's simple projective properties. The authors developed a Monte Carlo approximation for the PYP, though it remains computationally intensive and subject to higher variance as sample sizes increase.
3. De-colliding the Sketch
The methodology essentially "de-collides" the sketch statistically. By using an Empirical Bayes approach, the researchers learn the prior parameters directly from the observed bucket counts, allowing the model to account for the width of the hash function ($J$). As $J$ increases (reducing compression), the estimators naturally converge to classical full-data BNP estimators.
Empirical Results and Applications
The methodology was validated across three diverse real-world domains:
- Genomics (Covid DNA): Analyzing 16-mers from over 43,000 SARS-CoV-2 genomes. The DP-based estimators proved remarkably accurate in this context, matching oracle results even under significant compression.
- Linguistics (Classic Literature): Analyzing 2-grams from the Gutenberg Corpus. Because language often follows a power-law distribution, the DP model slightly underestimated the missing mass, highlighting the need for the more complex PYP prior in heavy-tailed scenarios.
- Network Traffic (IP Addresses): Analyzing over 3.5 million IP addresses. The estimators provided a robust approximation of distinct counts and coverage, useful for monitoring telecommunication service degradation.
Conclusion and Future Work
This research bridges the gap between randomized data structures and Bayesian statistics. The DP-based estimators offer a fast, scalable solution for real-time streaming applications, while the PYP framework provides a theoretical path for more complex data distributions.
Future research directions include:
- Refining the PYP: Developing more efficient computational methods for the Pitman-Yor prior to handle massive sketches.
- Uncertainty Quantification: Moving beyond point estimates to provide credible intervals for sketched data.
- Multi-step Prediction: Extending the model to estimate the number of new items expected in a future sample of size $m$, rather than just the next single observation.
Summary updated