Our new X account is live! Follow @wizwand_team for updates
WorkDL logo mark

Fine-mixing: Mitigating Backdoors in Fine-tuned Language Models

About

Deep Neural Networks (DNNs) are known to be vulnerable to backdoor attacks. In Natural Language Processing (NLP), DNNs are often backdoored during the fine-tuning process of a large-scale Pre-trained Language Model (PLM) with poisoned samples. Although the clean weights of PLMs are readily available, existing methods have ignored this information in defending NLP models against backdoor attacks. In this work, we take the first step to exploit the pre-trained (unfine-tuned) weights to mitigate backdoors in fine-tuned language models. Specifically, we leverage the clean pre-trained weights via two complementary techniques: (1) a two-step Fine-mixing technique, which first mixes the backdoored weights (fine-tuned on poisoned data) with the pre-trained weights, then fine-tunes the mixed weights on a small subset of clean data; (2) an Embedding Purification (E-PUR) technique, which mitigates potential backdoors existing in the word embeddings. We compare Fine-mixing with typical backdoor mitigation methods on three single-sentence sentiment classification tasks and two sentence-pair classification tasks and show that it outperforms the baselines by a considerable margin in all scenarios. We also show that our E-PUR method can benefit existing mitigation methods. Our work establishes a simple but strong baseline defense for secure fine-tuned NLP models against backdoor attacks.

Zhiyuan Zhang, Lingjuan Lyu, Xingjun Ma, Chenguang Wang, Xu Sun• 2022

Related benchmarks

TaskDatasetResultRank
Backdoor DefenseAGNews
Attack Success Rate12.32
81
Sentiment ClassificationSST-2 64 instances (test)
Accuracy91.05
80
Backdoor DefenseAverage of four datasets (test)
Accuracy87.1
70
Bias DefenseAverage of four datasets (test)
Accuracy86.02
56
Sentence-pair classificationQQP
Accuracy0.85
40
Sentence-pair classificationQNLI
Accuracy84.29
20
Natural Language InferenceQNLI 64 instances (test)
Accuracy86.77
20
Backdoor DefenseIMDB
Accuracy90.96
14
Backdoor DefenseRefusal behavior dataset
CACC (BadNet)80.3
12
Refusal behavior defenseWizardLM (test)
BadNet CACC89
12
Showing 10 of 18 rows

Other info

Code

Follow for update