An Empirical Study on Distribution Shift Robustness From the Perspective of Pre-Training and Data Augmentation

Ziquan Liu, Yi Xu, Yuanhong Xu, Qi Qian, Hao Li, Rong Jin, Xiangyang Ji, Antoni B. Chan · DOI

Abstract

Machine learning models frequently encounter distribution shifts in real-world applications, where test data deviates from the training distribution. While research has focused on specialized robustness algorithms, the impact of pre-training and data augmentation remains under-explored. This paper presents a comprehensive empirical study of 1,330 models across five major benchmarks. We demonstrate that standard Empirical Risk Minimization (ERM), when combined with optimal pre-training strategies and a novel "group-aware" augmentation called GroupMix, can match or exceed the performance of state-of-the-art specialized algorithms.

Introduction

Traditional machine learning assumes that training and testing data are independent and identically distributed (i.i.d.). In practice, models face various distribution shifts—such as changes in geographic location for satellite imagery or different hospital equipment for medical diagnostics—that degrade performance. While the community has developed complex algorithms like Invariant Risk Minimization (IRM) and Group Distributionally Robust Optimization (GroupDRO), this study investigates whether simpler levers like pre-training and data augmentation can provide equivalent or superior robustness.

Methods and Experimental Setup

The authors conducted an extensive study to isolate the variables contributing to robustness. The experimental matrix included:

  • Architectures: ResNet-50 and Vision Transformers (ViT).
  • Pre-training Modes: Supervised learning (on ImageNet-1k and ImageNet-21k) and self-supervised learning (MoCo-v3 and Masked Autoencoders/MAE).
  • Algorithms: Standard ERM compared against GroupDRO, CORAL (for domain alignment), and IRM.
  • Augmentations: Standard augmentation, Mixup, and a novel GroupMix variant.

GroupMix is a key contribution of this work. It adapts the Mixup technique to be "group-aware," blending images and labels in a way that prevents the model from relying on easy spurious features (e.g., a bird's background) and forces it to focus on the core object of interest.

Datasets and Distribution Shifts

The study utilizes five benchmarks representing distinct real-world shifts:

  1. WILDS-Waterbirds: Spurious correlations (e.g., land birds on land vs. water).
  2. WILDS-FMoW: Satellite imagery shifts across geographic regions.
  3. WILDS-Camelyon: Medical tissue slides across different hospitals.
  4. WILDS-iWildCam: Wildlife photos across different camera trap locations.
  5. DomainNet: Large-scale generalization across domains like sketches and paintings.
Figure 1: Overview of the datasets used in the study, showing training vs. test shifts and a summary of the performance achieved by the authors' best ERM models compared to previous state-of-the-art (SotA).

Key Insights

The Efficacy of ERM

A primary finding is that ERM is surprisingly competitive. When paired with GroupMix and appropriate pre-training, ERM matched or exceeded SotA results on all five datasets. For instance, on WILDS-FMoW, the authors achieved 40.7% worst-group accuracy, a significant jump from the previous 35.5% SotA.

Task-Specific Pre-training

Pre-training is not a one-size-fits-all solution. For object recognition tasks (like iWildCam), supervised pre-training on large datasets (ImageNet-21k) is most effective for teaching high-level semantic features. Conversely, for dense imagery like satellite or medical slides, self-supervised pre-training (specifically MAE) is superior. These tasks rely on low-level textures that supervised labels might inadvertently obscure.

Figure 2: Performance comparison across different pre-training modes (Self-Supervised vs. Supervised) and architectures (ViT vs. ResNet) for the five benchmarks.

Architecture and Scale

Vision Transformers (ViT) demonstrated better data efficiency during supervised pre-training for mitigating spurious correlations compared to ResNets. Furthermore, increasing the scale of pre-training data (from ImageNet-1k to 21k) consistently improved robustness across nearly all distribution shifts.

Conclusion

This study highlights that robustness is a holistic property of the training pipeline. By optimizing pre-training and data augmentation, researchers can achieve state-of-the-art robustness without necessarily resorting to complex specialized algorithms. Future work will extend these findings to object detection and semantic segmentation, and investigate the theoretical reasons why specific self-supervised methods excel on dense imagery tasks.

Summary updated

BibTeX
@misc{liu2022empirical,
  author = {Ziquan Liu and Yi Xu and Yuanhong Xu and Qi Qian and Hao Li and Rong Jin and Xiangyang Ji and Antoni B. Chan},
  title = {{An Empirical Study on Distribution Shift Robustness From the Perspective of Pre-Training and Data Augmentation}},
  year = {2022},
  eprint = {2205.12753},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2205.12753},
}
Figure