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

TL;DR

This paper demonstrates that standard Empirical Risk Minimization (ERM) combined with data augmentation can match or exceed state-of-the-art performance under distribution shifts, provided you select a pre-trained model that aligns with the target data's properties. By evaluating 1,330 model configurations, the authors show that pre-training strategies and architectures matter just as much as specialized robust optimization algorithms.

What Problem Does This Paper Address?

Machine learning models notoriously degrade when deployed on data that deviates from their training distribution—a phenomenon known as distribution shift. To combat this, the research community has largely focused on developing specialized algorithms (like Invariant Risk Minimization or Distributionally Robust Optimization) to enforce invariance or minimize worst-case loss.

However, these algorithmic benchmarks often overlook two massive pillars of modern deep learning practice: pre-training and data augmentation. This paper addresses this gap by systematically investigating how different pre-training modes (supervised vs. self-supervised), model architectures (ResNets vs. Vision Transformers), and data augmentation strategies impact a model's robustness to various real-world distribution shifts.

Methods

The authors conduct a massive empirical study, training a total of 1,330 models. Their experimental matrix includes:

  • 7 Pre-trained Models: Comparing self-supervised methods (MoCo-v3, Masked Autoencoders (MAE)) against standard supervised models trained on ImageNet-1k and ImageNet-21k, across both ResNet-50 and ViT-B/16 architectures.
  • 5 Learning Algorithms: Empirical Risk Minimization (ERM), GroupDRO, IRM, CORAL, and a newly introduced variant called GroupMix (a group-aware version of Mixup that incorporates subpopulation group weights into the data mixing process).
  • Data Augmentations: Standard data augmentation, standard Mixup, and GroupMix.

Datasets

The study evaluates performance across five prominent distribution-shift benchmarks from the WILDS and DomainBed repositories:

  1. WILDS-Waterbirds: Evaluates spurious correlation (birds pasted onto land/water backgrounds).
  2. WILDS-FMoW: Evaluates subpopulation shift using satellite imagery across different geographical regions.
  3. WILDS-Camelyon: Evaluates out-of-distribution (OOD) generalization on tumor tissue slide images from different hospitals.
  4. WILDS-iWildCam: Evaluates OOD generalization for wildlife camera-trap image recognition across different locations.
  5. DomainNet: A large-scale domain generalization benchmark spanning six distinct image styles (clipart, painting, real, sketch, etc.).

Key Insights and Ideas

  • Match Pre-training to Data Semantics: Self-supervised pre-training (specifically patch-based reconstruction like MAE) is highly effective for dense pixel-level classification tasks where there is no single dominant object, such as satellite imagery (FMoW) or histopathology slides (Camelyon). Conversely, object recognition tasks (iWildCam, DomainNet) benefit significantly more from supervised pre-training because the high-level labels help capture invariant object semantics.
  • Data Scale Triumphs: Pre-training on larger datasets (ImageNet-21k vs. ImageNet-1k) consistently yields stronger downstream robustness across almost all distribution shifts.
  • Algorithmic Specialization is Context-Dependent: While ERM with strong data augmentation is incredibly competitive, specialized algorithms still have their place. GroupDRO excels on small datasets with severe spurious correlations, while CORAL shines on large-scale OOD datasets where feature mean and variance can be stably estimated.
Figure 1: The performance of seven pre-trained models on five datasets, averaged over 5five algo- rithms. The triangle and circle denote self-supervised and supervised pre-trained model, while blue and pink denote ViT and R50. The large and small marker mean pre-training with IN-21k and IN-1k respectively. See our analysis in Sections 5 and 6.

Key Results

By carefully pairing the right pre-trained model with appropriate data augmentations, the authors achieved results that matched or outperformed existing state-of-the-art (SotA) specialized algorithms across all five datasets:

  • Waterbirds (Worst-Group Accuracy): Achieved 92.6% (matching/beating the specialized SotA of 91.4%).
  • FMoW (Worst-Group Accuracy): Improved to 40.7% compared to the previous SotA of 35.5%.
  • Camelyon (OOD Accuracy): Reached 94.7% over the SotA of 93.3%.
  • iWildCam (OOD Macro F1): Pushed performance to 43.2% over the SotA of 38.5%.
  • DomainNet (Average Accuracy): Achieved 52.1% over the baseline SotA of 49.8%.
Summary of the paper's best results compared against existing state-of-the-art methods across the five benchmarks.

Limitations and Future Work

The primary limitation acknowledged by the authors is that this empirical study focuses exclusively on image classification tasks. While these benchmarks are standard for evaluating distribution shifts, real-world applications often demand robustness in more complex vision tasks. The authors note that future work should extend this systematic evaluation of pre-training and data augmentation to tasks like object detection and semantic segmentation.

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