Domain-Specific Risk Minimization for Out-of-Distribution Generalization

Yi-Fan Zhang, Jindong Wang, Jian Liang, Zhang Zhang, Baosheng Yu +3 more
8/18/2022
cs.LGcs.AI

Official code: yfzhang114/AdaNPC (89 stars, Python, MIT, last commit 2024-04-16).

Abstract

Recent domain generalization (DG) approaches typically use the hypothesis learned on source domains for inference on the unseen target domain. However, such a hypothesis can be arbitrarily far from the optimal one for the target domain, induced by a gap termed ``adaptivity gap''.

Show full abstract

Without exploiting the domain information from the unseen test samples, adaptivity gap estimation and minimization are intractable, which hinders us to robustify a model to any unknown distribution. In this paper, we first establish a generalization bound that explicitly considers the adaptivity gap. Our bound motivates two strategies to reduce the gap: the first one is ensembling multiple classifiers to enrich the hypothesis space, then we propose effective gap estimation methods for guiding the selection of a better hypothesis for the target. The other method is minimizing the gap directly by adapting model parameters using online target samples. We thus propose \textbf{Domain-specific Risk Minimization (DRM)}. During training, DRM models the distributions of different source domains separately; for inference, DRM performs online model steering using the source hypothesis for each arriving target sample. Extensive experiments demonstrate the effectiveness of the proposed DRM for domain generalization with the following advantages: 1) it significantly outperforms competitive baselines on different distributional shift settings; 2) it achieves either comparable or superior accuracies on all source domains compared to vanilla empirical risk minimization; 3) it remains simple and efficient during training, and 4) it is complementary to invariant learning approaches.

View on arXivView PDF

Code Implementations(1)

yfzhang114/AdaNPCOfficial100%
MIT

This is an official PyTorch implementation of the ICML 2023 paper AdaNPC and SIGKDD paper DRM.

897Python, TeXApr 26, 20232 years agoMIT
domain-generalizationmachine-learningrobustnesstest-time-adaptation

Similar Papers

Cite this paper

@article{zhang2022domainspecific,
  title  = {Domain-Specific Risk Minimization for Out-of-Distribution Generalization},
  author = {Yi-Fan Zhang and Jindong Wang and Jian Liang and Zhang Zhang and Baosheng Yu and Liang Wang and Dacheng Tao and Xing Xie},
  year   = {2022},
  eprint = {2208.08661},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/2208.08661}
}

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

Discussion