Amortized Inference for Causal Structure Learning

Lars Lorch, Scott Sussex, Jonas Rothfuss, Andreas Krause, Bernhard Schölkopf

The Challenge of Causal Discovery

Inferring "who causes what"—known as causal structure learning—is a notoriously difficult inverse problem. The number of possible directed graphs grows superexponentially with the number of variables. To put this in perspective: for a system with just 10 variables, there are more possible graphs than atoms in the universe.

Traditional methods to solve this typically fall into two camps:

  1. Constraint-based: These rely on statistical tests for independence but often lack the domain-specific "common sense" (inductive bias) needed to resolve ambiguities.
  2. Score-based: These search for the graph that maximizes a specific score. However, these scores rely on rigid assumptions (e.g., assuming all relationships are linear) that rarely hold in complex, real-world fields like genomics.

While we have highly accurate simulators for many scientific fields (biology, climate, physics), we historically haven't had a good way to "bake" the knowledge from those simulators into our causal discovery algorithms without massive manual effort.

Introducing AVICI: Amortized Inference

To bridge this gap, the authors introduce AVICI (Amortized Variational Inference for Causal Discovery). Instead of treating causal discovery as a grueling, from-scratch search problem for every new dataset, AVICI "amortizes" the process by treating it as a supervised learning task.

  • Amortized Inference: Instead of starting a new search over an astronomical number of graphs for every new dataset, a neural network is trained once on data generated by a simulator. At test time, the model performs a single forward pass to output the causal graph, making inference incredibly fast.
  • Likelihood-Free Objective: AVICI optimizes the "forward KL divergence." This allows the model to learn from complex simulators where the underlying probability density (the likelihood) is mathematically intractable.
  • Acyclicity Constraint: Because causal graphs are typically assumed to be Directed Acyclic Graphs (DAGs), the authors incorporate a differentiable penalty based on the spectral radius of the predicted adjacency matrix to encourage valid structures.

The Architecture

AVICI's neural architecture processes data as a 3D tensor, applying attention mechanisms that preserve permutation invariances.

The model relies on a modified Transformer architecture that treats the input data as a 3D tensor (samples $\times$ variables $\times$ features). Crucially, the model is designed to be permutation invariant across samples (shuffling the rows of your dataset doesn't change the result) and permutation equivariant across variables (reordering columns simply reorders the predicted edges accordingly). This structural design is key to the model's statistical efficiency.

Datasets and Evaluation

The model was trained and evaluated across three primary domains:

  1. Linear SCMs: Standard synthetic structural causal models with linear relationships.
  2. Nonlinear SCMs (RFF): Models using Random Fourier Features to simulate complex, non-linear causal mechanisms.
  3. Gene Regulatory Networks (GRN): A "semisynthetic" domain using the SERGIO simulator. This mimics the stochastic dynamical systems of real-world gene expression data and is calibrated on actual single-cell RNA sequencing.

To rigorously test the model, the authors evaluated it on "out-of-distribution" (OOD) scenarios. This included testing on different graph types (e.g., Watts-Strogatz small-world graphs) and noise distributions (e.g., Cauchy noise) that the model never encountered during training.

Key Insights and Results

  • Simulation as Inductive Bias: The most powerful idea in AVICI is that researchers no longer need to mathematically define a "good" causal score. If a domain can be simulated, the neural network will automatically "discover" the appropriate inductive biases—like typical noise patterns or recurring graph motifs.
  • Generalization to Scale: Thanks to the permutation-equivariant architecture, a model trained on systems with up to 50 variables can successfully predict structures for systems with 100 variables.
  • Uncertainty Calibration: Unlike many deep learning models that are overconfident when wrong, AVICI produces well-calibrated edge probabilities. If the model predicts a 70% chance of an edge existing, empirical tests show that edge exists roughly 70% of the time.
  • State-of-the-Art Performance: AVICI significantly outperformed classical baselines (like PC, GES, and LiNGAM) and recent deep learning methods (like DCDI) across almost all metrics. In the challenging GRN domain with interventional data, AVICI achieved an F1 score of 0.338, crushing the next best baseline (GIES) which only managed 0.092.
  • Speed: Once trained, AVICI can infer a causal graph for 30 variables in just a few seconds on a standard CPU. Traditional search-based methods can take minutes or even hours for the same task.

Limitations and Future Work

While AVICI represents a major leap forward, it has a few limitations:

  • Soft Acyclicity: The model is encouraged to produce DAGs, but it doesn't guarantee acyclicity with 100% certainty. It may occasionally predict small cycles.
  • No Theoretical Guarantees: Unlike some classical methods proven to be "consistent" (guaranteed correct given infinite data), AVICI is a neural network and lacks formal asymptotic guarantees.
  • Causal Sufficiency: The current iteration assumes there are no unobserved "latent" variables confounding the observed ones. Extending AVICI to handle latent confounding is a prime target for future work.
  • Simulator Dependency: The model's real-world accuracy is bottlenecked by the quality of the simulator. If the simulator fundamentally diverges from reality, the model's performance will degrade.

Summary updated

BibTeX
@inproceedings{lorch2022amortized,
  author = {Lars Lorch and Scott Sussex and Jonas Rothfuss and Andreas Krause and Bernhard Schölkopf},
  title = {{Amortized Inference for Causal Structure Learning}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2022},
  url = {https://openreview.net/forum?id=DUb25JFezyK},
}
Figure