用模拟训练提升电脑代理安全,防恶意指令又不误伤正常操作。
MirrorGuard: Toward Secure Computer-Use Agents via Simulation-to-Real Reasoning Correction
- 在文本模拟环境中生成高风险操作轨迹,提前发现不安全推理。
- 真实测试中将不安全率从66.5%降至13.0%,误拒率极低。
- 无需改动原系统,可直接部署,适合各类自动化电脑代理。
大型基础模型被集成进计算机使用代理(CUA),使其能通过图形界面自主执行复杂任务。这种自主性带来严重安全风险:恶意指令或视觉提示注入可能引发不安全推理,导致有害系统操作。现有防御如基于检测的拦截虽能阻止破坏,但常过早终止任务,降低代理实用性。本文提出MirrorGuard,一种即插即用的防御框架,利用仿真训练提升真实世界中的CUA安全性。为降低在真实操作系统中大规模训练的成本,我们设计了一种新型神经符号仿真流水线,可在纯文本模拟环境中生成真实、高风险的GUI交互轨迹,捕捉不安全推理模式与潜在系统危害,且无需执行实际操作。在仿真环境中,MirrorGuard学习拦截并修正CUA的不安全推理链,防止其生成并执行危险动作。在真实世界测试中,跨多种基准和CUA架构的广泛评估显示,MirrorGuard显著降低安全风险。例如,在ByteDance UI-TARS系统上,不安全率从66.5%降至13.0%,同时保持极低的误拒率(FRR)。相比之下,最先进的GuardAgent仅降至53.9%,且误拒率高出15.4%。本工作证明,基于仿真的防御可提供稳健的真实世界保护,同时维持代理的核心功能。代码与模型已公开于https://bmz-q-q.github.io/MirrorGuard/。
原文摘要 · Abstract (English)
Large foundation models are integrated into Computer Use Agents (CUAs), enabling autonomous interaction with operating systems through graphical user interfaces (GUIs) to perform complex tasks. This autonomy introduces serious security risks: malicious instructions or visual prompt injections can trigger unsafe reasoning and cause harmful system-level actions. Existing defenses, such as detection-based blocking, prevent damage but often abort tasks prematurely, reducing agent utility. In this paper, we present MirrorGuard, a plug-and-play defense framework that uses simulation-based training to improve CUA security in the real world. To reduce the cost of large-scale training in operating systems, we propose a novel neural-symbolic simulation pipeline, which generates realistic, high-risk GUI interaction trajectories entirely in a text-based simulated environment, which captures unsafe reasoning patterns and potential system hazards without executing real operations. In the simulation environment, MirrorGuard learns to intercept and rectify insecure reasoning chains of CUAs before they produce and execute unsafe actions. In real-world testing, extensive evaluations across diverse benchmarks and CUA architectures show that MirrorGuard significantly mitigates security risks. For instance, on the ByteDance UI-TARS system, it reduces the unsafe rate from 66.5% to 13.0% while maintaining a marginal false refusal rate (FRR). In contrast, the state-of-the-art GuardAgent only achieves a reduction to 53.9% and suffers from a 15.4% higher FRR. Our work proves that simulation-derived defenses can provide robust, real-world protection while maintaining the fundamental utility of the agent. Our code and model are publicly available at https://bmz-q-q.github.io/MirrorGuard/.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。