A Meta-Reinforcement Learning Algorithm for Causal Discovery

Andreas W. M. Sauter, Erman Acar, Vincent François-Lavet

Abstract

Uncovering the underlying causal structure of a phenomenon, domain or environment is of great scientific interest, not least because of the inferences that can be derived from such structures. Unfortunately though, identifying its causal structure poses significant challenges, including the need for costly interventions and the massive search space of possible structures. In this work, we propose a meta-reinforcement learning setup that addresses these challenges by learning a causal discovery algorithm called Meta-Causal Discovery (MCD). We model this algorithm as a policy trained on a set of environments with known causal structures to perform budgeted interventions while maintaining an estimate of the environment’s causal structure. The learned policy can estimate structures in milliseconds and performs well even in previously unseen environments. We empirically show that MCD estimates high-quality graphs compared to SOTA approaches, constituting a proof-of-concept for learning causal discovery algorithms.

Introduction

Identifying "who causes what" in a system—known as causal discovery—is a fundamental goal of science. However, it is notoriously difficult for two primary reasons. First, observational equivalence means some causal structures look identical under passive observation (e.g., $A \to B$ and $B \to A$ can produce identical correlations). Resolving these requires interventions, which are often expensive or impossible. Second, computational complexity is a major hurdle; the number of possible directed acyclic graphs (DAGs) grows super-exponentially with the number of variables. Current state-of-the-art (SOTA) methods often require significant computation time and large sample sizes for even small graphs.

The Meta-Causal Discovery (MCD) Framework

We frame causal discovery as a Meta-Reinforcement Learning problem. Instead of designing a fixed discovery algorithm, we train an RL agent to become the algorithm. By training on a variety of known causal environments, the model develops a policy that can perform targeted interventions and estimate the underlying causal graph of a brand-new environment in just milliseconds.

The MCD training and testing pipeline. Training involves learning from a distribution of environments to optimize a policy that performs interventions and estimates structure.

The agent interacts with the environment through two types of actions:

  • Intervention Actions: The agent can choose a "listening action"—either observing the system naturally or performing a specific $do$-intervention on a variable.
  • Structure Actions: The agent can add, delete, or reverse edges in its internal estimate of the graph.

Agent Architecture

The model uses an Actor-Critic with Experience Replay (ACER) architecture. A central feature is the inclusion of a Long Short-Term Memory (LSTM) layer. This allows the agent to remember the history of its previous interventions and observations within an episode, effectively "building" its understanding of the causal structure step-by-step.

The internal architecture of the MCD Agent Policy, featuring an LSTM core to process sequential observations and output both actions and value estimates.

The agent is rewarded based on the directed Structural Hamming Distance (dSHD)—the number of edge changes required to match the ground truth. It also receives a small "bonus" for performing interventions to encourage active exploration.

Key Results and Insights

MCD shifts the computational burden from test time to training time. While SOTA methods solve an optimization problem for every new dataset, MCD performs discovery via a few forward passes through a neural network.

  • Speed and Efficiency: MCD estimates causal structures in 23–30 milliseconds, whereas traditional SOTA methods can take several minutes.
  • Accuracy: On 3-variable and 4-variable benchmarks, MCD achieved significantly lower dSHD than NOTEARS, ENCO, and DCDI.
  • Robustness: MCD's performance remains stable even when the number of available interventional samples is severely restricted, outperforming other algorithms that degrade sharply in low-sample regimes.
  • Active Intervention: In toy experiments, the agent learned to specifically intervene on "root" variables that provide the most information to disambiguate causal directions.

Limitations and Future Work

While promising, MCD faces challenges in scalability, as the action space grows quadratically with the number of variables. Future research will focus on handling larger graphs, increasing the diversity of training models (e.g., non-linear relationships), and allowing the agent to learn more informative intervention values.

Summary updated

BibTeX
@inproceedings{sauter2023meta,
  author = {Andreas W. M. Sauter and Erman Acar and Vincent François-Lavet},
  title = {{A Meta-Reinforcement Learning Algorithm for Causal Discovery}},
  booktitle = {CLeaR},
  year = {2023},
  url = {https://openreview.net/forum?id=6iCBYl2rj4},
}
Figure