- 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”)andattributestheshift\mu_Q - \mu_Ptoasetofchangesinsubgroupconditionalprobabilities.Thesubgroupconditionalsareselectedbasedonthesplitstructureofadecisiontreesurrogateforthemodel.</p><p>Contrarytoapproachesrelyingonjointprobabilities,whichareill−posedduetonecessaryrenormalizationandinterpretiveambiguity,operatingonconditionalprobabilitiesavoidstherenormalizationproblemandproducesmoreactionable,granularattributions.TheSVframeworkallowsthedecompositionoftheaggregateshiftintomarginalcontributions,computedbyexplicitinterventionontheconditionalprobabilities.<imgsrc="https://emergentmind−storage−cdn−c7atfsgud9cecchk.z01.azurefd.net/paper−images/2604−11200/singletreeillustrative.png"alt="Figure1"title=""class="markdown−image"loading="lazy"><pclass="figure−caption">Figure1:CalculationofSVsforsubgroupconditionalstoexplainpredictionshiftinadecisiontree.</p></p><h2class=′paper−heading′id=′exact−sv−calculation−for−decision−trees′>ExactSVCalculationforDecisionTrees</h2><p>Whenthemodelisadecisiontree,thesetofsubgroupconditionalscoincidesexactlywiththeprobabilityofeachsplitoutcome,giventhatitsparentsplitshaveoccurred.ShapShift’sSVanalysisentailsconstructingall2^{|C|}interventionalmixturesoftheconditionalprobabilitiesfromPandQ$, computing the tree'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'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://emergentmind−storage−cdn−c7atfsgud9cecchk.z01.azurefd.net/paper−images/2604−11200/ensembleexperiment.png"alt="Figure3"title=""class="markdown−image"loading="lazy"><pclass="figure−caption">Figure3:ApplicationofShapShifttoarandomforestforbreastcancermalignancyprediction.</p></p><h2class=′paper−heading′id=′model−agnostic−extension−surrogate−trees−for−arbitrary−models′>Model−AgnosticExtension:SurrogateTreesforArbitraryModels</h2><p>Forblackboxmodels,ShapShiftgrowsasurrogatedecisiontreetoapproximatetheinput−outputrelationshipofthetargetmodelonbothPandQ.Standardtreesplittingcriteria(e.g.,Giniimpurity)arefoundtobemisalignedwiththeobjectiveofmaximizingexplanatorypowerforpredictionshift.ShapShiftthereforeintroducesanovelimpuritymeasure,designedasaproxyforminimizingthe“PercentUnexplained”.Empirically,thisoptimizedsplittingcriterionproducessurrogatesforwhichtheSV−basedexplanationscapturethevastmajorityofmodelshift,whilesurrogatesgrownwithstandardcriterialeavemostshiftunexplained.<imgsrc="https://emergentmind−storage−cdn−c7atfsgud9cecchk.z01.azurefd.net/paper−images/2604−11200/modelagnosticexperiment.png"alt="Figure4"title=""class="markdown−image"loading="lazy"><pclass="figure−caption">Figure4:Comparisonofnaiveandoptimizedsplitcriteriaforsurrogategrowth.</p></p><h2class=′paper−heading′id=′empirical−validation−and−comparative−analysis′>EmpiricalValidationandComparativeAnalysis</h2><p>Extensiveevaluationisconductedonhundredsofreal−worlddistributionshiftsinUSCensus−basedbenchmarks(Folktables).ShapShiftexplainspredictionshiftsfromtree−basedandneuralmodels,maintaininglowPercentUnexplained(<6\%medianacrossalltestedmodels),runtimeefficiency,andhighfaithfulness(medianR−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: 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:
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: 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)