Causally Inspired Regularization Enables Domain General Representations

Olawale Salaudeen, Sanmi Koyejo

Abstract

Given a causal graph representing the data-generating process shared across different domains/distributions, enforcing sufficient graph-implied conditional independencies can identify domain-general (non-spurious) feature representations. For the standard input-output predictive setting, we categorize the set of graphs considered in the literature into two distinct groups: (i) those in which the empirical risk minimizer across training domains gives domain-general representations and (ii) those where it does not. For the latter case (ii), we propose a novel framework with regularizations, which we demonstrate are sufficient for identifying domain-general feature representations without a priori knowledge (or proxies) of the spurious features. Empirically, our proposed method is effective for both (semi) synthetic and real-world data, outperforming other state-of-the-art methods in average and worst-domain transfer accuracy.

Introduction

Standard machine learning models often fail when deployed in new environments or "domains." This failure typically stems from the model latching onto spurious correlations—shortcuts in the training data that do not hold true globally. For example, a model trained to identify cows might rely on green pasture backgrounds; if it encounters a cow on a beach, it fails.

Existing solutions like Invariant Risk Minimization (IRM) attempt to find stable features across domains but often require an impractical amount of data or manual identification of spurious features. This paper introduces Target Conditioned Representation Independence (TCRI), a novel regularization framework that leverages causal graph theory to isolate domain-general features from spurious ones automatically.

Causal Foundations of Domain Generalization

A key contribution of this work is the categorization of causal structures into "easy" and "hard" Directed Acyclic Graphs (DAGs). In "easy" cases, standard Empirical Risk Minimization (ERM) is sufficient to find domain-general representations. However, in "hard" cases—where spurious features are influenced by the label or the domain index—ERM fails catastrophically.

Causal graphs representing different data-generating processes, illustrating the distinction between causal and anticausal structures.

By analyzing these structures, the authors argue that domain-general features should be independent of spurious features when conditioned on the label ($Y$) and the domain index ($e$). This structural independence is the foundation for the proposed regularization.

The TCRI Framework

The proposed learning framework rests on two main pillars designed to disentangle stable causal features from shifting spurious ones:

  1. Total Information Criterion (TIC): The model learns a representation $\Phi$ split into two parts: $\Phi_{dg}$ (domain-general) and $\Phi_{spu}$ (spurious). TIC ensures that these components together capture all available information about the target $Y$ within the input $X$, preventing the model from simply discarding useful but difficult-to-isolate information.
  2. TCRI Regularization: This is the core mechanism. Using the Hilbert Schmidt Independence Criterion (HSIC) as a penalty term, the model enforces the conditional independence implied by the causal graph. By minimizing the empirical risk of the domain-general predictor while enforcing TCRI, the model is forced to push "bad" features into the spurious bucket.
The proposed TCRI framework architecture for disentangling domain-general and spurious features.

Experimental Evaluation

The authors evaluated TCRI against state-of-the-art baselines like IRM, V-REx, and GroupDRO across several benchmarks:

  • ColoredMNIST: In this difficult benchmark where color correlates with labels in training but changes in testing, TCRI achieved 45.1% worst-case accuracy, while most baselines failed completely, hovering around 10%.
  • Spurious PACS: TCRI reached 63.4% average and 62.3% worst-case accuracy, significantly outperforming the next best method, V-REx, which managed only 37.5% in the worst-case domain.
  • Terra Incognita: On this real-world dataset of wild animal photos, TCRI showed superior robustness, achieving the highest worst-case accuracy (40.4%) among all tested methods.

Conclusion and Future Work

TCRI demonstrates that enforcing the structural independence implied by causal graphs is sufficient to identify domain-general representations without needing prior knowledge of spurious features. While the framework currently assumes the data follows specific representative causal structures, it provides a powerful path forward for robust machine learning. Future research will focus on refining model selection strategies and expanding the framework to cover even more complex generative processes.

Summary updated

BibTeX
@inproceedings{salaudeen2024causally,
  author = {Olawale Salaudeen and Sanmi Koyejo},
  title = {{Causally Inspired Regularization Enables Domain General Representations}},
  booktitle = {International Conference on Artificial Intelligence and Statistics},
  year = {2024},
  url = {https://openreview.net/forum?id=2cXoGtP5k4},
}
Figure