Building Wavelet Histograms on Large Data in MapReduce

Jeffrey Jestes, Ke Yi, Feifei Li

Introduction

Wavelet histograms are a fundamental tool for data summarization, enabling efficient query optimization and statistical analysis by capturing the essential properties of large datasets through a small set of significant coefficients. However, as data scales to terabytes, traditional centralized or streaming algorithms for constructing these histograms become impractical. This paper addresses the challenges of building Haar wavelet histograms within the MapReduce framework, focusing on minimizing communication overhead and I/O costs.

The Challenge of Distributed Wavelet Construction

Constructing wavelet histograms on massive datasets in a distributed environment like Hadoop presents several hurdles. Standard adaptations of existing algorithms often suffer from prohibitive communication bottlenecks when full frequency vectors are transmitted across the network. Furthermore, the stateless nature of MapReduce between rounds complicates the global "top-k" search required to identify the most significant wavelet coefficients.

Haar Wavelet Decomposition Tree illustrating the hierarchical structure of coefficients.

The hierarchical nature of Haar wavelets, as shown in Figure 2, allows for a recursive decomposition of the data. Because wavelet transforms are linear, a global coefficient can be computed as the sum of local coefficients from different data splits. This property is leveraged by the authors to develop efficient distributed algorithms.

Proposed Methodology

The authors introduce two primary algorithms: H-WTopk for exact computation and TwoLevel-S for approximate computation.

H-WTopk: Exact Top-k Coefficients

H-WTopk is an adaptation of the Three-Phase Uniform Threshold (TPUT) algorithm. Unlike standard TPUT, which handles non-negative scores, H-WTopk is designed to manage both positive and negative wavelet coefficients. It employs a three-round MapReduce process to prune items that cannot mathematically belong to the global top-k based on their absolute magnitude. This significantly reduces the volume of data sent to the reducer.

TwoLevel-S: Unbiased Approximate Sampling

For scenarios requiring even higher performance, the TwoLevel-S scheme provides a novel sampling approach.

  1. Level 1: Standard random sampling of keys from input splits.
  2. Level 2: Mappers perform a second round of sampling. High-frequency items are transmitted exactly, while low-frequency items are emitted as "null" markers with a specific probability. This two-level approach ensures the final estimate remains unbiased while capping communication costs at $O(\sqrt{m}/\epsilon)$, where $m$ is the number of data splits.

Experimental Evaluation and Results

The algorithms were evaluated on a 16-node Hadoop cluster using both synthetic Zipfian distributions (up to 54 billion records) and real-world WorldCup access logs (1.35 billion records).

Comparison of running times across different methods as the number of parallel splits increases.

As demonstrated in Figure 6, both H-WTopk and TwoLevel-S outperform baseline methods like Send-V and Send-Sketch by orders of magnitude. Specifically, TwoLevel-S can process a 200GB dataset in under 10 minutes with only 2MB of communication, maintaining high accuracy. The results highlight that in large-scale MapReduce clusters, minimizing network communication through pruning and sampling is the key to achieving high performance and scalability.

Conclusion

This work demonstrates that highly efficient wavelet histogram construction is possible on large-scale data using MapReduce. By exploiting the linearity of wavelets and employing advanced pruning and sampling techniques, the proposed H-WTopk and TwoLevel-S algorithms overcome the traditional bottlenecks of distributed data summarization. Future work may involve extending these techniques to incremental updates and higher-dimensional sparse data.

Summary updated

BibTeX
@article{jestes2011building,
  author = {Jeffrey Jestes and Ke Yi and Feifei Li},
  title = {{Building Wavelet Histograms on Large Data in MapReduce}},
  journal = {Proc. VLDB Endow.},
  year = {2011},
  doi = {10.14778/2078324.2078327},
}
Figure