A Guide to Robust Generalization: The Impact of Architecture, Pre-training, and Optimization Strategy

Maxime Heuillet, Rishika Bhagwatkar, Jonas Ngnawé, Yann Pequignot, Alexandre Larouche, Christian Gagné, Irina Rish, Ola Ahmad, Audrey Durand · DOI

Abstract

Deep learning vision models are notoriously fragile when faced with adversarial attacks or common image corruptions. While robust fine-tuning—adapting pre-trained models to resist these perturbations—has emerged as a compute-efficient alternative to training from scratch, the design space for such models is vast and poorly understood. This paper presents a comprehensive empirical benchmark of 1,440 training configurations across six diverse datasets. By evaluating the interplay between architecture, pre-training methods, and optimization objectives, we provide actionable guidance for practitioners. Our findings reveal that well-tuned Convolutional Neural Networks (CNNs) often outperform Vision Transformers (ViTs) in robust generalization, and that the TRADES loss function scales more effectively than classic adversarial training as model size increases.

Introduction

Deep neural networks frequently fail when encountering distribution shifts, ranging from natural corruptions like snow or sensor noise to malicious adversarial perturbations. Historically, achieving robustness required training models from scratch using specialized objectives, a process that is both data-intensive and computationally expensive. The current paradigm has shifted toward robust fine-tuning, where a model pre-trained on a large-scale dataset (e.g., ImageNet) is adapted to a target task while maintaining or enhancing its resistance to perturbations.

However, practitioners face a "paralysis of choice" regarding model architecture (CNNs vs. Transformers), pre-training strategies (supervised vs. self-supervised), and fine-tuning protocols. This study addresses these gaps by systematically benchmarking 240 design combinations across six datasets, resulting in 7,200 individual robustness measurements. The goal is to identify which configurations lead to the best robust generalization—the ability to withstand unseen perturbations at test time.

Experimental Methodology

To ensure a rigorous evaluation, the authors conducted a massive grid search over the following dimensions:

  • Architectures: 19 architectures were tested, categorized by type (CNN, Attention-based/ViT, and Hybrid) and scale (Small: 5-10M, Medium: 25-30M, and Large: 80-90M parameters).
  • Pre-training Backbones: 40 pre-trained backbones were evaluated, including standard supervised models, self-supervised models (unimodal and multimodal), and models that underwent robust pre-training.
  • Fine-tuning Protocols: Three protocols were compared to reflect different compute budgets: Full Fine-Tuning for 50 epochs (FFT-50), a compute-efficient Full Fine-Tuning for 5 epochs (FFT-5), and a parameter-efficient Linear Probing for 50 epochs (LP-50).
  • Loss Objectives: The study compared Classic Adversarial Training (AT) against TRADES, a loss function that balances standard accuracy with a KL-divergence penalty to encourage similar predictions for clean and perturbed inputs.

Datasets and Evaluation

The study focused on the low-data regime, using six datasets: Caltech101, FGVC Aircraft, Flowers-102, Oxford-IIIT Pet, Stanford Cars, and UC Merced Land Use. Models were evaluated against 23 perturbation types, including clean images, adversarial attacks (AutoAttack bounded by $L_1$, $L_2$, and $L_\infty$ norms), and 11 common corruptions such as blur, weather effects, and compression artifacts.

Key Insights and Analysis

The Superiority of CNNs and Hybrids

Contrary to recent trends favoring Vision Transformers for standard tasks, this benchmark demonstrates that CNNs remain the most robust choice for fine-tuning. Specifically, the ConvNeXt-Base architecture, when pre-trained on ImageNet-22k and fine-tuned with TRADES, emerged as the top-performing configuration. In certain datasets like Caltech101, the best CNN configurations maintained over 80% accuracy across all perturbation types.

For resource-constrained environments (5-10M parameters), Hybrid architectures (e.g., CoaT, EdgeNeXt) that combine convolutional layers with attention mechanisms provided the best balance of efficiency and robust generalization, significantly outperforming pure CNNs or ViTs of comparable size.

Optimization and Loss Functions

The choice of loss function is critical as models scale. TRADES consistently outperformed Classic AT, particularly as model size increased. TRADES appears to act as a more effective regularizer for CNNs and Hybrid models. Furthermore, the study found that "switching losses" is beneficial: if a backbone was pre-trained using Classic AT, switching to TRADES during the fine-tuning phase yielded better results than maintaining the original loss.

Pre-training and Compute Dynamics

The effectiveness of pre-training is highly dependent on the available fine-tuning budget. If compute is limited (e.g., using Linear Probing or only 5 epochs of fine-tuning), starting with a backbone that has already undergone robust pre-training is essential. However, when the budget allows for full fine-tuning (FFT-50), standard supervised pre-training on large datasets like ImageNet-22k actually results in higher final robustness.

Practical Recommendations

  1. Use Linear Probing as a Proxy: Practitioners can use the computationally cheaper Linear Probing (LP-50) to rank configurations. The performance in LP-50 is a highly accurate predictor of which models will excel during expensive Full Fine-Tuning (FFT-50).
  2. Prioritize ConvNeXt for Robustness: For maximum robustness, a large CNN (ConvNeXt) paired with TRADES loss is the current state-of-the-art approach for fine-tuning.
  3. Scale Matters: Full fine-tuning (FFT-50) remains the gold standard, achieving a top sum score 61% higher than the accelerated FFT-5 protocol.

Conclusion and Future Work

This benchmark clarifies the path toward robust vision models, highlighting that the combination of modern CNN architectures and the TRADES loss function provides a formidable defense against both adversarial and natural perturbations. While this study provides a comprehensive map for models up to 90M parameters, future research should explore whether these trends hold for "scale-frontier" models with hundreds of millions or billions of parameters. Additionally, the relative scarcity of robustly pre-trained small-scale architectures remains a gap in the open-source ecosystem that warrants further development.

Summary updated

BibTeX
@inproceedings{heuillet2025guide,
  author = {Maxime Heuillet and Rishika Bhagwatkar and Jonas Ngnawé and Yann Pequignot and Alexandre Larouche and Christian Gagné and Irina Rish and Ola Ahmad and Audrey Durand},
  title = {{A Guide to Robust Generalization: The Impact of Architecture, Pre-training, and Optimization Strategy}},
  booktitle = {Reliable ML @ NeurIPS},
  year = {2025},
  url = {https://openreview.net/forum?id=eGloNCU2Ya},
}
Figure