arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2510.04503cs.CRcs.AIcs.CL
收藏

P2P:一种用于大语言模型可靠后门防御的毒对毒疗法

P2P: A Poison-to-Poison Remedy for Reliable Backdoor Defense in LLMs

Nanyang Technological University, Singapore(南洋理工大学);Shanghai Jiao Tong University, Shanghai, China(上海交通大学)

Shuai Zhao, Xinyi Wu, Shiqian Zhao, Xiaobao Wu, Zhongliang Guo, Yanhao Jia, Anh Tuan Luu

AI总结:

针对大语言模型微调中的后门攻击,提出毒对毒(P2P)防御算法,通过注入良性触发器并微调以覆盖恶意后门,在多种任务和攻击下降低攻击成功率并保持性能。

摘要:

在微调过程中,大型语言模型(LLMs)日益容易受到数据投毒后门攻击的影响,这损害了它们的可靠性和可信度。然而,现有的防御策略存在泛化性有限的缺点:它们仅适用于特定的攻击类型或任务设置。在本研究中,我们提出了毒对毒(P2P),一种通用且有效的后门防御算法。P2P 将带有安全替代标签的良性触发器注入到一部分训练样本中,并通过利用基于提示的学习在此重新投毒的数据集上对模型进行微调。这迫使模型将触发器诱导的表征与安全输出相关联,从而覆盖原始恶意触发器的影响。得益于这种稳健且可泛化的基于触发器的微调,P2P 在各种任务设置和攻击类型下均有效。在理论上和实证上,我们表明 P2P 能够中和恶意后门,同时保持任务性能。我们在分类、数学推理和摘要生成任务上进行了大量实验,涉及多个最先进的 LLMs。结果表明,与基线模型相比,我们的 P2P 算法显著降低了攻击成功率。我们希望 P2P 能够作为防御后门攻击的指南,并促进安全可信的 LLM 社区的发展。

英文摘要:

During fine-tuning, large language models (LLMs) are increasingly vulnerable to data-poisoning backdoor attacks, which compromise their reliability and trustworthiness. However, existing defense strategies suffer from limited generalization: they only work on specific attack types or task settings. In this study, we propose Poison-to-Poison (P2P), a general and effective backdoor defense algorithm. P2P injects benign triggers with safe alternative labels into a subset of training samples and fine-tunes the model on this re-poisoned dataset by leveraging prompt-based learning. This enforces the model to associate trigger-induced representations with safe outputs, thereby overriding the effects of original malicious triggers. Thanks to this robust and generalizable trigger-based fine-tuning, P2P is effective across task settings and attack types. Theoretically and empirically, we show that P2P can neutralize malicious backdoors while preserving task performance. We conduct extensive experiments on classification, mathematical reasoning, and summary generation tasks, involving multiple state-of-the-art LLMs. The results demonstrate that our P2P algorithm significantly reduces the attack success rate compared with baseline models. We hope that the P2P can serve as a guideline for defending against backdoor attacks and foster the development of a secure and trustworthy LLM community.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