Gradient-Based Neural DAG Learning

Sébastien Lachapelle, Philippe Brouillard, Tristan Deleu, Simon Lacoste-Julien

Introduction

In causal discovery, the primary goal is to find the "Directed Acyclic Graph" (DAG) that accurately describes how variables influence one another—for instance, determining whether smoking causes cancer, or if a confounding third factor causes both.

Traditionally, learning this structure from observational data is a daunting task because the space of possible graphs grows super-exponentially with the number of variables. For decades, researchers relied on "greedy" search algorithms that add or remove edges one by one. While effective, this process is often slow and prone to getting stuck in local optima.

A recent breakthrough called NOTEARS demonstrated that for linear models, this combinatorial search could be transformed into a smooth, continuous optimization problem using a clever mathematical constraint. However, real-world biological or economic systems are rarely linear. This paper introduces GraN-DAG (Gradient-Based Neural DAG Learning), which extends this continuous optimization framework to handle complex, nonlinear interactions using neural networks.

Methodology: The GraN-DAG Approach

GraN-DAG transforms the combinatorial nightmare of causal structure learning into a continuous optimization problem that neural networks can solve via standard gradient descent. The approach is broken down into several key steps:

  1. Neural Network per Node: For a system with $d$ variables, the model trains $d$ separate neural networks. Each network $j$ is tasked with predicting the distribution of variable $X_j$ based on all other variables in the system.
  2. The Connectivity Matrix: To enforce that the resulting graph is a DAG (meaning it has no circular dependencies), the authors need a way to "measure" the strength of an edge in a nonlinear model. They define a weighted adjacency matrix $A_\phi$ where each entry $(i, j)$ is calculated by taking the product of the absolute values of the weights across all layers of the $j$-th neural network. If this product is zero, variable $i$ has no mathematical path to influence variable $j$.
  3. Differentiable Acyclicity: The core innovation relies on a mathematical property involving the matrix exponential: $\text{Tr}(e^{A_\phi}) - d = 0$. This equation evaluates to zero if and only if the graph is acyclic. Because this formula is fully differentiable, it can be seamlessly integrated as a penalty constraint in the neural network's loss function.
  4. Optimization: The model employs the Augmented Lagrangian method. This allows the algorithm to maximize the log-likelihood of the data (fitting the model accurately) while gradually increasing the penalty for any cycles detected in the graph.
  5. Refinement: After the optimization phase, thresholding is applied to remove weak edges, followed by a pruning step (preliminary neighbor selection) to ensure the final causal graph is sparse and interpretable.

Key Insights

  • Weights as Proxies for Paths: The most elegant insight of GraN-DAG is realizing that the existence of a causal path through a deep neural network can be verified simply by looking at the product of its weight matrices. This effectively bridges the gap between deep learning architectures and graph theory.
  • Global vs. Local Search: Unlike greedy algorithms that make local, incremental changes to a graph, GraN-DAG updates the entire adjacency matrix simultaneously. This "global" view helps the model avoid some of the common pitfalls and local optima of traditional search methods.
  • The Identifiability Advantage: The paper leverages the fact that nonlinear "Additive Noise Models" are often fully identifiable from observational data alone. In contrast, linear models often leave researchers with a set of equally likely graphs (known as Markov equivalence classes).

Key Results

The authors evaluated GraN-DAG on a mix of synthetic datasets (Gauss-ANM, Linear & Additive Models, SynTReN) and real-world data (the Sachs protein signaling dataset).

Performance comparison of GraN-DAG against baselines on synthetic datasets (SHD and SID metrics).
  • Superiority over Continuous Baselines: As seen in the performance metrics, GraN-DAG significantly outperforms other continuous methods like NOTEARS (which is limited by its linearity assumption) and DAG-GNN on nonlinear synthetic tasks.
  • Competitive with Greedy Search: GraN-DAG proved highly competitive with CAM, a top-performing greedy search method. This is particularly true as sample sizes increase. In high-sample regimes, GraN-DAG often achieved a lower Structural Interventional Distance (SID)—a crucial metric that measures how well the learned graph predicts the results of actual interventions.
  • Real-World Performance: On the Sachs protein dataset (11 nodes, 17 edges), GraN-DAG achieved a Structural Hamming Distance (SHD) of 13, placing it on par with or better than most state-of-the-art causal discovery algorithms.

Limitations and Future Work

While GraN-DAG represents a significant step forward for nonlinear causal discovery, it comes with trade-offs:

  • Computational Complexity: The acyclicity constraint requires calculating a matrix exponential, which scales at $O(d^3)$. While this is manageable for graphs with around 100 nodes, it becomes a severe bottleneck for thousands of variables (e.g., full-genome studies).
  • Non-Convexity: Because neural networks are inherently non-convex, the algorithm is not mathematically guaranteed to find the global maximum likelihood and may sometimes settle for a "good" local optimum.
  • Data Requirements: As a deep learning-based method, GraN-DAG generally requires more observational samples to perform well compared to simpler linear models. Future work exploring different neural architectures or regularization schemes could help improve its performance in low-data regimes.

Summary updated

BibTeX
@inproceedings{lachapelle2020gradient,
  author = {Sébastien Lachapelle and Philippe Brouillard and Tristan Deleu and Simon Lacoste-Julien},
  title = {{Gradient-Based Neural DAG Learning}},
  booktitle = {International Conference on Learning Representations},
  year = {2020},
  url = {https://openreview.net/forum?id=hKjfRpxZl1},
}
Figure