[MASK] Insertion: a robust method for anti-adversarial attacks

Xinrong Hu, Ce Xu, Junlong Ma, Zijian Huang, Jie Yang, Yi Guo, Johan Barthelemy


Abstract
Adversarial attack aims to perturb input sequences and mislead a trained model for false predictions. To enhance the model robustness, defensing methods are accordingly employed by either data augmentation (involving adversarial samples) or model enhancement (modifying the training loss and/or model architecture). In contrast to previous work, this paper revisits the masked language modeling (MLM) and presents a simple yet efficient algorithm against adversarial attacks, termed [MASK] insertion for defensing (MI4D). Specifically, MI4D simply inserts [MASK] tokens to input sequences during training and inference, maximizing the intersection of the new convex hull (MI4D creates) with the original one (the clean input forms). As neither additional adversarial samples nor the model modification is required, MI4D is as computationally efficient as traditional fine-tuning. Comprehensive experiments have been conducted using three benchmark datasets and four attacking methods. MI4D yields a significant improvement (on average) of the accuracy between 3.2 and 11.1 absolute points when compared with six state-of-the-art defensing baselines.
Anthology ID:
2023.findings-eacl.78
Volume:
Findings of the Association for Computational Linguistics: EACL 2023
Month:
May
Year:
2023
Address:
Dubrovnik, Croatia
Editors:
Andreas Vlachos, Isabelle Augenstein
Venue:
Findings
SIG:
Publisher:
Association for Computational Linguistics
Note:
Pages:
1058–1070
Language:
URL:
https://aclanthology.org/2023.findings-eacl.78
DOI:
10.18653/v1/2023.findings-eacl.78
Bibkey:
Cite (ACL):
Xinrong Hu, Ce Xu, Junlong Ma, Zijian Huang, Jie Yang, Yi Guo, and Johan Barthelemy. 2023. [MASK] Insertion: a robust method for anti-adversarial attacks. In Findings of the Association for Computational Linguistics: EACL 2023, pages 1058–1070, Dubrovnik, Croatia. Association for Computational Linguistics.
Cite (Informal):
[MASK] Insertion: a robust method for anti-adversarial attacks (Hu et al., Findings 2023)
Copy Citation:
PDF:
https://aclanthology.org/2023.findings-eacl.78.pdf
Video:
 https://aclanthology.org/2023.findings-eacl.78.mp4