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

仁者重写:通过重写实现良性投影以防御大语言模型数据中毒攻击

Be Kind, Rewrite: Benign Projections via Rewriting Defend Against LLM Data Poisoning Attacks

Leidos;University of Pennsylvania(宾夕法尼亚大学)

John T. Halloran, Noopur S. Bhatt

AI总结:

本文提出了一种基于重写的良性投影方法(OBBR),通过利用开放书本的良性样本来提高大语言模型对数据中毒攻击的防御能力,实验表明OBBR在多种已知攻击模式中表现出更高的安全性能,并且在计算效率和模型性能方面具有优势。

摘要:

大型语言模型(LLMs)对后门攻击(BAs)非常敏感,其中训练样本通过基于触发器的有害内容进行中毒。此外,现有防御措施在广泛测试不同BA模式时已被证明无效。为了更好地对抗BAs,我们探索了使用LLM重写作为主动防御数据中毒的方法。首先,我们理论证明,当LLM重写利用开放书本良性样本(称为开放书本良性重写,OBBR)时,重写输出为良性的概率严格大于闭合书本重写。因此,OBBR通过将训练样本投影到良性提示空间来中和有害内容。我们随后表明,与以往的防御措施不同,OBBR有效缓解了大量现有的BAs:在五种已知BAs和四种广泛使用的LLMs中,OBBR相比最先进的BA防御措施平均提高了51%的安全性能,相比闭合书本重写方法提高了25.7%。最后,我们表明OBBR在计算效率方面优于其他BA防御措施,经过微调后不会降低模型在自然语言任务上的性能,并且能够防御非触发基于的数据中毒攻击。

英文摘要:

Large language models (LLMs) are highly susceptible to backdoor attacks (BAs), wherein training samples are poisoned using trigger-based harmful content. Furthermore, existing defenses have proven ineffective when extensively tested across BA patterns. To better combat BAs, we explore the use of LLM rewriting as a proactive defense against data poisoning. First, we theoretically show that when LLM rewriting utilizes open-book benign samples--termed open-book benign rewriting (OBBR)--the probability of a rewritten output being benign is strictly greater than that of closed-book rewriting. Thus, OBBR neutralizes harmful content by projecting training samples to the space of benign prompts. We then show that, in contrast to previous defenses, OBBR effectively mitigates a large number of existing BAs: across five known BAs and four widely used LLMs, OBBR increases safety performance by an average 51% compared to state-of-the-art BA defenses and 25.7% compared to closed-book rewriting methods. Finally, we show that OBBR is computationally efficient relative to other BA defenses, does not degrade model performance on natural language tasks after fine-tuning, and is capable of defending against non-trigger based data poisoning attacks.

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

↑