RootES: A Method for Generating Text Adversarial Examples Using Root Embedding Space
摘要
The pervasive deployment of deep learning in NLP (Natural Language Processing) has prompted researchers to acknowledge the vulnerability of existing models to adversarial examples. The current methods for generating text adversarial examples frequently exhibit high perturbation rates, limited perturbation methods, and poor similarity. To address these issues, this article proposes a process named “RootES” for generating text adversarial examples using the root embedding space. First, an enhanced BERT(Bidirectional Encoder Representations from Transformers) model with a multi-head self-attention mechanism is employed to identify keywords that significantly affect classification accurately. Second, the root embedding space model finds root words most similar to the keywords for character-level perturbations, generating candidate examples with different perturbation types. Finally, the candidate examples are treated as different clusters, and one is selected as the final mixed-type adversarial example with varying types of substitution. The experimental results show that adversarial examples generated on the IMDB Review, Yelp Reviews, and AG's News datasets have lower perturbation rates (PR) and improved attack success rates (SR) and similarity (Sim) compared to existing methods. Further experiments confirm that adversarial examples generated by RootES exhibit good transferability and that adversarial training enhances model robustness.