TL;DR
This paper introduces a unified, game-theoretic framework that uses Shapley values to accurately attribute changes in complex, aggregated business metrics. By classifying metrics based on their mathematical structure, the authors deliver a spectrum of algorithms—ranging from exact closed-form solutions for ratios to raw-data approximations for non-additive metrics like distinct counts. When integrated into existing root cause analysis systems, this framework dramatically improves anomaly diagnostic accuracy, boosting F1-scores by up to 740%.
What Problem Does This Paper Address?
Data analysts frequently need to explain why a high-level metric (like revenue or success rate) has changed over time. However, modern metrics are rarely simple sums; they are often complex, non-linear combinations (like ratios) or non-additive aggregations (like count_distinct).
When these metrics fluctuate, the root cause is usually an interplay between two axes:
- Sub-cubes (Dimensional changes): Which segment of the data changed (e.g., a specific data center or region)?
- Sub-measures (Compositional changes): Which underlying component changed (e.g., did the number of failures increase, or did the total traffic volume shift)?
Standard Online Analytical Processing (OLAP) and Root Cause Analysis (RCA) tools struggle to untangle these joint contributions. They often rely on ad-hoc heuristics that fail to account for non-linear interactions, leading to misleading conclusions or analytical blind spots like Simpson's Paradox—where a metric appears to improve in every single sub-segment individually, yet drops at the aggregate level due to a shift in data composition.
Methods
The authors reframe metric attribution through the lens of cooperative game theory. They treat the metric's aggregation function as the "payout" of a game, and define each unique combination of sub-measure × sub-cube as a "player." To fairly distribute the total change ($\Delta y$) among these players, they leverage the Shapley value, which mathematically guarantees essential fairness properties like completeness (contributions sum up exactly to the total change) and symmetry.
To make this computationally viable for real-world applications, they classify metrics into two categories:
- Generalized Additive Measures (GAMs): Metrics that are smooth, differentiable functions of additive base measures (e.g., $Ratio = \frac{\text{success\_cnt}}{\text{total\_cnt}}$). For GAMs, they utilize the Aumann-Shapley value (akin to Integrated Gradients), deriving exact, closed-form solutions for ratio metrics that compute in constant time.
- Non-Generalized Additive Measures (Non-GAMs): Arbitrary, non-smooth metrics that involve operations like
count_distinct()or conditional if/else logic. For these, they adapt the coalitional game to operate directly on raw data records, dynamically mixing target and reference datasets to calculate marginal contributions.
Datasets
The framework was evaluated using a mix of simulated and real-world datasets:
- Simulated Linear & Non-Additive Data: Used to rigorously test numerical accuracy and scalability against known ground truths.
- 1973 Berkeley Graduate Admissions Dataset: A classic real-world dataset famous for demonstrating Simpson's Paradox in gender admission rates.
- Video Service Provider Anomaly Dataset: A public, real-world benchmark containing 135 manually verified anomaly cases from a global online video service provider, tracking the "Stalling Ratio" metric across dimensions like CDN, Bitrate, and Device Type.
Key Insights and Ideas
- The Power of Exact Additivity: For an attribution method to be trustworthy, individual contributions must sum up exactly to the total change. The Shapley value provides a non-arbitrary way to fully distribute the shared "interaction effect" (where one factor amplifies another) without relying on measure-specific heuristics.
- Exploiting Differentiability for Speed: While calculating exact Shapley values is notoriously slow (exponential complexity), recognizing that many business metrics are differentiable (GAMs) allows the authors to use path integrals. This bypasses the exponential bottleneck, offering instantaneous closed-form solutions for common metrics like ratios.
- Mathematical Resolution of Paradoxes: The framework elegantly deconstructs Simpson's Paradox by splitting a sub-cube's impact into its performance component and its volume/composition component, proving mathematically that systemic shifts in data volume—not localized bias—can drive aggregate metric drops.
Key Results
- High Numerical Accuracy: Simulations showed that the framework's error consistently converges toward zero as the reference sample size grows.
- Robustness on Non-Additive Metrics: For complex
count_distinctmetrics (like Daily Active Users), the framework achieved perfect accuracy in identifying simulated faults down to a 20% severity threshold.
- Massive Upgrades to Existing RCA Systems: The authors replaced the native attribution modules of 5 state-of-the-art root cause localization systems with their Shapley-based framework. It consistently improved diagnostic F1-scores across the board. The most dramatic gains were seen in heuristic-based methods like Hotspot, whose F1-score leaped from 0.0444 to 0.3731 (a 740.3% improvement), because the new framework correctly modeled the non-linear nature of the Stalling Ratio metric.
Limitations and Future Work
The primary limitation of this framework is the computational cost associated with Non-GAMs. Because non-additive metrics like count_distinct cannot be pre-aggregated, the algorithm must repeatedly query and re-aggregate raw transactional data for thousands of permutations, introducing substantial latency overhead for massive datasets.
The authors note that future work will focus on performance optimization (such as specialized approximation techniques and hardware acceleration), extending the framework to handle continuous time-windows, and integrating causal inference to bridge the gap between mathematical attribution and real-world physical causation.
Summary updated