Causal Shapley Values: Exploiting Causal Knowledge to Explain Individual Predictions of Complex Models

Tom Heskes, Evi Sijben, Ioan Gabriel Bucur, Tom ClaassenNeurIPS 2020

In the realm of Explainable AI (XAI), Shapley values have become the gold standard for attributing a model's prediction to its input features. However, standard implementations often stumble when features are highly correlated because they ignore the underlying causal structure of the data.

This paper introduces Causal Shapley Values, a framework that leverages Judea Pearl’s do-calculus to provide explanations that distinguish between direct and indirect effects. By doing so, it offers a more intuitive and "human-like" understanding of complex model predictions.

The Problem with Standard Shapley Values

Most Shapley value implementations, such as Marginal SHAP, assume that features are independent. When features are highly correlated—for example, "Season" and "Temperature"—this assumption breaks down.

Imagine a model predicting high bike rentals based on temperature. A standard explanation might give all the credit to "Temperature" and none to "Season." But humans intuitively understand that the season causes the temperature. Existing "Conditional" or "Asymmetric" Shapley approaches attempt to fix this by looking at correlations, but they often fail to distinguish between different causal structures (e.g., a "fork" where one cause has two effects versus a "chain" where one cause leads to another). To truly explain a prediction, we must account for the generative causal process of the data itself.

Methods: Interventional Conditioning

The authors propose a novel value function for Shapley values based on interventional conditioning. Instead of asking, "What is the prediction given we observed these features?", they ask, "What is the prediction if we actively set (intervene on) these features?"

Key technical components of this approach include:

  1. Interventional Value Function: Defined as $v(S) = E[f(X) | do(X_S = x_S)]$, this measures the average prediction if we were to force the features in subset $S$ to specific values.
  2. Causal Chain Graphs: Recognizing that a full causal Directed Acyclic Graph (DAG) is rarely available, the authors propose using "causal chain graphs." This allows practitioners to provide a partial ordering of features (e.g., "Time" comes before "Weather") without needing to map every single interaction.
  3. Direct vs. Indirect Effects: The framework decomposes the total causal Shapley value into a "direct" contribution (the feature's immediate impact on the model) and an "indirect" contribution (the impact it has by influencing other features).
Comparison of causal structures (Chain, Fork, Confounder, Cycle) and how different Shapley value formulations handle them.

Key Insights and Results

The paper demonstrates the superiority of Causal Shapley values using both synthetic causal models and real-world data.

Synthetic Causal Models

Using four toy models (Chain, Fork, Confounder, and Cycle), the authors prove that Causal Shapley values correctly identify "root causes" where other methods fail. For instance, while "Conditional SHAP" treats a "Fork" and a "Confounder" identically, Causal Shapley values correctly distinguish between them. This ensures that interventions on an effect don't erroneously "cause" a change in the root variable.

Real-World Application: Bike Rentals

The authors applied their method to a real-world bike rental dataset from Washington D.C., which includes date-related variables (trend, season) and weather variables (temperature, humidity).

Causal Shapley values applied to the Bike Rental dataset, highlighting the impact of root causes like season (cosyear) alongside direct features like temperature.

On this dataset, Marginal SHAP attributed almost all prediction variance to "Temperature." In contrast, Causal Shapley Values correctly identified "Season" (specifically the cosyear variable) as a major contributor, recognizing its role as the driver of temperature. In a causal chain (Season $\rightarrow$ Temperature $\rightarrow$ Rentals), Causal Shapley values can attribute credit to the "Season" even if the model primarily relies on "Temperature." This aligns much better with how humans assign responsibility.

Furthermore, the authors showed that their interventional formula can be integrated into existing computationally efficient frameworks like KernelSHAP and TreeExplainer.

Limitations and Future Work

While Causal Shapley Values offer a significant step forward, there are practical hurdles:

  • Knowledge Requirement: The user must provide at least a partial causal ordering. If the assumed causal structure is wrong, the resulting explanations will be misleading.
  • Computational Cost: Computing conditional expectations is significantly more expensive than the marginal expectations used in basic SHAP. Even with proposed optimizations, it remains a heavy lift for very high-dimensional datasets.
  • User Studies: The authors claim these explanations are more "intuitive," but they note that future work should include formal user studies to confirm that practitioners actually find these causal explanations more helpful in real-world decision-making.

Summary updated

BibTeX
@inproceedings{heskes2020causal,
  author = {Tom Heskes and Evi Sijben and Ioan Gabriel Bucur and Tom Claassen},
  title = {{Causal Shapley Values: Exploiting Causal Knowledge to Explain Individual Predictions of Complex Models}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2020},
}
Figure