DeCaFlow: A deconfounding causal generative model

Alejandro Almodóvar, Adrián Javaloy, Juan Parras, Santiago Zazo, Isabel Valera

Introduction

Estimating causal effects from observational data is a fundamental challenge in science and policy-making. The primary obstacle is often the presence of hidden confounders—unobserved variables that influence both the treatment and the outcome, leading to biased estimates. While traditional causal inference methods often assume "causal sufficiency" (the absence of hidden confounders), real-world datasets rarely meet this criterion.

DeCaFlow (Deconfounding Causal Normalizing Flow) introduces a unified generative framework designed to perform accurate interventional and counterfactual inference in the presence of hidden confounding. By leveraging proxy variables within a Variational Autoencoder (VAE) architecture, DeCaFlow enables a "train once, query anything" paradigm, allowing researchers to answer diverse causal questions without the need for model retraining.

Methodology

DeCaFlow conceptualizes causal inference as a generative modeling task. It builds upon the architecture of a VAE but replaces standard components with specialized causal structures:

  1. The Generative Network (Decoder): This component utilizes a Causal Normalizing Flow (CNF). Unlike standard flows, a CNF is constrained to respect the structure of a directed acyclic graph (DAG). It models the data-generating process by conditioning observed variables on their parents and the inferred hidden confounders.
  2. The Deconfounding Network (Encoder): This is a conditional normalizing flow that estimates the posterior distribution of hidden confounders. It uses observed proxy variables—data points related to the hidden confounders but not directly causing the outcome—to "triangulate" the state of unobserved factors.
  3. Amortized Causal Inference: The authors introduce a modified do-operator for these flows. Once the model is trained, it can efficiently sample from interventional distributions ($P(Y|do(X))$) and counterfactual distributions ($P(Y_{X=x'} | X=x)$) for any node in the graph.

Theoretical Contributions

A significant contribution of this work is the bridge between interventional and counterfactual identifiability. The authors demonstrate that if an interventional query is identifiable using proxy variables in a continuous setting, its corresponding counterfactual query is also identifiable. This provides a rigorous theoretical foundation for using generative flows to answer "what if" questions in complex, confounded environments.

Experimental Evaluation

The model was evaluated against several benchmarks to test accuracy, scalability, and real-world utility:

Protein and Gene Regulatory Networks

  • Sachs Dataset: On a semi-synthetic version of this classic protein-signaling network, DeCaFlow outperformed Additive Noise Models (ANM) and standard CNFs that ignore confounding. It achieved performance levels near an "Oracle" model that had access to the hidden variables.
  • Ecoli70 Dataset: To test scalability, the authors used a network with 43 observed variables and 3 independent hidden confounders. DeCaFlow successfully estimated hundreds of distinct causal queries from a single training run, a feat that would require hundreds of separate models using traditional deconfounder methods.

Counterfactual Fairness

  • Law School Dataset: The model was applied to predict student success (decile) while ensuring fairness relative to sensitive attributes like race and sex. By treating these attributes as potential sources of confounding, DeCaFlow achieved a 98% reduction in Maximum Mean Discrepancy (MMD)—a measure of group disparity—compared to baseline models, while maintaining high predictive accuracy.

Key Insights

  • The Utility of Proxies: Ablation studies indicate that increasing the number of available proxies consistently improves model accuracy, suggesting that collecting "related" data is a practical path to overcoming unobserved confounding.
  • Robustness: DeCaFlow is robust to the over-specification of the latent space. As long as the latent dimension is sufficient to capture the true confounding, the model remains stable.
  • Efficiency: The ability to query any intervention across the entire graph after a single training session represents a significant leap in efficiency for causal discovery and analysis.

Limitations and Future Work

While DeCaFlow is a powerful tool, it relies on the existence of "sufficiently informative" proxies; if the observed data contains no information about the hidden confounders, the model cannot recover the true causal effects. Additionally, the current framework requires a pre-defined causal graph and is primarily optimized for continuous variables. Future research may focus on extending these guarantees to purely discrete data and integrating automated structure learning to relax the requirement for a known graph.

Summary updated

BibTeX
@inproceedings{almodovar2025decaflow,
  author = {Alejandro Almodóvar and Adrián Javaloy and Juan Parras and Santiago Zazo and Isabel Valera},
  title = {{DeCaFlow: A deconfounding causal generative model}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2025},
  url = {https://openreview.net/forum?id=mOYGK7Hw9Y},
}
Figure