---
title: 'Causal SHAP: Causal Attribution in Feature Analysis'
url: https://www.emergentmind.com/topics/causal-shap
type: topic
---

# Causal SHAP: Causal Attribution in Feature Analysis

Causal SHAP denotes a family of Shapley-based attribution methods in which feature importance is interpreted through causal semantics rather than through observational association alone. In the most direct formulation, the coalition value function is changed from an observational conditional expectation to an interventional expectation, so that the contribution of a subset of features is evaluated as the expected model output under $\mathrm{do}(X_S=x_S)$ rather than under $X_S=x_S$ observed in the data [2011.01625][2509.20211]. Across the literature, the term is also used for related constructions that encode causal knowledge by restricting admissible feature orderings, assigning credit on graph edges rather than nodes, or combining SHAP with separate causal estimators such as causal forests, directed acyclic graphs, or double machine learning [2310.09961][2010.14592][2602.19841].

## 1. Conceptual basis

Standard SHAP is built from the Shapley value
\[
\phi_i(f,x)=\sum_{S\subseteq N\setminus\{i\}}\frac{|S|!(n-|S|-1)!}{n!}\big(v(S\cup\{i\};x)-v(S;x)\big),
\]
where features are the players and the value function $v(S;x)$ specifies what it means for coalition $S$ to be present [2008.05052]. In ordinary model-agnostic SHAP, $v(S;x)$ is usually observational, either through conditional expectations or through marginal imputation. The resulting attribution measures associational influence in the observed data-generating distribution, not causal effect [2008.05052][1910.13413].

Causal SHAP changes the semantics of this coalition value. A central formulation defines
\[
v_{\mathrm{do}}(S;x)=\mathbb{E}[f(X)\mid \mathrm{do}(X_S=x_S)],
\]
so the question becomes: what would the model output be if the features in $S$ were actively set to their observed values, with the rest of the system generated under the corresponding intervention [2011.01625][2509.20211]? This distinction matters because $\mathbb{E}[Y\mid X=x]$ and $\mathbb{E}[Y\mid \mathrm{do}(X=x)]$ are generally different in the presence of confounding, causal chains, colliders, or other dependencies [2008.05052][2409.06157].

A recurrent motivation is that standard SHAP can attribute importance to variables that are predictive proxies, downstream effects, or siblings of causal drivers. Several papers therefore treat causal SHAP as an attempt to distinguish “features associated with predictions” from “features whose intervention would change predictions or outcomes” [2602.19841][2509.00846].

## 2. Formal semantics

The observational and interventional value functions differ only superficially in notation but substantially in meaning. In the observational form,
\[
v_{\mathrm{obs}}(S;x)=\mathbb{E}[f(X)\mid X_S=x_S],
\]
inactive features are averaged under the observational conditional distribution [2008.05052][2310.09961]. In the interventional form,
\[
v_{\mathrm{causal}}(S;x)=\mathbb{E}[f(X)\mid \mathrm{do}(X_S=x_S)],
\]
the incoming edges into $X_S$ are cut and the remaining variables are generated according to the structural equations or the identified interventional distribution [2011.01625][2509.20211].

Within a structural causal model, each variable satisfies a structural equation
\[
X_j=g_j(\mathrm{Pa}(X_j),U_j),
\]
and an intervention replaces the relevant equation by a constant assignment [2011.01625][2010.14592]. For Markovian DAGs, the resulting post-intervention distribution can be written through truncated factorization or the $g$-formula; when backdoor adjustment is available, one may write
\[
\mathbb{E}[Y\mid \mathrm{do}(X_S=x_S)]
=
\sum_z \mathbb{E}[Y\mid X_S=x_S,Z=z]\,p(z)
\]
[2509.20211]. These formulas provide the identification target for do-based Shapley values.

One important line of work argues that, when “dropping” a feature means removing its information from the model input while leaving the remaining inputs distributed naturally, the correct value function is the unconditional or marginal one
\[
v_{\text{uncond}}(S,x)=\mathbb{E}_{X_{\bar S}}[f(x_S,X_{\bar S})],
\]
because this coincides with the interventional semantics of input deletion at the model level [1910.13413][2409.06157]. Under this view, conditional SHAP is observational rather than causal.

