Is BERT Really Robust? A Strong Baseline for Natural Language Attack on Text Classification and Entailment
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.
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
Explore this link on the map →related reading
- GitHub - SoyGema/pulling_ace · GitHubgithub.com
- [2209.02128] Evaluating the Susceptibility of Pre-Trained Language Models via Handcrafted Adversarial Examplesarxiv.org
- gpt-4.pdfcdn.openai.com
- Nicholas Carlininicholas.carlini.com
- Adversarial Attacks on LLMs | Lil'Loglilianweng.github.io
- Adversarial Examples Are Not Bugs, They Are Features – gradient sciencegradientscience.org
- [2104.13733] Gradient-based Adversarial Attacks against Text Transformersarxiv.org
- A small number of samples can poison LLMs of any size \ Anthropicanthropic.com
- Adversarial Attacks on Aligned Language Models | Gray Swan Researchgrayswan.ai
- Import AIjack-clark.net
- Universal and Transferable Attacks on Aligned Language Modelsllm-attacks.org
- [2407.15549] Latent Adversarial Training Improves Robustness to Persistent Harmful Behaviors in LLMsarxiv.org