NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Domain Generalization - A Causal Perspective

Paras Sheth, Raha Moraffah, K. Selçuk Candan, Adrienne Raglin, Huan LiuarXiv 2022 · DOI

Standard machine learning models often fail when encountering "distribution shift"—situations where test data differs significantly from training data. This survey explores Domain Generalization (DG) through the lens of causality, categorizing methods that leverage causal invariance to build robust models that ignore spurious correlations and focus on the underlying mechanisms that remain stable across environments.

The Problem: Spurious Correlations and Distribution Shift

Most machine learning models rely on the i.i.d. assumption: that training and testing data are drawn from the same distribution. In real-world scenarios, this assumption is frequently violated. A model might learn "spurious correlations"—patterns that exist in the training data but do not represent the underlying causal mechanism. For example, a model trained to recognize digits might inadvertently rely on background color if that color is correlated with specific digits in the training set.

Figure 1: A model trained on standard MNIST data fails to generalize to Colored MNIST test data, resulting in a significant drop in prediction accuracy due to reliance on spurious features.

The goal of Domain Generalization is to train a model on multiple "source" domains such that it performs well on an unseen "target" domain. Causality provides a framework for this: while correlations (like the color of a background) may shift across environments, causal relationships (like the shape of a digit) remain invariant.

A Taxonomy of Causal Domain Generalization

The authors propose a structured taxonomy to categorize causal DG methods based on their point of intervention within the machine learning pipeline.

Figure 2: A comprehensive taxonomy of Causal Domain Generalization methods, categorized by Invariance via Causal Representations, Causal Mechanisms, and Causal Data Augmentation.

1. Invariance via Causal Data Augmentation

These pre-processing methods generate counterfactual examples to break spurious associations. By programmatically altering non-causal variables—such as rotating a digit or changing its color—the model is taught that these features should not affect the classification outcome. In NLP, this often involves generating counterfactual sentences to ensure models don't latch onto specific "toxic" tokens that are actually neutral in context.

2. Invariance via Learning Causal Representations

These methods focus on representation learning to disentangle causal features (e.g., the shape of an object) from non-causal features (e.g., the background). Techniques like "backdoor" or "front-door" adjustments are employed to mitigate the influence of confounding variables that create misleading correlations. This approach often treats the domain (e.g., "sketch" vs. "photo") as a "style" variable to be separated from the "content."

3. Invariance via Causal Mechanisms

This approach targets the classification stage, focusing on the mechanism that generates the label. A prominent example is Invariant Risk Minimization (IRM), which seeks a data representation where the optimal classifier remains consistent across all training domains. If a predictor is optimal everywhere, it is likely capturing a true causal mechanism rather than a local correlation.

Benchmarks and Modalities

The survey outlines benchmarks across various fields, highlighting that while vision is the most mature, other areas are growing:

  • Vision: PACS (Photo, Art, Cartoon, Sketch), OfficeHome, and Colored MNIST.
  • Text: Multi-NLI (Natural Language Inference), CivilComments, and Amazon Kindle Reviews.
  • Graphs: Identification of invariant subgraphs (rationales) in biological datasets like PROTEINS.

Synthesis and Future Directions

While causality offers a robust path forward, several challenges remain. Causal discovery—identifying the causal graph from raw data—is notoriously difficult, and most current methods assume the graph is known. Furthermore, the presence of unobserved confounders continues to plague current models. Future research must expand beyond computer vision into NLP and graph-based learning, developing new metrics that measure causal representation rather than just simple accuracy.

Summary updated

BibTeX
@misc{sheth2022domain,
  author = {Paras Sheth and Raha Moraffah and K. Selçuk Candan and Adrienne Raglin and Huan Liu},
  title = {{Domain Generalization - A Causal Perspective}},
  year = {2022},
  eprint = {2209.15177},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2209.15177},
}
Figure