Papers
Topics
Authors
Recent
Search
2000 character limit reached

ShapShift: Explaining Model Prediction Shifts with Subgroup Conditional Shapley Values

Published 13 Apr 2026 in cs.LG, cs.AI, and stat.ML | (2604.11200v1)

Abstract: Changes in input distribution can induce shifts in the average predictions of machine learning models. Such prediction shifts may impact downstream business outcomes (e.g. a bank's loan approval rate), so understanding their causes can be crucial. We propose \ours{}: a Shapley value method for attributing prediction shifts to changes in the conditional probabilities of interpretable subgroups of data, where these subgroups are defined by the structure of decision trees. We initially apply this method to single decision trees, providing exact explanations based on conditional probability changes at split nodes. Next, we extend it to tree ensembles by selecting the most explanatory tree and accounting for residual effects. Finally, we propose a model-agnostic variant using surrogate trees grown with a novel objective function, allowing application to models like neural networks. While exact computation can be intensive, approximation techniques enable practical application. We show that \ours{} provides simple, faithful, and near-complete explanations of prediction shifts across model classes, aiding model monitoring in dynamic environments.

Summary

  • The paper introduces a method to decompose prediction shifts into subgroup conditional contributions using Shapley values.
  • It employs decision tree structures to calculate conditional probabilities, ensuring complete, interpretable, and efficient explanations.
  • Empirical results confirm high attribution faithfulness, low unexplained variance (<6%), and significant runtime improvements over comparator methods.

ShapShift: Explaining Model Prediction Shifts with Subgroup Conditional Shapley Values

Overview

ShapShift introduces a methodology for attributing changes in model mean predictions under distribution shift to interpretable changes in input data, using Shapley values (SVs) calculated over subgroup conditional probabilities defined by decision tree structures. The approach provides a rigorous framework for decomposing prediction shift into conditional contributions, quantifies explanatory completeness, and supports both tree-based and black box (via surrogates) models. Comprehensive empirical analyses establish the utility, faithfulness, and computational practicality of the method.

Attributing Prediction Shift via Subgroup Conditionals

ShapShift addresses the central problem of explaining why a machine learning model’s mean prediction shifts under input distribution drift, an issue with strong implications for model deployment, audit, and downstream impact. The method defines interpretable subgroups (e.g., “probability individual is employed”, “probability income $\leq \$50kconditionedonemployment)andattributestheshiftconditioned on employment”) and attributes the shift\mu_Q - \mu_Ptoasetofchangesinsubgroupconditionalprobabilities.Thesubgroupconditionalsareselectedbasedonthesplitstructureofadecisiontreesurrogateforthemodel.</p><p>Contrarytoapproachesrelyingonjointprobabilities,whichareillposedduetonecessaryrenormalizationandinterpretiveambiguity,operatingonconditionalprobabilitiesavoidstherenormalizationproblemandproducesmoreactionable,granularattributions.TheSVframeworkallowsthedecompositionoftheaggregateshiftintomarginalcontributions,computedbyexplicitinterventionontheconditionalprobabilities.<imgsrc="https://emergentmindstoragecdnc7atfsgud9cecchk.z01.azurefd.net/paperimages/260411200/singletreeillustrative.png"alt="Figure1"title=""class="markdownimage"loading="lazy"><pclass="figurecaption">Figure1:CalculationofSVsforsubgroupconditionalstoexplainpredictionshiftinadecisiontree.</p></p><h2class=paperheadingid=exactsvcalculationfordecisiontrees>ExactSVCalculationforDecisionTrees</h2><p>Whenthemodelisadecisiontree,thesetofsubgroupconditionalscoincidesexactlywiththeprobabilityofeachsplitoutcome,giventhatitsparentsplitshaveoccurred.ShapShiftsSVanalysisentailsconstructingall to a set of changes in subgroup conditional probabilities. The subgroup conditionals are selected based on the split structure of a decision tree surrogate for the model.</p> <p>Contrary to approaches relying on joint probabilities, which are ill-posed due to necessary renormalization and interpretive ambiguity, operating on conditional probabilities avoids the renormalization problem and produces more actionable, granular attributions. The SV framework allows the decomposition of the aggregate shift into marginal contributions, computed by explicit intervention on the conditional probabilities. <img src="https://emergentmind-storage-cdn-c7atfsgud9cecchk.z01.azurefd.net/paper-images/2604-11200/single_tree_illustrative.png" alt="Figure 1" title="" class="markdown-image" loading="lazy"> <p class="figure-caption">Figure 1: Calculation of SVs for subgroup conditionals to explain prediction shift in a decision tree.</p></p> <h2 class='paper-heading' id='exact-sv-calculation-for-decision-trees'>Exact SV Calculation for Decision Trees</h2> <p>When the model is a decision tree, the set of subgroup conditionals coincides exactly with the probability of each split outcome, given that its parent splits have occurred. ShapShift’s SV analysis entails constructing all 2^{|C|}interventionalmixturesoftheconditionalprobabilitiesfrom interventional mixtures of the conditional probabilities from Pand and Q$, computing the tree&#39;s mean prediction under each, and averaging the differences attributable to each conditional via the Shapley formula.</p> <p>This approach provides <strong>complete, lossless explanations</strong>—the sum of SVs across the tree split conditionals exactly equals the observed shift in mean prediction.</p> <h2 class='paper-heading' id='extension-to-tree-ensembles-quantifying-and-minimizing-unexplained-components'>Extension to Tree Ensembles: Quantifying and Minimizing Unexplained Components</h2> <p>For ensembles (random forests, gradient boosted trees), conditional probabilities of a single tree are insufficient to fully explain the ensemble&#39;s prediction shift due to residual effects originating from heterogeneity across trees. ShapShift extends its analysis by introducing an “unexplained” SV term, capturing the component of the shift not attributable to the conditionals of the tree under analysis. ShapShift selects the ensemble member minimizing the relative unexplained term, maximizing explanatory completeness. <img src="https://emergentmind-storage-cdn-c7atfsgud9cecchk.z01.azurefd.net/paper-images/2604-11200/ensemble_illustrative.png" alt="Figure 2" title="" class="markdown-image" loading="lazy"> <p class="figure-caption">Figure 2: SV analysis of one member of a tree ensemble to explain ensemble-wide prediction shift, including an unexplained term to quantify the degree of incompleteness.</p></p> <p>Application to real data (e.g., breast cancer malignancy prediction) demonstrates that the selected tree typically captures the vast majority of the ensemble shift, with residual unexplained share often $<1\%.<imgsrc="https://emergentmindstoragecdnc7atfsgud9cecchk.z01.azurefd.net/paperimages/260411200/ensembleexperiment.png"alt="Figure3"title=""class="markdownimage"loading="lazy"><pclass="figurecaption">Figure3:ApplicationofShapShifttoarandomforestforbreastcancermalignancyprediction.</p></p><h2class=paperheadingid=modelagnosticextensionsurrogatetreesforarbitrarymodels>ModelAgnosticExtension:SurrogateTreesforArbitraryModels</h2><p>Forblackboxmodels,ShapShiftgrowsasurrogatedecisiontreetoapproximatetheinputoutputrelationshipofthetargetmodelonboth. <img src="https://emergentmind-storage-cdn-c7atfsgud9cecchk.z01.azurefd.net/paper-images/2604-11200/ensemble_experiment.png" alt="Figure 3" title="" class="markdown-image" loading="lazy"> <p class="figure-caption">Figure 3: Application of ShapShift to a random forest for breast cancer malignancy prediction.</p></p> <h2 class='paper-heading' id='model-agnostic-extension-surrogate-trees-for-arbitrary-models'>Model-Agnostic Extension: Surrogate Trees for Arbitrary Models</h2> <p>For black box models, ShapShift grows a surrogate decision tree to approximate the input-output relationship of the target model on both Pand and Q.Standardtreesplittingcriteria(e.g.,Giniimpurity)arefoundtobemisalignedwiththeobjectiveofmaximizingexplanatorypowerforpredictionshift.ShapShiftthereforeintroducesanovelimpuritymeasure,designedasaproxyforminimizingthePercentUnexplained.Empirically,thisoptimizedsplittingcriterionproducessurrogatesforwhichtheSVbasedexplanationscapturethevastmajorityofmodelshift,whilesurrogatesgrownwithstandardcriterialeavemostshiftunexplained.<imgsrc="https://emergentmindstoragecdnc7atfsgud9cecchk.z01.azurefd.net/paperimages/260411200/modelagnosticexperiment.png"alt="Figure4"title=""class="markdownimage"loading="lazy"><pclass="figurecaption">Figure4:Comparisonofnaiveandoptimizedsplitcriteriaforsurrogategrowth.</p></p><h2class=paperheadingid=empiricalvalidationandcomparativeanalysis>EmpiricalValidationandComparativeAnalysis</h2><p>ExtensiveevaluationisconductedonhundredsofrealworlddistributionshiftsinUSCensusbasedbenchmarks(Folktables).ShapShiftexplainspredictionshiftsfromtreebasedandneuralmodels,maintaininglowPercentUnexplained(. Standard tree splitting criteria (e.g., Gini impurity) are found to be misaligned with the objective of maximizing explanatory power for prediction shift. ShapShift therefore introduces a novel impurity measure, designed as a proxy for minimizing the “PercentUnexplained”. Empirically, this optimized splitting criterion produces surrogates for which the SV-based explanations capture the vast majority of model shift, while surrogates grown with standard criteria leave most shift unexplained. <img src="https://emergentmind-storage-cdn-c7atfsgud9cecchk.z01.azurefd.net/paper-images/2604-11200/model_agnostic_experiment.png" alt="Figure 4" title="" class="markdown-image" loading="lazy"> <p class="figure-caption">Figure 4: Comparison of naive and optimized split criteria for surrogate growth.</p></p> <h2 class='paper-heading' id='empirical-validation-and-comparative-analysis'>Empirical Validation and Comparative Analysis</h2> <p>Extensive evaluation is conducted on hundreds of real-world distribution shifts in US Census-based benchmarks (Folktables). ShapShift explains prediction shifts from tree-based and neural models, maintaining low PercentUnexplained (<6\%medianacrossalltestedmodels),runtimeefficiency,andhighfaithfulness(medianRFaithfulness median across all tested models), runtime efficiency, and high faithfulness (median R-Faithfulness >0.998$).

