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

Backdoor Pre-trained Models Can Transfer to All

About

Pre-trained general-purpose language models have been a dominating component in enabling real-world natural language processing (NLP) applications. However, a pre-trained model with backdoor can be a severe threat to the applications. Most existing backdoor attacks in NLP are conducted in the fine-tuning phase by introducing malicious triggers in the targeted class, thus relying greatly on the prior knowledge of the fine-tuning task. In this paper, we propose a new approach to map the inputs containing triggers directly to a predefined output representation of the pre-trained NLP models, e.g., a predefined output representation for the classification token in BERT, instead of a target label. It can thus introduce backdoor to a wide range of downstream tasks without any prior knowledge. Additionally, in light of the unique properties of triggers in NLP, we propose two new metrics to measure the performance of backdoor attacks in terms of both effectiveness and stealthiness. Our experiments with various types of triggers show that our method is widely applicable to different fine-tuning tasks (classification and named entity recognition) and to different models (such as BERT, XLNet, BART), which poses a severe threat. Furthermore, by collaborating with the popular online model repository Hugging Face, the threat brought by our method has been confirmed. Finally, we analyze the factors that may affect the attack performance and share insights on the causes of the success of our backdoor attack.

Lujia Shen, Shouling Ji, Xuhong Zhang, Jinfeng Li, Jing Chen, Jie Shi, Chengfang Fang, Jianwei Yin, Ting Wang• 2021

Related benchmarks

TaskDatasetResultRank
Text Classification11 text classification tasks
Average Performance60.57
34
Topic ClassificationAG's News
CACC93.91
24
Spam DetectionLingspam
CACC99.48
10
Binary ClassificationTwitter
ACC94.67
6
Multi-ClassificationSST-5
Accuracy53.12
6
Multi-ClassificationDBpedia
Accuracy74.85
6
Binary ClassificationSST-2
Accuracy92.32
6
Binary ClassificationENRON
ACC99.02
6
Binary ClassificationHateSpeech
Accuracy91.95
6
Multi-ClassificationYahoo
Accuracy64.82
6
Showing 10 of 15 rows

Other info

Follow for update