liveBook · Manning

Abduction

As explained in Causal AI

Abduction is the inference step that uses observed facts to infer the latent circumstances or exogenous values that could have produced them.

A counterfactual question begins with factual observations: what would have happened under a different condition? Abduction infers the latent circumstances that could have produced those observations. In a structural causal model (SCM), this means estimating the distribution of exogenous variables conditional on observed endogenous variables. section 9.1 section 9.1.1

Counterfactual inference uses abduction as its first step:

  • Abduction infers exogenous variables from factual evidence. section 9.5
  • Action performs the hypothetical condition through an ideal intervention or graph surgery. section 9.1
  • Prediction applies the intervened model using the abducted exogenous-variable distribution to derive hypothetical outcomes. section 9.5

Abduction is not simply reading causes from correlations. The model determines which dependence paths carry information from observations to latent variables. In an online-gaming SCM, observing low side-quest engagement and $50 in purchases updates beliefs about guild-member, engagement, and purchase exogenous variables, including paths opened by conditioning on a collider. section 9.1.1

With partial observations, probabilistic inference is usually required. Variational inference learns a guide distribution that approximates the posterior over exogenous variables; Pyro can condition a model on factual values, optimize the guide with SVI and ELBO loss, and extract the updated posterior. Exact point-valued abduction is possible when every endogenous variable is observed and the SCM assignment functions are invertible. section 9.3.3

From observed height to counterfactual height

Given femur length 44 cm and height 165 cm, abduction estimates the posterior distribution of latent sex, femur, and height disturbances. The action step changes femur length to 46 cm, and prediction generates the corresponding counterfactual height. section 9.3.3

Listing 9.13 Specifying the guide function for variational inference
import torch.distributions.constraints as constraints
from pyro.primitives import param
from pyro.distributions import Delta

def guide(exogenous):   #1
    p = param("p", tensor(.5),     #2
              constraint=constraints.unit_interval)   #2
    n_sex = sample("N_sex", Bernoulli(p))   #2
    sex = sample("sex", Bernoulli(n_sex))    #3
    n_femur_loc = param("n_femur_loc", tensor(0.0))     #4
    n_femur_scale = param(     #4
        "n_femur_scale",    #4
        tensor(1.0),     #4
        constraint=constraints.positive    #4
    )     #4
    femur_dist = Normal(n_femur_loc, n_femur_scale)    #5
    n_femur = sample("N_femur", femur_dist)     #5
    n_height_loc = param("n_height_loc", tensor(0.0))    #5
    n_height_scale = param(    #5
        "n_height_scale",   #5
        tensor(1.0),     #5
        constraint=constraints.positive    #5
    )     #5
    height_dist =  Normal(n_height_loc, n_height_scale) #5
    n_height = sample("N_height", height_dist)     #5
    femur = sample("femur", Delta(n_femur))     #6
    height = sample("height", Delta(n_height))     #6

A Pyro guide function makes the abducted exogenous-variable distribution explicit through trainable parameters and proposal distributions. section 9.3.3

Abduction depends on the SCM’s structural assumptions. Two SCMs can agree on observational and interventional distributions yet produce different posterior exogenous distributions for the same observed outcome, leading to different counterfactuals. Confidence in the ground-truth SCM therefore matters; otherwise, counterfactual identification can seek weaker assumptions. section 10.6.1 section 9.5

How Causal AI covers it

How deep it goes
Explains latent-variable conditioning, dependence paths, variational implementation, deterministic special cases, and SCM sensitivity.
Examples
Uses online-game engagement, femur-length height, and counterfactual image-editing examples.
What it assumes
Assumes structural causal models, endogenous and exogenous variables, conditioning, and ideal interventions.
What you can do after
Apply abduction via Pyro or graphical-model inference to estimate latent disturbances for counterfactual queries.
How it connects
Connects counterfactual inference, structural causal models, interventions, latent variables, variational inference, and causal identification.

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.