训练时加入"蜜罐"样本,让 LLM 被攻击失效时输出更难被利用的内容
Training with Honeypots: Reshaping How LLMs Fail Under Adversarial Attacks
安全训练圈的新思路:与其只追 ASR 分数,不如教模型在被攻击时输出"看着有害但没法用"的假饵。做 LLM 安全对齐或红队评估的工程师可以直接看,代码开源能跑。
一篇 arXiv 论文(编号 2611.37917)提出借鉴计算机安全中蜜罐(honeypot)的思路来改进 LLM 安全训练。研究指出,当前自动化红队测试普遍以攻击成功率(ASR)作为衡量真实风险的代理指标,但安全判官本身并不完美,被判为违规的输出在实际可操作性上差异很大。
团队的做法是:构造一批容易被自动化判官标记为有害、但实际操作价值很低的回复,把它们作为难负样本(hard negatives)放进安全训练流程。这样模型在防御被攻破时,会倾向于产出低可操作性的内容,而不是真正可用的有害信息。
结果显示,这种"重塑失败方式"的训练能同时降低有害输出的真实影响和发生频率,可作为基于 ASR 评估的补充手段。论文代码已在 GitHub 开源(samuelsimko/training_with_honeypots),可直接复用。
Training with Honeypots: Reshaping How LLMs Fail Under Adversarial Attacks
Automated red-teaming of Large Language Models (LLMs) commonly relies on attack success rates (ASR) as a proxy for real-world harm, implicitly assuming that judge-detected violations correspond to actionable risk. In practice, safety judges are imperfect, and outputs that satisfy automated criteria for harm can vary widely in their operational usefulness. In this work, we investigate whether model failure modes can be reshaped so that, when defenses fail, they preferentially produce reduced-actionability outputs rather than highly actionable harm. Inspired by honeypots in computer security, we construct responses that are frequently flagged as harmful by automated judges yet provide limited real-world operational value, and treat them as hard negatives in the safety training pipeline. Our findings show that shaping how models fail under attack can improve overall safety by reducing both the real-world impact and the frequency of harmful failures, and serves as a practical complement to ASR-based evaluations. Our code is available at https://github.com/samuelsimko/training_with_honeypots.
This report is categorized under AITOP's "Papers" desk. Within our cross-regional analytical framework, it directly maps to AI developer toolchains, coding agents, and engineering workflows. Key entities and technical topics under continuous tracking include LLM, AI safety, red teaming, alignment.
Source attribution: curated from arXiv cs.LG (@Samuel Simko, Punya Syon Pandey, Zhijing Jin, Bernhard Schölkopf).