Demystifying amortized causal discovery with transformers
Francesco Montagna, Max Cairney-Leeming, Dhanya Sridhar, Francesco Locatello
TL;DR
The paper ties identifiability theory to amortized causal discovery by analyzing CSIvA, a transformer-based model trained on synthetic data to infer causal graphs from observational data. It shows that the training-data distribution implicitly imposes a prior on test graphs, and that identifiability governs when the model can reliably recover the true causal structure. Empirically, CSIvA demonstrates strong in-distribution generalization but limited out-of-distribution generalization across unseen mechanism types and noise distributions; training on mixtures of identifiable SCMs markedly improves generalization across a broader class of models. The findings advocate for explicit incorporation of identifiability-inspired priors in learning-based causal discovery and propose mixture training as a practical route to broaden recoverable causal structures, while highlighting the remaining gap between theory and robust OOD performance.
Abstract
Supervised learning approaches for causal discovery from observational data often achieve competitive performance despite seemingly avoiding explicit assumptions that traditional methods make for identifiability. In this work, we investigate CSIvA (Ke et al., 2023), a transformer-based model promising to train on synthetic data and transfer to real data. First, we bridge the gap with existing identifiability theory and show that constraints on the training data distribution implicitly define a prior on the test observations. Consistent with classical approaches, good performance is achieved when we have a good prior on the test data, and the underlying model is identifiable. At the same time, we find new trade-offs. Training on datasets generated from different classes of causal models, unambiguously identifiable in isolation, improves the test generalization. Performance is still guaranteed, as the ambiguous cases resulting from the mixture of identifiable causal models are unlikely to occur (which we formally prove). Overall, our study finds that amortized causal discovery still needs to obey identifiability theory, but it also differs from classical methods in how the assumptions are formulated, trading more reliance on assumptions on the noise type for fewer hypotheses on the mechanisms.
