Sketch-Based Estimation of Subpopulation-Weight

Edith Cohen, Haim KaplanarXiv 2008 · arXiv

In the era of massive datasets, storing every record for real-time analysis is often infeasible. Instead, systems use "sketches"—compact summaries that allow for approximate querying. A fundamental challenge in this domain is the subpopulation-weight query: estimating the total weight of a specific subset of items (e.g., total revenue from a specific region or traffic from a specific protocol) based solely on the sketch.

This paper, originally presented at SIGMOD 2008, introduces two novel unbiased estimators—Rank Conditioning (RC) and Subset Conditioning (SC)—designed for bottom-$k$ sketches. These estimators significantly improve accuracy over traditional sampling methods, particularly when the total weight of the entire dataset is known.

The Challenge of Subpopulation Estimation

Traditional sampling often struggles with "heavy-tailed" data, where a few items contribute most of the total weight. Simple random sampling might miss these heavy hitters entirely, leading to high variance and unreliable estimates. While previous methods like "priority sampling" addressed some of these issues, they failed to fully utilize all available information, such as the total weight of the original dataset ($W$). This paper bridges that gap by providing estimators that are not only unbiased but also aim for the lowest possible variance.

Methodology: Bottom-$k$ Sketches

The authors focus on bottom-$k$ sketches. In this framework, every item $i$ in the dataset is assigned a random "rank" $r(i)$ based on its weight $w(i)$. The sketch stores only the $k$ items with the smallest ranks. To estimate subpopulation weights from this limited summary, the authors propose two primary approaches:

  1. Rank Conditioning (RC) Estimator: This is used when the total weight of the original dataset is unknown. It generalizes previous priority sampling estimators by adjusting the weight of each item in the sketch based on the rank of the $(k+1)$-th item (the first item excluded from the sketch).
  2. Subset Conditioning (SC) Estimator: This is the paper's most significant contribution. If the total weight of the entire dataset is known—a common scenario in many database applications—the SC estimator uses this information to further refine the estimate.

Both estimators are derived using a framework called HTp (Horvitz-Thompson on a Partitioned Space). This technique applies the classic Horvitz-Thompson estimator to specific partitions of the probability space where inclusion probabilities can be precisely calculated.

The Power of Negative Covariance

The SC estimator’s superior performance stems from negative covariance. By conditioning the estimate on the known total weight, the adjusted weights of the records in the sketch become negatively correlated. This means if one item's weight is overestimated, another is likely to be underestimated. When these weights are summed to estimate a subpopulation, the errors tend to cancel out, resulting in remarkably tight estimates for larger subpopulations.

Experimental Validation

The authors evaluated their methods using synthetic datasets designed to mimic real-world distributions:

  • Pareto Distributions: Skewness parameters ($\alpha = 1, 1.2, 2$) were used to simulate heavy-tailed phenomena like network traffic or wealth distribution.
  • Uniform Distributions: Used as a baseline for less skewed data.

The simulations, involving datasets of up to 20,000 items and sketch sizes ($k$) up to 500, demonstrated that the SC estimator consistently achieved lower variance than RC and priority sampling as subpopulation size increased. Furthermore, the authors derived new confidence bounds for these sketches that are significantly tighter than previous state-of-the-art bounds.

Practical Implementation

While the exact SC estimator involves complex definite integrals, the authors developed a fast Markov Chain Approximation. This method converges quickly to the true SC value, making the approach computationally feasible for high-speed, real-time systems like network routers where processing power is at a premium.

Conclusion

The introduction of RC and SC estimators represents a significant advancement in sketch-based estimation. By treating the total dataset weight as a powerful "prior," the SC estimator achieves a level of accuracy previously unattainable. While the requirement of knowing the total weight may limit its use in some distributed or streaming contexts where the total is not easily defined, its efficiency and precision make it a robust tool for modern big data analytics.

Summary updated

Abstract

Summaries of massive data sets support approximate query processing over the original data. A basic aggregate over a set of records is the weight of subpopulations specified as a predicate over records' attributes. Bottom-k sketches are a powerful summarization format of weighted items that includes priority sampling and the classic weighted sampling without replacement. They can be computed efficiently for many representations of the data including distributed databases and data streams. We derive novel unbiased estimators and efficient confidence bounds for subpopulation weight. Our estimators and bounds are tailored by distinguishing between applications (such as data streams) where the total weight of the sketched set can be computed by the summarization algorithm without a significant use of additional resources, and applications (such as sketches of network neighborhoods) where this is not the case. Our rigorous derivations are based on clever applications of the Horvitz-Thompson estimator, and are complemented by efficient computational methods. We demonstrate their benefit on a wide range of Pareto distributions.
BibTeX
@misc{cohen2008sketch,
  author = {Edith Cohen and Haim Kaplan},
  title = {{Sketch-Based Estimation of Subpopulation-Weight}},
  year = {2008},
  eprint = {0802.3448},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/0802.3448},
}
Figure