Abstract
Causal inference aims to understand the mechanisms of cause and effect, moving beyond mere statistical correlation. This paper introduces Causal Autoregressive Flows (CAREFL), a framework that utilizes affine autoregressive normalizing flows to model Structural Equation Models (SEMs). By leveraging the inherent properties of normalizing flows—exact likelihood computation and invertibility—CAREFL provides a unified approach for causal discovery, interventions, and counterfactual reasoning. We demonstrate that the affine constraint ensures model identifiability, allowing for robust causal direction discovery across various noise distributions and functional forms.
Introduction
Determining the causal relationship between variables is a fundamental challenge in data science. Traditional Structural Equation Models (SEMs) often struggle with identifiability; without strong assumptions like additive noise or specific functional forms, it is frequently impossible to distinguish between $X \to Y$ and $Y \to X$. Furthermore, downstream tasks such as predicting the effects of interventions or performing counterfactual "what-if" analysis often require separate, computationally intensive procedures.
Methods
CAREFL proposes using Autoregressive Normalizing Flows as a proxy for SEMs. A normalizing flow learns an invertible mapping $T$ that transforms a simple base distribution (e.g., Gaussian) into the complex observed data distribution.
The Affine Constraint and Identifiability
A key contribution is the use of affine autoregressive flows, where each variable $x_j$ is modeled as $x_j = e^{s(x_{<j})} z_j + t(x_{<j})$. The authors prove that this specific restriction makes the model identifiable. While more flexible flows could fit any data distribution in any direction, the affine constraint ensures that the "true" causal direction yields a significantly higher likelihood, serving as a tool for discovery.
Causal Discovery and Reasoning
- Discovery: Causal direction is determined by comparing the log-likelihood of the data under different variable orderings (e.g., $X \to Y$ vs. $Y \to X$). The ordering with the higher likelihood on test data is selected.
- Interventions: Predicting the outcome of an intervention (e.g., $do(X=x)$) is straightforward due to the generative nature of the flow.
- Counterfactuals: Counterfactual reasoning involves "abduction," "action," and "prediction." Because flows are invertible, abduction—calculating the latent noise $z$ for a specific observation $x$—is trivial: $z = T^{-1}(x)$.
Results
The authors evaluated CAREFL against several benchmarks, including synthetic SEMs and real-world datasets.
Synthetic Benchmarks
As shown in the figure above, CAREFL consistently achieves high accuracy across linear, additive, affine, and post-nonlinear SEMs. Notably, it maintains performance in high-dimensional settings (e.g., 20-variable SEMs) where traditional methods like ANM may struggle.
Real-World Performance
On the Tübingen Cause-Effect Pairs benchmark, CAREFL achieved 73% accuracy, outperforming established methods such as Additive Noise Models (ANM, 69%) and Regression Error Causal Inference (RECI, 69%). The model also demonstrated superior performance in predicting interventional outcomes in fMRI brain activity data, achieving a lower Median Absolute Error (0.586) compared to linear SEMs (0.643).
Robustness and Decision Rate
CAREFL's performance is robust to various noise distributions (Gaussian, Laplace, Student-t). Furthermore, when evaluating accuracy against the "decision rate" (the proportion of pairs for which the model is most confident), CAREFL maintains high precision even at high decision rates, as illustrated in the figure above.
Conclusion
CAREFL bridges generative modeling and causal inference, providing a flexible yet identifiable framework for structural modeling. By using affine autoregressive flows, it offers a unified solution for discovery, intervention, and counterfactual analysis. Future work includes scaling the approach to larger graphs by integrating with continuous structure learning algorithms.
Summary updated