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 can be thought of as a restricted form of Bayesian networks.
In this talk, I give an account of causal modelling from the (PL) semantics point of view that generalises cleanly to higher order, in two steps. Firstly, in analogy to Pearl's three rungs of causality, I give a hierarchy of three first-order probabilistic programming languages, describe causal operations as program transformations between them, and formulate causal model equivalence as contextual equivalence. Then, I will present an equivalent, denotational view where interventions are tracked using grading, and counterfactuals using vectorisation. This semantic framework allows us to extend to a higher-order causal language, where a rich class of higher-order and cross-world interventions become expressible as ordinary functional programming abstractions.
