Causal SHAP is an interventional feature attribution method that computes Shapley values by respecting a known causal graph of the data-generating process. Unlike standard SHAP, which may break or preserve feature correlations based on observational or interventional formulations, Causal SHAP explicitly models the asymmetric causal relationships between variables. It restricts the sampling of background data to respect the partial ordering defined by the directed acyclic graph, ensuring that an effect is never attributed to a feature that is causally downstream of it.
Glossary
Causal SHAP

What is Causal SHAP?
Causal SHAP extends the SHAP framework by incorporating a causal graph to compute feature attributions that respect the underlying causal structure of the data, distinguishing between direct and indirect effects.
This approach decomposes a prediction into direct and indirect causal effects, providing a more faithful explanation of the model's behavior under real-world interventions. By conditioning only on a feature's causal parents rather than all correlated features, Causal SHAP avoids the spurious attribution that can occur when confounders are present. This makes it a critical tool for high-stakes decision systems where understanding the true causal drivers—not just statistical associations—is required for regulatory compliance and robust policy-making.
Key Characteristics of Causal SHAP
Causal SHAP extends the standard SHAP framework by incorporating a causal graph to compute feature attributions that respect the underlying data-generating process, distinguishing between direct and indirect causal effects.
Causal Graph Integration
Unlike standard SHAP which treats all features symmetrically, Causal SHAP requires a directed acyclic graph (DAG) encoding the causal relationships between variables.
- Nodes represent observed features and the target variable
- Edges encode direct causal influence (e.g.,
education → income) - The graph distinguishes confounders, mediators, and colliders
- Prevents attributing effect to features that are merely correlated, not causal
Interventional vs. Observational Decomposition
Causal SHAP decomposes a feature's total effect into direct and indirect components using Pearl's do-calculus.
- Direct effect: The feature's influence on the prediction holding all mediators fixed
- Indirect effect: Influence transmitted through intermediate causal descendants
- Uses interventional distributions
P(Y | do(X=x))rather than conditional distributions - Avoids the feature independence assumption that standard SHAP often relies on
Asymmetric Feature Relationships
Standard SHAP treats feature contributions symmetrically, but causal relationships are inherently asymmetric. Causal SHAP respects this directionality.
- If
X → Ycausally, attributing effect toYfor predictingXis nonsensical - The causal ordering constrains which coalitions are valid during Shapley value computation
- Prevents credit assignment to downstream effects when the root cause is upstream
- Essential for root cause analysis in industrial and medical diagnostics
Fairness and Bias Auditing
Causal SHAP is critical for algorithmic fairness because it isolates the direct discriminatory effect of protected attributes.
- Distinguishes fair correlation (e.g., via a legitimate mediator) from unfair direct discrimination
- Example: Gender may influence income prediction through occupation choice (potentially fair) vs. directly (potentially biased)
- Enables path-specific counterfactual fairness analysis
- Used in compliance with regulations like the EU AI Act for high-risk automated decisions
Computational Complexity
Causal SHAP is significantly more computationally intensive than TreeSHAP or KernelSHAP due to the need to respect causal constraints.
- Requires causal discovery or domain-expert-provided DAG as a prerequisite
- Must evaluate the model under interventional distributions for each valid coalition
- The number of valid coalitions is restricted by the partial ordering of the causal graph
- Often combined with sampling-based approximation to remain tractable on high-dimensional data
Recourse and Decision Optimization
Causal SHAP provides actionable explanations by identifying which features an individual can realistically change to alter an outcome.
- Standard SHAP may recommend changing a non-manipulable feature (e.g., age)
- Causal SHAP restricts recommendations to ancestral features that causally influence the target
- Generates minimal intervention sets for achieving a desired prediction flip
- Critical for algorithmic recourse in credit scoring, hiring, and medical treatment planning
Frequently Asked Questions
Explore the critical distinctions between standard SHAP and its causal extension, designed to answer interventional and counterfactual questions by respecting the data's underlying causal structure.
Causal SHAP is an extension of the SHAP framework that incorporates a causal graph (a directed acyclic graph) to compute feature attributions that respect the underlying causal structure of the data. While standard SHAP estimates importance by observing correlations—potentially giving credit to non-causal proxy features—Causal SHAP answers interventional questions. It decomposes a prediction by measuring the effect of intervening on a feature while propagating that change through the causal graph's downstream effects. This distinguishes direct causal drivers from merely correlated variables, providing a more robust explanation for decision-making where causality matters.
Enabling Efficiency, Speed & Accuracy
Intelligent Analysis, Decision & Execution
We build AI systems for teams that need search across company data, workflow automation across tools, or AI features inside products and internal software.
Talk to Us
Search across company data
Give teams answers from docs, tickets, runbooks, and product data with sources and permissions.
Useful when people spend too long searching or get different answers from different systems.

