Netinfo Security ›› 2026, Vol. 26 ›› Issue (5): 725-735.doi: 10.3969/j.issn.1671-1122.2026.05.005

Previous Articles     Next Articles

A Word-Level Adversarial Sample Generation Method Based on the Improved Slime Mold Algorithm

XU Ruzhi, WU Xiaoxin()   

  1. School of Control and Computer Engineering, North China Electric Power University, Beijing 102206, China
  • Received:2025-12-10 Online:2026-05-10 Published:2026-06-03

Abstract:

In the context of the continuous innovation and wide application of artificial intelligence technology, deep learning has achieved significant breakthroughs, but it often shows vulnerability when subjected to adversarial sample attacks. In the field of natural language processing, the discreteness and semantic constraints of text make text adversarial attacks more challenging. Among them, word-level attacks, as a typical combinatorial optimization task, existing methods face the dual bottlenecks of easily causing semantic deviation in the construction of the search space and often getting stuck in local optima of the optimization algorithm, making it difficult to efficiently explore high-quality perturbation strategies. To address these issues, this paper proposed a word-level adversarial sample generation method based on the improved slime mold algorithm. Firstly, by constructing a search space of replacement candidate words based on semantic origin knowledge, it effectively constrained the semantic consistency of the replacement words, avoiding the problem of naturalness degradation of the text caused by semantic deviation in traditional methods; then, the improved slime mold algorithm reconstructed the position update rule through discrete space logical operations, achieving a dynamic balance between global exploration and local development, avoiding the problem of the algorithm getting stuck in local optima; finally, by using the substitution strategy of similar characters in Chinese and Japanese dictionaries, the attackability of the adversarial samples was further enhanced. Experimental results show that this method achieves effective attacks on text classification models in the Chinese sentiment classification task, with an average decrease in classification accuracy of more than 30%, and significantly outperforms the comparison methods in semantic similarity.

Key words: adversarial samples, word-level adversarial attack, slime mold algorithm

CLC Number: