Quantifying and Improving Transferability in Domain Generalization

Guojun Zhang, Han Zhao, Yaoliang Yu, Pascal Poupart
6/7/2021
56 citations
cs.LGcs.AIstat.ML

Official code: facebookresearch/DomainBed (1,630 stars, Python, MIT, last commit 2025-12-16). 1 more implementation below.

Abstract

Out-of-distribution generalization is one of the key challenges when transferring a model from the lab to the real world. Existing efforts mostly focus on building invariant features among source and target domains.

Show full abstract

Based on invariant features, a high-performing classifier on source domains could hopefully behave equally well on a target domain. In other words, the invariant features are \emph{transferable}. However, in practice, there are no perfectly transferable features, and some algorithms seem to learn "more transferable" features than others. How can we understand and quantify such \emph{transferability}? In this paper, we formally define transferability that one can quantify and compute in domain generalization. We point out the difference and connection with common discrepancy measures between domains, such as total variation and Wasserstein distance. We then prove that our transferability can be estimated with enough samples and give a new upper bound for the target error based on our transferability. Empirically, we evaluate the transferability of the feature embeddings learned by existing algorithms for domain generalization. Surprisingly, we find that many algorithms are not quite learning transferable features, although few could still survive. In light of this, we propose a new algorithm for learning transferable features and test it over various benchmark datasets, including RotatedMNIST, PACS, Office-Home and WILDS-FMoW. Experimental results show that the proposed algorithm achieves consistent improvement over many state-of-the-art algorithms, corroborating our theoretical findings.

View on arXivView PDF

Code Implementations(2)

Code implementations of this paper
RepositoryTypeStarsLanguageLicenseLast commit
facebookresearch/DomainBedOfficial1,630PythonMIT2025-12-16
Gordon-Guojun-Zhang/Transferability-NeurIPS2021Official13PythonMIT2022-11-01
MIT

DomainBed is a suite to test domain generalization algorithms

1,630332Python, TeXJun 29, 202011 months agoMIT
MIT

This repo includes our code for evaluating and improving transferability in domain generalization (NeurIPS 2021)

131PythonOct 18, 20214 years agoMIT

Similar Papers

Cite this paper

@article{zhang2021quantifying,
  title  = {Quantifying and Improving Transferability in Domain Generalization},
  author = {Guojun Zhang and Han Zhao and Yaoliang Yu and Pascal Poupart},
  year   = {2021},
  eprint = {2106.03632},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/2106.03632}
}

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/2106.03632.svg)](https://codeofpaper.com/paper/2106.03632)

Discussion