Weighted Risk Invariance: Domain Generalization under Invariant Feature Shift

Gina Wong, Joshua Gleason, Rama Chellappa, Yoav Wald, Anqi Liu
7/25/2024
cs.LGcs.AIcs.CV

No official code found. Best implementation: ginawong/weighted_risk_invariance (5 stars, last commit 2024-07-30).

Abstract

Learning models whose predictions are invariant under multiple environments is a promising approach for out-of-distribution generalization. Such models are trained to extract features $X_{\text{inv}}$ where the conditional distribution $Y \mid X_{\text{inv}}$ of the label given the extracted features does not change across environments. Invariant models are also supposed to generalize to shifts in the marginal distribution $p(X_{\text{inv}})$ of the extracted features $X_{\text{inv}}$, a type of shift we call an $\textit{invariant covariate shift}$. However, we show that proposed methods for learning invariant models underperform under invariant covariate shift, either failing to learn invariant models$\unicode{x2014}$even for data generated from simple and well-studied linear-Gaussian models$\unicode{x2014}$or having poor finite-sample performance. To alleviate these problems, we propose $\textit{weighted risk invariance}$ (WRI). Our framework is based on imposing invariance of the loss across environments subject to appropriate reweightings of the training examples. We show that WRI provably learns invariant models, i.e. discards spurious correlations, in linear-Gaussian settings. We propose a practical algorithm to implement WRI by learning the density $p(X_{\text{inv}})$ and the model parameters simultaneously, and we demonstrate empirically that WRI outperforms previous invariant learning methods under invariant covariate shift.

View on arXivView PDF

Code Implementations(1)

Weighted risk invariance

50Shell, PythonJul 11, 20242 years ago

Similar Papers

Cite this paper

@article{wong2024weighted,
  title  = {Weighted Risk Invariance: Domain Generalization under Invariant Feature Shift},
  author = {Gina Wong and Joshua Gleason and Rama Chellappa and Yoav Wald and Anqi Liu},
  year   = {2024},
  eprint = {2407.18428},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2407.18428v1}
}

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

Discussion