[Paper Review] Better Robustness by More Coverage: Adversarial Training with Mixup Augmentation for Robust Fine-tuning
This paper proposes Adversarial and Mixup Data Augmentation (AMDA), a method that combines adversarial training with continuous representation-based mixup to significantly improve the robustness of pretrained language models (PLMs) against textual adversarial attacks. By generating diverse, interpolated virtual training samples, AMDA covers a larger portion of the attack search space than traditional discrete adversarial augmentation, achieving state-of-the-art robustness gains—e.g., improving RoBERTa's IMDB accuracy from 6.35% to 51.84% under PWWS attack—while maintaining or improving clean data performance.
Pretrained language models (PLMs) perform poorly under adversarial attacks. To improve the adversarial robustness, adversarial data augmentation (ADA) has been widely adopted to cover more search space of adversarial attacks by adding textual adversarial examples during training. However, the number of adversarial examples for text augmentation is still extremely insufficient due to the exponentially large attack search space. In this work, we propose a simple and effective method to cover a much larger proportion of the attack search space, called Adversarial and Mixup Data Augmentation (AMDA). Specifically, AMDA linearly interpolates the representations of pairs of training samples to form new virtual samples, which are more abundant and diverse than the discrete text adversarial examples in conventional ADA. Moreover, to fairly evaluate the robustness of different models, we adopt a challenging evaluation setup, which generates a new set of adversarial examples targeting each model. In text classification experiments of BERT and RoBERTa, AMDA achieves significant robustness gains under two strong adversarial attacks and alleviates the performance degradation of ADA on the clean data. Our code is available at: https://github.com/thunlp/MixADA .
Motivation & Objective
- To address the limited coverage of adversarial examples in text due to the exponentially large attack search space.
- To overcome the performance degradation on clean data commonly caused by adversarial data augmentation (ADA).
- To propose a more effective and generalizable defense strategy for improving adversarial robustness in fine-tuned PLMs.
- To advocate for a more rigorous evaluation protocol using targeted attack evaluation (TAE) instead of static attack evaluation (SAE).
Proposed method
- AMDA performs adversarial data augmentation (ADA) by generating adversarial examples using PWWS and TextFooler attacks on the original training data.
- It then applies mixup augmentation on the hidden representations (e.g., [CLS] token or all tokens) of paired samples from the augmented training set.
- Mixup is performed in the continuous representation space by linearly interpolating the hidden states of two samples with a mixing coefficient α.
- Two variants are explored: SMix (mixing only the [CLS] representation) and TMix (mixing all token representations), both applied after ADA.
- The method trains models on a combined set of original, adversarial, and mixup-generated virtual samples to improve generalization and robustness.
- A greedy hyperparameter search is conducted for the number of augmented adversarial examples and the mixup parameter α.
Experimental results
Research questions
- RQ1Can combining adversarial data augmentation with mixup in the representation space significantly improve the robustness of fine-tuned PLMs?
- RQ2Does mixup-based augmentation help mitigate the performance drop on clean data commonly observed in adversarial training?
- RQ3Is the widely used static attack evaluation (SAE) a reliable benchmark for measuring model robustness, or does it fail to detect model-specific vulnerabilities?
- RQ4Can a more challenging, model-targeted evaluation protocol (TAE) reveal the true robustness of defense methods?
- RQ5How does the word modification rate under attacks correlate with model robustness, and can it serve as a proxy for robustness improvement?
Key findings
- AMDA significantly improves adversarial robustness, achieving a 51.84% test accuracy on IMDB under the PWWS attack for RoBERTa, up from 6.35% for the baseline.
- AMDA-TMix and AMDA-SMix outperform both standard ADA and mixup alone across all datasets and attacks, demonstrating complementary benefits of both techniques.
- Unlike standard ADA, AMDA does not degrade performance on clean data; in some cases, such as BERT+AMDA-TMix, it even improves clean accuracy.
- Models trained with AMDA require significantly higher word modification rates (e.g., 59.68% for RoBERTa+AMDA-TMix under PWWS) compared to baselines (37.48%), indicating stronger resistance to attacks.
- The targeted attack evaluation (TAE) reveals that models robust under SAE are vulnerable under TAE, showing that SAE is an unreliable benchmark.
- The study demonstrates that TAE is a more rigorous and meaningful evaluation protocol, and it is recommended for future robustness evaluations.
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.