Partial transportability for domain generalization

Alexis Bellot, Elias Bareinboim

Abstract

A fundamental task in AI is providing performance guarantees for predictions made in unseen domains. In practice, there can be substantial uncertainty about the distribution of new data, and corresponding variability in the performance of existing predictors. Building on the theory of partial identification and transportability, this paper introduces new results for bounding the value of a functional of the target distribution, such as the generalization error of a classifier, given data from source domains and assumptions about the data generating mechanisms, encoded in causal diagrams. Our contribution is to provide the first general estimation technique for transportability problems, adapting existing parameterization schemes such Neural Causal Models to encode the structural constraints necessary for cross-population inference. We demonstrate the expressiveness and consistency of this procedure and further propose a gradient-based optimization scheme for making scalable inferences in practice. Our results are corroborated with experiments.

Introduction: The Challenge of Domain Generalization

The goal of robust AI is to develop models that maintain performance when deployed in new environments (target domains) where underlying data-generating mechanisms may have shifted. Standard machine learning typically assumes that training and testing data are independent and identically distributed (i.i.d.). However, in real-world applications, this assumption is frequently violated. While Domain Generalization (DG) techniques attempt to identify invariant features, they often rely on statistical proxies that fail under structural changes.

Causal inference provides a more rigorous framework known as Transportability, which utilizes causal diagrams to transfer knowledge from source domains to a target domain. A significant hurdle in this approach is that the causal graph and available data often do not uniquely identify the target distribution. In such "non-transportable" scenarios, traditional methods fail to provide answers. This research addresses this gap by shifting the focus from point identification to partial identification, allowing for the calculation of tight upper bounds on risk even under uncertainty.

Causal diagrams for source and target domains, including the selection diagram $\mathcal{G}^\Delta$ used to model distribution shifts.

Methodology: Neural-TR and Causal Robust Optimization

The paper introduces two primary technical contributions to bridge causal theory and practical machine learning:

  1. Neural Transportability (Neural-TR): This gradient-based estimation technique employs Neural Causal Models (NCMs). In an NCM, causal mechanisms are represented by neural networks that encode the structural constraints of a causal graph. Neural-TR optimizes these networks to identify the "worst-case" target distribution consistent with the observed source data and causal assumptions.
  2. Causal Robust Optimization (CRO): This is an iterative, adversarial training framework. It utilizes Neural-TR as a subroutine to generate the most challenging target domain for a given model. The model is then updated to minimize its risk on this adversarial domain. This process continues until the model achieves robustness against any plausible target domain permitted by the causal graph.
Comparison between a selection diagram $\mathcal{G}^\Delta$ and a null diagram $\mathcal{G}^\mathcal{N}$, illustrating how structural constraints are encoded for cross-population inference.

Experimental Evaluation

The framework was validated using both controlled simulations and semi-synthetic benchmarks:

  • Simulated Causal Models: These included the "Bow Model" and various multi-variable synthetic graphs designed to simulate specific distribution shifts, such as covariate shifts and mechanism changes.
  • Colored MNIST (CMNIST): A benchmark where digit color serves as a spurious correlation. In this task, the correlation between color and label is strong during training but changes or reverses in the target domain.

Key Insights

  • Partial Identification as a Safety Guarantee: When the target distribution is unidentifiable, partial transportability provides a mathematically sound "worst-case" bound, offering a safety guarantee that point estimates cannot provide.
  • The Role of Descendants: The research suggests that "causal" predictors (using only direct causes) are not always the most stable. Descendants of the outcome may offer better performance if their mechanisms remain more invariant across domains.
  • Causal Adversarial Generation: CRO functions similarly to a "causal GAN," generating "fake domains" that are structurally consistent with causal knowledge but optimized to challenge the classifier's robustness.

Results and Discussion

Experiments demonstrate that Neural-TR effectively identifies tight upper bounds on generalization risk. In complex synthetic scenarios, the worst-case risk estimates converged to theoretical bounds. On the CMNIST benchmark, while standard methods like Empirical Risk Minimization (ERM) or Invariant Risk Minimization (IRM) suffered up to 95% error when correlations flipped, CRO learned to ignore spurious color features, achieving a stable error rate of approximately 25%, which aligns with the theoretical optimum for grayscale information.

Limitations and Future Directions

Despite its strengths, the framework has limitations:

  • Graph Dependency: The method relies on a pre-defined selection diagram. Obtaining accurate graphs in high-dimensional domains like computer vision remains difficult.
  • Computational Scalability: While Neural-TR improves upon symbolic methods, optimizing over very large causal graphs with hundreds of variables is still computationally intensive.
  • Future Work: Potential research directions include exploring "partial knowledge" of graphs (e.g., causal equivalence classes) and incorporating specific Structural Causal Model (SCM) assumptions, such as linear Gaussian models, to enhance efficiency in high-dimensional spaces.

Summary updated

BibTeX
@inproceedings{bellot2024partial,
  author = {Alexis Bellot and Elias Bareinboim},
  title = {{Partial transportability for domain generalization}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2024},
  url = {https://openreview.net/forum?id=2V5LTfhcfd},
}
Figure