Learned Causal Method Prediction

Shantanu Gupta, Cheng Zhang, Agrin HilmkilarXiv 2023

Abstract: For a given causal question, it is important to efficiently decide which causal inference method to use for a given dataset. This is challenging because causal methods typically rely on complex and difficult-to-verify assumptions, and cross-validation is not applicable since ground truth causal quantities are unobserved. In this work, we propose CAusal Method Predictor (CAMP), a framework for predicting the best method for a given dataset. To this end, we generate datasets from a diverse set of synthetic causal models, score the candidate methods, and train a model to directly predict the highest-scoring method for that dataset. Next, by formulating a self-supervised pre-training objective centered on dataset assumptions relevant for causal inference, we significantly reduce the need for costly labeled data and enhance training efficiency. Our strategy learns to map implicit dataset properties to the best method in a data-driven manner. In our experiments, we focus on method prediction for causal discovery. CAMP outperforms selecting any individual candidate method and demonstrates promising generalization to unseen semi-synthetic and real-world benchmarks.

Introduction

Causal discovery—the process of inferring cause-and-effect relationships from observational data—is a cornerstone of scientific inquiry. However, the field is currently saturated with dozens of algorithms, each relying on specific, often untestable assumptions such as linearity or Gaussian noise. In standard machine learning, researchers use cross-validation to select the best model. In causal inference, this is impossible because the "ground truth" causal graph is typically unobserved in real-world settings. Consequently, researchers often default to popular methods or subjective heuristics.

CAMP (CAusal Method Predictor) addresses this gap by using deep learning to automatically select the most effective causal discovery algorithm for a specific dataset. By treating algorithm selection as a meta-learning problem, CAMP maps a dataset’s implicit statistical signatures to the algorithm most likely to succeed.

Methodology

The CAMP framework utilizes a deep neural network architecture designed to handle tabular data efficiently. The core of the model is a permutation-invariant Transformer-based encoder, ensuring that the order of samples or variables in the input matrix does not affect the prediction.

The CAMP architecture for predicting causal discovery methods.

The authors propose two primary training regimes:

  1. CAMP-Sup (Supervised): The model is trained to take a dataset as input and directly classify which candidate method (e.g., DirectLiNGAM, NOTEARS, GraNDAG, or DECI) will yield the highest F1-score.
  2. CAMP-SemiSup (Semi-supervised): This version introduces a self-supervised pre-training step where the model learns to predict high-level dataset properties (assumptions) like linearity or noise distribution. This "warm-up" phase injects useful inductive biases, allowing the model to reach peak performance with 50% less labeled data than the fully supervised version.

Experimental Setup and Datasets

To train and evaluate CAMP, the researchers utilized a diverse array of data sources:

  • Synthetic Training Data: Generated from various Structural Causal Models (SCMs), including Linear Gaussian, Additive Noise Models (ANM), and Post-nonlinear (PNL) models.
  • Out-of-Distribution (OOD) Synthetic: Testing generalization on graphs with up to 40 nodes and different topologies (e.g., scale-free) not seen during training.
  • Semi-synthetic Benchmarks: Gene networks such as MAGIC-NIAB and SynTReN were used to test performance on complex biological structures.
  • Real-world Benchmark: The Sachs protein signaling dataset, a gold-standard benchmark in the causal discovery community.

Key Insights and Results

CAMP demonstrates that meta-learning is a viable path for automating causal inference. Key findings include:

  • Superior Accuracy: CAMP significantly outperformed the "best-on-average" heuristic (typically the DECI method). On synthetic data, it matched the performance of "oracles" that were manually provided with the exact SCM type.
  • Robust Generalization: Despite being trained on small synthetic graphs (8–12 nodes), CAMP successfully generalized to much larger semi-synthetic graphs (up to 64 nodes) and real-world data.
  • Ranking Capability: Beyond picking the top method, CAMP’s predicted probabilities correlate strongly with the actual performance ranking of all candidate methods.

LLM Integration

A unique application of CAMP is its integration as a "tool" for Large Language Models (LLMs). This allows users to pose causal questions in natural language, while CAMP handles the technical complexity of method selection and execution in the background.

Example of CAMP integrated as a tool within an LLM interface.

Limitations and Future Work

While CAMP shows great promise, its performance relative to an ideal oracle begins to degrade as the number of variables increases significantly (40+ nodes). Furthermore, the current framework is focused on causal discovery. Future work aims to extend this meta-learning approach to treatment effect estimation and covariate selection, further broadening the scope of automated causal analysis.

Summary updated

BibTeX
@misc{gupta2023learned,
  author = {Shantanu Gupta and Cheng Zhang and Agrin Hilmkil},
  title = {{Learned Causal Method Prediction}},
  year = {2023},
  eprint = {2311.03989},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2311.03989},
}
Figure