Abstract
Machine learning models frequently experience performance drops under distribution shifts. The underlying cause of such shifts may be multiple simultaneous factors such as changes in data quality, differences in specific covariate distributions, or changes in the relationship between label and features. When a model does fail during deployment, attributing performance change to these factors is critical for the model developer to identify the root cause and take mitigating actions. In this work, we introduce the problem of attributing performance differences between environments to distribution shifts in the underlying data generating mechanisms. We formulate the problem as a cooperative game where the players are distributions. We define the value of a set of distributions to be the change in model performance when only this set of distributions has changed between environments, and derive an importance weighting method for computing the value of an arbitrary set of distributions. The contribution of each distribution to the total performance change is then quantified as its Shapley value. We demonstrate the correctness and utility of our method on synthetic, semi-synthetic, and real-world case studies, showing its effectiveness in attributing performance changes to a wide range of distribution shifts.
Introduction
Machine learning models are notorious for failing when deployed in environments different from their training data. However, "distribution shift" is a broad term that encompasses various phenomena: input features might change (covariate shift), the relationship between features and labels might change (concept drift), or both might occur simultaneously.
Critically, not all shifts impact model performance equally. A massive shift in a variable the model ignores won't affect performance, while a tiny shift in a critical feature might cause a total collapse. Existing diagnostic tools often focus on measuring how much the data changed overall, but they fail to explain how much each specific change contributed to the performance drop. This work addresses this gap by providing a "root cause analysis" framework to help developers decide whether to collect more data, perform data augmentation, or retrain their models.
Methodology
The authors propose a principled method to attribute performance changes to individual components of the data-generating process by combining causal modeling with game theory.
- Causal Factorization: The data-generating process is represented by a Directed Acyclic Graph (DAG). This allows the joint distribution to be broken down into independent "mechanisms" (conditional distributions for each variable given its parents).
- The Attribution Game: The problem is framed as a cooperative game where each causal mechanism is a "player." The "value" of the game is the total change in model performance (e.g., a drop in accuracy or an increase in Brier score).
- Shapley Values: To fairly distribute the "blame" among the mechanisms, the framework uses Shapley values. This game-theoretic approach accounts for the fact that multiple shifts might interact non-linearly to degrade performance.
- Importance Weighting: To estimate what the model's performance would have been if only a subset of mechanisms had shifted, the authors use an importance weighting technique. This allows them to simulate "counterfactual" environments using only the available source and target data.
Experimental Evaluation
The method was validated across several domains to demonstrate its accuracy and actionability:
- Synthetic and Semi-synthetic Data: In controlled setups like ColoredMNIST and CelebA, the method correctly identified known shifts. In CelebA experiments with multiple simultaneous random shifts, the method identified ground-truth perturbed mechanisms with approximately 90% accuracy.
- eICU (Mortality Prediction): Using real-world clinical data, the authors simulated a shift in hospital regions (Midwest to South). The model's Brier score worsened by 0.0366. The method attributed 0.0108 of that shift specifically to the "Age" distribution. By augmenting training data with more samples from the underrepresented age group, the performance gap was reduced by 36.6%.
- Camelyon17 (Tumor Detection): Analysis of histopathology images revealed that performance drops were almost entirely due to covariate shift ($P(X)$) rather than concept shift ($P(Y|X)$). This insight suggests that unsupervised domain adaptation is the most appropriate mitigation strategy for this specific dataset.
Key Insights
- Performance-Centric Attribution: The paper emphasizes that attributing a shift in the joint distribution is not the same as attributing a shift in model performance. This method specifically targets the latter, ignoring shifts that are irrelevant to the model's logic.
- Actionability: The attribution is "actionable." Identifying the specific mechanism responsible for failure allows for targeted interventions, such as specific data augmentation.
- Signed Attributions: Unlike metrics like KL-divergence, these attributions are signed. A shift can have a negative attribution, meaning that specific change actually helped the model's performance, even if the overall performance dropped.
- The Necessity of Causal Knowledge: The authors demonstrate that without a causal graph, the attribution problem is ill-posed. The graph provides the necessary structure to define what the "players" (mechanisms) actually are.
Limitations and Future Work
The primary limitation is the requirement of a known causal DAG, which can be difficult to obtain for complex real-world data. Additionally, the current framework assumes all relevant variables are observed; dealing with unobserved confounders remains a challenge. Finally, calculating exact Shapley values is computationally expensive for very high-dimensional causal structures, requiring approximation methods.
Summary updated