Explaining the model and feature dependencies by decomposition of the Shapley value

Joran Michiels, Johan A. K. Suykens, Maarten De Vos

Abstract

Shapley values (SHAP) are a cornerstone of Explainable AI (XAI), yet their application is often complicated by a choice between two perspectives: conditional SHAP, which accounts for feature correlations, and interventional SHAP, which treats features as independent. This paper resolves this long-standing debate by decomposing the Shapley value into two distinct parts: an interventional part ($\phi_{i,int}$) explaining the model's internal logic, and a dependent part ($\phi_{i,dep}$) explaining the influence of feature dependencies. This unified framework provides a more nuanced understanding of feature importance, distinguishing between direct model effects and indirect effects driven by real-world correlations.

The "Missing Feature" Problem in XAI

To calculate a feature's contribution, SHAP compares model outputs when a feature is present versus when it is "missing." Simulating a missing feature typically follows one of two paths:

  1. Conditional SHAP: Estimates missing values based on their correlation with observed features. This explains the combined effect of the model and the data distribution.
  2. Interventional SHAP: Treats features as independent, effectively explaining the model's logic in isolation.

Users often require both insights. For instance, legal audits for bias require an interventional view to see if a model directly uses protected attributes. Conversely, medical diagnostics might favor a conditional view to understand the total risk impact of a factor, including its correlated side effects.

Methodology: A Unified Decomposition

The authors propose the decomposition: $\phi_i = \phi_{i,int} + \phi_{i,dep}$.

  • Interventional Part ($\phi_{i,int}$): Captures the direct effect of feature $i$ on the model output, satisfying the "dummy" property—if a feature is not mathematically present in the model, its attribution is zero.
  • Dependent Part ($\phi_{i,dep}$): Captures the indirect effect, showing how feature $i$ influences the model by altering the expected values of other correlated features.

This approach is implemented using a model-agnostic algorithm based on Kernel SHAP and conditional sampling, making it applicable to any distribution that can be conditionally sampled, such as Multivariate Gaussians or Gaussian Copulas.

Actionable Explanations and Intervention Guidance

A key advantage of this decomposition is its ability to guide interventions. If a user aims to change an outcome (e.g., a mayor wanting to increase median house prices), the interventional part provides a more reliable guide than the total conditional SHAP. Relying on conditional SHAP might lead to intervening on features that have no direct impact on the model but are merely correlated with influential ones.

Comparison of intervention strategies on the Boston Housing dataset. Selecting features based on the interventional perspective (blue and red lines) leads to faster improvements in the target variable compared to the conditional perspective (green line).

Enhanced Visualization: The Decomposed Force Plot

To make these insights accessible, the authors introduced a modified "force plot." This visualization splits each feature's contribution into a solid bar (interventional effect) and a faded bar (dependent effect). This allows users to see at a glance whether a feature's importance stems from the model's direct logic or from its relationship with other variables.

Enhanced force plot for the Boston Housing dataset. The plot visually separates the interventional and dependent components of each feature's attribution, clarifying why specific features like 'CRIM' or 'LSTAT' influence the model's prediction.

Key Results and Insights

  • Mathematical Consistency: For independent features, the dependent part naturally drops to zero. In linear models, the decomposition aligns perfectly with model coefficients.
  • Bias Detection: Because $\phi_{i,int}$ preserves the dummy property, it serves as a robust tool for identifying direct model bias, whereas conditional SHAP can "leak" attribution from correlated features.
  • Generalizability: The method was successfully evaluated across diverse datasets, including a toy risk model, the Boston Housing dataset, and the Algerian Forest Fires dataset.

Conclusion

By treating conditional and interventional SHAP as two sides of the same coin, this paper provides a framework that satisfies diverse user needs without forcing a choice between perspectives. While the computational cost of calculating both parts is higher than standard SHAP, the resulting clarity in "why" a feature matters offers significant value for high-stakes decision-making. Future work will focus on optimizing these calculations for high-dimensional models and conducting user studies to validate the practical utility of these decomposed explanations.

Summary updated

BibTeX
@article{michiels2024explaining,
  author = {Joran Michiels and Johan A. K. Suykens and Maarten De Vos},
  title = {{Explaining the model and feature dependencies by decomposition of the Shapley value}},
  journal = {Decis. Support Syst.},
  year = {2024},
  doi = {10.1016/j.dss.2024.114234},
}
Figure