mlsanityData to 7 Oct 2026

TextGrad: Advancing Robustness Evaluation in NLP by Gradient-Driven Optimization

arXiv 2212.09254 ↗First posted 19 Dec 2022cs.CLcited by 21

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

  1. 2018BERT: Pre-training of Deep Bidirectional Transformers for Language Understandingcited by 40,204
  2. 2019RoBERTa: A Robustly Optimized BERT Pretraining Approachcited by 13,266
  3. 2014Explaining and Harnessing Adversarial Examplescited by 7,287
  4. 2017Towards Deep Learning Models Resistant to Adversarial Attackscited by 6,326
  5. 2013Intriguing properties of neural networkscited by 5,114
  6. 2018GLUE: A Multi-Task Benchmark and Analysis Platform for Natural Language Understandingcited by 4,854
  7. 2016Towards Evaluating the Robustness of Neural Networkscited by 2,976
  8. 2019ALBERT: A Lite BERT for Self-supervised Learning of Language Representationscited by 2,772
  9. 2016Categorical Reparameterization with Gumbel-Softmaxcited by 2,708
  10. 2017A Broad-Coverage Challenge Corpus for Sentence Understanding through Inferencecited by 2,665
  11. 2021Convex optimizationcited by 2,479
  12. 2015Character-level Convolutional Networks for Text Classificationcited by 2,293
38 more
  1. 2013Estimating or Propagating Gradients Through Stochastic Neurons for Conditional Computationcited by 2,031
  2. 2016Adversarial examples in the physical worldcited by 1,762
  3. 2019Theoretically Principled Trade-off between Robustness and Accuracycited by 1,510
  4. 2020Reliable evaluation of adversarial robustness with an ensemble of diverse parameter-free attackscited by 1,442
  5. 2018Obfuscated Gradients Give a False Sense of Security: Circumventing Defenses to Adversarial Examplescited by 1,259
  6. 2015The Limitations of Deep Learning in Adversarial Settingscited by 784
  7. 2016Universal adversarial perturbationscited by 774
  8. 2020Fast is better than free: Revisiting adversarial trainingcited by 723
  9. 2019Is BERT Really Robust? A Strong Baseline for Natural Language Attack on Text Classification and Entailmentcited by 663
  10. 2019Adversarial Training for Free!cited by 638
  11. 2018Improving Transferability of Adversarial Examples with Input Diversitycited by 591
  12. 2016Delving into Transferable Adversarial Examples and Black-box Attackscited by 530
  13. 2020BERT-ATTACK: Adversarial Attack Against BERT Using BERTcited by 488
  14. 2019Evading Defenses to Transferable Adversarial Examples by Translation-Invariant Attackscited by 440
  15. 2018Generating Natural Language Adversarial Examplescited by 422
  16. 2019Unlabeled Data Improves Adversarial Robustnesscited by 415
  17. 2018TextBugger: Generating Adversarial Text Against Real-world Applicationscited by 376
  18. 2020BAE: BERT-based Adversarial Examples for Text Classificationcited by 316
  19. 2019FreeLB: Enhanced Adversarial Training for Natural Language Understandingcited by 261
  20. 2019Adversarial Attacks and Defenses in Images, Graphs and Text: A Reviewcited by 234
  21. 2021Gradient-based Adversarial Attacks against Text Transformerscited by 233
  22. 2021Adversarial GLUE: A Multi-Task Benchmark for Robustness Evaluation of Language Modelscited by 227
  23. 2019Topology Attack and Defense for Graph Neural Networks: An Optimization Perspectivecited by 196
  24. 2019You Only Propagate Once: Accelerating Adversarial Training via Maximal Principlecited by 181
  25. 2020Adversarial Robustness: From Self-Supervised Pre-Training to Fine-Tuningcited by 152
  26. 2020Contextualized Perturbation for Textual Adversarial Attackcited by 136
  27. 2018Query-Efficient Hard-label Black-box Attack:An Optimization-based Approachcited by 130
  28. 2019Improving Black-box Adversarial Attacks with a Transfer-based Priorcited by 121
  29. 2020InfoBERT: Improving Robustness of Language Models from An Information Theoretic Perspectivecited by 92
  30. 2021Revisiting and Advancing Fast Adversarial Training Through The Lens of Bi-Level Optimizationcited by 75
  31. 2021Towards Robustness Against Natural Language Word Substitutionscited by 68
  32. 2018Structured Adversarial Attack: Towards General Implementation and Better Interpretabilitycited by 63
  33. 2021Searching for an Effective Defender: Benchmarking Defense against Adversarial Word Substitutioncited by 55
  34. 2020Generating Fluent Adversarial Examples for Natural Languagescited by 49
  35. 2020Better Robustness by More Coverage: Adversarial Training with Mixup Augmentation for Robust Fine-tuningcited by 39
  36. 2021Improving the Transferability of Adversarial Examples with Resized-Diverse-Inputs, Diversity-Ensemble and Region Fittingcited by 37
  37. 2022Query-Efficient and Scalable Black-Box Adversarial Attacks on Discrete Sequential Data via Bayesian Optimizationcited by 22
  38. 2019OpenHowNet: An Open Sememe-based Lexical Knowledge Basecited by 21

