Proceedings

LBA: Textual Hard-Label Adversarial Attack Under Low Query Budgets

Download BibTeX Cite

Proceedings of the Thirty-Fifth International Joint Conference on Artificial Intelligence. Main Track. Pages 617-625.

https://doi.org/10.24963/ijcai.2026/70

Abstract

Generating high-quality adversarial texts with low query budgets remains a challenging problem in the hard-label scenario. Most existing approaches rely on greedy algorithms, where one position in the text is selected for substitution, followed by the substitutions of other positions. This local search approach may fail to discover high-quality adversarial examples and often leads to excessive query costs. Ideally, an optimal adversarial sample would consider all possible position combinations in the text, but exhaustive search is computationally impractical. To address this challenge, we propose a sampling-based method called LBA, which constructs an approximate distribution of high-quality adversarial examples by integrating both prior and posterior knowledge, and utilizes this distribution for sampling. As sampling progresses, posterior knowledge updates the approximate distribution, which in turn guides more effective sampling. Extensive experiments on six language models, ranging from small-scale to large-scale architectures across four datasets, demonstrate that LBA significantly outperforms state-of-the-art baselines on all evaluation metrics. Additionally, LLM-based assessment indicates that LBA generates more semantically preserved and comprehensible adversarial texts.

  1. [Alzantot et al., 2018] Moustafa Alzantot, Yash Sharma, Ahmed Elgohary, Bo-Jhang Ho, B. Mani Srivastava, and Kai-Wei Chang. Generating natural language adversarial examples. EMNLP, pages 2890-2896, 2018.
  2. [Brown et al., 2020] Tom Brown, Benjamin Mann, Nick Ry- der, Melanie Subbiah, Jared D Kaplan, Prafulla Dhari- wal, Arvind Neelakantan, Pranav Shyam, Girish Sastry, Amanda Askell, et al. Language models are few-shot learners. Advances in neural information processing sys- tems, 33:1877-1901, 2020.
  3. [Cer et al., 2018] Daniel Cer, Yinfei Yang, Sheng-yi Kong, Nan Hua, Nicole Limtiaco, Rhomni St John, Noah Con- stant, Mario Guajardo-Cespedes, Steve Yuan, Chris Tar, et al. Universal sentence encoder for english. In Proceed- ings of the 2018 conference on empirical methods in nat- ural language processing: system demonstrations, pages 169-174, 2018.
  4. [Chib and Greenberg, 1995] Siddhartha Chib and Edward Greenberg. Understanding the metropolis-hastings algo- rithm. The american statistician, 49(4):327-335, 1995.
  5. [Devlin et al., 2019] Jacob Devlin, Ming-Wei Chang, Ken- ton Lee, and Kristina Toutanova. Bert: Pre-training of deep bidirectional transformers for language understand- ing. In Proceedings of the 2019 conference of the North American chapter of the association for computational lin- guistics: human language technologies, volume 1 (long and short papers), pages 4171-4186, 2019.
  6. [Du et al., 2022] Zhengxiao Du, Yujie Qian, Xiao Liu, Ming Ding, Jiezhong Qiu, Zhilin Yang, and Jie Tang. Glm: Gen- eral language model pretraining with autoregressive blank infilling. In Proceedings of the 60th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pages 320-335, 2022.
  7. [Gao et al., 2024] Chongyang Gao, Kang Gu, Soroush Vosoughi, and Shagufta Mehnaz. Semantic-preserving ad- versarial example attack against bert. In Proceedings of the 4th Workshop on Trustworthy Natural Language Pro- cessing (TrustNLP 2024), pages 202-207, 2024.
  8. [Garg and Ramakrishnan, 2020] Siddhant Garg and Goutham Ramakrishnan. Bae: Bert-based adversar- ial examples for text classification. In Proceedings of the 2020 Conference on Empirical Methods in Natural Language Processing (EMNLP), pages 6174-6181, 2020.
  9. [Goodfellow et al., 2015] Ian J. Goodfellow, Jonathon Shlens, and Christian Szegedy. Explaining and harnessing adversarial examples. In International Conference on Learning Representations (ICLR), 2015.
  10. [Hochreiter and Schmidhuber, 1997] Sepp Hochreiter and Jurgen Schmidhuber. Long short-term memory. Neural Comput., 9(8):1735-1780, 1997.
  11. [Hu et al., 2022] Junjie Hu, Hiroaki Hayashi, Kyunghyun Cho, and Graham Neubig. DEEP: DEnoising entity pre- training for neural machine translation. In Smaranda Muresan, Preslav Nakov, and Aline Villavicencio, editors, Proceedings of the 60th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pages 1753-1766, 2022.
  12. [Jin et al., 2020] Di Jin, Zhijing Jin, Joey Tianyi Zhou, and Peter Szolovits. Is bert really robust? a strong baseline for natural language attack on text classification and entail- ment. In Proceedings of the AAAI conference on artificial intelligence, volume 34, pages 8018-8025, 2020.
  13. [Kim, 2014] Yoon Kim. Convolutional neural networks for sentence classification. EMNLP, pages 1746-1751, 2014.
  14. [Li et al., 2020] Jinfeng Li, Shouling Ji, Tianyu Du, Bo Li, and Ting Wang. Textbugger: Generating adversarial text against real-world applications. In 26th Annual Network and Distributed System Security Symposium, NDSS, 2020.
  15. [Li et al., 2021] Dianqi Li, Yizhe Zhang, Hao Peng, Liqun Chen, Chris Brockett, Ming-Ting Sun, and William B Dolan. Contextualized perturbation for textual adversar- ial attack. In Proceedings of the 2021 Conference of the North American Chapter of the Association for Computa- tional Linguistics: Human Language Technologies, pages 5053-5069, 2021.
  16. [Linyang et al., 2020] Li Linyang, Ma Ruotian, Guo Qipeng, Xue Xiangyang, and Qiu Xipeng. Bert attack: Adversarial attack against bert using bert. EMNLP 2020, pages 6193- 6202, 2020.
  17. [Liu et al., 2024a] Han Liu, Zhi Xu, Xiaotong Zhang, Feng Zhang, Fenglong Ma, Hongyang Chen, Hong Yu, and Xi- anchao Zhang. Hqa-attack: toward high quality black-box hard-label adversarial attack on text. Advances in Neural Information Processing Systems, 36:51347-51358, 2024.
  18. [Liu et al., 2024b] Zhaorong Liu, Xi Xiong, Yuanyuan Li, Yan Yu, Jiazhong Lu, Shuai Zhang, and Fei Xiong. Hygloadattack: Hard-label black-box textual adversar- ial attacks via hybrid optimization. Neural Networks, 178:106461, 2024.
  19. [Maas et al., 2011] L. Andrew Maas, E. Raymond Daly, T. Peter Pham, Dan Huang, Y. Andrew Ng, and Christo- pher Potts. Learning word vectors for sentiment analysis. ACL, pages 142-150, 2011.
  20. [Maheshwary et al., 2021a] Rishabh Maheshwary, Saket Maheshwary, and Vikram Pudi. Generating natural language attacks in a hard label black box setting. In Pro- ceedings of the AAAI Conference on Artificial Intelligence, volume 35, pages 13525-13533, 2021.
  21. [Maheshwary et al., 2021b] Rishabh Maheshwary, Saket Maheshwary, and Vikram Pudi. A strong baseline for query efficient attacks in a black box setting. In Proceed- ings of the 2021 Conference on Empirical Methods in Natural Language Processing, pages 8396-8409, 2021.
  22. [Morris et al., 2020] John Morris, Eli Lifland, Jin Yong Yoo, Jake Grigsby, Di Jin, and Yanjun Qi. Textattack: A frame- work for adversarial attacks, data augmentation, and ad- versarial training in nlp. In Proceedings of the 2020 Con- ference on Empirical Methods in Natural Language Pro- cessing: System Demonstrations, pages 119-126, 2020.
  23. [OpenAI, 2023] R OpenAI. Gpt-4 technical report. arXiv, pages 2303-08774, 2023.
  24. [Pang and Lee, 2005] Bo Pang and Lillian Lee. Seeing stars: exploiting class relationships for sentiment categorization with respect to rating scales. meeting of the association for computational linguistics, pages 115-124, 2005.
  25. [Peng et al., 2023] Hao Peng, Shixin Guo, Dandan Zhao, Xuhong Zhang, Jianmin Han, Shouling Ji, Xing Yang, and Ming Zhong. Textcheater: A query-efficient textual adver- sarial attack in the hard-label setting. IEEE Transactions on Dependable and Secure Computing, (01):1-16, 2023.
  26. [Radford et al., 2019] Alec Radford, Jeffrey Wu, Rewon Child, David Luan, Dario Amodei, Ilya Sutskever, et al. Language models are unsupervised multitask learners. OpenAI blog, 1(8):9, 2019.
  27. [Szegedy et al., 2014] Christian Szegedy, Wojciech Zaremba, Ilya Sutskever, Joan Bruna, Dumitru Erhan, Ian Goodfellow, and Rob Fergus. Intriguing properties of neural networks. In International Conference on Learning Representations (ICLR), 2014.
  28. [Touvron et al., 2023] Hugo Touvron, Thibaut Lavril, Gau- tier Izacard, Xavier Martinet, Marie-Anne Lachaux, Tim- othée Lacroix, Baptiste Rozière, Naman Goyal, Eric Ham- bro, Faisal Azhar, et al. Llama: Open and efficient founda- tion language models. arXiv preprint arXiv:2302.13971, 2023.
  29. [Ye et al., 2022] Muchao Ye, Chenglin Miao, Ting Wang, and Fenglong Ma. Texthoaxer: budgeted hard-label ad- versarial attacks on text. In Proceedings of the AAAI Con- ference on Artificial Intelligence, volume 36, pages 3877- 3884, 2022.
  30. [Ye et al., 2023] Muchao Ye, Jinghui Chen, Chenglin Miao, Ting Wang, and Fenglong Ma. Leapattack: Hard-label adversarial attack on text via gradient-based optimization. In Proceedings of the 28th ACM SIGKDD Conference on Knowledge Discovery and Data Mining, pages 2307- 2315, 2023.
  31. [Zang et al., 2020] Yuan Zang, Fanchao Qi, Chenghao Yang, Zhiyuan Liu, Meng Zhang, Qun Liu, and Maosong Sun. Word-level textual adversarial attacking as combinatorial optimization. pages 6066-6080, 2020.
  32. [Zhang et al., 2015] Xiang Zhang, Junbo Zhao, and Yann LeCun. Character-level convolutional networks for text classification. In Proceedings of the 29th International Conference on Neural Information Processing Systems -Volume 1, NIPS'15, page 649-657, Cambridge, MA, USA, 2015.
  33. [Zhang et al., 2023] Biao Zhang, Barry Haddow, and Alexandra Birch. Prompting large language model for machine translation: a case study. In Proceedings of the 40th International Conference on Machine Learning, ICML'23, pages 41092-41110, 2023.
  34. [Zhao et al., 2023] Wayne Xin Zhao, Kun Zhou, Junyi Li, Tianyi Tang, Xiaolei Wang, Yupeng Hou, Yingqian Min, Beichen Zhang, Junjie Zhang, Zican Dong, et al. A survey of large language models. arXiv preprint arXiv:2303.18223, 2023.

References were extracted automatically from the PDF and may contain errors.

Welcome Future Conferences AI Journal Division IJCAI Proceedings About IJCAI IJCAI Awards