An action step represents a hypothetical condition as an ideal intervention in a modified causal graph. It is the middle stage of counterfactual inference: abduction recovers exogenous variables from the factual case, action performs graph surgery, and prediction derives the hypothetical outcome. section 9.1 section 9.5
The intervention changes the model while retaining information inferred from the actual world. This distinguishes counterfactual sampling from ordinary interventional sampling: conditioning on the factual case usually produces a narrower hypothetical distribution. section 9.3.4
A practical action step follows this pattern:
- Define the hypothetical condition, such as setting femur length to 46 cm or changing a latent image concept. section 9.3.4 section 9.4
- Apply the intervention to the structural causal model, leaving the abducted exogenous distribution available for prediction. section 9.3.4
- Generate hypothetical outcomes and compare their distribution with outcomes from the corresponding intervention. section 9.3.4
Semantic image editing
Infer a latent representation of an image, intervene on a desired concept such as removing glasses, then generate a new image while preserving elements not causally downstream of the edit. section 9.4
int_model = pyro.do(model, data={"femur": tensor(46.0)})
Inspect the Pyro graph-surgery operation that creates the intervention model. section 9.3.4
