Vanilla Feature Distillation for Improving the Accuracy-Robustness Trade-Off in Adversarial Training

Guodong Cao, Zhibo Wang, Xiaowei Dong, Zhifei Zhang, Hengchang Guo, Zhan Qin, Kui Ren

Introduction

Adversarial training (AT) is a primary defense mechanism against adversarial attacks on deep neural networks. However, it typically introduces a significant "accuracy tax," where the model's performance on clean, unperturbed images drops as its robustness increases. This trade-off is often attributed to the suppression of "non-robust features"—patterns that are highly predictive for classification but easily manipulated by attackers. The proposed Vanilla Feature Distillation (VFD-Adv) method aims to mitigate this trade-off by preserving these predictive features through knowledge distillation from a standard, high-accuracy "vanilla" model.

Methodology: Vanilla Feature Distillation

VFD-Adv is designed as a "plug-in" enhancement for existing adversarial training frameworks like TRADES, MART, or HAT. The core mechanism involves using a pre-trained vanilla model (trained only on clean data) as a teacher to guide the feature representations of a student model undergoing adversarial training.

The VFD-Adv framework: A vanilla teacher model guides the adversarial student model through feature-level distillation.

Key Components

  1. Feature-Level Alignment: Unlike traditional distillation that focuses on output logits, VFD-Adv aligns intermediate feature maps (typically from the final residual block). This preserves richer semantic information necessary for accurate classification.
  2. Dual Distillation Path: During training, the student model processes both clean and adversarial examples. The distillation loss ($\mathcal{L}_{KD}$) forces the features of both inputs to align with the teacher's features for the corresponding clean image.
  3. Composite Loss Function: The training objective combines a standard clean classification loss ($\mathcal{L}_{clean}$), a robustness loss ($\mathcal{L}_{adv}$), and the distillation loss ($\mathcal{L}_{KD}$), which is calculated as the Euclidean distance between student and teacher feature maps.

Experimental Results

The researchers evaluated VFD-Adv on CIFAR-10 and CIFAR-100 datasets using ResNet-18 and VGG-16 architectures. The method was tested against various white-box (PGD, FGSM, C&W) and black-box attacks.

Improving the Pareto Frontier

A critical finding is that VFD-Adv shifts the accuracy-robustness Pareto frontier. As shown in the performance plots, models equipped with VFD-Adv consistently achieve higher clean accuracy for any given level of robustness compared to baseline AT methods.

Accuracy vs. Robustness trade-off: VFD-Adv (red line) consistently outperforms other distillation and training baselines.

Quantitative and Qualitative Gains

On CIFAR-10, adding VFD-Adv to the TRADES algorithm resulted in an average improvement of 6.4% in clean accuracy and 4.3% in robust accuracy. Qualitative analysis using t-SNE visualizations further revealed that VFD-Adv leads to more compact and well-separated class clusters in the feature space, explaining the simultaneous gains in both accuracy and robustness.

Conclusion

Vanilla Feature Distillation (VFD-Adv) provides a robust framework for bridging the gap between clean accuracy and adversarial robustness. By leveraging the predictive power of "non-robust" features through feature-level distillation, it allows models to maintain high performance on standard tasks while defending against malicious perturbations. Its nature as a modular "plug-in" makes it a versatile tool for enhancing various state-of-the-art adversarial defense strategies.

Summary updated

Abstract

Adversarial training has been widely explored for mitigating attacks against deep models. However, most existing works are still trapped in the dilemma between higher accuracy and stronger robustness since they tend to fit a model towards robust features (not easily tampered with by adversaries) while ignoring those non-robust but highly predictive features. To achieve a better robustness-accuracy trade-off, we propose the Vanilla Feature Distillation Adversarial Training (VFD-Adv), which conducts knowledge distillation from a pre-trained model (optimized towards high accuracy) to guide adversarial training towards higher accuracy, i.e., preserving those non-robust but predictive features. More specifically, both adversarial examples and their clean counterparts are forced to be aligned in the feature space by distilling predictive representations from the pre-trained/clean model, while previous works barely utilize predictive features from clean models. Therefore, the adversarial training model is updated towards maximally preserving the accuracy as gaining robustness. A key advantage of our method is that it can be universally adapted to and boost existing works. Exhaustive experiments on various datasets, classification models, and adversarial training algorithms demonstrate the effectiveness of our proposed method.
BibTeX
@article{cao2022vanilla,
  author = {Guodong Cao and Zhibo Wang and Xiaowei Dong and Zhifei Zhang and Hengchang Guo and Zhan Qin and Kui Ren},
  title = {{Vanilla Feature Distillation for Improving the Accuracy-Robustness Trade-Off in Adversarial Training}},
  journal = {IEEE Trans. Dependable Secur. Comput.},
  year = {2022},
}
Figure