Explainable artificial intelligence promises to yield insights into relevant features, thereby enabling humans to examine and scrutinize machine learning models or even facilitating scientific discovery. Considering the widespread technique of Shapley values, we find that purely data-driven operationalization of multivariate feature importance is unsuitable for such purposes. Even for simple problems with two features, spurious associations due to collider bias and suppression arise from considering one feature only in the observational context of the other, which can lead to misinterpretations. Causal knowledge about the data-generating process is required to identify and correct such misleading feature attributions. We propose cc-Shapley (causal context Shapley), an interventional modification of conventional observational Shapley values leveraging knowledge of the data's causal structure, thereby analyzing the relevance of a feature in the causal context of the remaining features. We show theoretically that this eradicates spurious association induced by collider bias. We compare the behavior of Shapley and cc-Shapley values on various, synthetic, and real-world datasets. We observe nullification or reversal of associations compared to univariate feature importance when moving from observational to cc-Shapley.
Figures & tables
Figure 1: Causal graph for Example 1.1 (top), together with the according results for conventional Shapley values ( 1 ) (bottom - left) and the cc-Shapley values ( 6 ) (bottom - right). Experimental details are in Appendix D.1 .
Paths τ between Xj and Y
…∣Xk
do(Xk)
→Xk→ exists on τ
✗ or ✓ ⇒ ✗
✗ or ✓ ⇒ ✗
←Xk→ exists on τ
✗ or ✓ ⇒ ✗
✗ or ✓ ⇒ ✗
→Xk← exists on τ
✗ ⇒ ✗ or ✓
✗ ⇒ ✗
→C← exists on τ and Xk∈/τ,C∈an(Xk)
✗ ⇒ ✗ or ✓
✗ ⇒ ✗
None of the above
no effect
no effect
Table 1: Change in the state of being blocked ( ✗ ) or unblocked ( ✓ ) for paths between feature Xj and target Y when conditioning (middle column) or intervening (right column) on Xk . ” ✗ or ✓ ” means that the path is potentially unblocked - depending on other path details. Conditioning on Xk potentially unblocks previously blocked paths, which can lead to collider bias (cells marked in red). This is avoided by causal interventions do(Xk) .
Figure 2: Comparison of the regression coefficients bX1∣X2 (left) and bX1∣do(X2) (right) with bX1 for randomly sampled linear SCMs with 9 variables. The color encodes the extent to which X2 acts as collider, cf. Appendix D.2 .
Figure 3: Shapley (left) and cc-Shapley (right) values for the nonlinear diabetes example considered in Section 4 .
Figure 4: Various terms arising in the computation of the conventional observational Shapley values ( 1 ) and the cc-Shapley values ( 6 ) for the (more complex) diabetes example introduced in Section 4 . The upper row shows (with standard error) the context-free univariate term that coincides for ( 1 ) and ( 6 ).
Figure 5: Causal graphs for two datasets used in Section 4 . For the diabetes example (left) the meaning of the variables are: blood glucose G , average sugar H , BMI B and presence of type 2 diabetes Y (target). For the example from Sachs et al. [2005] (right) the variables are various proteins with known causal graph. The protein PKA is here chosen as target.
Figure 6: Some results of the univariate important measure I∅ and the Shapley and cc-Shapley values for the data from Sachs et al. [2005] . Only a subset of the proteins shown in the causal graph 5(b) are depicted here. The results for all proteins are contained in Appendix D.4 .
Appendix figures & tables7 assets
Supplementary material from the paper’s appendix.
Appendix
Figure 7: Causal Shapley values as proposed by Heskes et al. [2020] evaluated for the running Example 1.1 .
Figure 8: Simple cases of causal (left) and anti-causal (right) mediation between X and Y through M on which asymmetric Shapley values show inconsistent behavior.
Figure 9: Plot of all objects arising in the computation of the conventional Shapley values ( 1 ) for Example 1.1 .
Figure 10: Plot of all objects arising in the computation of the cc-Shapley values ( 6 ) for Example 1.1 .
Figure 11: Plot of all objects with no or univariate context arising in the computation of the conventional Shapley values ( 1 ) for the SCM ( 32 ).
Figure 12: Plot of all objects with no or univariate context arising in the computation of the cc-Shapley values ( 6 ) for the SCM ( 32 ).
Figure 13: Left : univariate importance of all proteins considered in the experiment with the data from Sachs et al. [2005] . Standard errors (computed from 5 repetitions) are shown by shaded areas but are very small. Right : Shapley values and cc-Shapley values for all considered proteins.