Skip to content

Enhancing safety alignment with backdoors to mitigate fine-tuning-based jailbreak attacksMitigating Fine-tuning based Jailbreak Attack with Backdoor Enhanced Safety Alignment

arXiv· arXiv:2402.14968· Jiongxiao Wang, Jiazhao Li, Yiquan Li, Xiangyu Qi, Junjie Hu, Yixuan Li, Patrick McDaniel, Muhao Chen, Bo Li, Chaowei Xiao·Indexed by this site · 27 days ago· Originally publishedDefenses
AI summary

Researchers propose a backdoor-enhanced safety alignment method to mitigate fine-tuning-based jailbreak attacks (FJAttack) in the model-as-a-service (LMaaS) setting, in which fine-tuning data uploaded by users need only contain a small number of harmful samples to significantly compromise model safety. Drawing on the idea of backdoor attacks, the service provider mixes into the fine-tuning data safety samples prefixed with a secret prompt (serving as a backdoor trigger), so that fine-tuning establishes a strong association between the secret prompt and safe responses; at inference time, adding this secret prompt before any user input ensures that the model gives a safe response. Experiments show that adding only 11 prefixed safety samples enables a maliciously fine-tuned large language model to achieve safety comparable to the original aligned model without harming benign performance; the method is equally effective in the more realistic setting where the fine-tuning data contains both attack samples and task data. Compared with existing defense approaches that require large amounts of safety data, this method requires less safety data.

Read originalarxiv.org