Abstract
We consider the problem of answering observational, interventional, and counterfactual queries in a causally sufficient setting where only observational data and the causal graph are available. Utilizing the recent developments in diffusion models, we introduce diffusion-based causal models (DCM) to learn causal mechanisms, that generate unique latent encodings. These encodings enable us to directly sample under interventions and perform abduction for counterfactuals. Diffusion models are a natural fit here, since they can encode each node to a latent representation that acts as a proxy for exogenous noise. Our empirical evaluations demonstrate significant improvements over existing state-of-the-art methods for answering causal queries. Furthermore, we provide theoretical results that offer a methodology for analyzing counterfactual estimation in general encoder-decoder models, which could be useful in settings beyond our proposed approach.
Introduction
In the field of causal inference, researchers often refer to Judea Pearl’s "Ladder of Causation." Most machine learning models are confined to the first rung: Observation (identifying patterns). However, for effective decision-making and scientific discovery, we must climb to the higher rungs: Intervention (predicting the outcome of an action) and Counterfactuals (reasoning about what would have happened under different circumstances).
Structural Causal Models (SCMs) provide the mathematical foundation for this reasoning by describing how variables are generated from observed parents and unobserved "exogenous" noise. Yet, learning these models from data is notoriously difficult, particularly when relationships are highly non-linear or when noise is non-additive. This paper introduces Diffusion-based Causal Models (DCM), a framework that leverages the deterministic properties of Denoising Diffusion Implicit Models (DDIMs) to learn these complex causal mechanisms with unprecedented accuracy and efficiency.
Methodology
The core innovation of DCM lies in treating the diffusion process as a proxy for the structural equations in an SCM. Instead of training a single monolithic model for an entire dataset, DCM models every node in a causal Directed Acyclic Graph (DAG) as an individual diffusion process.
Node-wise Diffusion and Deterministic Encoding
Each variable $X_i$ in the DAG is modeled by its own diffusion process, conditioned on its causal parents $PA_i$. While standard diffusion models are stochastic, DCM utilizes DDIMs, which provide a deterministic mapping between the data space and the latent noise space. This bi-directional bridge is essential for causal reasoning:
- Encoding (Abduction): The forward diffusion process maps an observation to a unique latent noise vector.
- Decoding (Prediction): The reverse process maps that noise vector back to the data space.
The Causal Workflow
To answer a counterfactual query—such as "Given this patient's history, what would their outcome have been if they had received Treatment B instead of Treatment A?"—DCM follows a three-step process:
- Abduction: Use the forward DDIM process to find the specific latent noise that produced the observed data. This noise represents the unique, unobserved characteristics of the individual.
- Action: Modify the value of the treatment variable (the intervention) within the causal graph.
- Prediction: Execute the reverse diffusion process starting from the abducted noise, but conditioned on the new treatment value, to generate the counterfactual outcome.
Furthermore, the authors provide a rigorous theoretical contribution by establishing error bounds for counterfactual estimation in general encoder-decoder models. They prove that if a model achieves high reconstruction accuracy, its counterfactual estimates are likely to be reliable, providing a formal justification for using diffusion models in this context.
Empirical Evaluation
The authors evaluated DCM against state-of-the-art baselines, including VACA and CAREFL, across several diverse datasets:
- Synthetic and Semi-Synthetic: "Ladder" graphs and random DAGs with complex non-additive noise, as well as the Sachs dataset (protein signaling networks).
- Real-World fMRI: Data from 14 patients involving electrical brain stimulation.
- Causal Benchmarks: The IHDP (Infant Health and Development Program) and Lalonde datasets, which are standard for estimating Individual Treatment Effects (ITE).
Key Insights and Results
Handling Non-Additive Noise
Traditional causal methods often struggle when noise interacts with variables in non-linear ways (e.g., $Y = f(X, \text{noise})$). DCM excels here because diffusion models are designed to map complex, high-dimensional data to simple Gaussian noise without assuming additivity. In non-additive scenarios, DCM's error was frequently an order of magnitude lower than competing models.
Computational Efficiency
Because each node in the DAG is trained independently, the training process can be parallelized. DCM demonstrated significant speed advantages, training approximately 7x faster than CAREFL and 9x faster than VACA.
Superior Accuracy
DCM consistently outperformed baselines in interventional and counterfactual tasks. On the IHDP dataset, it estimated the Average Treatment Effect (ATE) with a relative error of only 0.199%, significantly outperforming the Additive Noise Model (ANM) baseline. On real-world fMRI data, DCM achieved the lowest mean absolute error for interventional predictions.
Limitations and Future Directions
While DCM represents a significant leap forward, it currently operates under the assumption of causal sufficiency, meaning it assumes no unobserved confounders exist. Additionally, the model requires a known causal DAG. Future work may involve integrating DCM with causal discovery algorithms to learn the graph structure directly from data and extending the framework to handle latent confounders in more complex, real-world environments.
Summary updated