Discovering causal relations from purely observational data is a fundamental challenge in science. This paper introduces DiffAN (Diffusion Additive Noise), a scalable framework for causal discovery that leverages the power of Diffusion Probabilistic Models (DPMs).
By approximating the Hessian of the data log-likelihood through neural network backpropagation, DiffAN efficiently finds the topological ordering of causal graphs. It bypasses the prohibitive computational costs of traditional kernel-based approaches, scaling to datasets with 500 nodes and $10^5$ samples—orders of magnitude larger than previous state-of-the-art methods.
The Bottleneck in Causal Discovery
Mathematically, causal discovery involves finding a Directed Acyclic Graph (DAG) that represents the relationships between variables. However, the search space for DAGs grows exponentially with the number of variables, making the problem NP-hard.
A popular shortcut is topological ordering. If we can determine the correct order of variables (from "leaf" nodes that cause nothing to "root" nodes that are caused by nothing), the problem simplifies significantly. Recent work, such as the SCORE algorithm, showed that for Nonlinear Additive Noise Models (ANMs), the Hessian (second-order derivatives) of the data's log-likelihood can identify leaf nodes.
The catch? Previous methods relied on kernel-based estimators to calculate this Hessian. These require inverting large matrices, meaning they hit a "computational wall" as soon as datasets exceed a few thousand samples.
The DiffAN Approach
The authors propose DiffAN, which replaces expensive kernel methods with Diffusion Models.
- Score Estimation via DPMs: Diffusion models are trained to reverse a noise-adding process. In doing so, they naturally learn the "score function" ($\nabla \log p(x)$) of the data distribution.
- Hessian via Backpropagation: Instead of kernel tricks, DiffAN computes the Jacobian of the learned score function—which is equivalent to the Hessian of the log-likelihood—using standard auto-differentiation (backpropagation) through the neural network. This is computationally efficient and scales linearly with the number of samples.
- The "Deciduous Score": This is the paper's most clever theoretical contribution. Normally, when you identify and remove a leaf node to find the next one, the data distribution changes, requiring you to retrain your model. The authors derive a mathematical update rule that allows them to adjust the existing score model to reflect the removal of a node without retraining.
- Iterative Ordering: The algorithm identifies the node with the lowest Hessian variance as the leaf, removes it, updates the score using the "deciduous" formula, and repeats until the entire graph is ordered.
Key Insights
- Neural Networks as Constant-Time Query Engines: Once a DPM is trained on $n$ samples, querying the score or Hessian for a small batch takes constant time. This decouples the complexity of "learning the distribution" from the complexity of "ordering the graph."
- Subsampling Works: The authors found that while you should train on the full dataset to get an accurate score model, you only need a small subsample to estimate the Hessian variance accurately enough to find leaf nodes.
- The Power of Multi-scale Noise: Diffusion models are trained across multiple noise scales. The authors found that "majority voting" across different noise levels provides a more robust leaf identification than picking a single noise level.
Key Results
The authors evaluated DiffAN on both synthetic benchmarks (Erdős-Rényi and Scale-Free graphs up to 500 nodes) and real-world datasets (the Sachs protein signaling network and SynTReN gene expression simulator).
- Massive Scalability: While the previous state-of-the-art (SCORE) became intractable beyond 2,000 samples on a 64GB RAM machine, DiffAN easily handled 100,000 samples.
- High-Dimensional Success: DiffAN successfully ordered graphs with 500 nodes, a regime where most traditional causal discovery methods struggle or fail entirely.
- Competitive Accuracy: On smaller datasets where baselines could run (like Sachs or 20-node synthetic graphs), DiffAN performed on par with or better than CAM, GranDAG, and SCORE in terms of Structural Hamming Distance (SHD) and Structural Intervention Distance (SID).
Limitations and Future Work
While highly scalable, DiffAN's theory relies on the Additive Noise Model (ANM) assumption and "causal sufficiency" (assuming no unobserved hidden variables). Furthermore, DiffAN primarily provides the topological ordering. To get the final graph, a post-processing "pruning" step is still required to remove spurious edges, meaning the quality of the final graph is somewhat dependent on this secondary step.
Looking forward, the authors suggest that future work could leverage the generative side of DPMs to perform downstream causal inference tasks, such as predicting the outcome of interventions or calculating counterfactuals.
Summary updated