From Structural Causal Models to Higher Order Causal Probabilistic Programming
POPL 2027 (conditionally accepted), 2026, with Dario Stein, Michael Lee, Eli Bingham, John Feser, Ohad Kammar, Sam Staton, Jeremy Yallop.
[Conditionally accepted to POPL 2027. Draft available on request.] Causal Inference is the statistical discipline that seeks to give quantitative answers to questions beyond Bayesian conditioning (rung 1), about causal relationships (rung 2, ‘does smoking cause cancer?’) and counterfactuals (rung 3, ‘had I not smoked, what is the probability that I would not have got cancer?’). Pearl answers such questions by syntactic surgeries on structural causal models (SCMs), which refine Bayesian networks with explicit deterministic mechanisms and exogenous noise. Causal probabilistic programming seeks to make these surgery operations first-class on expressive probabilistic programs, but existing systems often rely on non-standard evaluation strategies, lack denotational and equational foundations, and only informally relate to Pearl’s original definitions.
In this paper, we give a novel semantic account of causal modelling that generalises to higher order. In analogy to Pearl’s three rungs of causality, we develop a hierarchy of three first-order probabilistic programming languages, and describe causal operations as program transformations between them. We also develop an equivalent denotational description where interventions are tracked using grading, and counterfactuals using vectorisation. Our semantic framework conservatively generalises structural causal models: each structural causal model can be compiled into a program, preserving causal operations. Moreover, thanks to the denotational semantics, our framework naturally extends to a higher-order causal language, where a rich class of higher-order and cross-world interventions becomes expressible as ordinary functional programming abstractions.
