Skip to main content
QUICK REVIEW

[Paper Review] Domain Generalization via Contrastive Causal Learning

Qiaowei Miao, Junkun Yuan|arXiv (Cornell University)|Oct 6, 2022
Domain Adaptation and Few-Shot LearningComputer Science4 citations
TL;DR

This paper proposes Contrastive Causal Model (CCM), a novel domain generalization framework that leverages causal inference and contrastive learning to improve zero-shot generalization. By modeling image-to-label causal effects via the front-door criterion and using prior knowledge from seen data to guide unseen image prediction, CCM achieves state-of-the-art performance across PACS, OfficeHome, and TerraIncognita, with a 68.4% average accuracy on the latter two datasets.

ABSTRACT

Domain Generalization (DG) aims to learn a model that can generalize well to unseen target domains from a set of source domains. With the idea of invariant causal mechanism, a lot of efforts have been put into learning robust causal effects which are determined by the object yet insensitive to the domain changes. Despite the invariance of causal effects, they are difficult to be quantified and optimized. Inspired by the ability that humans adapt to new environments by prior knowledge, We develop a novel Contrastive Causal Model (CCM) to transfer unseen images to taught knowledge which are the features of seen images, and quantify the causal effects based on taught knowledge. Considering the transfer is affected by domain shifts in DG, we propose a more inclusive causal graph to describe DG task. Based on this causal graph, CCM controls the domain factor to cut off excess causal paths and uses the remaining part to calculate the causal effects of images to labels via the front-door criterion. Specifically, CCM is composed of three components: (i) domain-conditioned supervised learning which teaches CCM the correlation between images and labels, (ii) causal effect learning which helps CCM measure the true causal effects of images to labels, (iii) contrastive similarity learning which clusters the features of images that belong to the same class and provides the quantification of similarity. Finally, we test the performance of CCM on multiple datasets including PACS, OfficeHome, and TerraIncognita. The extensive experiments demonstrate that CCM surpasses the previous DG methods with clear margins.

Motivation & Objective

  • To address the lack of out-of-distribution generalization in deep learning models under domain shift.
  • To formalize domain generalization as a causal inference problem using a novel, inclusive causal graph that incorporates prior knowledge.
  • To quantify and optimize the true causal effect of images on labels, independent of spurious domain-specific correlations.
  • To improve feature representation learning through contrastive similarity learning that clusters same-class features across domains.
  • To develop a unified framework that generalizes robustly to unseen target domains without domain-specific adaptation.

Proposed method

  • Introduces a new causal structural model (SCM) that includes domain (D), object (O), category (C), background features (E), image (X), prior knowledge (Z), and label (Y), with D influencing O and E, and X being linked to Z.
  • Applies the front-door criterion to estimate the do(X)→Y causal effect by decomposing it into P(X), P(Z|X), and P(Y|Z,X), enabling causal effect quantification despite unobserved confounders.
  • Designs a three-part training objective: (i) domain-conditioned supervised learning to teach correlations between X and Y; (ii) causal effect learning to estimate P(Y|do(X)) via the front-door formula; and (iii) contrastive similarity learning to cluster features of the same class.
  • Uses contrastive learning to enforce feature similarity among images of the same class, improving generalization and stabilizing representation learning across domains.
  • Controls the domain factor D to eliminate spurious paths (D→O and D→E), isolating the true causal path from X to Y via the front-door criterion.
  • Employs a knowledge transfer mechanism where unseen images are mapped to prior knowledge (Z) derived from seen images, enabling generalization to unseen domains.

Experimental results

Research questions

  • RQ1How can we formalize domain generalization as a causal inference problem that captures stable, invariant relationships across domains?
  • RQ2How can we quantify and optimize the true causal effect of input images on labels, independent of domain-specific distribution shifts?
  • RQ3What role does prior knowledge from seen data play in enabling zero-shot generalization to unseen domains?
  • RQ4How does contrastive similarity learning improve the robustness and invariance of learned representations in domain generalization?
  • RQ5Can a unified model that combines causal inference and contrastive learning outperform existing domain generalization methods across diverse benchmarks?

Key findings

  • CCM achieves a 68.4% average accuracy on the OfficeHome and TerraIncognita datasets, outperforming all baseline methods.
  • On PACS, CCM achieves 87.0% accuracy, surpassing the next best method by a clear margin.
  • Ablation studies show that removing the knowledge transfer loss (ℒ_teach) reduces performance to near-random levels, indicating its critical role in learning basic correlations.
  • The combination of causal effect learning (ℒ_learn) and contrastive similarity (ℒ_CS) yields the best performance, confirming their synergistic effect.
  • T-SNE visualization confirms that CCM produces more compact, well-separated feature clusters per class, with a manifold-like structure indicating improved representation learning.
  • CCM achieves the highest average accuracy on TerraIncognita despite not leading in any single domain, demonstrating superior stability and generalization across diverse domains.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.