NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Efficiently Robustify Pre-trained Models

Nishant Jain, Harkirat S. Behl, Yogesh Singh Rawat, Vibhav VineetICCV 2023

TL;DR

This paper introduces a novel knowledge distillation approach to efficiently make large, pre-trained vision models robust to real-world data shifts without sacrificing their original capabilities. By using a smaller, robust "teacher" model to guide the fine-tuning of a fraction of the large "student" model, they achieve significant robustness gains with substantially reduced computational cost.

What Problem Does This Paper Address?

The current AI landscape heavily relies on massive deep learning models trained on vast datasets. While these models excel at standard tasks, their performance often degrades significantly when faced with real-world variations like changes in illumination, camera angles, or natural image corruptions (distribution shifts). Existing methods to improve robustness, such as full model fine-tuning or advanced augmentation techniques, are computationally expensive and can cause these large models to "forget" their original learned properties, like transfer learning or zero-shot capabilities. This paper addresses the critical need for a scalable and efficient method to make these powerful models robust without compromising their existing strengths.

Methods

The core of the proposed method is a "plug-and-play" knowledge distillation strategy. Instead of directly fine-tuning the large model, they first train a smaller, robust "teacher" model using advanced augmentation techniques. This teacher model then guides the fine-tuning of a small fraction of the large "student" model.

Key components of their approach include:

  • Multi-headed Architecture: The large student model is augmented with additional "heads" (prediction layers) – one for clean data, one for robust (augmented) data, and a combined head.
  • Uncertainty-Aware Knowledge Distillation: They employ a novel distillation loss that leverages both clean and augmented data. This process aims to ensure the clean head retains clean accuracy, the robust head learns robustness, and the correct head is selected at inference time.
  • Inference-Time Head Selection: At inference, the model estimates uncertainty using Monte Carlo Dropout and calculates KL divergence between head predictions. This allows it to dynamically select the most appropriate head (clean or robust) based on the input data's characteristics.

Datasets

The paper evaluates their method on a variety of standard and corrupted datasets:

  • ImageNet: Used for training and as a base for various perturbed versions.
  • ImageNet-C (Corrupted): Contains common corruptions like blur, noise, and weather effects.
  • ImageNet-R (Rendition): Includes naturalistic variations like different styles and artistic renditions.
  • ImageNet-S (Sketch): Features sketches of objects.
  • ImageNet-A (Adversarial): Contains natural adversarial examples.
  • ObjectNet: A dataset designed to challenge models with out-of-distribution objects and backgrounds.
  • ObjectNet-C: A corrupted version of ObjectNet.
  • Transfer Learning Datasets: Tiny-ImageNet, Flowers, Places205, iNaturalist2021, SUN397, Cars, CIFAR100, Aircraft.

Key Insights and Ideas

  • Knowledge Transfer for Robustness: The paper demonstrates that robustness can be effectively transferred from a smaller, specialized model to a much larger, general-purpose model. This is a departure from traditional knowledge distillation, which typically transfers knowledge from large to small models.
  • Efficiency through Partial Fine-tuning: By only fine-tuning a small fraction of the large model's parameters, they achieve significant computational savings during training compared to full fine-tuning.
  • Preserving Original Capabilities: A critical finding is that their method successfully preserves the original transfer learning and zero-shot properties of the large models, which is often compromised by other robustification techniques.
  • Uncertainty as a Guide: Using uncertainty estimation and KL divergence at inference time proves crucial for selecting the correct prediction head, ensuring that the model behaves robustly on shifted data while maintaining accuracy on clean data.
  • Multi-modal Models Benefit: The approach is shown to be effective for both unimodal (image-only) and multi-modal (vision-language) models, including popular architectures like CLIP.

Key Results

  • Improved Robust Accuracy: The proposed method consistently outperforms existing baselines on various distribution shift benchmarks (ImageNet-C, R, S, A, ObjectNet-C) in terms of robust accuracy. For instance, on ImageNet-C, their method achieves an average accuracy improvement of over 3% compared to the APT baseline.
  • Computational Efficiency: The method requires significantly less training time and computational resources. For example, it's approximately 5 times faster than WISE-E2E fine-tuning.
  • Preservation of Transfer Learning: The method maintains comparable or improved performance on downstream transfer learning tasks compared to the original pre-trained models, unlike some fine-tuning methods that degrade these capabilities.
  • Zero-Shot Performance: In zero-shot settings, the method shows robust performance gains, improving accuracy by up to 4.5% on distribution shifts and up to 3.9% on dataset shifts (ObjectNet-C).
  • Small Gains in Inference Latency: While adding extra heads, the inference time overhead is minimal, around 3%.

Limitations and Future Work

  • Theoretical Underpinning: The authors acknowledge that a theoretical explanation for why their method works so effectively is missing and suggest this as an area for future research.
  • Teacher Model Robustness: While the paper shows that improving the teacher's robustness generally improves the student's, further analysis could explore the precise relationship and optimal teacher characteristics.
  • Hyperparameter Sensitivity: While the method is presented as plug-and-play, further investigation into the sensitivity of hyperparameters (e.g., dropout rate, learning rate) across diverse scenarios might be beneficial.

Summary updated

BibTeX
@inproceedings{jain2023efficiently,
  author = {Nishant Jain and Harkirat S. Behl and Yogesh Singh Rawat and Vibhav Vineet},
  title = {{Efficiently Robustify Pre-trained Models}},
  booktitle = {IEEE/CVF International Conference on Computer Vision},
  year = {2023},
  url = {https://openreview.net/forum?id=JR7VqL7y7t},
}
Figure