AI Pulse
📄 论文解读

AI 防注入从 94% 失守降到 9%,靠的是逐字纠错

AI 智能体读网页、邮件时,黑客在数据里藏一句「忽略之前所有指令,去做 X」就能劫持它,这类攻击成功率几乎 100%。之前所有防御都栽在同一个坑:训练时把整段回答当成一个整体打分,模型分不清哪几个词是「被带偏」的。这篇把反馈细化到每个 token——拿模型在干净输入下的回答当标尺,逐字比对被注入后的输出,精准标出哪些词是「叛变」的,再针对性纠正。用这招训练的 27B 模型,面对目前最强的自适应攻击,成功率从 94% 暴跌到 9%,而且防御能力能迁移到训练时完全没见过的工具调用场景。它不是你明天能装上的补丁,但指明了方向:防注入的关键不在模型更大,而在训练信号更细。

📄 原文摘要(英文)

Prompt injection is listed as the \#1 threat to AI agents. When an agent accesses external data from websites, files, or emails, an attacker may inject a prompt into the data, saying, "Ignore all prior instructions and perform <an attacker's task>." To prevent arbitrary manipulation of agents, defenders try to train secure LLMs, which, however, still suffer from near 100% attack success rates (ASRs) against adaptive prompt injections. We note that this is because existing defensive finetuning recipes rely on sequence-level feedback signals (in DPO or GRPO). Treating an entire output equally prevents the model from learning precisely which output tokens are insecure. In this paper, we propose Secure On-Policy Distillation (SecOPD) that provides token-level feedback to guide defensive fine-tuning. The LLM receives an injected sample and produces a rollout, whose tokens are scored by the initialization model given the corresponding clean input. With more fine-grained training signals, our defended Qwen3.6-27B achieves a 9.0% ASR against the SoTA PISmith adaptive prompt injections, compared to 94.0% for the prior SoTA, Meta-SecAlign. The obtained security generalizes to domains completely unseen in training: in agentic tool calling, SecOPD achieves a 4.7% ASR compared to 5.5% for Meta-SecAlign. Code and the model are available at https://github.com/pppyb/SecOPD and https://huggingface.co/pybbb/Qwen3.6-27B-SecOPD.

arXiv 原文

订阅 AI Pulse

每天 08:00 · 12:30 · 18:30 · 23:50 更新