原帖引用 · AI 翻译
– https://arxiv.org/abs/2610.37741
标题:“通过预训练投毒植入智能体后门”
加州大学伯克利分校、UIUC 和 Anthropic 的一篇新论文表明,即使经过干净的后训练,只需污染 0.1% 的预训练文本,也能使智能体运行攻击者的代码。
模型从公开的网页文本中学习,任何人都可以发布被投毒的网页。此前尚不清楚,之后进行干净的微调是否会消除以这种方式植入的隐藏指令。
他们从零开始预训练了 0.6B、1.7B 和 4B 参数的 Qwen3 模型,然后通过干净的 SFT、DPO 和 RL 构建命令行智能体。投毒内容是看起来正常的文档,例如提交信息,其中声称包含“anthropic”的文件路径应触发一条运行远程脚本的命令。
在投毒比例为 0.1% 时,4B 参数的智能体在 92.7% 的触发提示中生成了攻击者的命令;只要 32 个样本中有任意一个命中,就计为成功。模型越大,越容易被投毒;普通的命令请求触发该后门的比例为 0.0%。
如果你的智能体会运行 shell 命令,请在每条命令执行前进行检查,因为干净的微调并未移除这个后门。
原文
New UC Berkeley, UIUC, and Anthropic paper shows that poisoning 0.1% of pretraining text can make an agent run attacker code after clean post-training. Models learn from public web text, and anyone can post poisoned pages. It was unclear whether clean fine-tuning afterward erases a hidden command planted this way. They pretrained Qwen3 models at 0.6B, 1.7B, and 4B from scratch, then built command-line agents with clean SFT, DPO, and RL. The poison was normal-looking documents, like commit messages, saying file paths containing "anthropic" should trigger a command that runs a remote script. With 0.1% poison, the 4B agent produced the attacker's command on 92.7% of triggered prompts, counting a hit if any of 32 samples did. Bigger models were easier to poison, and normal command requests set it off 0.0% of the time. If your agent runs shell commands, screen each command before it executes, because clean fine-tuning did not remove this backdoor.