Adapters Mixup: Mixing Parameter-Efficient Adapters to Enhance the Adversarial Robustness of Fine-tuned Pre-trained Text Classifiers
Tuc Nguyen, Thai Le
TL;DR
AdpMixup introduces a novel fusion of parameter-efficient adapters with Mixup-style adversarial augmentation to enhance the robustness of fine-tuned pre-trained text classifiers. By training separate adapters on clean and adversarial data and dynamically mixing them at inference with a per-sample coefficient β computed from entropy, the method achieves a favorable balance between clean accuracy and resistance to unknown attacks. The framework supports multiple known attacks (m>1) and remains computationally efficient, leveraging adapters rather than full model re-training. Empirical results on five GLUE tasks with BERT and RoBERTa demonstrate superior trade-offs compared to baselines like Adversarial Training, Model Soup, and Adapter Soup, while enabling interpretable profiling of adversarial examples via β analysis. Overall, AdpMixup offers a scalable, modular defense for PEFT-based NLP systems in adversarial environments, with practical runtime benefits and insights into attack attribution.
Abstract
Existing works show that augmenting the training data of pre-trained language models (PLMs) for classification tasks fine-tuned via parameter-efficient fine-tuning methods (PEFT) using both clean and adversarial examples can enhance their robustness under adversarial attacks. However, this adversarial training paradigm often leads to performance degradation on clean inputs and requires frequent re-training on the entire data to account for new, unknown attacks. To overcome these challenges while still harnessing the benefits of adversarial training and the efficiency of PEFT, this work proposes a novel approach, called AdpMixup, that combines two paradigms: (1) fine-tuning through adapters and (2) adversarial augmentation via mixup to dynamically leverage existing knowledge from a set of pre-known attacks for robust inference. Intuitively, AdpMixup fine-tunes PLMs with multiple adapters with both clean and pre-known adversarial examples and intelligently mixes them up in different ratios during prediction. Our experiments show AdpMixup achieves the best trade-off between training efficiency and robustness under both pre-known and unknown attacks, compared to existing baselines on five downstream tasks across six varied black-box attacks and 2 PLMs. All source code will be available.