Automate internal workflows
Use AI to route work, draft outputs, trigger actions, and keep approvals and logs in place.
Useful when repetitive work moves across multiple tools and teams.

Add AI to products and internal tools
Build assistants, guided actions, or decision support into the software your team or customers already use.
Useful when AI needs to be part of the product, not a separate tool.
Related Terms
Causal SHAP extends the standard SHAP framework by incorporating a causal graph, ensuring feature attributions respect the underlying data-generating process rather than mere statistical correlations.
Interventional SHAP
The foundational causal formulation of SHAP that breaks spurious correlations by explicitly simulating interventions on features. Instead of conditioning on observed values, it estimates the marginal distribution of a feature by sampling from the background dataset, answering 'What would the model predict if we set this feature to a specific value?'. This aligns attributions with Pearl's do-calculus, making it the default choice for causal inference but computationally intensive due to the need to marginalize over all other features.
Observational SHAP
The standard non-causal SHAP formulation that preserves the natural joint distribution of the data. It estimates missing feature values by conditioning on known features, which means attributions reflect both direct causal effects and spurious associations from confounders. While computationally cheaper and faithful to the data manifold, it can assign importance to features that are merely correlated with the outcome, not causally responsible. This is the default behavior in KernelSHAP and TreeSHAP when feature independence is assumed.
Causal Graph Integration
Causal SHAP requires a directed acyclic graph (DAG) encoding the causal relationships between features. This graph defines valid adjustment sets and determines which variables must be controlled for when computing the marginal contribution of a feature. By respecting the back-door criterion, the method blocks non-causal paths and isolates the true causal effect of each feature on the prediction. Tools like DoWhy and CausalNex are commonly used to specify this structural knowledge before computing SHAP values.
Asymmetric Shapley Values
A generalization of Shapley values that incorporates causal knowledge by restricting the permissible orderings of features during the marginal contribution calculation. In standard SHAP, all permutations are equally weighted, but asymmetric SHAP assigns zero weight to orderings that violate the causal partial order. This ensures a cause never receives credit for an effect that occurs before it in the causal chain, producing attributions that respect the temporal and causal flow of the data-generating process.
Feature Independence Assumption
The simplifying assumption that all input features are statistically independent, which is violated in most real-world datasets. Under this assumption, the conditional distribution equals the marginal distribution, making interventional and observational SHAP equivalent. While this dramatically reduces computational cost by avoiding complex conditional density estimation, it produces unrealistic model evaluations by feeding the model impossible feature combinations. Causal SHAP explicitly rejects this assumption to generate physically plausible explanations.
Conditional Expectation Estimation
The core statistical challenge in causal SHAP: accurately estimating E[f(x) | x_S] when only a subset of features S is known. Methods include:
- Parametric models: Fit a separate model for each feature subset
- Generative models: Use variational autoencoders or normalizing flows to sample from the conditional distribution
- Empirical nearest neighbors: Approximate conditioning by finding similar instances in the background data Poor estimation here introduces bias into the Shapley values, undermining the causal interpretation.

About the author
Prasad Kumkar
CEO & MD, Inference Systems
Prasad Kumkar is the CEO & MD of Inference Systems and writes about AI systems architecture, LLM infrastructure, model serving, evaluation, and production deployment. Over 5+ years, he has worked across computer vision models, L5 autonomous vehicle systems, and LLM research, with a focus on taking complex AI ideas into real-world engineering systems.
His work and writing cover AI systems, large language models, AI agents, multimodal systems, autonomous systems, inference optimization, RAG, evaluation, and production AI engineering.
Partnered with leading AI, data, and software stack.
How We Work
Custom AI workflows for your Business
One-fit-all AI don't work for modern businesses. At Inferensys, we aim to understand your business & custom requirements; which we use to define most efficient agentic workflows, the data, and the tools for your business.
01
Review the use case
We understand the task, the users, and where AI can actually help.
Read more02
Pick the right approach
We define what needs search, automation, or product integration.
Read more03
Build the first useful version
We implement the part that proves the value first.
Read more04
Improve from there
We add the checks and visibility needed to keep it useful.
Read moreThe first call is a practical review of your use case and the right next step.
Talk to Us