Certified Robustness to Text Adversarial Attacks by Randomized [MASK]

Jiehang Zeng, Jianhan Xu, Xiaoqing Zheng, Xuanjing Huang


Abstract
Very recently, few certified defense methods have been developed to provably guarantee the robustness of a text classifier to adversarial synonym substitutions. However, all the existing certified defense methods assume that the defenders have been informed of how the adversaries generate synonyms, which is not a realistic scenario. In this study, we propose a certifiably robust defense method by randomly masking a certain proportion of the words in an input text, in which the above unrealistic assumption is no longer necessary. The proposed method can defend against not only word substitution-based attacks, but also character-level perturbations. We can certify the classifications of over 50% of texts to be robust to any perturbation of five words on AGNEWS, and two words on SST2 dataset. The experimental results show that our randomized smoothing method significantly outperforms recently proposed defense methods across multiple datasets under different attack algorithms.
Anthology ID:
2023.cl-2.5
Volume:
Computational Linguistics, Volume 49, Issue 2 - June 2023
Month:
June
Year:
2023
Address:
Cambridge, MA
Venue:
CL
SIG:
Publisher:
MIT Press
Note:
Pages:
395–427
Language:
URL:
https://aclanthology.org/2023.cl-2.5
DOI:
10.1162/coli_a_00476
Bibkey:
Cite (ACL):
Jiehang Zeng, Jianhan Xu, Xiaoqing Zheng, and Xuanjing Huang. 2023. Certified Robustness to Text Adversarial Attacks by Randomized [MASK]. Computational Linguistics, 49(2):395–427.
Cite (Informal):
Certified Robustness to Text Adversarial Attacks by Randomized [MASK] (Zeng et al., CL 2023)
Copy Citation:
PDF:
https://aclanthology.org/2023.cl-2.5.pdf