LMSanitator: Defending Prompt-Tuning Against Task-Agnostic Backdoors

Chengkun Wei, Wenlong Meng, Zhikun Zhang, Min Chen, Minghu Zhao +4 more
8/26/2023
cs.CLcs.CRcs.LG
lora-peft-merging

No official code found. Best implementation: meng-wenlong/LMSanitator (29 stars, MIT, last commit 2023-08-21).

Abstract

Prompt-tuning has emerged as an attractive paradigm for deploying large-scale language models due to its strong downstream task performance and efficient multitask serving ability. Despite its wide adoption, we empirically show that prompt-tuning is vulnerable to downstream task-agnostic backdoors, which reside in the pretrained models and can affect arbitrary downstream tasks. The state-of-the-art backdoor detection approaches cannot defend against task-agnostic backdoors since they hardly converge in reversing the backdoor triggers. To address this issue, we propose LMSanitator, a novel approach for detecting and removing task-agnostic backdoors on Transformer models. Instead of directly inverting the triggers, LMSanitator aims to invert the predefined attack vectors (pretrained models' output when the input is embedded with triggers) of the task-agnostic backdoors, which achieves much better convergence performance and backdoor detection accuracy. LMSanitator further leverages prompt-tuning's property of freezing the pretrained model to perform accurate and fast output monitoring and input purging during the inference phase. Extensive experiments on multiple language models and NLP tasks illustrate the effectiveness of LMSanitator. For instance, LMSanitator achieves 92.8% backdoor detection accuracy on 960 models and decreases the attack success rate to less than 1% in most scenarios.

View on arXivView PDF

Code Implementations(1)

MIT
292Shell, PythonAug 21, 20233 years agoMIT

Similar Papers

Cite this paper

@article{wei2023lmsanitator,
  title  = {LMSanitator: Defending Prompt-Tuning Against Task-Agnostic Backdoors},
  author = {Chengkun Wei and Wenlong Meng and Zhikun Zhang and Min Chen and Minghu Zhao and Wenjing Fang and Lei Wang and Zihui Zhang and Wenzhi Chen},
  year   = {2023},
  eprint = {2308.13904},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2308.13904v2}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2308.13904.svg)](https://codeofpaper.com/paper/2308.13904)

Discussion