Ask Your Distribution Shift if Pre-Training is Right for You

Benjamin Cohen-Wang, Joshua Vendrow, Aleksander Madry
2/29/2024
cs.LG

Official code: MadryLab/pretraining-distribution-shift-robustness (14 stars, last commit 2024-03-04).

Abstract

Pre-training is a widely used approach to develop models that are robust to distribution shifts. However, in practice, its effectiveness varies: fine-tuning a pre-trained model improves robustness significantly in some cases but not at all in others (compared to training from scratch). In this work, we seek to characterize the failure modes that pre-training can and cannot address. In particular, we focus on two possible failure modes of models under distribution shift: poor extrapolation (e.g., they cannot generalize to a different domain) and biases in the training data (e.g., they rely on spurious features). Our study suggests that, as a rule of thumb, pre-training can help mitigate poor extrapolation but not dataset biases. After providing theoretical motivation and empirical evidence for this finding, we explore two of its implications for developing robust models: (1) pre-training and interventions designed to prevent exploiting biases have complementary robustness benefits, and (2) fine-tuning on a (very) small, non-diverse but de-biased dataset can result in significantly more robust models than fine-tuning on a large and diverse but biased dataset. Code is available at https://github.com/MadryLab/pretraining-distribution-shift-robustness.

View on arXivView PDF

Code Implementations(1)

141Shell, PythonFeb 6, 20242 years ago

Similar Papers

Cite this paper

@article{cohenwang2024your,
  title  = {Ask Your Distribution Shift if Pre-Training is Right for You},
  author = {Benjamin Cohen-Wang and Joshua Vendrow and Aleksander Madry},
  year   = {2024},
  eprint = {2403.00194},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2403.00194v2}
}

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

Discussion