Latent Causal Invariant Model

Xinwei Sun, Botong Wu, Chang Liu, Xiangyu Zheng, Wei Chen, Tao Qin, Tie-Yan Liu

Abstract

Deep learning models frequently struggle with out-of-distribution (OOD) generalization because they tend to exploit spurious correlations present in training data. We introduce the Latent Causal Invariant Model (LaCIM), a framework designed to separate latent features into true causal factors and non-causal contextual factors. By integrating Structural Causal Models (SCMs) with deep generative modeling and leveraging data from multiple environments, LaCIM provides theoretical guarantees for the identifiability and disentanglement of these features. Experimental results across synthetic and real-world datasets, including medical imaging and DeepFake detection, demonstrate that LaCIM achieves superior robustness and interpretability compared to existing invariant learning methods.

Introduction

Standard supervised learning is essentially a correlation-matching mechanism. It minimizes error by exploiting any pattern in the training data, regardless of whether that pattern is causal. For instance, if a training set primarily features dogs on grass, a model may learn that "grass" is a predictive feature for "dog." When faced with a dog on snow—an out-of-distribution (OOD) scenario—the model fails.

While existing causal machine learning methods attempt to find "invariant" predictors across environments, they often assume that raw inputs (like pixels) are the direct causes of labels. However, semantic concepts like "shape" or "texture" are the true causes, not individual pixel values. LaCIM addresses this by performing causal reasoning within a latent semantic space.

The LaCIM Framework

LaCIM combines Structural Causal Models (SCMs) with variational inference to explicitly model the generation of data from latent variables.

Latent Separation and Confounding

The core idea is to split the latent space into two components: $S$ (causative factors, such as object shape) and $Z$ (non-causative factors, such as background context). Only $S$ has a direct causal effect on the label $Y$. To account for spurious correlations, the authors introduce a hidden confounder $C$ that influences both $S$ and $Z$. A domain variable $D$ shifts the distribution of $C$, explaining why correlations vary across environments.

Structural Causal Models (SCMs) for LaCIM, illustrating the transition from simple correlation to a latent space with a domain-influenced confounder.

Identifiability and Inference

The paper provides a rigorous theoretical proof: if data is available from a sufficient number of diverse environments, the true causal features $S$ can be mathematically identified and disentangled from the spurious features $Z$. In practice, this is implemented using a Variational Autoencoder (VAE) framework. During training, the model learns the invariant causal mechanisms; during testing, it optimizes the latent space to infer $S$ and $Z$, ultimately ignoring $Z$ to make robust predictions.

Experimental Evaluation

The authors evaluated LaCIM on several benchmarks:

  • Synthetic Data: Used to verify theoretical identifiability claims.
  • Colored MNIST (CMNIST): A standard OOD benchmark where digit color is spuriously correlated with the label.
  • NICO: Real-world images of animals in various contexts (e.g., cats in grass vs. snow).
  • ADNI: A medical dataset using MRI scans to predict Alzheimer’s Disease, with domains defined by patient attributes.
  • FaceForensics++: A dataset for DeepFake detection.

Results and Discussion

LaCIM consistently outperformed strong baselines such as Invariant Risk Minimization (IRM) and Domain-Adversarial Neural Networks (DANN). On Colored MNIST, LaCIM achieved 96.6% accuracy (vs. IRM's 92.9%), and on NICO, it reached 66.4% (vs. IRM's 62.8%).

Latent space visualizations comparing pool-LaCIM, LaCIM, and the ground truth distribution, demonstrating successful disentanglement of features.

Beyond accuracy, LaCIM offers improved interpretability. Gradient-based visualizations show the model focuses on the actual object of interest rather than background elements. In the ADNI medical dataset, LaCIM improved prediction accuracy across different age and biomarker domains, reaching up to 67.3%.

Conclusion and Limitations

LaCIM represents a significant step in bridging deep generative models with causal theory, providing a mathematical foundation for robust OOD generalization. However, its theoretical guarantees rely on having a sufficient number of diverse environments. In many real-world applications, data may only be available from a few domains, which may not satisfy the strict requirements for full disentanglement. Future research aims to relax these constraints to make the model more applicable to data-constrained scenarios.

Summary updated

BibTeX
@misc{sun2020latent,
  author = {Xinwei Sun and Botong Wu and Chang Liu and Xiangyu Zheng and Wei Chen and Tao Qin and Tie-Yan Liu},
  title = {{Latent Causal Invariant Model}},
  year = {2020},
  eprint = {2011.02203},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2011.02203},
}
Figure