A Gradual Adversarial Training Method for Semantic Segmentation
Abstract
:1. Introduction
- A novel adversarial defense method is proposed to learn robust feature representations based on the domain generalization theory;
- A gradual adversarial training method is proposed to enhance the robustness of the network without requiring specific information about the target network’s architecture. By controlling the input data flow based on model weights external to the network structure, our proposed method can adaptively achieve model robustness enhancement;
- The proposed method is verified on both SAR and optical images, which proves that the proposed method is suitable for image segmentation with various attack intensities. The results show that, in SAR images, for commonly used methods (FGSM, PGD, etc.), when the attack intensity varies from 0.001 to 0.010, the accuracy of GAT improves by 0.5% to 4.23%, with an average of 1.57%. F1 improves by 1.31–5.02%, with an average of 3.24%. In optical images, when the attack intensity changes from 0.0039 to 0.196, the accuracy of the GAT method increases by 4.94% to 12.13%, with an average of 7.94%. F1 improves by 5.2–14.28%, with an average of 8.86%.
2. Background
2.1. Adversarial Examples
2.1.1. Fast Gradient Sign Method
2.1.2. Dense Adversarial Generation
2.1.3. Projected Gradient Descent
2.1.4. segPGD
2.2. Adversarial Defense
2.2.1. Standard Adversarial Training
2.2.2. Stochastic Activation Pruning
2.2.3. Defensive Distillation
2.2.4. Summary
3. Methodology
3.1. Gradual Adversarial Training Method
3.2. Framework
Algorithm 1. Gradual Adversarial Training (GAT) Method |
Input: Clean image and ground truth y |
Output: Robust model f |
1. Train the model f using data and labels y |
2. Generate output results and evaluation metrics |
3. If the evaluation metrics do not improve, repeat steps 1–2 |
4. Let |
5. Generate adversarial images according to Equation (10) |
6. Generate intermediate data according to Equation (9) |
7. Train the model f using data and labels y |
8. Repeat steps 5–7 until the model converges |
9. Output model f |
3.3. Evaluation Metrics
4. Experiments
4.1. Models and Datasets
4.2. Experimental Settings and Implementation Details
4.3. Result Analysis on SF-RS2 Dataset
4.4. Result Analysis on ISPRS-Vaihingen Dataset
5. Discussion
6. Conclusions
Author Contributions
Funding
Data Availability Statement
Conflicts of Interest
Abbreviations
DNN | Deep Neural Network |
SAR | Synthetic Aperture Radar |
SAT | Standard Adversarial Training |
GAT | Gradual Adversarial Training |
FGSM | Fast Gradient Sign Method |
PGD | Projected Gradient Descent |
References
- Rony, J.; Pesquet, J.C.; Ben Ayed, I. Proximal splitting adversarial attack for semantic segmentation. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, Vancouver, BC, Canada, 18–22 June 2023; pp. 20524–20533. [Google Scholar]
- Wang, Z.; Yang, H.; Feng, Y.; Sun, P.; Guo, H.; Zhang, Z.; Ren, K. Towards transferable targeted adversarial examples. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, Vancouver, BC, Canada, 18–22 June 2023; pp. 20534–20543. [Google Scholar]
- Williams, P.N.; Li, K. Black-box sparse adversarial attack via multi-objective optimisation. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, Vancouver, BC, Canada, 18–22 June 2023; pp. 12291–12301. [Google Scholar]
- Szegedy, C.; Zaremba, W.; Sutskever, I.; Bruna, J.; Erhan, D.; Goodfellow, I.; Fergus, R. Intriguing properties of neural networks. arXiv 2013, arXiv:1312.6199. [Google Scholar]
- Maslovskiy, A.; Vasilets, V.; Nechitaylo, S.; Sukharevsky, O. The Antiradar Camouflage Method for Ground Military Objects. In Proceedings of the 2019 IEEE 2nd Ukraine Conference on Electrical and Computer Engineering (UKRCON), Lviv, Ukraine, 2–6 July 2019; pp. 1–5. [Google Scholar]
- He, W.; Weng, X.; Luo, W.; Chen, H.; Wu, X.; Li, K.; Huang, Y.; Liu, B.; Li, L. Investigation of radar cross-section reduction for dihedral corner reflectors based on camouflage grass. IEEE Antennas Wirel. Propag. Lett. 2021, 20, 2447–2451. [Google Scholar] [CrossRef]
- Smy, T.J.; Gupta, S. Surface susceptibility synthesis of metasurface skins/holograms for electromagnetic camouflage/illusions. IEEE Access 2020, 8, 226866–226886. [Google Scholar] [CrossRef]
- Han, S.; Lin, C.; Shen, C.; Wang, Q.; Guan, X. Interpreting adversarial examples in deep learning: A review. ACM Comput. Surv. 2023, 55, 1–38. [Google Scholar] [CrossRef]
- Monroe, D. Deceiving ai. Commun. ACM 2021, 64, 15–16. [Google Scholar] [CrossRef]
- Siegelmann, H. Defending Against Adversarial Artificial Intelligence. Technical Report. 2019. Available online: https://www.darpa.mil/news-events/2019-02-06 (accessed on 6 February 2019).
- Nicolae, M.I.; Sinn, M.; Tran, M.N.; Buesser, B.; Rawat, A.; Wistuba, M.; Zantedeschi, V.; Baracaldo, N.; Chen, B.; Ludwig, H.; et al. Adversarial Robustness Toolbox v1. 0.0. arXiv 2018, arXiv:1807.01069. [Google Scholar]
- Sreeram, A.; Mehlman, N.; Peri, R.; Knox, D.; Narayanan, S. Perceptual-based deep-learning denoiser as a defense against adversarial attacks on ASR systems. arXiv 2021, arXiv:2107.05222. [Google Scholar]
- Joshi, S.; Villalba, J.; Żelasko, P.; Moro-Velázquez, L.; Dehak, N. Study of Pre-Processing Defenses Against Adversarial Attacks on State-of-the-Art Speaker Recognition Systems. IEEE Trans. Inf. Forensics Secur. 2021, 16, 4811–4826. [Google Scholar] [CrossRef]
- Lo, S.Y. Robust Computer Vision Against Adversarial Examples and Domain Shifts. Ph.D. Thesis, Johns Hopkins University, Baltimore, MD, USA, 2023. [Google Scholar]
- Chen, J.; Wu, X.; Guo, Y.; Liang, Y.; Jha, S. Towards evaluating the robustness of neural networks learned by transduction. arXiv 2021, arXiv:2110.14735. [Google Scholar]
- Zhang, Y.; Jiang, Z.; Villalba, J.; Dehak, N. Black-Box Attacks on Spoofing Countermeasures Using Transferability of Adversarial Examples. In Proceedings of the Interspeech, Shanghai, China, 25–29 October 2020; pp. 4238–4242. [Google Scholar]
- Cherepanova, V.; Goldblum, M.; Foley, H.; Duan, S.; Dickerson, J.; Taylor, G.; Goldstein, T. Lowkey: Leveraging adversarial attacks to protect social media users from facial recognition. arXiv 2021, arXiv:2101.07922. [Google Scholar]
- Luo, Y.; Ye, F.; Weng, B.; Du, S.; Huang, T. A novel defensive strategy for facial manipulation detection combining bilateral filtering and joint adversarial training. Secur. Commun. Netw. 2021, 2021, 4280328. [Google Scholar] [CrossRef]
- Jiang, W.; He, Z.; Zhan, J.; Pan, W. Attack-aware detection and defense to resist adversarial examples. IEEE Trans. Comput.-Aided Des. Integr. Circuits Syst. 2020, 40, 2194–2198. [Google Scholar] [CrossRef]
- Xie, C.; Wang, J.; Zhang, Z.; Ren, Z.; Yuille, A. Mitigating adversarial effects through randomization. arXiv 2017, arXiv:1711.01991. [Google Scholar]
- Zhang, S.; Chen, S.; Liu, X.; Hua, C.; Wang, W.; Chen, K.; Zhang, J.; Wang, J. Detecting adversarial samples for deep learning models: A comparative study. IEEE Trans. Netw. Sci. Eng. 2021, 9, 231–244. [Google Scholar] [CrossRef]
- Cao, X.; Gong, N.Z. Mitigating evasion attacks to deep neural networks via region-based classification. In Proceedings of the 33rd Annual Computer Security Applications Conference, Orlando, FL, USA, 4–8 December 2017; pp. 278–287. [Google Scholar]
- Liu, N.; Du, M.; Guo, R.; Liu, H.; Hu, X. Adversarial attacks and defenses: An interpretation perspective. ACM SIGKDD Explor. Newsl. 2021, 23, 86–99. [Google Scholar] [CrossRef]
- Wei, Z.; Wang, Y.; Guo, Y.; Wang, Y. Cfa: Class-wise calibrated fair adversarial training. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, Vancouver, BC, Canada, 18–22 June 2023; pp. 8193–8201. [Google Scholar]
- Boenisch, F.; Sperl, P.; Böttinger, K. Gradient masking and the underestimated robustness threats of differential privacy in deep learning. arXiv 2021, arXiv:2105.07985. [Google Scholar]
- Tomar, D.; Vray, G.; Bozorgtabar, B.; Thiran, J.P. Tesla: Test-time self-learning with automatic adversarial augmentation. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, Vancouver, BC, Canada, 18–22 June 2023; pp. 20341–20350. [Google Scholar]
- Qiu, S.; Liu, Q.; Zhou, S.; Wu, C. Review of artificial intelligence adversarial attack and defense technologies. Appl. Sci. 2019, 9, 909. [Google Scholar] [CrossRef]
- Jia, X.; Zhang, Y.; Wei, X.; Wu, B.; Ma, K.; Wang, J.; Cao, X. Improving fast adversarial training with prior-guided knowledge. IEEE Trans. Pattern Anal. Mach. Intell. 2024, 46, 6367–6383. [Google Scholar] [CrossRef]
- Bae, H.; Jang, J.; Jung, D.; Jang, H.; Ha, H.; Lee, H.; Yoon, S. Security and privacy issues in deep learning. arXiv 2018, arXiv:1807.11655. [Google Scholar]
- Dhillon, G.S.; Azizzadenesheli, K.; Lipton, Z.C.; Bernstein, J.; Kossaifi, J.; Khanna, A.; Anandkumar, A. Stochastic activation pruning for robust adversarial defense. arXiv 2018, arXiv:1803.01442. [Google Scholar]
- Yanagita, Y.; Yamamura, M. Gradient masking is a type of overfitting. Int. J. Mach. Learn. Comput. 2018, 8, 203–207. [Google Scholar] [CrossRef]
- Zhou, M.; Wang, L.; Niu, Z.; Zhang, Q.; Zheng, N.; Hua, G. Adversarial attack and defense in deep ranking. IEEE Trans. Pattern Anal. Mach. Intell. 2024, 46, 5306–5324. [Google Scholar] [CrossRef] [PubMed]
- 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 2016 IEEE Symposium on Security and Privacy (SP), San Jose, CA, USA, 23–25 May 2016; pp. 582–597. [Google Scholar]
- Shi, C.; Liu, Y.; Zhao, M.; Pun, C.M.; Miao, Q. Attack-invariant attention feature for adversarial defense in hyperspectral image classification. Pattern Recognit. 2024, 145, 109955. [Google Scholar] [CrossRef]
- Liu, D.; Wu, L.Y.; Li, B.; Boussaid, F.; Bennamoun, M.; Xie, X.; Liang, C. Jacobian norm with selective input gradient regularization for interpretable adversarial defense. Pattern Recognit. 2024, 145, 109902. [Google Scholar] [CrossRef]
- Lo, S.Y.; Patel, V.M. Adaptive Batch Normalization Networks for Adversarial Robustness. arXiv 2024, arXiv:2405.11708. [Google Scholar]
- Hamidi, S.M.; Ye, L. Adversarial Training via Adaptive Knowledge Amalgamation of an Ensemble of Teachers. arXiv 2024, arXiv:2405.13324. [Google Scholar]
- Zhang, K.; Weng, J.; Luo, Z.; Li, S. Towards Adversarial Robustness via Debiased High-Confidence Logit Alignment. arXiv 2024, arXiv:2408.06079. [Google Scholar]
- Mustafa, A.; Khan, S.H.; Hayat, M.; Shen, J.; Shao, L. Image super-resolution as a defense against adversarial attacks. IEEE Trans. Image Process. 2019, 29, 1711–1724. [Google Scholar] [CrossRef]
- Yu, S.; Wang, S. Multi-intermediate Feature with Multi-stage Fusion for Domain Adaptive Person Re-ID. In Proceedings of the 2023 6th International Conference on Image and Graphics Processing, Chongqing, China, 6–8 January 2023; pp. 36–43. [Google Scholar]
- Wei, X.; Yuan, M. Adversarial pan-sharpening attacks for object detection in remote sensing. Pattern Recognit. 2023, 139, 109466. [Google Scholar] [CrossRef]
- Huang, J.J.; Wang, Z.; Liu, T.; Luo, W.; Chen, Z.; Zhao, W.; Wang, M. DeMPAA: Deployable Multi-Mini-Patch Adversarial Attack for Remote Sensing Image Classification. IEEE Trans. Geosci. Remote Sens. 2024, 62, 5623613. [Google Scholar] [CrossRef]
- Liu, L.; Xu, Z.; He, D.; Yang, D.; Guo, H. Local pixel attack based on sensitive pixel location for remote sensing images. Electronics 2023, 12, 1987. [Google Scholar] [CrossRef]
- Bai, T.; Cao, Y.; Xu, Y.; Wen, B. Stealthy Adversarial Examples for Semantic Segmentation in Remote Sensing. IEEE Trans. Geosci. Remote Sens. 2024, 62, 5614817. [Google Scholar] [CrossRef]
- Yu, Z.; Yang, W.; Xie, X.; Shi, Z. Attacks on Continual Semantic Segmentation by Perturbing Incremental Samples. In Proceedings of the AAAI Conference on Artificial Intelligence, Vancouver, BC, Canada, 20–27 February 2024; Volume 38, pp. 6844–6852. [Google Scholar]
- Agnihotri, S.; Jung, S.; Keuper, M. CosPGD: An efficient white-box adversarial attack for pixel-wise prediction tasks. In Proceedings of the Forty-First International Conference on Machine Learning, Vienna, Austria, 21–27 July 2024. [Google Scholar]
- Cheng, B.; Schwing, A.; Kirillov, A. Per-pixel classification is not all you need for semantic segmentation. Adv. Neural Inf. Process. Syst. 2021, 34, 17864–17875. [Google Scholar]
- Goodfellow, I.J.; Shlens, J.; Szegedy, C. Explaining and harnessing adversarial examples. arXiv 2014, arXiv:1412.6572. [Google Scholar]
- Xie, C.; Wang, J.; Zhang, Z.; Zhou, Y.; Xie, L.; Yuille, A. Adversarial examples for semantic segmentation and object detection. In Proceedings of the IEEE International Conference on Computer Vision, Venice, Italy, 22–29 October 2017; pp. 1369–1378. [Google Scholar]
- Madry, A.; Makelov, A.; Schmidt, L.; Tsipras, D.; Vladu, A. Towards deep learning models resistant to adversarial attacks. arXiv 2017, arXiv:1706.06083. [Google Scholar]
- Gu, J.; Zhao, H.; Tresp, V.; Torr, P.H. Segpgd: An effective and efficient adversarial attack for evaluating and boosting segmentation robustness. In Proceedings of the European Conference on Computer Vision, Tel Aviv, Israel, 23–27 October 2022; pp. 308–325. [Google Scholar]
- Kurakin, A.; Goodfellow, I.; Bengio, S. Adversarial machine learning at scale. arXiv 2016, arXiv:1611.01236. [Google Scholar]
- Malinin, A.; Gales, M. Prior networks for detection of adversarial attacks. arXiv 2018, arXiv:1812.02575. [Google Scholar]
- Gong, Z.; Wang, W. Adversarial and clean data are not twins. In Proceedings of the Sixth International Workshop on Exploiting Artificial Intelligence Techniques for Data Management, Seattle, WA, USA, 18 June 2023; pp. 1–5. [Google Scholar]
- Liu, X.; Jiao, L.; Liu, F.; Zhang, D.; Tang, X. PolSF: PolSAR image datasets on san Francisco. In Proceedings of the International Conference on Intelligence Science, Xi’an, China, 28–31 October 2022; pp. 214–219. [Google Scholar]
- Zhang, Z.; Guo, H.; Yang, J.; Wang, X.; Du, Y. Adversarial network with higher order potential conditional random field for PolSAR image classification. IEEE J. Sel. Top. Appl. Earth Obs. Remote Sens. 2023, 17, 1795–1812. [Google Scholar] [CrossRef]
- Zhang, H.; Jiang, Z.; Zheng, G.; Yao, X. Semantic segmentation of high-resolution remote sensing images with improved U-Net based on transfer learning. Int. J. Comput. Intell. Syst. 2023, 16, 181. [Google Scholar] [CrossRef]
- Li, M.; Zou, H.; Dong, Z.; Qin, X.; Liu, S.; Zhang, Y. Unsupervised Semantic Segmentation of PolSAR Images Based on Multi-view Similarity. IEEE J. Sel. Top. Appl. Earth Obs. Remote Sens. 2024, 17, 5317–5331. [Google Scholar] [CrossRef]
- Zhang, S.; Cui, L.; Dong, Z.; An, W. A Deep Learning Classification Scheme for PolSAR Image Based on Polarimetric Features. Remote Sens. 2024, 16, 1676. [Google Scholar] [CrossRef]
No Attack | FGSM [48] | DAG [49] | PGD [50] | segPGD [51] | ||||||
---|---|---|---|---|---|---|---|---|---|---|
Acc (%) | F1 (%) | Acc (%) | F1 (%) | Acc (%) | F1 (%) | Acc (%) | F1 (%) | Acc (%) | F1 (%) | |
No Defense | 95.7 | 94.95 | 56.89 | 49.99 | 67.47 | 64.27 | 44.85 | 37.14 | 49.63 | 41.72 |
SAT [52] | 96.43 | 96.13 | 63.26 | 51.97 | 64.39 | 61.31 | 49.73 | 39.97 | 53.86 | 39.97 |
GAT | 97.54 | 97.07 | 64.08 | 54.39 | 68.62 | 65.52 | 50.34 | 41.28 | 54.36 | 44.99 |
No Attack | FGSM | DAG | PGD | segPGD | ||||||
---|---|---|---|---|---|---|---|---|---|---|
Acc (%) | F1 (%) | Acc (%) | F1 (%) | Acc (%) | F1 (%) | Acc (%) | F1 (%) | Acc (%) | F1 (%) | |
No Defense | 75.6 | 71.39 | 48.2 | 40.78 | 66.11 | 66.62 | 31.09 | 28.22 | 24.49 | 24.49 |
SAT | 77.18 | 78.41 | 44.27 | 40.58 | 60.95 | 59.18 | 33.60 | 27.98 | 21.22 | 18.84 |
GAT | 77.03 | 77.53 | 49.21 | 45.78 | 70.18 | 73.46 | 39.05 | 33.42 | 33.35 | 29.35 |
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. |
© 2024 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
Zan, Y.; Lu, P.; Meng, T. A Gradual Adversarial Training Method for Semantic Segmentation. Remote Sens. 2024, 16, 4277. https://doi.org/10.3390/rs16224277
Zan Y, Lu P, Meng T. A Gradual Adversarial Training Method for Semantic Segmentation. Remote Sensing. 2024; 16(22):4277. https://doi.org/10.3390/rs16224277
Chicago/Turabian StyleZan, Yinkai, Pingping Lu, and Tingyu Meng. 2024. "A Gradual Adversarial Training Method for Semantic Segmentation" Remote Sensing 16, no. 22: 4277. https://doi.org/10.3390/rs16224277
APA StyleZan, Y., Lu, P., & Meng, T. (2024). A Gradual Adversarial Training Method for Semantic Segmentation. Remote Sensing, 16(22), 4277. https://doi.org/10.3390/rs16224277