Holistic Cube Analysis: A Query Framework for Data Insights

Xi Wu, Shaleen Deep, Joe Benassi, Fengan Li, Yaqi Zhang, Uyeong Jang, James Foster, Stella Kim, Yujing Sun, Long Nguyen, Stratis Viglas, Somesh Jha, John Cieslewicz, Jeffrey F. NaughtonarXiv 2023

TL;DR

Holistic Cube Analysis (HoCA) is a new query framework that treats data cubes as first-class, programmable functions rather than just static tables. By introducing a "function-as-data" paradigm, HoCA allows engineers to search for complex insights—like identifying outliers or attributing changes in non-summable metrics—using succinct, composable operators that scale to massive datasets.

What Problem Does This Paper Address?

Traditional database tools like SQL and OLAP are designed for "forward-style" questions: given a specific slice of data (e.g., "Revenue for Chrome users on Pixel 6"), extract the table. However, modern data science often asks "backward-style" questions: "Which of these thousands of possible slices contributed most to our overall drop in Cost-Per-Click?" or "Which time-series slices are significant outliers?"

Answering these "insight" questions currently requires building complex, brittle pipelines that manually aggregate data at various granularities and then apply ad-hoc statistical tests. There is no unified logical framework to express these searches, leading to redundant work and poor scalability. HoCA fills this gap by providing a formal algebra for searching through the "space of tables" to find the most interesting ones.

Figure 1: Insight problems like finding contributors to change (a) or outliers (b) require searching through many data slices.

Methods

The authors introduce the AbstractCube, a new data type defined as a function that maps a (region, features) pair to a relational table. In this model, a "region" is a specific slice (e.g., Device=Pixel6), and "features" are the metrics or dimensions to analyze.

Key components of the framework include:

  • Cube Crawling: An operator that traverses a defined region space, applies analysis models to each slice, and outputs a new cube containing the resulting "signals" (e.g., importance scores).
  • Cube Join: A higher-order operator that merges two cubes. This allows for composition, such as joining a cube of current revenue with a cube of historical p-values to improve outlier detection.
  • Region Analysis Models (RAMs): These are programmable modules that define what makes a slice "interesting." Crucially, RAMs have access to population features, allowing them to compare a local slice to the entire dataset (holistic analysis).
  • Algorithmic Optimizations: To avoid an exponential explosion of regions, HoCA uses "top-down crawling" with early stopping. If a coarse region (e.g., Country=US) fails a significance threshold (the "Apriori property"), the crawler can safely skip all its more fine-grained children (e.g., State=CA, City=SF).
Figure 2: The HoCA paradigm treats cubes as functions and operators as function-to-function transformations.

Datasets

The authors evaluated HoCA's performance and scalability using two large-scale, real-world datasets:

  1. COVID-19 Open Data: A Google public dataset with 21.2 million rows and 22 attribute columns, used to detect anomalies in confirmed cases.
  2. CMS Open Payments: A public dataset regarding healthcare industry payments, containing 55.8 million rows and 22 attribute columns, used for shift analysis and outlier detection.

Key Insights and Ideas

  • Function-as-Data: By treating the cube as a logical function, HoCA decouples the what (the analysis logic) from the how (the physical data layout and execution).
  • Holistic vs. Local: Most existing systems only look at a slice in isolation. HoCA’s RAMs enable "holistic" insights, such as using the Aumann-Shapley method to attribute changes in complex ratio metrics (like SUM(Cost)/SUM(Clicks)) across different dimensions.
  • Recurrent Crawling: Because HoCA operators output cubes, they can be chained. The authors demonstrate "recurrent crawling," where today's analysis uses yesterday's results as features to calibrate its models—a form of automated self-supervision.
  • Multi-Model Efficiency: The framework supports running multiple models in one pass. A cheap "weight" model can act as a gatekeeper, only invoking an expensive "outlier detection" model for slices with enough data to be statistically significant.

Key Results

HoCA has been deployed at Google and is used by over 30 teams for system monitoring, business intelligence, and experimentation.

  • Succinctness: Complex analysis workflows that previously required hundreds of lines of pipeline code can be expressed in just three statements in HoCA.
  • Latency: The SQL-based implementation (SqlTvf) achieved average latencies of ~200-600 seconds for complex searches on the evaluation datasets.
  • Scalability: The Apache Beam-based implementation (SqlBeam) showed impressive scaling; as the workload (number of regions) grew by 100x, the end-to-end latency only doubled.
Figure 6: Measured latency for the SqlTvf crawler on COVID-19 and CMS datasets.

Limitations and Future Work

  • Physical Design: The authors note that "materialization granularity" is a challenge. Choosing whether to store data by date or by region significantly impacts crawling performance, and they suggest "re-chunking" as a potential solution.
  • Pipeline Management: While HoCA simplifies individual queries, managing complex pipelines of these queries (especially recurrent ones) remains an area for future systems research.
  • Machine Learning Integration: The authors propose "cube learning," exploring how the structural information encoded in a cube's regions can be leveraged for better time-series forecasting and deep learning label generation.

Summary updated

BibTeX
@misc{wu2023holistic,
  author = {Xi Wu and Shaleen Deep and Joe Benassi and Fengan Li and Yaqi Zhang and Uyeong Jang and James Foster and Stella Kim and Yujing Sun and Long Nguyen and Stratis Viglas and Somesh Jha and John Cieslewicz and Jeffrey F. Naughton},
  title = {{Holistic Cube Analysis: A Query Framework for Data Insights}},
  year = {2023},
  eprint = {2302.00120},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2302.00120},
}
Figure