Ψnet: Efficient Causal Modeling at Scale

Florian Peter Busch, Moritz Willig, Jonas Seng, Kristian Kersting, Devendra Singh DhamiPGM 2024

TL;DR

This paper introduces Ψnet, a novel causal probabilistic circuit designed for efficient causal inference in large-scale, high-dimensional settings. By leveraging the efficiency of einsum networks and incorporating interventional data, Ψnet achieves competitive accuracy while drastically outperforming existing methods in inference speed, making causal reasoning practical for complex real-world problems.

What Problem Does This Paper Address?

Modern machine learning models often rely on correlations, limiting their robustness and ability to predict the effects of interventions. While causal models offer better generalization and prediction under interventions, they typically struggle with scalability, especially in high-dimensional scenarios. Existing methods for causal inference, such as Causal Bayesian Networks (CBNs) and Structural Causal Models (SCMs), face #P-hard complexity for exact inference, making them impractical for large datasets. Probabilistic circuits (PCs) offer tractable inference but have historically been limited to smaller-scale causal problems. This paper aims to bridge this gap by developing a scalable causal model that can handle thousands of variables and perform efficient causal inference.

Methods

The core contribution is Ψnet, a causal probabilistic circuit built upon einsum networks (EiNets). EiNets are a type of Sum-Product Network (SPN) that uses the einsum operation for efficient parallel computation, allowing them to scale to large numbers of variables.

Ψnet extends EiNets by:

  • Parameterizing with a Neural Network: Instead of fixed parameters, Ψnet uses a neural network ($f_\theta$) to dynamically set the parameters ($\psi = \{W, \lambda\}$) of the underlying EiNet based on the causal setting ($C$). The causal setting describes how an intervention modifies the observational SCM.
  • Learning from Interventional Data: The neural network is trained using interventional data, allowing it to learn how to adjust the EiNet parameters to approximate the interventional distribution.
  • End-to-End Training: Ψnet is trained end-to-end using a negative log-likelihood loss. Crucially, only the neural network's weights ($\theta$) are updated during training, as the EiNet parameters are derived from it.

This architecture allows Ψnet to answer causal queries (e.g., $P(X=x|do(X_1=1))$) by first passing the causal setting through the neural network to obtain the EiNet parameters, and then performing a single pass through the EiNet for inference.

Datasets

  • Synthetic Datasets: Generated with varying numbers of nodes and edges (e.g., 5/5, 10/12, ..., 100/250) to test model performance under controlled conditions.
  • CausalBench: A large-scale, real-world benchmark consisting of two datasets (K562 and RPE1) with observational and interventional data (representing gene knockdowns, i.e., soft interventions). This dataset is used for evaluating performance on high-dimensional, real-world causal problems.

Key Insights and Ideas

  • Scalability is Key for Causal Inference: The paper strongly emphasizes that for causal models to be useful in real-world applications, they must be able to handle large numbers of variables. Traditional methods fail here due to computational complexity.
  • EiNets as a Foundation for Scalable Causal Models: The einsum operation within EiNets provides a significant computational advantage, making them a promising building block for scalable probabilistic models.
  • Neural Networks as Dynamic Parameterizers: Using a neural network to dynamically set the parameters of a probabilistic circuit based on the intervention context is a powerful way to adapt the model to different causal settings without retraining the entire circuit.
  • Inference Speed is Crucial: While accuracy is important, the paper highlights that for large-scale problems, inference speed can be a critical bottleneck. Ψnet's architecture prioritizes this, offering orders of magnitude speedup.
  • Loss Optimization Isn't Everything: The experiments show that simply optimizing for training loss can lead to overfitting and hinder performance on validation metrics. A simpler architecture (Ψnet*) that avoids overfitting can sometimes perform better.

Key Results

  • Synthetic Data: Ψnet and iSPN consistently outperform NCM on synthetic datasets, with Ψnet showing faster convergence and better performance on larger problems.
  • CausalBench (K562 & RPE1):
    • Accuracy: Ψnet* (a simpler variant) achieves comparable mean squared error (MSE) to iSPN, and both significantly outperform NCM.
  • Speed: Ψnet is dramatically faster than both iSPN and NCM. For instance, on the K562 dataset, Ψnet takes around 550 seconds, while iSPN takes ~2600 seconds, and NCM takes over 50,000 seconds. This represents an order of magnitude improvement over iSPN and even greater for NCM.
  • Inference Time: Table 1 shows that Ψnet is orders of magnitude faster than iSPN for larger problems, and NCM is significantly slower due to its sample-based approach and graph traversal.

Limitations and Future Work

  • Interventions on Single Variables: The current work primarily focuses on interventions on single variables. The authors suggest that extending this to interventions on multiple variables simultaneously is a natural next step.
  • Hyperparameter Sensitivity: The paper notes that finding the right hyperparameters can be challenging, especially for large-scale problems. Transferring hyperparameters between datasets (e.g., K562 to RPE1) did not always preserve high accuracy, indicating a need for more robust hyperparameter selection or model adaptation.
  • Real-World Datasets: The authors point out that a lack of diverse, large-scale real-world causal datasets (beyond CausalBench) is a limitation for applying and evaluating causal models.
  • Model Robustness: Future work aims to improve model performance and make finding optimal parameters easier, as well as making Inets more robust to hyperparameter choices.

Summary updated

BibTeX
@inproceedings{busch2024net,
  author = {Florian Peter Busch and Moritz Willig and Jonas Seng and Kristian Kersting and Devendra Singh Dhami},
  title = {{Ψnet: Efficient Causal Modeling at Scale}},
  booktitle = {PGM},
  year = {2024},
}
Figure