Generative adversarial defense via conditional diffusion model
摘要
The security of deep neural networks has become a critical concern due to adversarial attacks. Current adversarial defense methods typically depend on adversarial training and data pre-processing to mitigate the impact of adversarial examples. However, adversarial training performs well only on the adversarial attacks as trained, leading to poor generalization of the well-trained model on other adversarial attacks. Besides, adversarial training significantly reduces the model’s accuracy on clean examples. Existing data pre-processing methods focus on data purification, thus being model-agnostic. Such pre-processing however suffers from limited defense performance and low visual quality of the purified images. In this article, we propose a generative adversarial defense (GAD) method that trains a conditional diffusion model to learn the distribution of source data. Leveraging such learned distribution, our GAD can effectively restore the adversarial examples to their corresponding original images. Therefore, our GAD is independent of specific target models while at the same time dramatically enhancing the visual quality of restored images. A large number of experimental results show that our GAD surpasses the state-of-the-art by a large margin and sets a new benchmark in defense performance and visual quality. The code is available at https://github.com/GZHU-DVL/GAD.