Introduction
Discovering the causal relationship between two variables from purely observational data—determining whether $X \rightarrow Y$ or $Y \rightarrow X$—is a fundamental challenge in science. A popular modern approach, Causal Generative Neural Networks (CGNN), models the data distribution for both possible directions and selects the one with the best fit. However, CGNN is notoriously data-hungry and computationally expensive, requiring a brand-new ensemble of networks to be trained from scratch for every new dataset.
This paper introduces meta-CGNN, a novel meta-learning algorithm for bivariate causal discovery. By leveraging dataset-feature extractors and adaptive neural network layers, the model learns to infer causal directions across multiple datasets without retraining. This approach drastically improves both inference speed and accuracy, particularly on small datasets where traditional methods often fail.
Methods
The authors propose an end-to-end encoder-decoder architecture that learns a Functional Causal Model (FCM).
The Encoder (Dataset-Feature Extractor)
To adapt to a new dataset, the model first encodes its underlying distribution into a feature vector. The authors explore two methods:
- DeepSets: A permutation-invariant neural network architecture for processing sets.
- Conditional Mean Embeddings (CME): A mathematically rigorous approach representing conditional probability distributions in a Reproducing Kernel Hilbert Space (RKHS). CMEs are particularly effective at capturing the "causal mechanism" of a dataset.
The Decoder (Adaptive Generator)
The decoder generates synthetic effect variables from cause variables and latent noise. To enable a single decoder to work across diverse datasets, the authors employ FiLM (Feature-wise Linear Modulation) layers. These layers take the dataset features from the encoder and apply affine transformations (shifts and scales) to the decoder's hidden layers, instantly adapting the network to the specific task.
Training and Inference
The model is trained jointly across many datasets to minimize the Maximum Mean Discrepancy (MMD) between generated and real data. At test time, the model performs a simple forward pass for both $X \rightarrow Y$ and $Y \rightarrow X$. The direction yielding the lowest MMD is chosen as the causal direction.
Key Results
The method was evaluated on synthetic datasets (CE-Net, CE-Gauss, and CE-Multi) and the real-world Tuebingen Cause-Effect benchmark.
- Superior Small-Data Performance: On datasets with only 100 samples, baseline methods like CGNN, ANM, and RECI saw significant performance degradation. Meta-CGNN maintained high Area Under the Precision-Recall Curve (AUPRC) across all benchmarks, demonstrating robustness to limited data.
- Massive Speedup: Because meta-CGNN only requires a forward pass at test time, inference takes less than one minute per dataset. In contrast, the baseline CGNN takes approximately 24 minutes due to its intensive retraining requirements.
- Real-World Viability: Meta-CGNN was among the top-performing methods on the real-world Tuebingen dataset, outperforming rigid parametric methods like Additive Noise Models (ANM).
Discussion
Meta-learning effectively addresses the small-data problem in causal inference by allowing the model to share statistical strength across tasks. By learning how to model causal mechanisms generally, meta-CGNN generalizes to new datasets with minimal samples. Furthermore, the use of CMEs as task embeddings provides a highly informative "fingerprint" of the causal mechanism.
While the method relies on MMD, which can scale quadratically with sample size, the authors mitigate this through Random Fourier Features. Future work could extend meta-CGNN to Reinforcement Learning, enabling agents to rapidly infer causal directions in dynamic environments.
Summary updated