SemAttack: natural textual adversarial attacks based on different semantic spacesSemAttack: Natural Textual Attacks via Different Semantic Spaces
The researchers propose the SemAttack framework, which generates more natural textual adversarial examples by constructing a variety of semantic perturbation functions, and validate the attack effectiveness on large-scale pretrained language models. The framework can constrain the generated perturbations within a typo space, a knowledge space such as WordNet, the contextual semantic space of BERT clustered embeddings, or a combination of these. Experiments show that models such as DeBERTa-v2 and defense strategies such as FreeLB remain vulnerable to SemAttack, and that the method can be applied to both English and Chinese and achieve high attack success rates. Human evaluation considers the generated adversarial texts relatively natural, with almost no impact on human performance. Code is publicly available on GitHub: https://github.com/AI-secure/SemAttack。