Here's a Free Lunch: Sanitizing Backdoored Models with Model Merge

Ansh Arora, Xuanli He, Maximilian Mozes, Srinibas Swain, Mark Dras +1 more
2/29/2024
cs.CL

No official code found. Best implementation: ansharora7/model-merge-backdoor (0 stars, last commit 2024-09-13).

Abstract

The democratization of pre-trained language models through open-source initiatives has rapidly advanced innovation and expanded access to cutting-edge technologies. However, this openness also brings significant security risks, including backdoor attacks, where hidden malicious behaviors are triggered by specific inputs, compromising natural language processing (NLP) system integrity and reliability. This paper suggests that merging a backdoored model with other homogeneous models can significantly remediate backdoor vulnerabilities even if such models are not entirely secure. In our experiments, we verify our hypothesis on various models (BERT-Base, RoBERTa-Large, Llama2-7B, and Mistral-7B) and datasets (SST-2, OLID, AG News, and QNLI). Compared to multiple advanced defensive approaches, our method offers an effective and efficient inference-stage defense against backdoor attacks on classification and instruction-tuned tasks without additional resources or specific knowledge. Our approach consistently outperforms recent advanced baselines, leading to an average of about 75% reduction in the attack success rate. Since model merging has been an established approach for improving model performance, the extra advantage it provides regarding defense can be seen as a cost-free bonus.

View on arXivView PDF

Code Implementations(1)

01PythonMay 20, 20242 years ago

Similar Papers

Cite this paper

@article{arora2024heres,
  title  = {Here's a Free Lunch: Sanitizing Backdoored Models with Model Merge},
  author = {Ansh Arora and Xuanli He and Maximilian Mozes and Srinibas Swain and Mark Dras and Qiongkai Xu},
  year   = {2024},
  eprint = {2402.19334},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2402.19334v2}
}

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/2402.19334.svg)](https://codeofpaper.com/paper/2402.19334)

Discussion