Causal Models and Interventions › Counterfactuals

Michael BrenndoerferJune 21, 20263 min read
World Models HandbookAll chapters
Part 4 of 12Space, Physics, and Causality
Chapter 21Causal Models and Interventions › Counterfactuals
Reading section 5 of 14 · Counterfactuals · 3 minSection 5 of 14 · 3 min

Book contents

Section 5 of 14 · 3 min read

Causal Models and Interventions › CounterfactualsOne section · Sections in this chapter5 / 14 ↓

An interventional distribution describes outcomes under a specified intervention and may itself be conditional on history. A counterfactual additionally conditions on evidence from the realized episode and reuses its exogenous factors under an alternative action. In the recursive, uniquely solvable SCMs used here, fixing those factors defines one outcome for each hypothetical intervention; abduction generally leaves posterior uncertainty over which factors occurred.

Abduction–Action–Prediction

Computing the counterfactual Yx′(u)Y_{x'}(u), the value YY would have taken under do(X=x′)\mathrm{do}(X = x') for an individual with exogenous profile uu, follows three steps:

  1. Abduction. Use the observed evidence ee to update the belief over exogenous variables: P(u∣e)P(u \mid e).
  2. Action. Modify the SCM by replacing the mechanism for XX with the counterfactual value x′x'.
  3. Prediction. Run the modified model forward with uu drawn from the posterior P(u∣e)P(u \mid e) to obtain the distribution of Yx′Y_{x'}.

It is instructive to see how the three steps relate to the rungs below them. Step 2 and step 3 together are a Rung 2 computation, an intervention evaluated in the modified model. The additional ingredient is step 1, abduction, which conditions on the episode's evidence and updates a posterior over its exogenous factors rather than necessarily identifying them exactly. In this sense counterfactuals require what an intervention requires plus a model of how the observed episode constrains the unmodeled factors at hand.

The exogenous variables encode episode-specific background factors: the hidden friction in a particular joint, the heat load in a particular room, or an unmodeled gust. Abduction updates a posterior over those factors from what was observed, and prediction reuses the same exogenous realization in the alternate history. This is why counterfactuals are Rung 3: they require a specific cross-world pairing. Observational and interventional distributions need not determine that pairing without additional structural assumptions, although counterfactuals can be identified in some models when those assumptions and suitable data are available. Two episodes with identical observable histories may still have different exogenous factors and hence different counterfactual outcomes.

For an agent, Rung 3 appears when the question explicitly asks what would have happened in the same episode under a different choice. Diagnosis and blame assignment often have this form. Standard advantage functions are related decision comparisons but usually contrast conditional expected returns, not unit-level cross-world outcomes. Hindsight experience replay is different again: it relabels an achieved goal on a realized transition when the transition dynamics do not depend on the goal. Neither method becomes a Pearl-style counterfactual unless an SCM specifies how the same exogenous disturbances are coupled across actions.

The price of this power is strong identifiability requirements. Counterfactuals depend on the functional form of the mechanisms and the distribution of exogenous noise; the graph alone does not determine them. Two SCMs can induce identical observational and interventional distributions yet disagree on counterfactuals. Interventional and some counterfactual distributions can nevertheless be identified from graphical assumptions together with suitable observational or experimental distributions; counterfactual-identification results characterize important such cases. When you build counterfactual reasoning into an agent, you are making stronger structural commitments than ordinary prediction requires, so learned counterfactual outputs should be reported with their assumptions and uncertainty rather than treated as ground truth.