ChiRho is a causal probabilistic programming library that extends Pyro with handlers and primitives for causal modeling and inference. It connects Bayesian posterior estimation with causal assumptions, allowing counterfactual queries to be represented and inferred rather than treated as ordinary predictions. section 10.6.2 section 11.6.1
ChiRho supports causal workflows through model transformations:
- Use node-splitting to represent an intervention while retaining the target variable’s causal parents separately from the constant value seen by its children. section 11.6.1
- Use the TwinWorldCounterfactual handler to transform a structural causal model into parallel worlds for counterfactual reasoning. section 11.6.1
- Combine causal assumptions and observed data with Bayesian inference; identified queries can converge toward their true values as data grows, subject to regularity conditions and prior quality. section 10.6.2
Monotonicity and counterfactual inference
For a binary action such as sending a promotion, ChiRho can participate in a Bayesian analysis of causal or counterfactual probabilities. The resulting posterior reflects both the observed data and assumptions such as monotonicity; when those assumptions identify the query, increasing data can concentrate the posterior near the true value. section 10.6.2
Figure 11.14 Yet another transform converts the model into a parallel-world model.
The parallel-world transformation makes counterfactual structure concrete by displaying separate model worlds whose relationships encode the query. section 11.6.1
