A causal graph is a formal, graphical representation of the data-generating process, explicitly distinguishing causation from mere statistical correlation. Each directed edge X → Y asserts that manipulating X directly influences Y, independent of other variables. This structure, typically a Directed Acyclic Graph (DAG), prohibits feedback loops to ensure logical consistency when reasoning about interventions and their downstream effects.
Glossary
Causal Graph

What is a Causal Graph?
A causal graph is a directed acyclic graph (DAG) where nodes represent variables and directed edges represent direct causal relationships, encoding assumptions for counterfactual and interventional inference.
These graphs serve as the foundational blueprint for a Structural Causal Model (SCM), enabling the computation of counterfactual queries via the do-operator. By encoding qualitative assumptions about confounding and independence, a causal graph allows algorithms to determine if a causal effect is identifiable from observational data alone, bridging the gap between raw correlation and actionable, robust explanations.
Core Properties of a Causal Graph
A causal graph is a directed acyclic graph (DAG) encoding qualitative assumptions about data-generating mechanisms. These core properties define its structure and enable rigorous counterfactual inference.
Directed Acyclic Graph (DAG) Structure
A causal graph is formally a DAG, meaning all edges have a direction and no path loops back to its origin. The direction of an edge X → Y encodes the assumption that X is a direct cause of Y. Acyclicity ensures no variable can cause itself, preventing logical paradoxes. This structure allows the graph to be factorized into a joint probability distribution where each node is conditioned only on its direct parents, forming the basis for the Causal Markov Condition.
Nodes as Variables, Edges as Direct Causes
Every node represents a random variable in the system—this can be an observed feature, a latent confounder, or a treatment. A directed edge X → Y asserts that X has a direct causal effect on Y that is not fully mediated by any other variable in the graph. The absence of an edge is a strong claim of no direct effect. This sparse encoding forces modelers to explicitly state their causal assumptions, making the graph a transparent scientific model rather than a black-box correlation matrix.
The Causal Markov Condition
This property states that a variable is independent of all its non-descendants given its direct parents in the graph. Formally: X ⊥ NonDescendants(X) | Parents(X). This allows the joint distribution to be factorized as P(V) = ∏ P(v | parents(v)). The Markov condition is the critical bridge between the graphical structure and the statistical data, enabling the decomposition of a complex high-dimensional distribution into modular, estimable components.
d-Separation and Conditional Independence
d-separation is the graphical criterion for reading all conditional independencies implied by the Markov condition. Two sets of nodes are d-separated by a third set if every path between them is blocked. A path is blocked by:
- A chain
X → M → Yor forkX ← M → Ywhere M is conditioned on. - A collider
X → C ← Ywhere neither C nor its descendants are conditioned on. d-separation allows analysts to test their causal graph against data by verifying that implied independencies hold empirically.
The Faithfulness Assumption
The faithfulness assumption is the converse of the Markov condition: all conditional independencies observed in the data must be entailed by the graph's structure via d-separation. Violations occur when causal pathways cancel each other out perfectly—for example, two paths with equal and opposite effects. Faithfulness is assumed by most causal discovery algorithms. Without it, the true causal graph may be statistically indistinguishable from a structurally different graph, complicating structure learning from observational data.
Intervention and the do-Operator
An intervention is an external manipulation that sets a variable to a specific value, breaking its dependence on its natural causes. Graphically, this is represented by deleting all incoming edges to the intervened node. The do-operator P(Y | do(X=x)) denotes the post-intervention distribution, which is fundamentally different from conditioning P(Y | X=x). This distinction is the core of causal reasoning: conditioning observes a passive world, while the do-operator simulates an active change, enabling counterfactual queries.
Frequently Asked Questions
Precise answers to common technical questions about causal graphs, their structure, and their role in counterfactual inference.
A causal graph is a directed acyclic graph (DAG) where nodes represent variables and directed edges represent direct causal relationships, encoding a set of conditional independence assumptions. Unlike a correlation graph, which merely captures statistical associations, a causal graph is an explicit model of the data-generating mechanism. The critical distinction is that a causal graph supports the do-operator and interventional queries. An edge X → Y in a causal graph asserts that manipulating X independently of its other causes will change the distribution of Y. A correlation graph cannot make this claim; an edge there only indicates that X and Y are predictive of one another, potentially due to a common cause Z (confounding). This makes causal graphs essential for reasoning about policy interventions and counterfactuals, where we ask what would have happened under a different action.
Causal Graph vs. Correlation Graph
Distinguishing between graphs that encode causal mechanisms and those that merely represent statistical associations.
| Feature | Causal Graph | Correlation Graph |
|---|---|---|
Fundamental Relationship | Encodes cause-and-effect mechanisms | Encodes statistical associations |
Edge Directionality | Directed edges (arrows) indicating causal flow | Undirected edges indicating mutual dependency |
Supports Interventions | ||
Answers Counterfactuals | ||
Graph Type | Directed Acyclic Graph (DAG) | Undirected Graph or Correlation Matrix |
Confounding Handling | Explicitly models confounders as nodes | Cannot distinguish confounding from causation |
Data Sufficiency | Requires domain knowledge or experimental data | Derivable from observational data alone |
Mathematical Foundation | Structural Causal Models and do-calculus | Covariance matrices and Pearson coefficients |
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
A causal graph is the structural backbone of counterfactual reasoning. The following concepts define how these graphs are built, queried, and validated to generate actionable explanations.
Structural Causal Model (SCM)
The formal mathematical framework that defines a causal graph. An SCM specifies a set of endogenous variables (nodes), exogenous variables (unexplained noise), and structural equations (edges) that represent the data-generating process.
- Equations: Each child node is a deterministic function of its parents and an independent noise term:
X_i = f_i(PA_i, U_i). - Intervention: The
do(X=x)operator surgically removes a variable from its parents, breaking incoming edges. - Counterfactual Computation: The three-step process of abduction (inferring noise), action (intervening), and prediction (recomputing) relies entirely on the SCM.
Do-Calculus
A set of three inference rules developed by Judea Pearl that determine when a causal effect—expressed as an interventional distribution P(Y|do(X))—can be estimated from purely observational data and the structure of the causal graph.
- Rule 1 (Insertion/Deletion of Observations): Allows adding or removing a variable from the conditioning set if Y and Z are d-separated by X in a modified graph.
- Rule 2 (Action/Observation Exchange): Allows replacing an intervention with a conditioning event if they share the same effect via backdoor paths.
- Rule 3 (Insertion/Deletion of Actions): Allows removing an intervention entirely if the effect is independent of the intervention in the relevant subgraph.
- Completeness: If a causal effect is identifiable, it can be derived by repeated application of these three rules.
Counterfactual Fairness
A rigorous definition of individual fairness grounded in causal graphs. A predictor Ŷ is counterfactually fair if its output for an individual is identical in the actual world and a counterfactual world where a sensitive attribute A (e.g., race, gender) was different.
- Causal Dependence: The definition only penalizes unfairness transmitted through causal paths from the sensitive attribute to the outcome.
- Non-Causal Correlation: Correlations due to common causes or random sampling are not considered unfair under this strict criterion.
- Graph Requirement: Computing this metric requires a fully specified causal graph that includes the sensitive attribute and all its descendants.
Feasibility Constraint
A hard rule encoded into a counterfactual search algorithm that prevents the generation of explanations that violate real-world causal laws or immutable characteristics. This transforms a generic counterfactual into an actionable recourse.
- Causal Constraints: Enforced by the causal graph's directed edges. Changing a parent node propagates changes to its descendants, preventing physically impossible counterfactuals.
- Immutability: Variables like
ageorplace of birthare clamped and cannot be modified by the optimization algorithm. - Action Set: The formal specification of which features can be changed, by how much, and in which direction, defining the feasible region for the counterfactual search.
Counterfactual Inference
The three-step computational process of answering 'what if' questions using a fully specified SCM. This is the algorithmic engine that powers all counterfactual explanations.
- Step 1: Abduction: Observe the factual outcome and use the structural equations to infer the posterior distribution of the unobserved exogenous noise variables
U. - Step 2: Action: Apply the
do()operator to the causal graph, surgically setting a variable to a counterfactual value and severing all incoming edges. - Step 3: Prediction: Recompute the values of the outcome variable in the modified graph using the inferred noise distribution from Step 1.
- Deterministic vs. Probabilistic: With deterministic structural equations, this yields a point estimate; with probabilistic equations, it yields a distribution.
Recourse Robustness
The property that a counterfactual recommendation remains valid even after the underlying predictive model is retrained or slightly updated. A lack of robustness leads to recourse invalidation, where a user implements the recommended changes but the new model still denies them.
- Model Shift: Retraining on new data can shift the decision boundary, invalidating previously generated counterfactuals.
- Robust Algorithms: Methods like Causal Recourse that constrain changes to follow the causal graph's mechanisms are inherently more robust than purely distance-based methods.
- Evaluation: Measured by the percentage of counterfactuals that remain valid after a model update, a critical metric for deploying recourse systems in production.

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