A different but related formal move is to keep the explained feature observational while intervening on the contextual features. cc-Shapley defines, for feature $i$,
\[
\phi_i^{cc}
=
\sum_{S\subseteq N\setminus\{i\}}
\frac{|S|!(|N|-|S|-1)!}{|N|!}
\Big(
\mathbb{E}[Y\mid X_i,\mathrm{do}(X_S)]
-
\mathbb{E}[Y\mid \mathrm{do}(X_S)]
\Big),
\]
thereby treating the context causally and the explained feature observationally [2602.20396]. This asymmetric construction is designed to avoid collider-induced spurious associations.

## 3. Major formulations

The literature does not contain a single canonical Causal SHAP estimator. It contains several families of constructions that differ in whether they modify the value function, the permutation set, the unit of attribution, or the overall workflow.

| Formulation | Core mechanism | Representative sources |
|---|---|---|
| Interventional or causal Shapley values | Replace $v(S;x)$ by $\mathbb{E}[f(X)\mid \mathrm{do}(X_S=x_S)]$ | [2011.01625][2509.20211] |
| Asymmetric Shapley Values | Restrict permutations to topological orders or precedence constraints | [2310.09961][2606.25103] |
| Shapley Flow | Assign credit to edges in a DAG and enforce boundary consistency | [2010.14592] |
| cc-Shapley | Keep explained feature observational, intervene on context features | [2602.20396] |
| PWSHAP | Target one binary variable and isolate path-wise local effects | [2306.14672] |
| Hybrid SHAP-plus-causal pipelines | Use SHAP for screening, then estimate causal effects separately | [2602.19841][2510.23817] |

Interventional causal Shapley values constitute the most direct adaptation of SHAP to Pearlian causal inference. In this line, causal SHAP preserves the usual Shapley axioms, and one can further decompose a feature’s contribution into direct and indirect effects by comparing interventions along different permutations [2011.01625]. Practical do-SHAP extends this idea to arbitrary identifiable interventional queries, replacing per-coalition estimand derivation by an estimand-agnostic structural causal model that can answer any identifiable query from a single trained model [2509.20211].

Asymmetric Shapley Values incorporate causal knowledge at the level of admissible feature orderings. Rather than averaging over all permutations, ASV averages over topological orders consistent with a DAG or precedence relation, thereby redistributing interaction effects according to the chosen order [2310.09961]. This approach is observational unless it is combined with an interventional value function; its causal content comes from the asymmetry in permutations rather than from a do-based expectation [2310.09961][2606.25103].

Shapley Flow shifts the attribution target from nodes to edges. It treats each edge in a DAG as a channel that transmits importance and derives a unique edge-credit vector from efficiency, linearity, dummy-edge, and boundary-consistency axioms [2010.14592]. This yields a conserved flow of credit through the graph and recovers node importance by summing outgoing edge attributions.

PWSHAP is a path-wise construction for a targeted binary variable, such as treatment or a sensitive attribute. It uses on-manifold Shapley values together with a user-supplied DAG to compute local path-specific effects such as mediation, confounding, and effect modification [2306.14672]. Its object is not a global additive explanation of all inputs, but a path-resolved local explanation for one designated variable.

A separate pragmatic strand uses “Causal SHAP” to describe two-stage workflows in which SHAP supplies interpretable rankings while causality is introduced by a second estimator. In unlawful insider trading, TreeSHAP ranks the drivers of an XGBoost classifier and Causal Forest tests whether top-ranked, decorrelated drivers have significant ATEs or CATEs [2602.19841]. In industrial fault detection for the Tennessee Eastman Process, standard SHAP selects a reduced feature set and multiple DAG-learning algorithms are then used to analyze fault propagation among the selected variables [2510.23817].

## 4. Theoretical disputes and misconceptions

A central controversy concerns whether standard SHAP can be read causally at all. In a Bayesian-network analysis, Shapley summands are tied to conditional dependence and independence, not to interventionist causality. The paper “Predictive and Causal Implications of using Shapley Value for Model Interpretation” concludes that there is no relationship between Shapley value and causality in general, and shows by constructive examples that a non-causal proxy can receive larger Shapley value than direct causes [2008.05052]. This result is frequently used to argue that any causal reading of SHAP requires explicit modification of the value function or of the surrounding methodology.

The most persistent debate is conditional versus marginal or interventional SHAP. One line argues that unconditional expectations provide the correct semantics for dropping features, because conditional expectations preserve observational ties between kept and dropped variables and therefore do not correspond to causal deletion [1910.13413]. “Causal Analysis of Shapley Values: Conditional vs. Marginal” strengthens this claim by arguing that the conditional approach is fundamentally unsound from a causal perspective and that the marginal approach should be preferred [2409.06157].

