[Paper Review] Debugging Machine Learning Tasks
This paper proposes Psi, a tool that uses Pearl’s causality framework—specifically the Probability of Sufficiency (PS) score—to automatically identify mislabeled training data points responsible for misclassifications in machine learning models. By modeling PS computation as a probabilistic program and leveraging gray-box abstractions of learning algorithms, Psi efficiently ranks root causes of errors without full retraining, successfully debugging data faults in real-world datasets.
Unlike traditional programs (such as operating systems or word processors) which have large amounts of code, machine learning tasks use programs with relatively small amounts of code (written in machine learning libraries), but voluminous amounts of data. Just like developers of traditional programs debug errors in their code, developers of machine learning tasks debug and fix errors in their data. However, algorithms and tools for debugging and fixing errors in data are less common, when compared to their counterparts for detecting and fixing errors in code. In this paper, we consider classification tasks where errors in training data lead to misclassifications in test points, and propose an automated method to find the root causes of such misclassifications. Our root cause analysis is based on Pearl's theory of causation, and uses Pearl's PS (Probability of Sufficiency) as a scoring metric. Our implementation, Psi, encodes the computation of PS as a probabilistic program, and uses recent work on probabilistic programs and transformations on probabilistic programs (along with gray-box models of machine learning algorithms) to efficiently compute PS. Psi is able to identify root causes of data errors in interesting data sets.
Motivation & Objective
- To address the growing challenge of debugging machine learning models when failures stem from errors in training data rather than code or hyperparameters.
- To develop an automated method for identifying the root causes of misclassifications in test data, specifically pinpointing faulty training instances.
- To apply counterfactual causality—particularly Pearl’s Probability of Sufficiency (PS)—to quantify the causal influence of individual training points on model errors.
- To overcome the high computational cost of retraining models for every counterfactual label flip by using gray-box abstractions and program transformations.
- To enable scalable, efficient root cause analysis in real-world datasets where training data errors are common and hard to detect
Proposed method
- Model the computation of the Probability of Sufficiency (PS) score as a probabilistic program to enable efficient inference and optimization.
- Use a gray-box model of the machine learning algorithm that captures key intermediate values during training, allowing fast approximation of model behavior after label flips without full retraining.
- Apply program transformations to share computation across multiple PS score computations, amortizing the cost of model retraining across different training points.
- Leverage recent advances in probabilistic programming and inference to efficiently compute PS scores over counterfactual worlds where training labels are altered.
- Instrument the training process to collect profiling data that enables accurate model re-estimation under label perturbations.
- Rank training points by their PS score to identify the most likely root causes of test misclassifications
Experimental results
Research questions
- RQ1Which training data points are the most likely root causes of a model’s misclassification on a given test point?
- RQ2How can we efficiently compute the Probability of Sufficiency (PS) score for each training point without performing full model retraining for each counterfactual?
- RQ3Can gray-box abstractions of machine learning algorithms be used to approximate model behavior under label perturbations with sufficient accuracy for root cause analysis?
- RQ4To what extent can program transformations and probabilistic programming techniques reduce the computational cost of PS computation across multiple training points?
- RQ5Can this approach scale to real-world datasets with thousands of training points and detect meaningful data errors that lead to model failures?
Key findings
- Psi successfully identifies mislabeled training instances that are the root causes of model misclassifications in real-world datasets, demonstrating practical applicability.
- The use of gray-box models enables accurate approximation of model behavior after label flips, reducing the need for expensive full retraining.
- By modeling PS computation as a probabilistic program, Psi enables efficient inference and reuse of intermediate computation across multiple training points.
- The tool achieves significant performance improvements through shared computation and program transformations, making PS-based root cause analysis scalable.
- Psi is able to debug data errors in datasets with thousands of points, showing promise for real-world deployment despite current limitations in scaling to industrial-scale data
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.