Abstract
In large-scale data analysis, coordinated "sketches" are used to estimate properties across massive datasets. However, traditional union-sketch methods discard significant amounts of sampled data to maintain uniform sketch sizes. This paper presents two novel estimators, Short Combination of Sketches (SCS) and Long Combination of Sketches (LCS), which utilize these discarded samples. By employing Rank Conditioning (RC) to derive unbiased adjusted weights, these methods achieve significant error reductions—ranging from 25% to 400%—without increasing the sampling budget. Evaluation on synthetic data, IP packet traces, and Netflix movie ratings demonstrates the consistent superiority of these methods over state-of-the-art union-sketch techniques.
Introduction
As datasets grow to petabyte scales, representing them through "sketches"—small, coordinated random samples—has become standard practice. These sketches allow for efficient estimation of set operations like Jaccard similarity or intersection weights. The conventional approach for multi-set queries is the union-sketch reduction, which merges individual sketches into a single union-sketch of a fixed size $k$.
A critical inefficiency exists in this standard approach: the union of multiple size-$k$ sketches typically contains many more than $k$ unique items. Traditional estimators discard these "extra" samples to keep the final sketch size constant. This paper argues that this discarded information is a wasted resource that has already been computed and stored. By leveraging these samples, we can achieve significantly tighter estimates for "free."
The SCS and LCS Estimators
The authors propose two primary methods for combining sketches that retain more information than the standard union-sketch:
- Short Combination of Sketches (SCS): This method includes all keys with a rank smaller than the $(k+1)$-th rank of the union. It represents the largest set of keys for which complete membership information is available across all sets in the query.
- Long Combination of Sketches (LCS): This method includes every key present in any of the individual sketches. While it provides the most data, it is restricted to attribute-based queries because membership information might be incomplete for keys that appear in one sketch but fall outside the top-$k$ ranks of another.
The core innovation lies in the Rank Conditioning (RC) estimators. These estimators assign "adjusted weights" to each sampled key based on its probability of inclusion in the combination.
As shown in the figure above, the adjusted weights $a(i)$ vary significantly between methods. The SCS and LCS methods often assign lower adjusted weights to more keys, leading to a more stable and lower-variance estimate of the total aggregate.
Formalizing the LCS Estimator
The LCS estimator is particularly powerful for attribute-based conditions. The algorithm involves sorting sets by their $(k+1)$-th rank and then calculating adjusted weights based on the inclusion probability $p(w(i), \tau)$.
This systematic approach ensures that the resulting estimates are unbiased while maximizing the utility of every available sample.
Key Insights and Results
The researchers evaluated these estimators using synthetic datasets, IP packet traces, and the Netflix Prize dataset. Several key insights emerged:
- Analytic Dominance: The SCS estimator is mathematically proven to perform at least as well as, and usually better than, the standard union-sketch estimator across all datasets and queries.
- The Similarity Factor: The improvement is most pronounced when sets have low similarity. In such cases, the standard union-sketch is often "starved" for samples from the intersection, whereas the individual sketches contain ample relevant data that the new methods successfully exploit.
- Substantial Error Reduction: In practical applications, the new estimators consistently reduced estimation error by a factor of 1.25x to 4x. On the Netflix dataset, the LCS estimator outperformed the standard RC union estimator by 3–4x when querying specific reviewer subpopulations.
- Efficiency: The computational overhead is minimal. The primary tasks—sorting and basic arithmetic on ranks—are comparable to those required by the standard union-sketch method.
Conclusion
By simply stopping the practice of throwing away valid samples, the SCS and LCS estimators provide a significant leap in estimation accuracy for massive dataset aggregates. This "data is wealth" philosophy demonstrates that smarter utilization of existing summaries can yield better results than simply increasing sampling budgets. Future work may extend these principles to other common data structures like Bloom filters or Count-Min sketches, potentially bringing similar efficiency gains to a wider range of streaming and big data applications.
Summary updated