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

Distilling Out-of-Distribution Robustness from Vision-Language Foundation Models

Andy Zhou, Jindong Wang, Yu-Xiong Wang, Haohan Wang

Overview

Modern neural networks achieve superhuman performance on standard benchmarks, yet they often fail spectacularly when faced with out-of-distribution (OOD) data—such as artistic sketches, unusual textures, or adversarial perturbations. Massive foundation models like CLIP have largely solved this zero-shot generalization problem by training on billions of diverse internet images. However, these models are computationally expensive and heavily parameterized, making them impractical for many real-world deployments.

This paper introduces Discrete Adversarial Distillation (DAD), a lightweight framework that transfers the impressive OOD robustness of massive vision-language foundation models (like CLIP) into smaller, practical models (like ResNet50 or ViT-B). By using a VQGAN to generate discrete, semantic adversarial examples from the teacher model, DAD achieves state-of-the-art robustness on natural distribution shifts with minimal computational overhead.

The Challenge: Model Capacity Gap in Distillation

A core question in model compression is: Can we distill the OOD robustness of a massive foundation model into a smaller student model using only standard, in-distribution data (like ImageNet)? Prior work in knowledge distillation (KD) suggested a "model capacity gap"—meaning that if a teacher is too large, the small student struggles to learn from it, often hurting clean accuracy. This paper challenges that assumption in the context of robustness, proving that big teachers do make excellent robustness teachers.

Discrete Adversarial Distillation (DAD)

The authors propose DAD, which combines knowledge distillation with a novel form of data augmentation.

Discrete Adversarial Distillation Framework

The framework operates through the following steps:

  1. Teacher-Driven Adversarial Generation: Instead of generating standard adversarial examples (which look like pixelated noise) using the student model, DAD uses the robust teacher (CLIP) to find worst-case perturbations. Because CLIP was trained on a massive, diverse dataset, the adversarial examples generated against it are far more semantically diverse than those generated against a standard ImageNet-trained model.
  2. Discretization via VQGAN: To make these perturbations semantically meaningful rather than just high-frequency noise, the images are passed through a pre-trained VQGAN. The perturbation is added in the latent space, and the VQGAN decodes it back into a discrete, visual image. This creates highly diverse, structural augmentations.
  3. Offline Augmentation: Unlike standard adversarial training (AT) which calculates perturbations on the fly (massively slowing down training), DAD generates these teacher-based adversarial examples offline. They are simply added to the dataset as augmented images.
  4. Distillation: The student model is trained to match the teacher's representations on both the clean images and these newly generated adversarial images.

The authors provide a theoretical framework using Wasserstein distance to show that empirical robustness depends heavily on the divergence between training and testing distributions. The foundation model's adversarial examples cover a wider semantic space, effectively shrinking the distance to unseen OOD test sets.

Key Results

The DAD framework was evaluated on standard in-distribution datasets (ImageNet, ImageNet-V2) as well as natural OOD (ImageNet-A, Sketch, Rendition) and synthetic OOD (ImageNet-C, Stylized-ImageNet) benchmarks.

Performance comparison across different architectures and datasets
  • Massive OOD Gains: When distilling CLIP to a ViT-B student, DAD achieved 46.1% accuracy on ImageNet-Sketch (a 17.8% absolute improvement over the previous state-of-the-art DAT method) and 65.1% on ImageNet-Rendition (+11.3% over SOTA).
  • Cross-Architecture Success: The method successfully distills robustness from a Transformer-based CLIP model into a standard ResNet50, achieving 51.6% on Rendition and 35.8% on Sketch.
  • High Compute-Efficiency: Because the adversarial examples are generated offline and reused, DAD only requires about 2x the training budget of standard training. For context, standard Adversarial Training requires 11x the budget, and previous discrete adversarial methods (DAT) require 3.5x.

Limitations and Future Work

While highly effective, DAD inherits the performance characteristics—and blind spots—of its teacher. Because CLIP excels at natural distribution shifts (art, sketches) but is relatively weaker at synthetic corruptions (ImageNet-C), the student model inherits this exact profile.

Furthermore, the authors caution against "automation bias." While these models are significantly more robust to finite OOD datasets, they might still fail unpredictably in the infinite space of real-world semantic transformations. Understanding when a model's decisions are truly reliable remains a critical open research question.

Summary updated

BibTeX
@inproceedings{zhou2023distilling,
  author = {Andy Zhou and Jindong Wang and Yu-Xiong Wang and Haohan Wang},
  title = {{Distilling Out-of-Distribution Robustness from Vision-Language Foundation Models}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2023},
  url = {https://openreview.net/forum?id=iwp3H8uSeK},
}
Figure