AdvSim2Real:在Web世界模型中训练Web智能体抵御自适应提示注入
研究论文 · 2026/10/07
Web智能体通过阅读和操作第三方编写的页面来完成任务,因此页面上植入的指令可能使智能体偏离用户目标。智能体无法简单忽略页面,因为页面也包含任务所需的值和控制。当前防御方法在训练前固定注入样本对智能体进行微调,而适应训练后模型攻击者可以绕过这些防御。对抗训练允许攻击者适应,但任务固定不变,因此一旦智能体解决任务,该任务就不再具有教学作用。我们提出AdvSim2Real,在冻结的Web世界模型中协同进化任务课程、注入对抗者和智能体。课程因智能体约一半时间能解决的任务而获得奖励,对抗者仅因成功翻转(即注入将判定成功变为失败)而获得奖励。在模拟器中训练使4B智能体能力更强且更鲁棒:其完成率在有攻击和无攻击下均上升,能抵御从未训练过的前沿模型对抗者,且能力提升可迁移到真实浏览器。在150个Web任务上,AdvSim2Real相对于基础智能体,在面对该未见对抗者时将完成率相对提升了33.6%。
该研究针对Web智能体面临的自适应提示注入攻击,提出了一种在模拟环境中协同进化任务、攻击和智能体的训练框架,显著提升了智能体的鲁棒性和任务完成能力,且能迁移到真实浏览器,对构建安全的Web智能体具有重要价值。
Web agents complete user requests by reading and acting on pages that third parties write, so an instruction planted on a page can redirect the agent away from the user's goal. The agent cannot simply ignore the page, because the page also holds the values and controls the task requires. Current defenses fine-tune the agent on injections fixed before training, and attackers that adapt to the trained model bypass them. Adversarial training lets the attacker adapt but keeps the tasks fixed, so a task stops teaching once the agent solves it. We introduce AdvSim2Real, which co-evolves a task curriculum, an injection adversary, and the agent inside a frozen web world model. The curriculum is rewarded for tasks the agent solves about half of the time, and the adversary only for a success flip, an injection that turns a judged success into a failure. Training in the simulator makes a 4B agent both more capable and more robust: its completion rises with and without attacks, holds against a frontier-model adversary it never trained against, and its capability gain carries over to a real browser. On 150 web tasks, AdvSim2Real raises completion under this unseen adversary by 33.6\% relative to the base agent.