An Iterative Scheme for Leverage-Based Approximate Aggregation

Shanshan Han, Hongzhi Wang, Jialin Wan, Jianzhong Li

TL;DR

Researchers have developed ISLA, a novel iterative scheme that provides high-precision approximate aggregation (like calculating averages) using only a fraction of the data. By combining "leverage-based" statistical weighting with an iterative refinement process, the system achieves the same accuracy as uniform sampling with only 1/3 of the sample size.

What Problem Does This Paper Address?

In the era of big data, performing exact aggregations (like SUM or AVG) across billions of rows is computationally prohibitive. While approximate aggregation via sampling is a common solution, it faces a major hurdle: outliers.

Uniform sampling often misses rare but high-value data points that significantly skew results. Conversely, if an outlier is picked, it can wildly distort the estimate. Existing "leverage-based" techniques try to solve this by weighting data points based on their influence, but they typically require a full scan of the dataset or massive storage to record every sample—defeating the purpose of efficient approximation. The challenge is to create a system that is accurate, handles outliers gracefully, and remains "lightweight" enough for massive, streaming, or distributed datasets.

Methods

The authors propose ISLA (Iterative Scheme for Leverage-based Approximate Aggregation), which operates in two main phases:

  1. The Sampling Phase: Instead of treating all data equally, the system uses a "pilot sample" to establish data boundaries based on a normal distribution. It categorizes data into five regions: Too Small, Small, Normal, Large, and Too Large. Interestingly, the algorithm focuses primarily on the "Small" and "Large" regions to reconstruct the distribution's shape, as these points provide the most "leverage" (statistical influence) on the final answer.
  2. The Iterative Modulation Phase: This is the core innovation. The system maintains two different estimators:
  3. The Sketch Estimator: A "rough picture" of the answer.
  4. The L-Estimator: A leverage-based estimate that re-weights samples to reflect their individual differences.

    These two estimators are in a "constraint relation." The algorithm iteratively "modulates" or nudges them toward each other. By evaluating the bias and deviation of these estimators against the actual conditions of the sampled data, they converge on a high-precision answer without needing to store the raw samples—only summary statistics (like sum and square sum) are required.

Datasets

The authors evaluated ISLA against several benchmarks:

  • Synthetic Data: Datasets following Normal, Uniform, and Exponential distributions to test robustness across different mathematical shapes.
  • TPC-H Benchmark: A standard 100GB industry-standard database benchmark (specifically the LINEITEM table with 600 million rows).
  • Real-World Data:
    • Census-Income (Salary) Data: Used to test performance on demographic distributions.
  • TLC Trip Record Data: Highly skewed taxi trip distance data from New York City, which is notoriously difficult for standard sampling due to extreme outliers.

Key Insights and Ideas

  • Leverage as a Weighting Tool: The "aha moment" is treating data points not as identical units, but as influencers. By assigning higher "leverage" to data further from the mean, the system can correct the bias inherent in small samples.
  • Convergence over Storage: Most sampling methods fail because they require "memory" of every point seen. ISLA replaces memory with iteration. By mathematically modeling how two different estimators should behave if the data is balanced, the authors can find the "true" average through refinement rather than raw counting.
  • Discarding the "Normal": Counter-intuitively, the system can achieve high accuracy by focusing on the tails of the distribution. Because the "Normal" region is symmetrical and predictable, the "Small" and "Large" regions provide the most information about the specific variance of the current dataset.

Key Results

  • Efficiency: ISLA achieved high-quality answers with only 33% (1/3) of the sample size required by traditional uniform sampling.
  • Accuracy: In tests on the TPC-H 100GB dataset, ISLA was significantly more accurate than the state-of-the-art "measure-biased" techniques (like sample+seek).
  • Speed: On the 100GB benchmark, ISLA was roughly 2x to 2.5x faster than competing biased-sampling methods.
  • Skew Handling: On the highly skewed TLC Trip data, ISLA’s estimate (4515.73) was much closer to the true average (4648.2) than uniform sampling or other biased methods, which often deviated by thousands of units.

Limitations and Future Work

  • Distribution Assumptions: The current iteration of ISLA relies heavily on the assumption that data follows a Normal Distribution (or a combination of them). While the authors showed it works on Exponential and Uniform data, the precision drops in extreme, non-symmetrical cases.
  • Parameter Tuning: The system requires setting a "leverage allocating parameter" ($q$). While the authors provide a self-tuning mechanism, extreme data distributions might still require manual intervention.
  • Future Scope: The authors plan to extend this iterative logic to other types of aggregation, such as MAX, MIN, and GROUP BY operations, and further refine the "leverage" definition for non-i.i.d. (independent and identically distributed) data.

Summary updated

BibTeX
@inproceedings{han2019iterative,
  author = {Shanshan Han and Hongzhi Wang and Jialin Wan and Jianzhong Li},
  title = {{An Iterative Scheme for Leverage-Based Approximate Aggregation}},
  booktitle = {ICDE},
  year = {2019},
  doi = {10.1109/icde.2019.00051},
}
Figure