NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Data Debugging with Shapley Importance over End-to-End Machine Learning Pipelines

Bojan Karlas, David Dao, Matteo Interlandi, Bo Li, Sebastian Schelter, Wentao Wu, Ce ZhangarXiv 2022 · DOI

Abstract

In the era of data-centric AI, identifying influential training data is crucial for model debugging and fairness. Shapley values provide a principled measure of data importance but are computationally prohibitive for complex machine learning pipelines. We present DataScope, the first system designed to compute Shapley values over entire end-to-end ML pipelines. By leveraging data provenance and approximating pipelines with "canonical" versions, DataScope achieves up to a 10,000x speedup over traditional sampling methods, making real-time label repair and fairness debugging feasible.

Introduction

As machine learning moves toward "data-centric" paradigms, a critical question arises: Which training examples are responsible for a model's inaccuracies or biases? Shapley values, a concept from game theory, have emerged as the gold standard for answering this by assigning a value to each data point based on its marginal contribution to model utility.

However, a significant gap exists between theory and practice. Most existing methods assume models are trained on clean, static datasets. In reality, ML involves complex pipelines—joining tables, filtering missing values, and extracting features. Computing Shapley values for the original raw data points is exponentially complex because it requires tracking how every raw tuple flows through these transformations to influence the final prediction.

Figure 1: A representative example of an end-to-end ML pipeline involving data joins, filtering, and scaling.

Methodology: The DataScope Approach

DataScope addresses the computational bottleneck of pipeline-wide Shapley values through three primary innovations:

1. Data Provenance Tracking

DataScope utilizes the theory of provenance semirings to link input tuples to output features. This allows the system to express the presence of an output feature as a logical formula (a provenance polynomial) of the input tuples, effectively mapping the "lineage" of data through the pipeline.

2. Canonical Pipelines and KNN Proxies

The authors identify a family of "canonical pipelines" (Map, Fork, and One-to-Many Joins) followed by a K-Nearest Neighbor (KNN) classifier. While computing Shapley values is generally #P-hard, it becomes tractable (PTIME) for KNN models. DataScope approximates complex models, such as XGBoost, using a KNN proxy to maintain this efficiency without sacrificing the quality of data importance rankings.

3. Additive Decision Diagrams (ADDs)

To handle the combinatorial "counting" required for Shapley values, DataScope represents pipeline logic using Additive Decision Diagrams (ADDs). This data structure transforms the problem into a graph traversal, allowing model counting in polynomial time relative to the data size.

Figure 3: An Additive Decision Diagram (ADD) used to represent pipeline logic and enable polynomial-time model counting.

For non-canonical steps like global scaling, DataScope employs a "stability approximation," assuming that global statistics (e.g., mean, variance) remain relatively stable when a single data point is removed.

Evaluation and Results

DataScope was evaluated across diverse modalities, including tabular data (UCIAdult, Folktables, Higgs), images (FashionMNIST), and text (20NewsGroups). Additionally, a case study of 500,000 real-world Microsoft user workflows confirmed that most practical pipelines are either canonical or easily convertible.

Key Performance Metrics

  • Efficiency: DataScope is consistently 100x to 10,000x faster than state-of-the-art Monte Carlo (TMC-Shapley) methods. It can compute values for 1,000 samples in seconds, whereas traditional methods may take over an hour.
  • Debugging Utility: In label repair experiments, DataScope matched or exceeded the performance of expensive sampling methods in identifying flipped labels.
  • Interactive Fairness: Due to its speed, DataScope enables "interactive" debugging. Users can recompute importance values in real-time after each data repair, facilitating a dynamic trade-off analysis between accuracy and fairness.

Discussion and Conclusion

The core insight of DataScope is that data importance is a property of the entire process, not just the final estimator. Ignoring feature extraction leads to an incomplete understanding of data influence. By restricting pipelines to positive relational algebra and using KNN proxies, the system turns a theoretically intractable problem into a practical tool for data-centric AI.

While the KNN proxy is highly effective for ranking, it may struggle if a model relies heavily on global population properties that KNN does not capture. Future work includes extending the framework to support more complex, non-linear operators and exploring hybrid Monte Carlo methods for non-canonical cases.

Summary updated

BibTeX
@misc{karlas2022data,
  author = {Bojan Karlas and David Dao and Matteo Interlandi and Bo Li and Sebastian Schelter and Wentao Wu and Ce Zhang},
  title = {{Data Debugging with Shapley Importance over End-to-End Machine Learning Pipelines}},
  year = {2022},
  eprint = {2204.11131},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2204.11131},
}
Figure