Another criticism focuses on collider bias and suppression. cc-Shapley shows theoretically that conventional observational Shapley values can induce spurious associations simply by placing one feature into the observational context of another. Its causal-context construction removes collider-induced attribution for d-separated features, and empirical examples report nullification or reversal of associations when moving from observational SHAP to cc-Shapley [2602.20396].

Asymmetric variants introduce a different set of issues. ASV can be attractive for root-cause analysis because it pushes shared credit toward ancestors or toward mediators, depending on the weighting scheme. However, its theoretical evaluation shows counter-intuitive behavior in v-structures, nonlinear models, and non-additive interactions; in some examples, all contribution is assigned to the later variable in the admissible order. The paper identifies generalized additive models as a restricted class in which ASV exhibits more desirable behavior [2310.09961].

These disputes do not invalidate causal SHAP as a research area. They delimit its scope. Standard SHAP remains an associational explanation of a predictive model; causal SHAP begins only when the coalitional game, the admissible permutations, or the surrounding estimator is made explicitly causal.

## 5. Estimation and computation

Exact Shapley evaluation is exponential in the number of features, and causal semantics usually add an identification or simulation problem on top of that. Practical do-SHAP addresses this by training a single parametric SCM and then answering identifiable interventional queries by sampling from the mutilated model rather than deriving a separate estimand for each coalition. It further introduces the Frontier-Reducibility Algorithm, which reduces many coalitions to irreducible subsets and, empirically, makes end-to-end do-SHAP about $10\times$ faster than computing all coalitions and about $2\times$ faster than a cache-only baseline, while preserving exponential worst-case complexity [2509.20211].

Asymmetric methods admit their own computational theory. “Beyond Shapley: Efficient Computation of Asymmetric Shapley Values” shows that exact ASV can be polynomial-time in settings where SHAP is $\#P$-hard, introduces equivalence classes over topological orderings, and provides a polynomial-time algorithm in the number of equivalence classes whenever the causal graph is a rooted directed tree. For arbitrary DAGs, it proposes approximation via uniformly sampled topological orderings [2606.25103].

When full SCM-based do-SHAP is unavailable, many papers adopt hybrid pipelines. In unlawful insider trading, the workflow is: train XGBoost on 110 variables, use TreeSHAP to rank and visualize drivers, remove multicollinearity by hierarchical clustering and iterative VIF filtering, retain features with mean absolute SHAP above $0.022$, and then estimate ATEs and CATEs by honest Causal Forest with AIPW, up to 1000 trees, maximum depth 10, honest fraction $0.8:0.2$, and significance testing at $\alpha=0.05$ [2602.19841]. In the Tennessee Eastman Process, SHAP first reduces the 52-variable space to a 10-variable subset and DAGs are then learned with PC, FCI, RFCI, LiNGAM, and NOTEARS [2510.23817]. A distinct framework combines PC for causal discovery, IDA for pathwise causal-strength estimation, graph-consistent interventional sampling for coalition values, and a causal weighting factor
\[
\gamma_i=\frac{|W_i|}{\sum_{j\in N}|W_j|}
\]
inside the Shapley kernel [2509.00846].

Retail applications illustrate a looser integration pattern. There, SHAP is used for interpretability and redundancy diagnostics, while double machine learning estimates causal effects after controlling multiple confounders; the paper explicitly cautions that SHAP values are associative or observational explanations rather than causal effects [2512.12605]. This suggests a practical taxonomy: formal Causal SHAP estimators modify the Shapley game itself, whereas hybrid workflows attach separate causal estimators to SHAP outputs.

## 6. Applications and empirical findings

In robotics, causal SHAP has been applied to deep-reinforcement-learning control of lever manipulation. The implementation uses a partial causal ordering
\[
[[\theta_{\text{target}}],[q_1,q_2,q_3],[q_4,d_x,d_z],[\theta_{\text{lever}}]]
\]
to sample descendants under intervention. In pushing and pulling events, causal SHAP assigns higher importance to the joint angles $q_1$–$q_3$, whereas KernelSHAP emphasizes the downstream pose variables $d_x$ and $d_z$; in grasping, $q_4$ becomes more important and $\theta_{\text{lever}}$ is down-weighted relative to KernelSHAP [2111.02936].

