Using High-Level Representation Difference Constraint and Relative Reconstruction Constraint for Defending against Adversarial Attacks
Abstract
:1. Introduction
- (1)
- We introduce a new input reconstruction defense for resisting adversarial examples which denoises inputs before they are inputted into the protected model. This allows us to provide protection to a deployed model without modifying its architecture or parameters.
- (2)
- We utilize the high-level representation difference constraint and the relative reconstruction constraint to guide the training of the denoiser. The high-level representation difference constraint is in charge of effectively removing adversarial perturbations, and the relative reconstruction constraint guarantees that tiny perturbations will not interfere with our denoiser.
- (3)
- Extensive experiments using two real datasets verify that the presented method achieves outstanding performance in resisting adversarial attacks.
2. Related Work
2.1. Crafting Adversarial Examples
2.2. Defenses against Adversarial Attacks
3. Methodology
3.1. Reconstruction Module
3.2. Training Formulation
4. Experiments
4.1. Experimental Settings
4.1.1. Datasets
4.1.2. Classifiers
4.1.3. Attack Techniques
4.1.4. Parameter Settings
4.2. Experimental Results Evaluation
4.2.1. Resisting White-Box Attacks
4.2.2. Resisting Black-Box Attacks
4.2.3. Protecting Different Classifiers
5. Conclusions
Author Contributions
Funding
Data Availability Statement
Conflicts of Interest
References
- Hu, J.; Shen, L.; Sun, G. Squeeze-and-excitation networks. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, Salt Lake City, UT, USA, 18–22 June 2018; pp. 7132–7141. [Google Scholar]
- Jing, L.; Chen, Y.; Tian, Y. Coarse-to-Fine semantic segmentation from image-level labels. IEEE Trans. Image Process. 2020, 29, 225–236. [Google Scholar] [CrossRef] [PubMed]
- Fan, C.; Yi, J.; Tao, J.; Tian, Z.; Liu, B.; Wen, Z. Gated recurrent fusion with joint training framework for robust end-to-end speech recognition. IEEE/ACM Trans. Audio Speech Lang. Process. 2021, 29, 198–209. [Google Scholar] [CrossRef]
- Lyu, C.; Huang, K.; Liang, H.-N. A unified gradient regularization family for adversarial examples. In Proceedings of the IEEE International Conference on Data Mining, Atlantic City, NJ, USA, 14–17 November 2015; pp. 301–309. [Google Scholar]
- Ross, A.; Doshi-Velez, F. Improving the adversarial robustness and interpretability of deep neural networks by regularizing their input gradients. In Proceedings of the Thirty-Second AAAI Conference on Artificial Intelligence, New Orleans, LA, USA, 2–7 February 2018; pp. 1660–1669. [Google Scholar]
- Papernot, N.; McDaniel, P.; Wu, X.; Jha, S.; Swami, A. Distillation as a defense to adversarial perturbations against deep neural networks. In Proceedings of the IEEE Symposium on Security and Privacy, San Jose, CA, USA, 22–26 May 2016; pp. 582–597. [Google Scholar]
- Papernot, N.; McDaniel, P. Extending defensive distillation. arXiv 2017, arXiv:1705.05264. [Google Scholar]
- Xie, C.; Wu, Y.; Maaten, L.; Yuille, A.; He, K. Feature denoising for improving adversarial robustness. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, Long Beach, CA, USA, 16–20 June 2019; pp. 501–509. [Google Scholar]
- Song, C.; He, K.; Lin, J.; Wang, L.; Hopcroft, J. Robust local features for improving the generalization of adversarial training. In Proceedings of the International Conference on Learning Representations, Addis Ababa, Ethiopia, 26–30 April 2020. [Google Scholar]
- Huang, R.; Xu, B.; Schuurmans, D.; Szepesvari, C. Learning with a strong adversary. In Proceedings of the International Conference on Learning Representations, San Juan, Puerto Rico, 2–4 May 2016. [Google Scholar]
- Kurakin, A.; Goodfellow, I.; Bengio, S. Adversarial machine learning at scale. In Proceedings of the International Conference on Learning Representations, Toulon, France, 24–26 April 2017. [Google Scholar]
- Gu, S.; Rigazio, L. Towards deep neural network architectures robust to adversarial examples. In Proceedings of the International Conference on Learning Representations, San Diego, CA, USA, 7–9 May 2015. [Google Scholar]
- Jia, X.; Wei, X.; Cao, X.; Foroosh, H. ComDefend: An efficient image compression model to defend adversarial examples. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, Long Beach, CA, USA, 16–20 June 2019; pp. 6084–6092. [Google Scholar]
- Liao, F.; Liang, M.; Dong, Y.; Pang, T.; Hu, X.; Zhu, J. Defense against adversarial attacks using high-level representation guided denoiser. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, Salt Lake City, UT, USA, 18–22 June 2018; pp. 1778–1787. [Google Scholar]
- Goodfellow, I.; Shlen, J.; Szegedy, C. Explaining and harnessing adversarial examples. In Proceedings of the International Conference on Learning Representations, San Diego, CA, USA, 7–9 May 2015. [Google Scholar]
- Kurakin, A.; Goodfellow, I.; Bengio, S. Adversarial examples in the physical world. In Proceedings of the International Conference on Learning Representations, Toulon, France, 24–26 April 2017. [Google Scholar]
- Madry, A.; Makelov, A.; Schmidt, L.; Tsipras, D.; Vladu, A. Towards deep learning models resistant to adversarial attacks. In Proceedings of the International Conference on Learning Representations, Vancouver, BC, Canada, 30 April–3 May 2018. [Google Scholar]
- Dong, Y.; Liao, F.; Pang, T.; Su, H.; Zhu, J.; Hu, X.; Li, J. Boosting adversarial attacks with momentum. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, Salt Lake City, UT, USA, 18–22 June 2018; pp. 9185–9193. [Google Scholar]
- Papernot, N.; McDaniel, P.; Jha, S.; Fredrikson, M.; Celik, Z.; Swami, A. The limitations of deep learning in adversarial settings. In Proceedings of the IEEE European Symposium on Security and Privacy, Saarbrücken, Germany, 21–24 March 2016; pp. 372–387. [Google Scholar]
- Su, J.; Vargas, D.V.; Sakurai, K. One Pixel Attack for Fooling Deep Neural Networks. IEEE Trans. Evol. Comput. 2019, 23, 828–841. [Google Scholar] [CrossRef]
- Moosavi-Dezfooli, S.-M.; Fawzi, A.; Frossard, P. DeepFool: A simple and accurate method to fool deep neural networks. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, Las Vegas, NV, USA, 27–30 June 2016; pp. 2574–2582. [Google Scholar]
- Carlini, N.; Wagner, D. Towards evaluating the robustness of neural networks. In Proceedings of the IEEE Symposium on Security and Privacy, San Jose, CA, USA, 22–26 May 2017; pp. 39–57. [Google Scholar]
- Xiao, C.; Li, B.; Zhu, J.; He, W.; Liu, M.; Song, D. Generating adversarial examples with adversarial networks. In Proceedings of the Twenty-Seventh International Joint Conference on Artificial Intelligence, Stockholm, Sweden, 13–19 July 2018; pp. 3905–3911. [Google Scholar]
- Jandial, S.; Mangla, P.; Varshney, S.; Balasubramanian, V. AdvGAN++: Harnessing latent layers for adversary generation. In Proceedings of the IEEE/CVF International Conference on Computer Vision Workshops, Seoul, Republic of Korea, 27–28 October 2019; pp. 2045–2048. [Google Scholar]
- Zhao, Z.; Dua, D.; Singh, S. Generating natural adversarial examples. In Proceedings of the International Conference on Learning Representations, Vancouver, BC, Canada, 30 April–3 May 2018. [Google Scholar]
- Eykholt, K.; Evtimov, I.; Fernandes, E.; Li, B.; Rahmati, A.; Xiao, C.; Prakash, A.; Kohno, T.; Song, D. Robust physical-world attacks on deep learning visual classification. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, Salt Lake City, UT, USA, 18–22 June 2018; pp. 1625–1634. [Google Scholar]
- Xu, K.; Zhang, G.; Liu, S.; Fan, Q.; Sun, M.; Chen, H.; Chen, P.; Wang, Y.; Lin, X. Adversarial T-shirt! Evading person detectors in a physical world. In Proceedings of the European Conference on Computer Vision, Glasgow, UK, 23–28 August 2020; pp. 665–681. [Google Scholar]
- Sharif, M.; Bhagavatula, S.; Bauer, L.; Reiter, M. Accessorize to a crime: Real and stealthy attacks on state-of-the-art face recognition. In Proceedings of the ACM Conference on Computer and Communications Security, Vienna, Austria, 24–28 October 2016; pp. 1528–1540. [Google Scholar]
- Lecuyer, M.; Atlidakis, V.; Geambasu, R.; Hsu, D.; Jana, S. Certified robustness to adversarial examples with differential privacy. In Proceedings of the IEEE Symposium on Security and Privacy, San Francisco, CA, USA, 19–23 May 2019; pp. 656–672. [Google Scholar]
- Liu, X.; Cheng, M.; Zhang, H.; Hsieh, C. Towards robust neural networks via random self-ensemble. In Proceedings of the European Conference, Munich, Germany, 8–14 September 2018; pp. 381–397. [Google Scholar]
- Miyato, T.; Meada, S.; Koyama, M.; Nakae, K.; Ishii, S. Distributional smoothing with virtual adversarial training. In Proceedings of the International Conference on Learning Representations, San Juan, PR, USA, 2–4 May 2016. [Google Scholar]
- Wong, E.; Kolter, J. Provable defenses against adversarial examples via the convex outer adversarial polytope. In Proceedings of the International Conference on Machine Learning, Stockholmsmässan, Stockholm, Sweden, 10–15 July 2018; pp. 5283–5292. [Google Scholar]
- Dvijotham, K.; Gowal, S.; Stanforth, R.; Arandjelovic, R.; O’Donoghue, B.; Uesato, J.; Kohli, P. Training verified learners with learned verifiers. arXiv 2018, arXiv:1805.10265. [Google Scholar]
- Gao, S.; Yu, S.; Wu, L.; Yao, S.; Zhou, X. Detecting adversarial examples by additional evidence from noise domain. IET Image Process. 2022, 16, 378–392. [Google Scholar] [CrossRef]
- Metzen, J.; Genewein, T.; Fischer, V.; Bischoff, B. On detecting adversarial perturbations. In Proceedings of the International Conference on Learning Representations, Toulon, France, 24–26 April 2017. [Google Scholar]
- Gao, S.; Wang, R.; Wang, X.; Yu, S.; Dong, Y.; Yao, S.; Zhou, W. Detecting adversarial examples on deep neural networks with mutual information neural estimation. IEEE Trans. Depend. Secure Comput. 2023. [Google Scholar] [CrossRef]
- Xie, C.; Wang, J.; Zhang, Z.; Ren, Z.; Yuille, A. Mitigating adversarial effects through randomization. In Proceedings of the International Conference on Learning Representations, Vancouver, BC, Canada, 30 April–3 May 2018. [Google Scholar]
- Das, N.; Shanbhogue, M.; Chen, S.; Hohman, F.; Chen, L.; Kounavis, M.; Chau, D. Keeping the bad guys out: Protecting and vaccinating deep learning with JPEG compression. arXiv 2017, arXiv:1705.02900. [Google Scholar]
- Gao, S.; Yao, S.; Li, R. Transferable adversarial defense by fusing reconstruction learning and denoising learning. In Proceedings of the IEEE Conference on Computer Communications Workshops, Vancouver, BC, Canada, 10–13 May 2021; pp. 1–6. [Google Scholar]
CIFAR-10 | |
---|---|
C(64, 3, 1), BN, LeakyReLU | Up Sampling 2 × 2 |
Max Pooling 2 × 2 | C(256, 3, 1), BN, ReLU |
C(128, 3, 1), BN, LeakyReLU | Up Sampling 2 × 2 autoencoder architecture for |
Max Pooling 2 × 2 | C(128, 3, 1), BN, ReLU |
C(256, 3, 1), BN, LeakyReLU | Up Sampling 2 × 2 |
Max Pooling 2 × 2 | C(64, 3, 1), BN, ReLU |
C(3, 5, 1), Tanh |
ImageNet | |
---|---|
C(64, 3, 1), BN, LeakyReLU | Up Sampling 2 × 2 |
Max Pooling 2 × 2 | C(512, 3, 1), BN, ReLU |
C(128, 3, 1), BN, LeakyReLU | Up Sampling 2 × 2 |
Max Pooling 2 × 2 | C(512, 3, 1), BN, ReLU |
C(256, 3, 1), BN, LeakyReLU | Up Sampling 2 × 2 |
Max Pooling 2 × 2 | C(256, 3, 1), BN, ReLU |
C(512, 3, 1), BN, LeakyReLU | Up Sampling 2 × 2 |
Max Pooling 2 × 2 | C(128, 3, 1), BN, ReLU |
C(512, 3, 1), BN, LeakyReLU | Up Sampling 2 × 2 |
Max Pooling 2 × 2 | C(64, 3, 1), BN, ReLU |
C(3, 5, 1), Tanh |
CIFAR-10 | ImageNet |
---|---|
VGG-16 | VGG-16 |
MoblieNet | MobileNet |
ResNet-50 |
Dataset | Assistant Attack | Method | Clean | FGSM | BIM | PGD | MIM | CW2 |
---|---|---|---|---|---|---|---|---|
CIFAR-10 | NA | NA | 0.786 | 0.178 | 0.011 | 0.016 | 0.017 | 0.121 |
PGD | DAE | 0.636 | 0.461 | 0.489 | 0.513 | 0.432 | 0.598 | |
HGD | 0.693 | 0.608 | 0.641 | 0.647 | 0.621 | 0.688 | ||
TD | 0.694 | 0.606 | 0.639 | 0.645 | 0.619 | 0.687 | ||
ours | 0.699 | 0.617 | 0.653 | 0.659 | 0.628 | 0.693 | ||
BIM | DAE | 0.629 | 0.461 | 0.503 | 0.518 | 0.437 | 0.596 | |
HGD | 0.676 | 0.589 | 0.627 | 0.628 | 0.603 | 0.670 | ||
TD | 0.678 | 0.597 | 0.633 | 0.636 | 0.606 | 0.671 | ||
Ours | 0.698 | 0.608 | 0.648 | 0.656 | 0.626 | 0.694 | ||
MIM | DAE | 0.632 | 0.459 | 0.501 | 0.533 | 0.441 | 0.594 | |
HGD | 0.691 | 0.619 | 0.649 | 0.650 | 0.621 | 0.687 | ||
TD | 0.671 | 0.601 | 0.636 | 0.638 | 0.614 | 0.667 | ||
ours | 0.705 | 0.641 | 0.669 | 0.674 | 0.652 | 0.701 | ||
ImageNet | NA | NA | 0.926 | 0.036 | 0 | 0 | 0 | 0.044 |
PGD | DAE | 0.442 | 0.366 | 0.402 | 0.396 | 0.376 | 0.432 | |
HGD | 0.812 | 0.764 | 0.800 | 0.790 | 0.770 | 0.812 | ||
TD | 0.796 | 0.762 | 0.784 | 0.784 | 0.770 | 0.794 | ||
ours | 0.810 | 0.770 | 0.790 | 0.790 | 0.776 | 0.816 | ||
BIM | DAE | 0.434 | 0.362 | 0.384 | 0.378 | 0.346 | 0.432 | |
HGD | 0.796 | 0.774 | 0.784 | 0.774 | 0.772 | 0.790 | ||
TD | 0.778 | 0.748 | 0.764 | 0.768 | 0.752 | 0.774 | ||
Ours | 0.804 | 0.784 | 0.778 | 0.784 | 0.776 | 0.790 | ||
MIM | DAE | 0.450 | 0.378 | 0.402 | 0.410 | 0.370 | 0.446 | |
HGD | 0.814 | 0.762 | 0.780 | 0.782 | 0.770 | 0.806 | ||
TD | 0.792 | 0.752 | 0.778 | 0.772 | 0.760 | 0.786 | ||
ours | 0.822 | 0.762 | 0.806 | 0.808 | 0.790 | 0.824 |
Model | Method | Clean | FGSM | BIM | PGD | MIM | CW2 |
---|---|---|---|---|---|---|---|
VGG-16 | NA | 0.786 | 0.573 | 0.674 | 0.681 | 0.586 | 0.765 |
DAE | 0.612 | 0.572 | 0.590 | 0.594 | 0.582 | 0.602 | |
HGD | 0.691 | 0.635 | 0.672 | 0.669 | 0.651 | 0.684 | |
TD | 0.691 | 0.641 | 0.671 | 0.678 | 0.657 | 0.687 | |
Ours | 0.705 | 0.651 | 0.685 | 0.688 | 0.665 | 0.700 | |
MobileNet | NA | 0.786 | 0.596 | 0.704 | 0.710 | 0.620 | 0.778 |
DAE | 0.612 | 0.572 | 0.591 | 0.592 | 0.580 | 0.608 | |
HGD | 0.691 | 0.625 | 0.662 | 0.662 | 0.639 | 0.688 | |
TD | 0.691 | 0.642 | 0.672 | 0.671 | 0.651 | 0.688 | |
ours | 0.705 | 0.648 | 0.683 | 0.683 | 0.661 | 0.702 | |
ResNet-50 | NA | 0.786 | 0.554 | 0.605 | 0.624 | 0.545 | 0.774 |
DAE | 0.612 | 0.548 | 0.564 | 0.571 | 0.558 | 0.604 | |
HGD | 0.691 | 0.605 | 0.629 | 0.631 | 0.612 | 0.686 | |
TD | 0.692 | 0.618 | 0.638 | 0.647 | 0.621 | 0.685 | |
ours | 0.709 | 0.625 | 0.649 | 0.658 | 0.633 | 0.702 |
Dataset | Model | Method | Clean | FGSM | BIM | PGD | MIM | CW2 |
---|---|---|---|---|---|---|---|---|
CIFAR-10 | MobileNet | NA | 0.825 | 0.100 | 0.036 | 0.038 | 0.025 | 0.145 |
DAE | 0.676 | 0.456 | 0.562 | 0.579 | 0.470 | 0.664 | ||
HGD | 0.667 | 0.626 | 0.649 | 0.657 | 0.633 | 0.667 | ||
TD | 0.673 | 0.633 | 0.655 | 0.650 | 0.640 | 0.671 | ||
ours | 0.688 | 0.648 | 0.673 | 0.652 | 0.647 | 0.686 | ||
ResNet-50 | NA | 0.806 | 0.081 | 0.024 | 0.026 | 0.027 | 0.111 | |
DAE | 0.678 | 0.437 | 0.488 | 0.518 | 0.434 | 0.679 | ||
HGD | 0.692 | 0.611 | 0.639 | 0.633 | 0.620 | 0.688 | ||
TD | 0.704 | 0.632 | 0.649 | 0.655 | 0.635 | 0.680 | ||
ours | 0.697 | 0.649 | 0.651 | 0.655 | 0.640 | 0.687 | ||
ImageNet | MobileNet | NA | 0.954 | 0.428 | 0.134 | 0.140 | 0.134 | 0.026 |
DAE | 0.678 | 0.670 | 0.676 | 0.676 | 0.660 | 0.678 | ||
HGD | 0.834 | 0.818 | 0.830 | 0.842 | 0.814 | 0.834 | ||
TD | 0.776 | 0.758 | 0.772 | 0.772 | 0.760 | 0.772 | ||
ours | 0.854 | 0.846 | 0.848 | 0.840 | 0.851 | 0.858 |
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content. |
© 2023 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https://creativecommons.org/licenses/by/4.0/).
Share and Cite
Gao, S.; Wang, X.; Dong, Y.; Yao, S. Using High-Level Representation Difference Constraint and Relative Reconstruction Constraint for Defending against Adversarial Attacks. Electronics 2023, 12, 2017. https://doi.org/10.3390/electronics12092017
Gao S, Wang X, Dong Y, Yao S. Using High-Level Representation Difference Constraint and Relative Reconstruction Constraint for Defending against Adversarial Attacks. Electronics. 2023; 12(9):2017. https://doi.org/10.3390/electronics12092017
Chicago/Turabian StyleGao, Song, Xiaoxuan Wang, Yunyun Dong, and Shaowen Yao. 2023. "Using High-Level Representation Difference Constraint and Relative Reconstruction Constraint for Defending against Adversarial Attacks" Electronics 12, no. 9: 2017. https://doi.org/10.3390/electronics12092017
APA StyleGao, S., Wang, X., Dong, Y., & Yao, S. (2023). Using High-Level Representation Difference Constraint and Relative Reconstruction Constraint for Defending against Adversarial Attacks. Electronics, 12(9), 2017. https://doi.org/10.3390/electronics12092017