Inferensys

Glossary

Structural Causal Model (SCM)

A formal framework representing variables and their causal dependencies through structural equations, enabling the computation of interventional and counterfactual queries.
Governance lead reviewing model governance framework on laptop, policy documents visible, executive office setup.
CAUSAL INFERENCE

What is a Structural Causal Model (SCM)?

A formal framework for representing variables and their causal dependencies through structural equations, enabling the computation of interventional and counterfactual queries.

A Structural Causal Model (SCM) is a formal framework defined by a triple (U, V, F) that represents the causal mechanisms of a system. It consists of exogenous background variables (U), endogenous observed variables (V), and a set of structural equations (F) that assign each endogenous variable a deterministic function of its direct causes and a unique noise term. This mathematical structure encodes not just statistical associations but the underlying data-generating process.

Unlike purely probabilistic graphical models, an SCM supports the do-operator and the computation of counterfactuals by explicitly modeling interventions as modifications to the structural equations. By mutilating the causal graph and replacing an equation with a constant, one can compute the effect of an action. This enables rigorous reasoning about what would have happened under a different scenario, forming the mathematical backbone for algorithmic recourse and counterfactual fairness in machine learning.

STRUCTURAL CAUSAL MODELS

Core Components of an SCM

A Structural Causal Model (SCM) is a formal framework that represents the data-generating process through a system of equations and a causal graph. It is the mathematical engine required to compute interventional and counterfactual queries.

01

Structural Equations

The deterministic or probabilistic functions that define how each endogenous variable is generated from its direct causes. An equation X = f(PA, U) maps parents and exogenous noise to an effect.

  • Form: X := f_X(PA_X, U_X)
  • Asymmetry: The := assignment operator enforces the direction of causality, distinguishing it from standard algebraic equality.
  • Mechanism: Represents the invariant physical or behavioral process generating the data, which remains stable under intervention.
02

Exogenous Variables (U)

Latent background factors that capture all unmodeled or random influences on the endogenous variables. They represent the inherent stochasticity of the real world.

  • Independence: Often assumed to be jointly independent, though this can be relaxed.
  • Role: They are the source of uncertainty that distinguishes a statistical model from a purely deterministic simulation.
  • Counterfactual Key: The specific values of U for an individual unit are the key to computing counterfactuals at the unit level.
03

Causal Graph (DAG)

A Directed Acyclic Graph where nodes represent variables and directed edges represent direct causal relationships. It encodes the qualitative causal assumptions of the model.

  • Parents: The direct causes of a node X are denoted as PA_X.
  • d-Separation: A graphical criterion for reading off conditional independencies implied by the model.
  • Acyclicity: The absence of directed cycles ensures no variable can cause itself, enforcing logical consistency.
04

Intervention Operator (do)

The mathematical operator do(X=x) that represents an external intervention forcing a variable to a specific value, surgically removing its incoming edges in the graph.

  • Truncated Factorization: The joint distribution under an intervention is computed by deleting the factor for the intervened variable: P(v | do(x)) = ∏_{V_i ≠ X} P(v_i | pa_i) when X=x.
  • Distinction: P(Y|X=x) (seeing) is fundamentally different from P(Y|do(X=x)) (doing).
  • Purpose: This is the core mechanism for answering policy and action-based queries.
05

Counterfactual Computation

The three-step process for answering 'what if' questions about a specific observed unit, combining the SCM with observed evidence.

  • Step 1 (Abduction): Infer the posterior distribution of the exogenous noise U given the observed factual evidence.
  • Step 2 (Action): Modify the SCM by applying the do-operator to set a variable to its counterfactual value.
  • Step 3 (Prediction): Compute the resulting value of the target variable using the modified model and the inferred U.
06

Do-Calculus

A complete set of three inference rules developed by Judea Pearl that allows an interventional distribution P(y|do(x)) to be transformed into an estimable expression from observational data alone, whenever possible.

  • Rule 1 (Insertion/Deletion of Observations): Allows adding or removing a conditioning variable if the target is d-separated from it after the intervention.
  • Rule 2 (Action/Observation Exchange): Allows replacing an intervention with a conditioning observation if they have the same effect.
  • Rule 3 (Insertion/Deletion of Actions): Allows adding or removing an intervention on a variable when it has no causal effect on the outcome.
CAUSAL INFERENCE

Frequently Asked Questions

Core questions about the formal framework that enables machines to reason about interventions and answer 'what if' questions using structural equations.

A Structural Causal Model (SCM) is a formal framework that represents variables and their causal dependencies through a set of structural equations, enabling the computation of interventional and counterfactual queries. An SCM is defined by a triple M = (U, V, F), where U is a set of exogenous (unobserved) background variables, V is a set of endogenous (observed) variables, and F is a set of functions mapping U ∪ V to V. Each function f_i ∈ F determines the value of a variable V_i based on its direct causes (its parents) and an exogenous noise term U_i. Unlike purely statistical models, an SCM encodes asymmetric causal knowledge: changing X causes a change in Y, but not vice versa. This asymmetry is what distinguishes causal reasoning from mere correlation. The model supports three layers of the Pearl Causal Hierarchy: association (seeing), intervention (doing), and counterfactuals (imagining).

Prasad Kumkar

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.