EFSAttack: Edge Noise-Constrained Black-Box Attack Using Artificial Fish Swarm Algorithm
Abstract
:1. Introduction
- We introduce the concept of edge noise constraint to indicate the low-frequency region of the image where perturbations are added, effectively improving the concealment of the adversarial examples.
- We improve the artificial fish swarm algorithm based on the edge noise constraint for the black-box attack task, including edge noise-constrained population initialization and edge noise-constrained population initialization evolution.
- We demonstrate the effectiveness of EFSAttack by conducting empirical evaluations on the CIFAR-10 and MNIST datasets.
2. Related Work
2.1. Adversarial Attacks
2.1.1. White-Box Attacks
2.1.2. Black-Box Attacks
2.2. Heuristic Algorithms
3. Methods
3.1. Problem Description
3.2. EFSAttack
3.2.1. Edge Noise Constraint
- Edge extraction. To begin, we employ an edge detection algorithm [25] to extract the initial edge information from the given original image . This process generates the initial edge map , which is a single-channel binary matrix. In this matrix, a value of 1 at a particular position indicates that the corresponding position in the original image belongs to the edge region.
- Edge expansion. To achieve a more continuous edge region, we perform edge expansion by shifting the initial edge map by one pixel in four directions: up, down, left, and right. We then add these shifted edge maps together and duplicate the edge map in the channel direction to ensure its channel number is consistent with that of the original image. Eventually, we obtain the final edge map .
- Edge noise constraint. To enforce the noise to be confined within the edge region, we perform an element-wise multiplication between the noise matrix and the edge map matrix. This operation masks out the noise in the non-edge region, ensuring that it only affects the pixels belonging to the edges. Finally, we add the resulting processed noise to the original image. This process generates the final perturbed image, where the noise is constrained to the edge region of the image.
3.2.2. Population Initialization Based on Edge Noise Constraint
3.2.3. Population Evolution Based on Edge Noise Constraint
3.2.4. Edge Noise Reduction
- Divide the adversarial example and the original image into blocks.
- Iterate through all the image blocks. (i) Replace the block in the adversarial example with the counterpart in the original image. (ii) Query the target model to check if the current adversarial example causes the model to classify incorrectly. (iii) If the current adversarial example causes misclassification, retain the replacement of the image block; otherwise, revert the replacement.
Algorithm 1 Overall procedure of EFSAttack | |
Input: target image x, max iteration number M, population size N, step size, the visual range Output: the adversarial example | |
1 | |
2 | Sample noise from a Gaussian distribution. |
3 | Initialize the population X according to Equation (2). |
4 | |
5 | |
6 | |
7 | |
8 | ) |
9 | |
10 | |
11 | |
12 | |
13 | ) |
14 | |
15 | |
16 | end for |
17 | if attacking successfully then |
18 | return |
19 | end if |
20 | end for |
21 | Divide the adversarial example and the original image into several blocks. |
22 | |
23 | |
24 | |
25 | continue |
26 | else |
27 | undo the operation |
28 | end if |
29 | return |
4. Experiments
4.1. Setup
- Zeroth Order Optimization (ZOO) [26]. ZOO generates adversarial examples based on differential evolution. It evaluates the coordinates of the samples after applying perturbations, approximates the gradients for each coordinate, and then applies small perturbations in the direction of the gradient to generate adversarial examples. ZOO reduces the number of queries required by using random coordinate descent and attack space dimensionality reduction.
- GenAttack [27]. GenAttack generates adversarial examples using the GA. It proposes the use of dimensionality reduction and adaptive parameter scaling to reduce the number of queries required.
- AdversarialPSO. AdversarialPSO generates adversarial examples based on PSO. This algorithm first divides the search space and initializes the particle swarm by randomly selecting a few image blocks to apply perturbations. It then performs an optimization search.
- ABCAttack [28]. ABCAttack generates adversarial examples based on the artificial bee colony algorithm.
- Multi-Group PSO with Random Redistribution (MGRR-PSO) [29]. MGRR-PSO uses multiple groups of PSO with random redistribution to generate perturbations. It solves the problem of the PSO algorithm getting stuck in local optima, leading to low attack success rates.
- Brownian Arithmetic Optimization Algorithm (BAOA) [30]. The BAOA uses simple arithmetic operations inspired by the Brownian motion of molecules in fluids and gases to search for the best adversarial examples in high-dimensional image space.
4.2. Results
4.3. Ablation Studies
4.3.1. Updation Strategy
4.3.2. Noise Constraint Strategy
4.3.3. Hyperparameter Analysis
5. Discussion
6. Conclusions
Author Contributions
Funding
Data Availability Statement
Conflicts of Interest
References
- Yang, J.; Shi, R.; Wei, D.; Liu, Z.; Zhao, L.; Ke, B.; Pfister, H.; Ni, B. Medmnist v2-a large-scale lightweight benchmark for 2d and 3d biomedical image classification. Sci. Data 2023, 10, 41. [Google Scholar] [CrossRef] [PubMed]
- Chang, Y.; Wang, X.; Wang, J.; Wu, Y.; Yang, L.; Zhu, K.; Chen, H.; Yi, X.; Wang, C.; Wang, Y.; et al. A survey on evaluation of large language models. ACM Trans. Intell. Syst. Technol. 2024, 15, 1–45. [Google Scholar] [CrossRef]
- Radford, A.; Kim, J.W.; Xu, T.; Brockman, G.; McLeavey, C.; Sutskever, I. Robust speech recognition via large-scale weak supervision. In Proceedings of the 40th International Conference on Machine Learning, Honolulu, HI, USA, 23–29 July 2023; pp. 28492–28518. [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]
- Goodfellow, I.J.; Shlens, J.; Szegedy, C. Explaining and harnessing adversarial examples. arXiv 2014, arXiv:1412.6572. [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]
- Brendel, W.; Rauber, J.; Bethge, M. Decision-Based Adversarial Attacks: Reliable Attacks Against Black-Box Machine Learning Models. arXiv 2021, arXiv:1712.04248. [Google Scholar]
- Chen, J.; Jordan, M.I.; Wainwright, M.J. Hopskipjumpattack: A query-efficient decision-based attack. In Proceedings of the 2020 IEEE Symposium on Security and Privacy (sp), San Francisco, CA, USA, 18–21 May 2020; pp. 1277–1294. [Google Scholar]
- Li, H.; Xu, X.; Zhang, X.; Yang, S.; Li, B. Qeba: Query-efficient boundary-based blackbox attack. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, New Orleans, LA, USA, 18–24 June 2020; pp. 1221–1230. [Google Scholar]
- Yang, C.; Kortylewski, A.; Xie, C.; Cao, Y.; Yuille, A. Patchattack: A black-box texture-based attack with reinforcement learning. In European Conference on Computer Vision; Springer: Berlin/Heidelberg, Germany, 2020; pp. 681–698. [Google Scholar]
- Carlini, N.; Wagner, D. Towards evaluating the robustness of neural networks. In Proceedings of the 2017 IEEE Symposium on Security and Privacy (sp), San Jose, CA, USA, 22–26 May 2017; pp. 39–57. [Google Scholar]
- Gatys, L.A.; Ecker, A.S.; Bethge, M. Image style transfer using convolutional neural networks. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, Las Vegas, NV, USA, 26 June–1 July 2016; pp. 2414–2423. [Google Scholar]
- Croce, F.; Andriushchenko, M.; Singh, N.D.; Flammarion, N.; Hein, M. Sparse-rs: A versatile framework for query-efficient sparse black-box adversarial attacks. In Proceedings of the AAAI Conference on Artificial Intelligence, Online, 22 February–1 March 2022; pp. 6437–6445. [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]
- Vo, V.Q.; Abbasnejad, E.; Ranasinghe, D.C. Query efficient decision based sparse attacks against black-box deep learning models. arXiv 2022, arXiv:2202.00091. [Google Scholar]
- Mosli, R.; Wright, M.; Yuan, B.; Pan, Y. They might not be giants crafting black-box adversarial examples using particle swarm optimization. In Proceedings of the Computer Security-ESORICS 2020: 25th European Symposium on Research in Computer Security, ESORICS 2020, Guildford, UK, 14–18 September 2020; Proceedings, Part II 25. Springer: Berlin/Heidelberg, Germany, 2020; pp. 439–459. [Google Scholar]
- Holland, J.H. Adaptation in Natural and Artificial Systems: An Introductory Analysis with Applications to Biology, Control, and Artificial Intelligence; MIT Press: Cambridge, MA, USA, 1992. [Google Scholar]
- Eberhart, R.; Kennedy, J. A new optimizer using particle swarm theory. In Proceedings of the Sixth International Symposium on Micro Machine and Human Science, Nagoya, Japan, 4–6 October 1995; pp. 39–43. [Google Scholar]
- Dorigo, M.; Birattari, M.; Stutzle, T. Ant colony optimization. IEEE Comput. Intell. Mag. 2006, 1, 28–39. [Google Scholar] [CrossRef]
- Kirkpatrick, S.; Gelatt, C.D., Jr.; Vecchi, M.P. Optimization by simulated annealing. Science 1983, 220, 671–680. [Google Scholar] [CrossRef] [PubMed]
- Neshat, M.; Sepidnam, G.; Sargolzaei, M.; Toosi, A.N. Artificial fish swarm algorithm: A survey of the state-of-the-art, hybridization, combinatorial and indicative applications. Artif. Intell. Rev. 2014, 42, 965–997. [Google Scholar] [CrossRef]
- Pourpanah, F.; Wang, R.; Lim, C.P.; Wang, X.-Z.; Yazdani, D. A review of artificial fish swarm algorithms: Recent advances and applications. Artif. Intell. Rev. 2023, 56, 1867–1903. [Google Scholar] [CrossRef]
- Van der Maaten, L.; Hinton, G. Visualizing data using t-SNE. J. Mach. Learn. Res. 2008, 9, 2579–2605. [Google Scholar]
- Kaur, M.; Jindal, S.; Behal, S.J. A study of digital image watermarking. J. Res. Eng. Appl. Sci. 2012, 2, 126–136. [Google Scholar]
- Canny, J. A computational approach to edge detection. IEEE Trans. Pattern Anal. Mach. Intell. 1986, 8, 679–698. [Google Scholar] [CrossRef] [PubMed]
- Chen, P.-Y.; Zhang, H.; Sharma, Y.; Yi, J.; Hsieh, C.-J. Zoo: Zeroth order optimization based black-box attacks to deep neural networks without training substitute models. In Proceedings of the 10th ACM Workshop on Artificial Intelligence and Security, Dallas, TX, USA, 3 November 2017; pp. 15–26. [Google Scholar]
- Alzantot, M.; Sharma, Y.; Chakraborty, S.; Zhang, H.; Hsieh, C.-J.; Srivastava, M.B. Genattack: Practical black-box attacks with gradient-free optimization. In Proceedings of the Genetic and Evolutionary Computation Conference, Prague, Czech Republic, 13–17 July 2019; pp. 1111–1119. [Google Scholar]
- Cao, H.; Si, C.; Sun, Q.; Liu, Y.; Li, S.; Gope, P. Abcattack: A gradient-free optimization black-box attack for fooling deep image classifiers. Entropy 2022, 24, 412. [Google Scholar] [CrossRef] [PubMed]
- Suryanto, N.; Kang, H.; Kim, Y.; Yun, Y.; Larasati, H.T.; Kim, H. A distributed black-box adversarial attack based on multi-group particle swarm optimization. Sensors 2020, 20, 7158. [Google Scholar] [CrossRef] [PubMed]
- Mukeri, A.F.; Gaikwad, D.P. Towards Query Efficient and Derivative Free Black Box Adversarial Machine Learning Attack. Int. J. Image Graph. Signal Process. 2022, 13, 16. [Google Scholar] [CrossRef]
CIFAR-10 | MNIST | |||||
---|---|---|---|---|---|---|
Success Rate | Avg. Queries | Avg. L2 | Success Rate | Avg. Queries | Avg. L2 | |
ZOO | 100.00% | 12,800 | 0.199 | 100% | 384,000 | 1.496 |
GenAttack | 96.50% | 1360 | 1.3651 | 94.45% | 1801 | 5.191 |
AdversarialPSO | 99.60% | 1224 | 1.414 | 96.30% | 593 | 4.143 |
ABCAttack | 98.60% | 330 | 1.643 | 100% | 629 | 4.010 |
MGRR-PSO Attack | 100.00% | 694 | 1.767 | 100% | 1288 | 4.2805 |
BAOA | 69.00% | 820 | 1.990 | - | - | - |
EFSAttack(ours) | 100.00% | 541 | 1.396 | 98.4% | 583 | 3.745 |
CIFAR-10 | MNIST | |||||
---|---|---|---|---|---|---|
Success Rate | Avg. Queries | Avg. L2 | Success Rate | Avg. Queries | Avg. L2 | |
EFSAttack | 100% | 541 | 1.396 | 98.4% | 583 | 3.745 |
EFSAttack-w/o-prey | 22.8% | 5 | 0.105 | 2.2% | 5 | 0.038 |
EFSAttack-w/o-swarm | 99.6% | 471 | 2.512 | 98.4% | 528 | 3.949 |
EFSAttack-w/o-follow | 99.6% | 473 | 2.516 | 98.3% | 525 | 3.961 |
CIFAR-10 | MNIST | |||||
---|---|---|---|---|---|---|
Success Rate | Avg. Queries | Avg. L2 | Success Rate | Avg. Queries | Avg. L2 | |
EFSAttack | 100% | 541 | 1.396 | 98.4% | 585 | 3.769 |
EFSAttack-w/o-mask | 100% | 497 | 1.304 | 100% | 515 | 3.703 |
EFSAttack-w/o-reduction | 100% | 393 | 3.103 | 98.1% | 416 | 5.865 |
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
Gao, J.; Zheng, K.; Wang, X.; Wu, C.; Wu, B. EFSAttack: Edge Noise-Constrained Black-Box Attack Using Artificial Fish Swarm Algorithm. Electronics 2024, 13, 2446. https://doi.org/10.3390/electronics13132446
Gao J, Zheng K, Wang X, Wu C, Wu B. EFSAttack: Edge Noise-Constrained Black-Box Attack Using Artificial Fish Swarm Algorithm. Electronics. 2024; 13(13):2446. https://doi.org/10.3390/electronics13132446
Chicago/Turabian StyleGao, Jiaqi, Kangfeng Zheng, Xiujuan Wang, Chunhua Wu, and Bin Wu. 2024. "EFSAttack: Edge Noise-Constrained Black-Box Attack Using Artificial Fish Swarm Algorithm" Electronics 13, no. 13: 2446. https://doi.org/10.3390/electronics13132446
APA StyleGao, J., Zheng, K., Wang, X., Wu, C., & Wu, B. (2024). EFSAttack: Edge Noise-Constrained Black-Box Attack Using Artificial Fish Swarm Algorithm. Electronics, 13(13), 2446. https://doi.org/10.3390/electronics13132446