[Paper Review] Text-CRS: A Generalized Certified Robustness Framework against Textual Adversarial Attacks
Text-CRS proposes a generalized certified robustness framework for NLP models using randomized smoothing to defend against four word-level adversarial operations: synonym substitution, reordering, insertion, and deletion. By modeling these operations as combinations of permutation and embedding transformations, and introducing tailored noise distributions, Text-CRS achieves state-of-the-art certified accuracy and radius across all four operations, establishing the first comprehensive benchmark for certified robustness in NLP.
The language models, especially the basic text classification models, have been shown to be susceptible to textual adversarial attacks such as synonym substitution and word insertion attacks. To defend against such attacks, a growing body of research has been devoted to improving the model robustness. However, providing provable robustness guarantees instead of empirical robustness is still widely unexplored. In this paper, we propose Text-CRS, a generalized certified robustness framework for natural language processing (NLP) based on randomized smoothing. To our best knowledge, existing certified schemes for NLP can only certify the robustness against $\ell_0$ perturbations in synonym substitution attacks. Representing each word-level adversarial operation (i.e., synonym substitution, word reordering, insertion, and deletion) as a combination of permutation and embedding transformation, we propose novel smoothing theorems to derive robustness bounds in both permutation and embedding space against such adversarial operations. To further improve certified accuracy and radius, we consider the numerical relationships between discrete words and select proper noise distributions for the randomized smoothing. Finally, we conduct substantial experiments on multiple language models and datasets. Text-CRS can address all four different word-level adversarial operations and achieve a significant accuracy improvement. We also provide the first benchmark on certified accuracy and radius of four word-level operations, besides outperforming the state-of-the-art certification against synonym substitution attacks.
Motivation & Objective
- To address the lack of provable robustness guarantees against diverse word-level adversarial operations in NLP.
- To extend certified robustness beyond $ε$-robustness against synonym substitution to include reordering, insertion, and deletion.
- To develop a unified framework that generalizes randomized smoothing for discrete text perturbations.
- To improve certified accuracy and robustness radius through optimized noise distributions and enhanced training.
- To establish the first benchmark for certified accuracy and radius across four distinct word-level adversarial operations.
Proposed method
- Represent each word-level adversarial operation (substitution, reordering, insertion, deletion) as a combination of permutation and embedding space transformations.
- Derive novel smoothing theorems to derive certified robustness bounds in both permutation and embedding spaces.
- Introduce a generalized smoothing framework using discrete noise distributions—staircase, Gaussian, and Bernoulli—aligned with $ε$-norms ($\ell_1$, $\ell_2$, $\ell_0$) for different operations.
- Propose a noise selection strategy based on numerical relationships between discrete words to improve certified accuracy and robustness radius.
- Design an enhanced training toolkit that optimizes smoothed classifier performance under the new noise distributions.
- Apply the framework to various pre-trained language models and datasets to validate robustness and generalization.
Experimental results
Research questions
- RQ1Can randomized smoothing be generalized to provide certified robustness against multiple word-level adversarial operations beyond synonym substitution?
- RQ2How can permutation and embedding space transformations be jointly modeled to derive robustness bounds for diverse text perturbations?
- RQ3What noise distributions are most effective in maximizing certified accuracy and robustness radius for discrete text operations?
- RQ4Can a unified smoothing framework achieve practical certified robustness across all four fundamental word-level operations?
- RQ5How does the proposed method compare to state-of-the-art certified defenses in terms of certified accuracy and robustness radius?
Key findings
- Text-CRS achieves state-of-the-art certified accuracy and radius for synonym substitution attacks, outperforming prior methods such as SAFER and CISS.
- The framework establishes the first benchmark for certified robustness against word reordering, insertion, and deletion, which were previously unaddressed in certified defenses.
- By using tailored noise distributions (staircase, Gaussian, Bernoulli), Text-CRS significantly improves certified accuracy and robustness radius compared to uniform or standard Gaussian noise.
- The method demonstrates strong generalization across diverse language models and datasets, including BERT and RoBERTa, on tasks such as sentiment analysis and text classification.
- The enhanced training toolkit contributes to a measurable improvement in certified accuracy, validating the effectiveness of noise distribution selection.
- Text-CRS provides practical certified radii for all four word-level operations, with measurable robustness in real-world adversarial settings.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.