50 most cited of 51 All 51 (JSON)

Built on by

Cited by year (2026 to 7 Oct)

Citing papers per year: 2023: 4; 2024: 9; 2025: 7; 2026: 1.

21 papers.

Sort:

By area:

  1. 2023To Generate or Not? Safety-Driven Unlearned Diffusion Models Are Still Easy To Generate Unsafe Images ... For Nowcited by 204
  2. 2023MMA-Diffusion: MultiModal Attack on Diffusion Modelscited by 184
  3. 2024Defensive Unlearning with Adversarial Training for Robust Concept Erasure in Diffusion Modelscited by 164
  4. 2024Attacking Large Language Models with Projected Gradient Descentcited by 91
  5. 2023A Pilot Study of Query-Free Adversarial Attack against Stable Diffusioncited by 75
  6. 2024Jailbreaking Prompt Attack: A Controllable Adversarial Attack against Diffusion Modelscited by 68
  7. 2024DiffZOO: A Purely Query-Based Black-Box Attack for Red-teaming Text-to-Image Generative Model via Zeroth Order Optimizationcited by 19
  8. 2024Task Facet Learning: A Structured Approach to Prompt Optimizationcited by 17
  9. 2024Advancing the Robustness of Large Language Models through Self-Denoised Smoothingcited by 15
  10. 2025REINFORCE Adversarial Attacks on Large Language Models: An Adaptive, Distributional, and Semantic Objectivecited by 15
  11. 2025LoX: Low-Rank Extrapolation Robustifies LLM Safety Against Fine-tuningcited by 12
  12. 2025Single-pass Detection of Jailbreaking Input in Large Language Modelscited by 10
9 more
  1. 2025CE-SDWV: Effective and Efficient Concept Erasure for Text-to-Image Diffusion Models via a Semantic-Driven Word Vocabularycited by 7
  2. 2025Universally Unfiltered and Unseen:Input-Agnostic Multimodal Jailbreaks against Text-to-Image Model Safeguardscited by 5
  3. 2024Revisiting Character-level Adversarial Attacks for Language Modelscited by 4
  4. 2024The Power of Few: Accelerating and Enhancing Data Reweighting with Coreset Selectioncited by 3
  5. 2025What Lurks Within? Concept Auditing for Shared Diffusion Models at Scalecited by 2
  6. 2025Robustness in Both Domains: CLIP Needs a Robust Text Encodercited by 2
  7. 2023Is Certifying ℓp Robustness Still Worthwhile?cited by 1
  8. 2024Optimizing Large Language Models for Dynamic Constraints through Human-in-the-Loop Discriminatorscited by 1
  9. 2026OASIS: Optimizing Attacker Sequences for Hard-Label Black-Box Text Attackscited by 0