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

On the benefits of knowledge distillation for adversarial robustness

Javier Maroto, Guillermo Ortiz-Jiménez, Pascal Frossard

Introduction

Knowledge Distillation (KD) is traditionally employed to compress large, complex models into smaller, more efficient ones. However, this research demonstrates that KD can also serve as a powerful "plugin" to enhance the performance of state-of-the-art robust models. By introducing Adversarial Knowledge Distillation (AKD), the authors show that training a student on a mixture of clean labels and teacher outputs for adversarial examples leads to significant gains in both clean accuracy and adversarial robustness. Notably, these improvements occur even when the student and teacher share the exact same architecture.

The Challenge of Adversarial Robustness

Deep neural networks are highly susceptible to adversarial attacks—minor, intentional perturbations that trigger misclassification. While Adversarial Training (AT) is the standard defense, it typically involves a "robustness-accuracy trade-off": increasing robustness often degrades performance on clean data. Furthermore, AT is prone to "robust overfitting," where models memorize noise instead of learning generalizable features. This paper explores whether distillation can push the Pareto frontier of this trade-off for existing high-performance models.

Adversarial Knowledge Distillation (AKD)

The proposed AKD method focuses on the adversarial space rather than just clean images. The student model ($f_S$) is trained on adversarial examples ($x'$) using a target that combines the ground-truth label ($y$) and the teacher's prediction ($f_T$):

$$\text{AKD}(x, y) = \text{CE}(f_S(x'), \alpha f_T(x') + (1-\alpha)y)$$

Methodological Recipes

  • Label Mixing ($\alpha$): The student learns from a weighted mix of the teacher and the ground truth. This helps mitigate teacher errors and prevents over-confidence.
  • Early-Stopped Teachers: Interestingly, teachers that have not fully converged often provide superior "dark knowledge" for robustness. This prevents the student from inheriting the teacher's own robust overfitting.
  • Teacher Ensembles: Mixing standard and robust teachers allows for fine-tuned control over the accuracy-robustness trade-off.
  • Weak Adversarial Training: Teachers trained with simpler attacks (e.g., Fast-FGSM) can effectively boost clean accuracy while still transferring significant robustness.
Effect of teacher training duration on student performance.

Key Insights

  • Same-Capacity Regularization: A student can outperform its teacher even with an identical architecture, suggesting KD acts as a superior regularizer for AT.
  • Improved Calibration: AKD reduces the overconfidence typical of standard AT models, forcing the student to learn from "hard" samples it might otherwise ignore.
  • Adversarial Dark Knowledge: Soft predictions on perturbed images convey critical information about the decision boundary shape that hard labels lack.

Key Results

Evaluations on CIFAR-10 and CIFAR-100 benchmarks demonstrate consistent improvements. For instance, on CIFAR-10 using WideResNet-28, AKD increased AutoAttack robustness from 58.18% to 61.23% while simultaneously improving clean accuracy. On CIFAR-100, ResNet-18 robustness jumped from 19.67% to 24.61%.

Performance comparison of AKD across CIFAR datasets.

Conclusion and Future Work

AKD proves to be a versatile and effective method for boosting adversarial robustness. While it requires some hyperparameter tuning (e.g., for $\alpha$ and early-stopping points), its compatibility with other state-of-the-art techniques makes it a valuable tool. Future research may explore its scalability to high-resolution datasets like ImageNet and the use of larger teacher ensembles.

Summary updated

BibTeX
@misc{maroto2022benefits,
  author = {Javier Maroto and Guillermo Ortiz-Jiménez and Pascal Frossard},
  title = {{On the benefits of knowledge distillation for adversarial robustness}},
  year = {2022},
  eprint = {2203.07159},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2203.07159},
}
Figure