mlsanityData to 7 Oct 2026

MaskPure: Improving Defense Against Text Adversaries with Stochastic Purification

arXiv 2406.13066 ↗First posted 18 Jun 2024cs.LG cs.AIcited by 2

Not on the map. Why?

Abstract (arXiv)

The improvement of language model robustness, including successful defense against adversarial attacks, remains an open problem. In computer vision settings, the stochastic noising and de-noising process provided by diffusion models has proven useful for purifying input images, thus improving model robustness against adversarial attacks. Similarly, some initial work has explored the use of random noising and de-noising to mitigate adversarial attacks in an NLP setting, but improving the quality and efficiency of these methods is necessary for them to remain competitive. We extend upon methods of input text purification that are inspired by diffusion processes, which randomly mask and refill portions of the input text before classification. Our novel method, MaskPure, exceeds or matches robustness compared to other contemporary defenses, while also requiring no adversarial classifier training and without assuming knowledge of the attack type. In addition, we show that MaskPure is provably certifiably robust. To our knowledge, MaskPure is the first stochastic-purification method with demonstrated success against both character-level and word-level attacks, indicating the generalizable and promising nature of stochastic denoising defenses. In summary: the MaskPure algorithm bridges literature on the current strongest certifiable and empirical adversarial defense methods, showing that both theoretical and practical robustness can be obtained together. Code is available on GitHub at https://github.com/hubarruby/MaskPure.

Key facts. Cited by 2 papers in the map (data through 7 Oct 2026). Builds on 30 of its 37 references that are in the map. First posted on arXiv 18 Jun 2024.

Builds on

30 of 37 references.

References · 30

  1. 2018BERT: Pre-training of Deep Bidirectional Transformers for Language Understandingcited by 40,204
  2. 2017Towards Deep Learning Models Resistant to Adversarial Attackscited by 6,326
  3. 2015Character-level Convolutional Networks for Text Classificationcited by 2,293
  4. 2019Certified Adversarial Robustness via Randomized Smoothingcited by 1,324
  5. 2022Diffusion Models in Vision: A Surveycited by 1,008
  6. 2016Adversarial Machine Learning at Scalecited by 934
  7. 2019Is BERT Really Robust? A Strong Baseline for Natural Language Attack on Text Classification and Entailmentcited by 663
  8. 2020BERT-ATTACK: Adversarial Attack Against BERT Using BERTcited by 488
  9. 2018TextBugger: Generating Adversarial Text Against Real-world Applicationscited by 376
  10. 2018Black-box Generation of Adversarial Text Sequences to Evade Deep Learning Classifierscited by 341
  11. 2017Synthetic and Natural Noise Both Break Neural Machine Translationcited by 304
  12. 2016Adversarial Training Methods for Semi-Supervised Text Classificationcited by 280
18 more
  1. 2019FreeLB: Enhanced Adversarial Training for Natural Language Understandingcited by 261
  2. 2019SMART: Robust and Efficient Fine-Tuning for Pre-trained Natural Language Models through Principled Regularized Optimizationcited by 253
  3. 2019Certified Robustness to Adversarial Word Substitutionscited by 164
  4. 2022(Certified!!) Adversarial Robustness for Free!cited by 130
  5. 2021Towards Improving Adversarial Training of NLP Modelscited by 79
  6. 2020SAFER: A Structure-free Approach for Certified Robustness to Adversarial Word Substitutionscited by 72
  7. 2019Robustness Certificates for Sparse Adversarial Attacks by Randomized Ablationcited by 59
  8. 2020Robust Encodings: A Framework for Combating Adversarial Typoscited by 58
  9. 2021Certified Robustness to Text Adversarial Attacks by Randomized [MASK]cited by 57
  10. 2021Searching for an Effective Defender: Benchmarking Defense against Adversarial Word Substitutioncited by 55
  11. 2023Diffusion Models for Non-autoregressive Text Generation: A Surveycited by 43
  12. 2020Better Robustness by More Coverage: Adversarial Training with Mixup Augmentation for Robust Fine-tuningcited by 39
  13. 2022A Survey of Adversarial Defences and Robustness in NLPcited by 22
  14. 2016Robsut Wrod Reocginiton via semi-Character Recurrent Neural Networkcited by 18
  15. 2023Diffusion Models in NLP: A Surveycited by 16
  16. 2022Text Adversarial Purification as Defense against Adversarial Attackscited by 15
  17. 2020Voting based ensemble improves robustness of defensive modelscited by 7
  18. 2022Using Random Perturbations to Mitigate Adversarial Attacks on Sentiment Analysis Modelscited by 4

Built on by

Cited by year (2026 to 7 Oct)

Citing papers per year: 2025: 1; 2026: 1.

2 papers.

Similar, not cited

Close in wording, no citation either way

  1. 2024DiffuseDef: Improved Robustness to Adversarial Attacks via Iterative Denoising
  2. 2024Adversarial Robustification via Text-to-Image Diffusion Models
  3. 2023Evaluating the Robustness of Text-to-image Diffusion Models against Real-world Attacks
  4. 2026Backdooring Masked Diffusion Language Models
  5. 2024Towards Understanding the Robustness of Diffusion-Based Purification: A Stochastic Perspective
  6. 2024Adversarial Attacks and Defenses on Text-to-Image Diffusion Models: A Survey
  7. 2026NADD: Amplifying Noise for Effective Diffusion-based Adversarial Purification
  8. 2024R.A.C.E.: Robust Adversarial Concept Erasure for Secure Text-to-Image Diffusion Model