Domain Generalization using Causal Matching

Divyat Mahajan, Shruti Tople, Amit Sharma
6/12/2020
cs.LGcs.AIstat.ML

Official code: microsoft/robustdg (176 stars, Python, MIT, last commit 2023-10-03).

Abstract

In the domain generalization literature, a common objective is to learn representations independent of the domain after conditioning on the class label. We show that this objective is not sufficient: there exist counter-examples where a model fails to generalize to unseen domains even after satisfying class-conditional domain invariance.

Show full abstract

We formalize this observation through a structural causal model and show the importance of modeling within-class variations for generalization. Specifically, classes contain objects that characterize specific causal features, and domains can be interpreted as interventions on these objects that change non-causal features. We highlight an alternative condition: inputs across domains should have the same representation if they are derived from the same object. Based on this objective, we propose matching-based algorithms when base objects are observed (e.g., through data augmentation) and approximate the objective when objects are not observed (MatchDG). Our simple matching-based algorithms are competitive to prior work on out-of-domain accuracy for rotated MNIST, Fashion-MNIST, PACS, and Chest-Xray datasets. Our method MatchDG also recovers ground-truth object matches: on MNIST and Fashion-MNIST, top-10 matches from MatchDG have over 50% overlap with ground-truth matches.

View on arXivView PDF

Code Implementations(1)

microsoft/robustdgOfficial100%
MIT

Toolkit for building machine learning models that generalize to unseen domains and are robust to privacy and other attacks.

17627PythonJun 12, 20203 years agoMIT
artificial-intelligencecausalitydomain-generalizationmachine-learningprivacy-preserving-machine-learning

Similar Papers

Cite this paper

@article{mahajan2020domain,
  title  = {Domain Generalization using Causal Matching},
  author = {Divyat Mahajan and Shruti Tople and Amit Sharma},
  year   = {2020},
  eprint = {2006.07500},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/2006.07500}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2006.07500.svg)](https://codeofpaper.com/paper/2006.07500)

Discussion