The Shapley value distributions typically display low entropy, indicating parsimonious explanations dominated by a small subset of subgroup conditionals. The activation curve analysis and correlation-based faithfulness metrics further confirm that the assigned SVs robustly reflect each conditional's true causal influence on the mean prediction shift. Figure 5

Figure 5: Aggregated performance metrics of ShapShift on 250 shifts across five Folktables datasets.

Comparison to Optimal Transport-Based Baselines

Direct comparison with OT-based methods ([Kulinski & Inouye, 2023]) modified for model-focused attribution reveals that ShapShift consistently achieves:

  • An order-of-magnitude lower runtime
  • Lower PercentUnexplained
  • Higher attribution faithfulness (by R-Faithfulness and AUAC metrics)
  • More compact (lower-entropy, semantically-interpretable) attributions Figure 6

    Figure 6: Quantitative comparison of ShapShift to adapted OT baselines on Folktables data.

Scalability and Approximation Strategies

To deal with trees with a large number of splits, ShapShift leverages sampling-based KernelSHAP for SV estimation and an impurity-driven pruning procedure to approximate explanations using smaller surrogate trees. Both approaches maintain explanation quality and completeness, as shown by negligible change in SV rankings and minimal increase in unexplained share, while reducing computation time by orders of magnitude.

Theoretical Implications and Failure Modes

