TextGrad: Advancing Robustness Evaluation in NLP by Gradient-Driven Optimization
Not on the map. Why?
Abstract (arXiv)
Robustness evaluation against adversarial examples has become increasingly important to unveil the trustworthiness of the prevailing deep models in natural language processing (NLP). However, in contrast to the computer vision domain where the first-order projected gradient descent (PGD) is used as the benchmark approach to generate adversarial examples for robustness evaluation, there lacks a principled first-order gradient-based robustness evaluation framework in NLP. The emerging optimization challenges lie in 1) the discrete nature of textual inputs together with the strong coupling between the perturbation location and the actual content, and 2) the additional constraint that the perturbed text should be fluent and achieve a low perplexity under a language model. These challenges make the development of PGD-like NLP attacks difficult. To bridge the gap, we propose TextGrad, a new attack generator using gradient-driven optimization, supporting high-accuracy and high-quality assessment of adversarial robustness in NLP. Specifically, we address the aforementioned challenges in a unified optimization framework. And we develop an effective convex relaxation method to co-optimize the continuously-relaxed site selection and perturbation variables and leverage an effective sampling method to establish an accurate mapping from the continuous optimization variables to the discrete textual perturbations. Moreover, as a first-order attack generation method, TextGrad can be baked into adversarial training to further improve the robustness of NLP models. Extensive experiments are provided to demonstrate the effectiveness of TextGrad not only in attack generation for robustness evaluation but also in adversarial defense.
Key facts. Cited by 21 papers in the map (data through 7 Oct 2026). Builds on 51 of its 64 references that are in the map. First posted on arXiv 19 Dec 2022.
Builds on
51 of 64 references.
References · 51
- 2018BERT: Pre-training of Deep Bidirectional Transformers for Language Understandingcited by 40,204
- 2019RoBERTa: A Robustly Optimized BERT Pretraining Approachcited by 13,266
- 2014Explaining and Harnessing Adversarial Examplescited by 7,287
- 2017Towards Deep Learning Models Resistant to Adversarial Attackscited by 6,326
- 2013Intriguing properties of neural networkscited by 5,114
- 2018GLUE: A Multi-Task Benchmark and Analysis Platform for Natural Language Understandingcited by 4,854
- 2016Towards Evaluating the Robustness of Neural Networkscited by 2,976
- 2019ALBERT: A Lite BERT for Self-supervised Learning of Language Representationscited by 2,772
- 2016Categorical Reparameterization with Gumbel-Softmaxcited by 2,708
- 2017A Broad-Coverage Challenge Corpus for Sentence Understanding through Inferencecited by 2,665
- 2021Convex optimizationcited by 2,479
- 2015Character-level Convolutional Networks for Text Classificationcited by 2,293
38 more
- 2013Estimating or Propagating Gradients Through Stochastic Neurons for Conditional Computationcited by 2,031
- 2016Adversarial examples in the physical worldcited by 1,762
- 2019Theoretically Principled Trade-off between Robustness and Accuracycited by 1,510
- 2020Reliable evaluation of adversarial robustness with an ensemble of diverse parameter-free attackscited by 1,442
- 2018Obfuscated Gradients Give a False Sense of Security: Circumventing Defenses to Adversarial Examplescited by 1,259
- 2015The Limitations of Deep Learning in Adversarial Settingscited by 784
- 2016Universal adversarial perturbationscited by 774
- 2020Fast is better than free: Revisiting adversarial trainingcited by 723
- 2019Is BERT Really Robust? A Strong Baseline for Natural Language Attack on Text Classification and Entailmentcited by 663
- 2019Adversarial Training for Free!cited by 638
- 2018Improving Transferability of Adversarial Examples with Input Diversitycited by 591
- 2016Delving into Transferable Adversarial Examples and Black-box Attackscited by 530
- 2020BERT-ATTACK: Adversarial Attack Against BERT Using BERTcited by 488
- 2019Evading Defenses to Transferable Adversarial Examples by Translation-Invariant Attackscited by 440
- 2018Generating Natural Language Adversarial Examplescited by 422
- 2019Unlabeled Data Improves Adversarial Robustnesscited by 415
- 2018TextBugger: Generating Adversarial Text Against Real-world Applicationscited by 376
- 2020BAE: BERT-based Adversarial Examples for Text Classificationcited by 316
- 2019FreeLB: Enhanced Adversarial Training for Natural Language Understandingcited by 261
- 2019Adversarial Attacks and Defenses in Images, Graphs and Text: A Reviewcited by 234
- 2021Gradient-based Adversarial Attacks against Text Transformerscited by 233
- 2021Adversarial GLUE: A Multi-Task Benchmark for Robustness Evaluation of Language Modelscited by 227
- 2019Topology Attack and Defense for Graph Neural Networks: An Optimization Perspectivecited by 196
- 2019You Only Propagate Once: Accelerating Adversarial Training via Maximal Principlecited by 181
- 2020Adversarial Robustness: From Self-Supervised Pre-Training to Fine-Tuningcited by 152
- 2020Contextualized Perturbation for Textual Adversarial Attackcited by 136
- 2018Query-Efficient Hard-label Black-box Attack:An Optimization-based Approachcited by 130
- 2019Improving Black-box Adversarial Attacks with a Transfer-based Priorcited by 121
- 2020InfoBERT: Improving Robustness of Language Models from An Information Theoretic Perspectivecited by 92
- 2021Revisiting and Advancing Fast Adversarial Training Through The Lens of Bi-Level Optimizationcited by 75
- 2021Towards Robustness Against Natural Language Word Substitutionscited by 68
- 2018Structured Adversarial Attack: Towards General Implementation and Better Interpretabilitycited by 63
- 2021Searching for an Effective Defender: Benchmarking Defense against Adversarial Word Substitutioncited by 55
- 2020Generating Fluent Adversarial Examples for Natural Languagescited by 49
- 2020Better Robustness by More Coverage: Adversarial Training with Mixup Augmentation for Robust Fine-tuningcited by 39
- 2021Improving the Transferability of Adversarial Examples with Resized-Diverse-Inputs, Diversity-Ensemble and Region Fittingcited by 37
- 2022Query-Efficient and Scalable Black-Box Adversarial Attacks on Discrete Sequential Data via Bayesian Optimizationcited by 22
- 2019OpenHowNet: An Open Sememe-based Lexical Knowledge Basecited by 21
50 most cited of 51 All 51 (JSON)
Built on by
Citing papers per year: 2023: 4; 2024: 9; 2025: 7; 2026: 1.
21 papers.
Sort:
By area:
- 2023To Generate or Not? Safety-Driven Unlearned Diffusion Models Are Still Easy To Generate Unsafe Images ... For Nowcited by 204
- 2023MMA-Diffusion: MultiModal Attack on Diffusion Modelscited by 184
- 2024Defensive Unlearning with Adversarial Training for Robust Concept Erasure in Diffusion Modelscited by 164
- 2024Attacking Large Language Models with Projected Gradient Descentcited by 91
- 2023A Pilot Study of Query-Free Adversarial Attack against Stable Diffusioncited by 75
- 2024Jailbreaking Prompt Attack: A Controllable Adversarial Attack against Diffusion Modelscited by 68
- 2024DiffZOO: A Purely Query-Based Black-Box Attack for Red-teaming Text-to-Image Generative Model via Zeroth Order Optimizationcited by 19
- 2024Task Facet Learning: A Structured Approach to Prompt Optimizationcited by 17
- 2024Advancing the Robustness of Large Language Models through Self-Denoised Smoothingcited by 15
- 2025REINFORCE Adversarial Attacks on Large Language Models: An Adaptive, Distributional, and Semantic Objectivecited by 15
- 2025LoX: Low-Rank Extrapolation Robustifies LLM Safety Against Fine-tuningcited by 12
- 2025Single-pass Detection of Jailbreaking Input in Large Language Modelscited by 10
9 more
- 2025CE-SDWV: Effective and Efficient Concept Erasure for Text-to-Image Diffusion Models via a Semantic-Driven Word Vocabularycited by 7
- 2025Universally Unfiltered and Unseen:Input-Agnostic Multimodal Jailbreaks against Text-to-Image Model Safeguardscited by 5
- 2024Revisiting Character-level Adversarial Attacks for Language Modelscited by 4
- 2024The Power of Few: Accelerating and Enhancing Data Reweighting with Coreset Selectioncited by 3
- 2025What Lurks Within? Concept Auditing for Shared Diffusion Models at Scalecited by 2
- 2025Robustness in Both Domains: CLIP Needs a Robust Text Encodercited by 2
- 2023Is Certifying ℓp Robustness Still Worthwhile?cited by 1
- 2024Optimizing Large Language Models for Dynamic Constraints through Human-in-the-Loop Discriminatorscited by 1
- 2026OASIS: Optimizing Attacker Sequences for Hard-Label Black-Box Text Attackscited by 0
- 2026OASIS: Optimizing Attacker Sequences for Hard-Label Black-Box Text Attacks30 Aug 2026
- 2025Universally Unfiltered and Unseen:Input-Agnostic Multimodal Jailbreaks against Text-to-Image Model Safeguards30 Jul 2025
- 2025LoX: Low-Rank Extrapolation Robustifies LLM Safety Against Fine-tuning18 Jun 2025
- 2025Robustness in Both Domains: CLIP Needs a Robust Text Encoder3 Jun 2025
- 2025What Lurks Within? Concept Auditing for Shared Diffusion Models at Scale21 Apr 2025
- 2025REINFORCE Adversarial Attacks on Large Language Models: An Adaptive, Distributional, and Semantic Objective24 Feb 2025
- 2025Single-pass Detection of Jailbreaking Input in Large Language Models21 Feb 2025
- 2025CE-SDWV: Effective and Efficient Concept Erasure for Text-to-Image Diffusion Models via a Semantic-Driven Word Vocabulary26 Jan 2025
- 2024Optimizing Large Language Models for Dynamic Constraints through Human-in-the-Loop Discriminators19 Oct 2024
- 2024DiffZOO: A Purely Query-Based Black-Box Attack for Red-teaming Text-to-Image Generative Model via Zeroth Order Optimization18 Aug 2024
- 2024Task Facet Learning: A Structured Approach to Prompt Optimization15 Jun 2024
- 2024Defensive Unlearning with Adversarial Training for Robust Concept Erasure in Diffusion Models24 May 2024
9 more
- 2024Revisiting Character-level Adversarial Attacks for Language Models7 May 2024
- 2024Advancing the Robustness of Large Language Models through Self-Denoised Smoothing18 Apr 2024
- 2024Jailbreaking Prompt Attack: A Controllable Adversarial Attack against Diffusion Models2 Apr 2024
- 2024The Power of Few: Accelerating and Enhancing Data Reweighting with Coreset Selection18 Mar 2024
- 2024Attacking Large Language Models with Projected Gradient Descent14 Feb 2024
- 2023MMA-Diffusion: MultiModal Attack on Diffusion Models29 Nov 2023
- 2023To Generate or Not? Safety-Driven Unlearned Diffusion Models Are Still Easy To Generate Unsafe Images ... For Now18 Oct 2023
- 2023Is Certifying ℓp Robustness Still Worthwhile?13 Oct 2023
- 2023A Pilot Study of Query-Free Adversarial Attack against Stable Diffusion29 Mar 2023
- 2023To Generate or Not? Safety-Driven Unlearned Diffusion Models Are Still Easy To Generate Unsafe Images ... For Nowcited by 204
- 2023MMA-Diffusion: MultiModal Attack on Diffusion Modelscited by 184
- 2024Defensive Unlearning with Adversarial Training for Robust Concept Erasure in Diffusion Modelscited by 164
- 2023A Pilot Study of Query-Free Adversarial Attack against Stable Diffusioncited by 75
- 2024Jailbreaking Prompt Attack: A Controllable Adversarial Attack against Diffusion Modelscited by 68
- 2024DiffZOO: A Purely Query-Based Black-Box Attack for Red-teaming Text-to-Image Generative Model via Zeroth Order Optimizationcited by 19
- 2025CE-SDWV: Effective and Efficient Concept Erasure for Text-to-Image Diffusion Models via a Semantic-Driven Word Vocabularycited by 7
- 2025What Lurks Within? Concept Auditing for Shared Diffusion Models at Scalecited by 2
- 2025What Lurks Within? Concept Auditing for Shared Diffusion Models at Scale21 Apr 2025
- 2025CE-SDWV: Effective and Efficient Concept Erasure for Text-to-Image Diffusion Models via a Semantic-Driven Word Vocabulary26 Jan 2025
- 2024DiffZOO: A Purely Query-Based Black-Box Attack for Red-teaming Text-to-Image Generative Model via Zeroth Order Optimization18 Aug 2024
- 2024Defensive Unlearning with Adversarial Training for Robust Concept Erasure in Diffusion Models24 May 2024
- 2024Jailbreaking Prompt Attack: A Controllable Adversarial Attack against Diffusion Models2 Apr 2024
- 2023MMA-Diffusion: MultiModal Attack on Diffusion Models29 Nov 2023
- 2023To Generate or Not? Safety-Driven Unlearned Diffusion Models Are Still Easy To Generate Unsafe Images ... For Now18 Oct 2023
- 2023A Pilot Study of Query-Free Adversarial Attack against Stable Diffusion29 Mar 2023
- 2024Advancing the Robustness of Large Language Models through Self-Denoised Smoothingcited by 15
- 2025LoX: Low-Rank Extrapolation Robustifies LLM Safety Against Fine-tuningcited by 12
- 2025Universally Unfiltered and Unseen:Input-Agnostic Multimodal Jailbreaks against Text-to-Image Model Safeguardscited by 5
- 2025Universally Unfiltered and Unseen:Input-Agnostic Multimodal Jailbreaks against Text-to-Image Model Safeguards30 Jul 2025
- 2025LoX: Low-Rank Extrapolation Robustifies LLM Safety Against Fine-tuning18 Jun 2025
- 2024Advancing the Robustness of Large Language Models through Self-Denoised Smoothing18 Apr 2024
- 2024Task Facet Learning: A Structured Approach to Prompt Optimizationcited by 17
- 2024Revisiting Character-level Adversarial Attacks for Language Modelscited by 4
- 2024The Power of Few: Accelerating and Enhancing Data Reweighting with Coreset Selectioncited by 3
- 2025Robustness in Both Domains: CLIP Needs a Robust Text Encodercited by 2
- 2023Is Certifying ℓp Robustness Still Worthwhile?cited by 1
- 2024Optimizing Large Language Models for Dynamic Constraints through Human-in-the-Loop Discriminatorscited by 1
- 2026OASIS: Optimizing Attacker Sequences for Hard-Label Black-Box Text Attackscited by 0
- 2026OASIS: Optimizing Attacker Sequences for Hard-Label Black-Box Text Attacks30 Aug 2026
- 2025Robustness in Both Domains: CLIP Needs a Robust Text Encoder3 Jun 2025
- 2024Optimizing Large Language Models for Dynamic Constraints through Human-in-the-Loop Discriminators19 Oct 2024
- 2024Task Facet Learning: A Structured Approach to Prompt Optimization15 Jun 2024
- 2024Revisiting Character-level Adversarial Attacks for Language Models7 May 2024
- 2024The Power of Few: Accelerating and Enhancing Data Reweighting with Coreset Selection18 Mar 2024
- 2023Is Certifying ℓp Robustness Still Worthwhile?13 Oct 2023