liveBook · Manning

Do-calculus

As explained in Causal AI

Do-calculus is a formal system of rules for transforming causal and interventional probability expressions using graphical-model assumptions.

When a model must answer what would happen if a variable were deliberately set, correlation is not enough. Do-calculus transforms intervention-based probability expressions into quantities that can be estimated from observational data, when a causal graph supplies the required assumptions. section 1.5.3 section 10.4.1

The system contains three if-then rules. Each rule links a graphical condition to an equivalent probability query: if variables are d-separated after graph surgery on a DAG, a probability expression may be inserted, removed, or transformed. The rules derive from d-separation, ideal interventions, and probability laws rather than intuition alone. section 10.4.1

A practical workflow treats do-calculus as an identification step between causal modeling and statistical estimation:

  • Represent the causal question as an intervention, such as the target distribution under setting X to x. section 10.4.1
  • Use graph structure and d-separation to transform the intervention expression into an observational estimand. section 10.4.1
  • Estimate the resulting terms with statistical or machine-learning models, while weighing bias, variance, scalability, and parallelizability. section 1.5.3
  • Automate identification with graphical software, or use a known result such as the backdoor adjustment estimand. section 10.4.1 section 10.4.2

Writer type and image content

To estimate the causal effect of writer type on images when a randomized assignment is infeasible, a DAG and do-calculus can derive an expression for conditional average treatment effects. The left side represents hypothetical interventions; the right side contains terms estimable from labeled image data. A related derivation applies rules 2 and 3 to obtain a backdoor estimand, with c-component factorization supplying an intermediate step. section 1.5.3 section 10.4.2

Figure 1.8 Visualization of an example CATE of writer type on an image. It is the pixel-by-pixel difference of the expected image under one intervention (W="high school") minus the expected image under another intervention (W="bureaucrat"), with both expectations conditional on being images of the digit 4 with a certain level of thickness.
figure

Compare two interventions as a pixel-by-pixel difference between their conditional expected images, making the causal query concrete. section 1.5.3

How Causal AI covers it

How deep it goes
Derives rules and a backdoor estimand from graph surgery, while emphasizing intuition and automation over memorizing every rule.
Examples
Uses writer-type effects on handwritten images and an alternative do-calculus derivation of the backdoor estimand.
What it assumes
Assumes causal graphs and probability basics, while building intuition for d-separation, interventions, identification, and causal queries.
What you can do after
Apply it via graphical identification libraries or derive estimands such as backdoor adjustment from a causal graph.
How it connects
Connects d-separation, ideal interventions, directed acyclic graphs, c-component factorization, and backdoor adjustment.

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Causal AI. The section links point to the parts of the book it draws on.