Skip to main content
QUICK REVIEW

[Paper Review] On the benefits of knowledge distillation for adversarial robustness

Javier Maroto, Guillermo Ortiz-Jiménez|arXiv (Cornell University)|Mar 14, 2022
Adversarial Robustness in Machine LearningComputer Science10 citations
TL;DR

This paper proposes Adversarial Knowledge Distillation (AKD), a method that boosts both clean and robust accuracy of state-of-the-art models by distilling knowledge from a robust teacher network. By mixing clean labels with adversarially trained teacher outputs during student training, AKD improves calibration and generalization, especially on hard-to-learn samples, outperforming standard adversarial training and prior distillation techniques.

ABSTRACT

Knowledge distillation is normally used to compress a big network, or teacher, onto a smaller one, the student, by training it to match its outputs. Recently, some works have shown that robustness against adversarial attacks can also be distilled effectively to achieve good rates of robustness on mobile-friendly models. In this work, however, we take a different point of view, and show that knowledge distillation can be used directly to boost the performance of state-of-the-art models in adversarial robustness. In this sense, we present a thorough analysis and provide general guidelines to distill knowledge from a robust teacher and boost the clean and adversarial performance of a student model even further. To that end, we present Adversarial Knowledge Distillation (AKD), a new framework to improve a model's robust performance, consisting on adversarially training a student on a mixture of the original labels and the teacher outputs. Through carefully controlled ablation studies, we show that using early-stopping, model ensembles and weak adversarial training are key techniques to maximize performance of the student, and show that these insights generalize across different robust distillation techniques. Finally, we provide insights on the effect of robust knowledge distillation on the dynamics of the student network, and show that AKD mostly improves the calibration of the network and modify its training dynamics on samples that the model finds difficult to learn, or even memorize.

Motivation & Objective

  • To investigate whether knowledge distillation can improve robustness beyond model compression, particularly when teacher and student have the same capacity.
  • To understand the impact of different distillation strategies—such as label mixing, early stopping, and ensemble distillation—on adversarial robustness and clean accuracy.
  • To analyze how AKD modifies training dynamics and model calibration, especially on difficult or adversarial samples.
  • To provide actionable, generalizable guidelines for applying distillation to enhance robustness in state-of-the-art models.

Proposed method

  • AKD trains a student model using a mixture of clean labels and soft labels from a pretrained teacher, where the teacher is adversarially trained to improve robustness.
  • The method employs label mixing, where the loss combines cross-entropy on clean labels and distillation loss on teacher outputs, with a hyperparameter controlling the balance.
  • Early stopping is applied to the teacher network to maximize post-distillation performance, as overtraining degrades generalization.
  • Ensembles of teachers—combining standard and robust models—are used to improve performance and widen the clean-robustness trade-off spectrum.
  • Small-epsilon adversarial training is applied to the teacher to further enhance clean accuracy while preserving some robustness.
  • The training dynamics are analyzed via cosine similarity of feature trajectories, revealing that AKD improves calibration on hard examples and reduces overconfidence on easy ones.

Experimental results

Research questions

  • RQ1Can knowledge distillation improve the robustness of state-of-the-art models beyond model compression, even when teacher and student have the same capacity?
  • RQ2How do techniques like early stopping, label mixing, and ensemble distillation affect the performance of the student model in adversarial settings?
  • RQ3What is the impact of distilling from a standard teacher versus an adversarially trained teacher on clean and robust accuracy?
  • RQ4How does AKD alter the training dynamics and confidence calibration of the student model on easy versus hard samples?
  • RQ5To what extent does AKD improve generalization on adversarial and out-of-distribution samples compared to standard adversarial training?

Key findings

  • AKD improves both clean and robust accuracy of the student model, with the largest gains observed on larger models like WideResNet-28, achieving 61.23% robust accuracy on CIFAR-10 under ∞-norm perturbations of size 8/255.
  • Distilling from an adversarially trained teacher increases robustness, while distilling from a standard teacher boosts clean accuracy, with small-ε adversarial training on the teacher further improving both metrics.
  • Early-stopped teachers consistently yield the best post-distillation performance, indicating that the optimal pretraining epoch is model- and dataset-specific.
  • Ensembling multiple teachers, especially when combining standard and robust models, leads to further performance gains and enables flexible trade-offs between clean and robust accuracy.
  • AKD improves model calibration by reducing confidence on easy samples and increasing it on hard or adversarial examples, which correlates with better generalization and robustness.
  • The method modifies training dynamics such that the student and teacher exhibit greater divergence in trajectory on hard samples, particularly adversarial ones, suggesting improved learning in difficult regions.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.