The method maintains the axiomatic strengths of the SV framework—efficiency, symmetry, linearity, and null-player. By explicitly exposing and quantifying residual (unexplained) contributions, it provides a diagnostic on the completeness of its explanations. Occasional explanation failures can occur if conditional probabilities are undefined, but these are mitigated by the design of surrogate growth.

The approach’s causal interpretation follows naturally from the mapping between tree structure and conditional dependencies, allowing attributions to be viewed as interventions in an induced causal graph. Figure 7

Figure 7: Interpretation of ShapShift as interventions on a causal graph.

An important caveat is that in the model-agnostic setting, surrogates may attribute importance to conditionals not used by the true model, but the included faithfulness metrics robustly detect such misalignment.

Conclusion

ShapShift establishes a practical and theoretically sound methodology for attributing model prediction shifts to data distributional changes, producing interpretable and mostly-complete attributions via subgroup conditional Shapley values. The approach is applicable to complex ensembles and black box models, scalable via approximation, and robustly outperforms state-of-the-art alternatives in faithfulness and informativeness. Outstanding challenges include extending the framework to non-tabular modalities and integrating richer domain causal structure.


Reference:

"ShapShift: Explaining Model Prediction Shifts with Subgroup Conditional Shapley Values" (2604.11200)

Paper to Video (Beta)

No one has generated a video about this paper yet.

Whiteboard

No one has generated a whiteboard explanation for this paper yet.

Open Problems

We haven't generated a list of open problems mentioned in this paper yet.

Collections

Sign up for free to add this paper to one or more collections.