Simulating counterfactuals
Juha Karvanen, Santtu Tikka, Matti Vihola
TL;DR
The paper tackles the challenge of sampling from counterfactual distributions under a recursive SCM when conditioning on continuous evidence, which typically induces a manifold and is analytically intractable. It introduces a tuning-free conditional-simulation algorithm that processes conditioning variables in topological order, solving for dedicated error terms with binary search for continuous conditions and applying sequential Monte Carlo calibration, while discrete conditions are handled by resampling; the entire workflow admits a particle-filter interpretation. The authors establish mean-square error convergence and a central limit theorem for the estimator, and they demonstrate the approach in a fairness-evaluation framework using synthetic credit-scoring data to assess counterfactual fairness of opaque AI models. Together, these contributions enable robust, scalable counterfactual inference and fairness analysis in mixed-variable SCMs with unobserved confounding, complemented by open-source software for practitioners.
Abstract
Counterfactual inference considers a hypothetical intervention in a parallel world that shares some evidence with the factual world. If the evidence specifies a conditional distribution on a manifold, counterfactuals may be analytically intractable. We present an algorithm for simulating values from a counterfactual distribution where conditions can be set on both discrete and continuous variables. We show that the proposed algorithm can be presented as a particle filter leading to asymptotically valid inference. The algorithm is applied to fairness analysis in credit-scoring.
