Causal Inference & ML

structural causal models (SCM)

Think of a system as a little program in which every variable is computed from its direct causes plus its own private noise. A structural causal model writes that program down: each variable gets one assignment line saying which other variables, and which unexplained randomness, produce it. The lines are not equations you solve simultaneously; they are directional recipes, read left of the arrow as the effect and right as the causes.

Formally an SCM is a tuple of exogenous (noise) variables U, endogenous variables V, a set of structural functions with one equation V_i = f_i(parents of V_i, U_i), and a distribution over U. The equations induce a directed graph in which an edge X to Y means X appears in Y's equation. The decisive property is autonomy: each equation is a separate mechanism, so an intervention that fixes a variable replaces only that one line and leaves the rest untouched. That modularity is exactly what a plain joint distribution lacks.

Because the same object specifies how data is observed, how it changes under interventions, and what would have happened in a counterfactual world, an SCM unifies all three rungs of Pearl's causal ladder in one model. The price is honesty about assumptions: the graph and the functional forms are largely a modeling choice, and only some of their implications (conditional independences) are testable from observational data.

V_i = f_i(\mathrm{pa}_i,\,U_i),\qquad U_i \sim P(U)

Each endogenous variable is a deterministic function of its parents and its own exogenous noise.

An SCM is more than its graph plus a joint distribution: two SCMs can share both yet disagree on counterfactuals, because they differ in the noise-level mechanism.

Also called
SCMstructural equation models結構因果模型