In unlawful insider trading detection, the feature space comprises 110 variables spanning governance, market microstructure, valuation, profitability, and trading attributes. On 3984 transactions, the XGBoost classifier reaches ACC $99.02\%$, TPR $99.07\%$, TNR $99.06\%$, FPR $1.02\%$, and FNR $0.93\%$. The causal-forest stage then reports statistically significant causal links for director status, price-to-book ratio, return, and market beta, with director status having a positive ATE and the others negative ATEs in the reported direction [2602.19841].

In industrial fault detection, the Tennessee Eastman Process study uses 52 variables and 20 fault types. After SHAP-based reduction to 10 variables, the MLP maintains accuracy at $0.872\pm0.006$ while improving balanced accuracy from $0.650\pm0.019$ to $0.711\pm0.027$ and AUC from $0.858\pm0.007$ to $0.869\pm0.002$. Across PC, FCI, RFCI, LiNGAM, and NOTEARS, cooling-system variables and stripper variables recur as root nodes or hubs, aligning the causal graphs with SHAP global rankings [2510.23817].

The PC-plus-IDA version of Causal SHAP reports strong synthetic results in biomedical-style benchmarks. In a lung-cancer-risk example, smoking and stress causally drive the outcome, whereas drink_coffee is correlated with the target through shared parents but has no causal path. Kernel SHAP assigns drink_coffee an attribution of $1.9514$, while Causal SHAP assigns $0.0000$ and achieves RMSE $0.0167$ against the ground-truth contributions [2509.00846].

The estimand-agnostic do-SHAP framework reports both synthetic and real-data demonstrations. On synthetic SCMs, better test log-likelihood tracks lower SHAP estimation loss. On the Diabetes dataset, High Blood Pressure, High Cholesterol, and BMI have the largest feature importance, and the do-SHAP beeswarm reveals threshold-like BMI effects. On Bike Rental, Hour dominates feature importance, and humidity above $80\%$ has a negative impact in the reported scatterplots [2509.20211].

Path-wise methods have been used for local bias and mediation analyses. On the UCI Adult dataset, PWSHAP reports a predominant local path-wise effect from Race through marital status to income of approximately $0.361$, larger than the corresponding path through capital gain. On German Credit, it identifies negative local path effects through loan amount and duration for a specific individual [2306.14672].

## 7. Limitations and frontier directions

Nearly all variants depend on causal structure that is rarely known with certainty. do-SHAP requires a graph $G$, identifiability of every queried intervention, and an SCM that fits the observational distribution; graph misspecification, model misspecification, and positivity violations are explicit sources of bias [2509.20211]. PC-plus-IDA likewise assumes causal sufficiency and faithfulness, and its linear-Gaussian sampling model may misrepresent nonlinear or discrete mechanisms [2509.00846].

Finance applications make the standard causal-inference assumptions explicit: unconfoundedness, overlap, and SUTVA are required for causal interpretation, while measurement error, simultaneity, timing misalignment, and dynamic confounding remain substantive threats even after decorrelation, cross-validation, and honest forests [2602.19841]. Industrial-process work adds that static DAGs may be inadequate for multivariate time series with delays and recycle loops, making temporal causal models a natural extension [2510.23817].

Not all causal Shapley variants preserve all classical axioms. Interventional causal Shapley values preserve efficiency, linearity, null player, and symmetry [2011.01625]. ASV explicitly relaxes symmetry [2310.09961]. cc-Shapley satisfies a strong dummy property under faithfulness but does not guarantee efficiency, because its asymmetric causal-context value function is not a symmetric set function [2602.20396].

There is also a distinction between interventional and counterfactual explanation. do-SHAP is population-level and interventional; it does not directly produce unit-level counterfactual attributions in general graphs [2509.20211]. Some newer work therefore moves toward decision-theoretic or task-specific generalizations. Rational Shapley values optimize the relevant reference class with respect to agent utilities and recover causal SHAP when the reference distribution is interventional [2106.10191]. ConfoundingSHAP defines an entirely different Shapley game over residual confounding bias rather than model output, attributing which covariates act as confounders in observational causal inference [2605.10533].

A plausible implication is that “Causal SHAP” now functions less as the name of one estimator than as the name of a research program. Its common denominator is not a single algorithm, but the insistence that feature attribution should respect interventions, causal order, or causal mechanisms whenever the explanatory question is itself causal.

Source: https://www.emergentmind.com/topics/causal-shap