[Paper Review] Is BERT Really Robust? Natural Language Attack on Text Classification and Entailment
This paper introduces TextFooler, a robust and efficient method to generate natural adversarial text examples that successfully fool state-of-the-art models, including BERT, on text classification and textual entailment tasks. It achieves high attack success rates while preserving semantic meaning and grammaticality, demonstrating that even powerful pre-trained models are vulnerable to subtle, human-indistinguishable perturbations.
Machine learning algorithms are often vulnerable to adversarial examples that have imperceptible alterations from the original counterparts but can fool the state-of-the-art models. It is helpful to evaluate or even improve the robustness of these models by exposing the maliciously crafted adversarial examples. In this paper, we present TextFooler, a simple but strong baseline to generate natural adversarial text. By applying it to two fundamental natural language tasks, text classification and textual entailment, we successfully attacked three target models, including the powerful pre-trained BERT, and the widely used convolutional and recurrent neural networks. We demonstrate the advantages of this framework in three ways: (1) effective---it outperforms state-of-the-art attacks in terms of success rate and perturbation rate, (2) utility-preserving---it preserves semantic content and grammaticality, and remains correctly classified by humans, and (3) efficient---it generates adversarial text with computational complexity linear to the text length. *The code, pre-trained target models, and test examples are available at this https URL.
Motivation & Objective
- To investigate the robustness of state-of-the-art NLP models, including BERT, against natural language adversarial examples.
- To develop a method that generates adversarial text with high success rates while maintaining semantic coherence and grammaticality.
- To evaluate the effectiveness of adversarial attacks on fundamental NLP tasks such as text classification and textual entailment.
- To provide a strong, efficient baseline for future adversarial robustness research in NLP.
Proposed method
- TextFooler generates adversarial examples by iteratively replacing words in the input text with semantically similar synonyms that maximize the model's prediction error.
- It uses gradient-based optimization to identify the most influential words to modify, ensuring minimal perturbation while maximizing attack success.
- The method preserves sentence semantics and grammaticality by selecting only words that are contextually and syntactically appropriate replacements.
- It operates with linear computational complexity relative to input length, making it efficient for long texts.
- The attack is applied to pre-trained models like BERT, CNNs, and RNNs across text classification and textual entailment benchmarks.
- The framework is evaluated using human judgment to confirm that adversarial examples remain correctly classified by humans.
Experimental results
Research questions
- RQ1Can adversarial examples be generated in natural language that are imperceptible to humans but highly effective at fooling state-of-the-art NLP models?
- RQ2How does TextFooler compare to existing attack methods in terms of success rate and perturbation rate on text classification and textual entailment tasks?
- RQ3To what extent do powerful pre-trained models like BERT remain robust to natural language adversarial attacks?
- RQ4Can adversarial examples preserve semantic meaning and grammaticality while still deceiving deep learning models?
Key findings
- TextFooler achieved higher attack success rates compared to state-of-the-art methods on both text classification and textual entailment tasks.
- The method maintained high semantic similarity and grammaticality, with human evaluators correctly classifying all adversarial examples as natural and meaningful.
- The attack was effective against BERT, demonstrating that even pre-trained models are vulnerable to subtle, natural language perturbations.
- The computational complexity of TextFooler scales linearly with input length, making it efficient for long documents.
- The framework successfully attacked multiple model architectures, including CNNs and RNNs, indicating broad applicability.
- The results highlight the need for improved robustness in NLP models, especially for safety-critical applications.
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.