Abstract
Although machine learning models typically experience a drop in performance on out-of-distribution data, accuracies on in- versus out-of-distribution data are widely observed to follow a single linear trend when evaluated across a testbed of models. Models that are more accurate on the out-of-distribution data relative to this baseline exhibit "effective robustness" and are exceedingly rare. Identifying such models, and understanding their properties, is key to improving out-of-distribution performance. We conduct a thorough empirical investigation of effective robustness during fine-tuning and surprisingly find that models pre-trained on larger datasets exhibit effective robustness during training that vanishes at convergence. We study how properties of the data influence effective robustness, and we show that it increases with the larger size, more diversity, and higher example difficulty of the dataset. We also find that models that display effective robustness are able to correctly classify 10% of the examples that no other current testbed model gets correct. Finally, we discuss several strategies for scaling effective robustness to the high-accuracy regime to improve the out-of-distribution accuracy of state-of-the-art models.
Introduction: The "Law" of Robustness
In computer vision, a consistent empirical observation has emerged: a model's performance on out-of-distribution (OOD) data is strongly correlated with its performance on in-distribution (ID) data. When plotting these accuracies across a wide variety of models, they typically fall along a single linear trend. Improving OOD performance has historically been synonymous with improving ID performance.
"Effective robustness" (ER) refers to a model's ability to break this trend, achieving higher OOD accuracy than predicted by its ID performance. While models like OpenAI’s CLIP have demonstrated such robustness, it remains an elusive property. This study investigates whether robustness is acquired or lost during the fine-tuning process.
Methodology
The researchers tracked the entire fine-tuning trajectory of various architectures, including ResNets and Vision Transformers (ViT). They compared models pre-trained on datasets of varying scales—ImageNet-1k, ImageNet-21k, and the massive JFT-300M—against randomly initialized models.
Effective robustness was quantified as the vertical distance above the linear baseline in a rescaled logit-space. The study also explored how the diversity of pre-training data and the difficulty of fine-tuning examples (measured by C-scores) influenced the preservation of ER across benchmarks like ImageNetV2, ImageNet-R, and ObjectNet.
Key Results: The Robustness "Hump"
The most significant finding is that effective robustness is not a stable property but a transient one. Pre-trained models often start the fine-tuning process with high ER. However, as training progresses toward convergence on the target task, this robustness is gradually "washed away."
Key observations include:
- Pre-training as a Source: Models trained from scratch never exhibit effective robustness. ER is exclusively a product of large-scale, diverse pre-training.
- The Convergence Trade-off: As models reach their highest ID accuracy, they fall back onto the standard linear trend, losing the unique OOD advantages they held mid-training. For example, a BiT-L model might show 4-6% effective robustness mid-training, only for that to drop to near 0% by the end.
- Data Diversity and Difficulty: ER increases with the size and diversity of the pre-training set. Furthermore, fine-tuning on "hard" examples helps retain more robustness than training on "easy" ones.
- Unique Predictions: At their peak ER, models make fundamentally different predictions, correctly classifying approximately 10% of images that no other models in the standard testbed can solve.
Discussion and Conclusion
The study highlights a fundamental "Robustness-Accuracy Trade-off" at the end of fine-tuning. Current optimization methods appear to prioritize task-specific features at the expense of the robust features learned during pre-training.
Attempts to mitigate this loss using replay buffers (mixing pre-training data back into fine-tuning) or weight regularization were largely unsuccessful in maintaining high ER at peak ID accuracy. Future research must focus on developing new training constraints or schedules that allow models to adapt to specific tasks without "forgetting" the broad, robust representations acquired during large-scale pre-training. The goal is to shift the peak of the robustness curve to the right, achieving both high task-specific accuracy and high OOD robustness simultaneously.
Summary updated