arXiv:2510.04503cs.CRcs.AI2025-10ACL被引 4

用良性触发反制恶意后门,提升大模型防御能力

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

  • 用安全触发词重炼数据,让模型误判恶意指令
  • 在多任务上将攻击成功率大幅降低,性能不降
  • 适用于多种攻击类型,适合关注模型安全的开发者

微调过程中,大语言模型(LLMs)越来越易受数据投毒后门攻击,威胁其可靠性与可信度。现有防御策略泛化能力有限,仅针对特定攻击类型或任务设置。本文提出一种通用有效的后门防御算法 Poison-to-Poison(P2P):在部分训练样本中注入带有安全标签的良性触发词,并基于提示学习对模型进行再微调。该方法迫使模型将触发词引发的表征与安全输出关联,从而覆盖原始恶意触发的影响。理论与实证均表明,P2P 能有效消除恶意后门,同时保持任务性能。我们在分类、数学推理和摘要生成等任务上,使用多个前沿 LLM 进行广泛实验,结果表明,相较于基线模型,本方法显著降低了攻击成功率。

原文摘要 · Abstract (English)

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.

后门防御大模型安全提示学习

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。