Abstract
Causal discovery—identifying the underlying structure of relationships from observational data—is a fundamental challenge in science. Traditionally, this involves searching for the optimal Directed Acyclic Graph (DAG), a task that is NP-hard due to the super-exponential growth of the search space and the difficulty of enforcing acyclicity. We present CORL (Causal discovery with Ordering-based Reinforcement Learning), a novel framework that shifts the search from the space of graphs to the space of variable orderings. By leveraging an encoder-decoder architecture with a pointer mechanism and using the Bayesian Information Criterion (BIC) as a reward signal, CORL ensures acyclicity by construction and significantly reduces the search complexity. Our experiments show that CORL outperforms state-of-the-art methods on both linear and non-linear datasets, scaling effectively to 150-node graphs.
Introduction
Identifying "what causes what" is mathematically framed as finding a DAG that best fits observational data. However, two major hurdles exist: the astronomical number of possible DAG combinations ($O(2^{d^2})$) and the computational expense of enforcing acyclicity constraints. Previous Reinforcement Learning (RL) approaches attempted to generate graphs directly but struggled with scalability beyond 30 variables due to the massive action space.
CORL addresses these issues by searching for permutations (orderings) of variables. If a causal ordering is known (e.g., $X_1$ precedes $X_2$), one only needs to determine if $X_1$ is a parent of $X_2$, never the reverse, which inherently guarantees a cycle-free graph.
Methodology
CORL treats the discovery of variable orderings as a multi-step Markov Decision Process (MDP). The architecture consists of a Transformer-based encoder that embeds observational data and an LSTM-based decoder with a pointer mechanism to predict the sequence of variables.
The CORL Framework:
- Encoder: Uses self-attention to capture dependencies between variables in the latent space.
- Decoder: Predicts the next variable in the sequence based on the current state.
- Rewards: The agent is optimized using the BIC score. Two variants were developed: CORL-1 (episodic reward) and CORL-2 (dense rewards at each step).
- Pruning: After finding an optimal ordering, statistical methods (like Lasso or CAM) are used to remove spurious edges from the implied fully connected graph.
Key Insights and Learning Dynamics
A critical finding of this research is the impact of reward density and pretraining. CORL-2, which provides feedback at every step of sequence generation, converges faster and achieves higher rewards than the episodic CORL-1. Furthermore, pretraining the model on synthetic graphs significantly accelerates discovery on new tasks.
Experimental Results
The authors evaluated CORL against benchmarks including synthetic linear data (Erdös–Rényi and Scale-free graphs), non-linear Gaussian Process data, and the real-world Sachs biological dataset.
- Accuracy and Scalability: On 100-node linear graphs, CORL achieved a True Positive Rate (TPR) of 0.98, far exceeding the 0.93 of gradient-based methods like NOTEARS. While previous RL methods failed at this scale, CORL successfully handled up to 150 nodes.
- Error Reduction: CORL consistently produced the lowest Structural Hamming Distance (SHD), indicating its predicted graphs were the most accurate representations of the ground truth.
- Real-World Performance: On the Sachs dataset (11 nodes), CORL achieved an SHD of 11, significantly outperforming NOTEARS (SHD 19).
Conclusion
By reframing causal discovery as an ordering search problem, CORL bypasses the primary bottlenecks of traditional and gradient-based discovery methods. While calculating non-linear rewards remains a computational bottleneck for very large systems, the framework's ability to provide "acyclicity for free" and its superior scalability mark a significant advancement in the field. Future work will focus on optimizing reward calculations and extending the model to handle latent variables.
Summary updated