Skip to main content
QUICK REVIEW

[Paper Review] Data Debugging with Shapley Importance over End-to-End Machine Learning Pipelines

Bojan Karlaš, David Dao|arXiv (Cornell University)|Apr 23, 2022
Machine Learning and Data ClassificationComputer Science7 citations
TL;DR

This paper introduces DataScope, the first system to efficiently compute Shapley values for training examples in end-to-end machine learning pipelines. By modeling pipelines as 'canonical pipelines'—a relational algebra query followed by a KNN classifier—it achieves PTIME complexity for many subfamilies, enabling up to four orders of magnitude speedup over Monte Carlo methods while maintaining or improving data debugging effectiveness.

ABSTRACT

Developing modern machine learning (ML) applications is data-centric, of which one fundamental challenge is to understand the influence of data quality to ML training -- "Which training examples are 'guilty' in making the trained ML model predictions inaccurate or unfair?" Modeling data influence for ML training has attracted intensive interest over the last decade, and one popular framework is to compute the Shapley value of each training example with respect to utilities such as validation accuracy and fairness of the trained ML model. Unfortunately, despite recent intensive interest and research, existing methods only consider a single ML model "in isolation" and do not consider an end-to-end ML pipeline that consists of data transformations, feature extractors, and ML training. We present DataScope (ease.ml/datascope), the first system that efficiently computes Shapley values of training examples over an end-to-end ML pipeline, and illustrate its applications in data debugging for ML training. To this end, we first develop a novel algorithmic framework that computes Shapley value over a specific family of ML pipelines that we call canonical pipelines: a positive relational algebra query followed by a K-nearest-neighbor (KNN) classifier. We show that, for many subfamilies of canonical pipelines, computing Shapley value is in PTIME, contrasting the exponential complexity of computing Shapley value in general. We then put this to practice -- given an sklearn pipeline, we approximate it with a canonical pipeline to use as a proxy. We conduct extensive experiments illustrating different use cases and utilities. Our results show that DataScope is up to four orders of magnitude faster over state-of-the-art Monte Carlo-based methods, while being comparably, and often even more, effective in data debugging.

Motivation & Objective

  • To address the lack of scalable, end-to-end data importance computation in modern ML pipelines that include data transformations and feature extractors.
  • To enable efficient and precise data debugging by computing Shapley values over complete ML pipelines rather than isolated models.
  • To bridge relational data provenance theory with modern ML pipelines through a tractable algorithmic framework.
  • To demonstrate that Shapley value computation over canonical pipelines is in PTIME for many subfamilies, contrasting the exponential complexity in general cases.
  • To provide a practical system, DataScope, that approximates real sklearn pipelines with canonical pipelines for efficient data importance analysis.

Proposed method

  • The authors define a class of pipelines called 'canonical pipelines', consisting of a positive relational algebra query followed by a KNN classifier.
  • They prove that for many subfamilies of canonical pipelines, Shapley value computation is in PTIME, avoiding the exponential complexity of general cases.
  • The system approximates real sklearn pipelines by transforming them into canonical pipelines using feature engineering and model proxying.
  • DataScope leverages data provenance and knowledge compilation techniques to trace training example influence through the pipeline.
  • It uses a proxy model (KNN) to efficiently estimate Shapley values, enabling scalable computation over large datasets.
  • The framework integrates with existing ML workflows via lightweight instrumentation, supporting end-to-end pipeline debugging.

Experimental results

Research questions

  • RQ1Can Shapley value computation over end-to-end ML pipelines be made tractable despite the exponential complexity in general?
  • RQ2What class of ML pipelines allows for polynomial-time Shapley value computation while preserving utility for data debugging?
  • RQ3How can real-world sklearn pipelines be effectively approximated by canonical pipelines to enable efficient data importance analysis?
  • RQ4To what extent can Shapley-based data importance computed over canonical pipelines improve data debugging over state-of-the-art Monte Carlo methods?
  • RQ5Can data provenance and relational algebra be effectively combined with ML pipeline analysis to enable scalable, explainable data debugging?

Key findings

  • DataScope achieves up to four orders of magnitude speedup over state-of-the-art Monte Carlo-based Shapley value computation methods.
  • For many subfamilies of canonical pipelines, Shapley value computation is in PTIME, enabling efficient exact computation where general cases are intractable.
  • The system demonstrates comparable or superior effectiveness in data debugging compared to Monte Carlo baselines, particularly in identifying problematic training examples.
  • Approximating real sklearn pipelines with canonical pipelines preserves the fidelity of data importance rankings, enabling practical deployment.
  • The integration of data provenance and knowledge compilation enables scalable, end-to-end influence analysis across feature extraction and model training stages.
  • Empirical evaluation confirms that Shapley values computed via DataScope effectively identify data quality issues such as noisy or biased examples.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.