Reliable Adversarial Distillation with Unreliable Teachers

Jianing Zhu, Jiangchao Yao, Bo Han, Jingfeng Zhang, Tongliang Liu, Gang Niu, Jingren Zhou, Jianliang Xu, Hongxia Yang

Abstract

In ordinary distillation, student networks are trained with soft labels (SLs) given by pretrained teacher networks, and students are expected to improve upon teachers since SLs are stronger supervision than the original hard labels. However, when considering adversarial robustness, teachers may become unreliable and adversarial distillation may not work: teachers are pretrained on their own adversarial data, and it is too demanding to require that teachers are also good at every adversarial data queried by students. Therefore, in this paper, we propose reliable introspective adversarial distillation (IAD) where students partially instead of fully trust their teachers. Specifically, IAD distinguishes between three cases given a query of a natural data (ND) and the corresponding adversarial data (AD): (a) if a teacher is good at AD, its SL is fully trusted; (b) if a teacher is good at ND but not AD, its SL is partially trusted and the student also takes its own SL into account; (c) otherwise, the student only relies on its own SL. Experiments demonstrate the effectiveness of IAD for improving upon teachers in terms of adversarial robustness.

Introduction

Deep Neural Networks (DNNs) are notoriously fragile; a tiny, invisible perturbation to an image—an adversarial attack—can flip a correct classification to a wrong one. While Adversarial Training (AT) is the gold standard for defense, it is computationally expensive and difficult to optimize. Adversarial Distillation (AD) attempts to mitigate this by having a student model mimic a pre-trained robust teacher. However, standard AD assumes the teacher is always correct, which fails in high-stakes adversarial settings where students can eventually outgrow their teachers.

The Unreliability Issue

The authors identify a critical flaw in traditional AD: as the student becomes more robust during training, it generates adversarial examples that are "harder" than anything the teacher encountered during its own training. Consequently, the teacher's accuracy on the student's adversarial data plummets over time, a phenomenon termed the "unreliability issue."

The teacher's robust accuracy on the student's adversarial queries decreases as training progresses, while remaining stable on natural data.

Blindly following a failing teacher limits the student's potential. As shown in the figure above, while the teacher maintains high accuracy on natural data, its performance on the student's adversarial examples drops significantly, making its soft labels (SLs) unreliable for guidance.

Introspective Adversarial Distillation (IAD)

To address this, the paper introduces Introspective Adversarial Distillation (IAD). Instead of full trust, the student uses a "trust-but-verify" approach based on three scenarios:

  1. High Trust: If the teacher correctly predicts both the natural and adversarial version of a sample, the student trusts the teacher's soft labels fully.
  2. Partial Trust: If the teacher succeeds on natural data but fails on the adversarial version, the student partially trusts the teacher while incorporating its own internal logic—a process called self-introspection.
  3. No Trust: If the teacher fails even on natural data, the student ignores the teacher and relies entirely on its own predictions.
Overview of the IAD framework, showing the transition from teacher guidance to self-introspection based on teacher reliability.

This is implemented via a dynamic loss function that balances Teacher Guidance (weighted by an annealing parameter based on teacher confidence) and Student Introspection (a regularization term ensuring the student's adversarial predictions match its own natural data predictions).

Experimental Results

The researchers evaluated IAD on CIFAR-10, CIFAR-100, and Tiny-ImageNet. Key findings include:

  • Robustness Gains: On CIFAR-100, the IAD-II variant achieved 29.08% accuracy under the rigorous AutoAttack benchmark, significantly outperforming both the teacher (24.36%) and the previous state-of-the-art AKD$^2$ (24.36%).
  • Stability: Unlike other methods that sacrifice natural accuracy for robustness, IAD maintained or slightly improved natural accuracy across several tests.
  • Scalability: The benefits were most pronounced on the larger Tiny-ImageNet dataset, where IAD-II outperformed the TRADES baseline by nearly 3% in robust accuracy.

Conclusion and Future Work

IAD demonstrates that students can surpass their teachers by intelligently evaluating the reliability of the guidance they receive. By using self-introspection as a safety net, students avoid inheriting the teacher's vulnerabilities.

While effective, IAD introduces a 15-20% computational overhead per epoch and requires tuning a "warming-up" period. Future research may explore applying this "unreliable teacher" framework to other dynamic domains like reinforcement learning or online learning where distribution shifts are common.

Summary updated

Abstract

In ordinary distillation, student networks are trained with soft labels (SLs) given by pretrained teacher networks, and students are expected to improve upon teachers since SLs are stronger supervision than the original hard labels. However, when considering adversarial robustness, teachers may become unreliable and adversarial distillation may not work: teachers are pretrained on their own adversarial data, and it is too demanding to require that teachers are also good at every adversarial data queried by students. Therefore, in this paper, we propose reliable introspective adversarial distillation (IAD) where students partially instead of fully trust their teachers. Specifically, IAD distinguishes between three cases given a query of a natural data (ND) and the corresponding adversarial data (AD): (a) if a teacher is good at AD, its SL is fully trusted; (b) if a teacher is good at ND but not AD, its SL is partially trusted and the student also takes its own SL into account; (c) otherwise, the student only relies on its own SL. Experiments demonstrate the effectiveness of IAD for improving upon teachers in terms of adversarial robustness.
BibTeX
@inproceedings{zhu2022reliable,
  author = {Jianing Zhu and Jiangchao Yao and Bo Han and Jingfeng Zhang and Tongliang Liu and Gang Niu and Jingren Zhou and Jianliang Xu and Hongxia Yang},
  title = {{Reliable Adversarial Distillation with Unreliable Teachers}},
  booktitle = {International Conference on Learning Representations},
  year = {2022},
  url = {https://openreview.net/forum?id=u6TRGdzhfip},
}
Figure