arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2503.22738cs.LGcs.CR
收藏

ShieldAgent: 通过可验证的安全策略推理实现安全代理

ShieldAgent: Shielding Agents via Verifiable Safety Policy Reasoning

University of Chicago, Chicago IL, USA(芝加哥大学);University of Illinois at Urbana-Champaign, Champaign IL, USA(伊利诺伊大学厄巴纳-香槟分校)

Zhaorun Chen, Mintong Kang, Bo Li

AI总结:

ShieldAgent通过逻辑推理实现对代理动作轨迹的安全策略合规性,有效提升代理防护性能。

摘要:

由基础模型驱动的自主代理已在各种现实应用中得到广泛应用。然而,它们仍然高度易受恶意指令和攻击的影响,可能导致严重的后果,如隐私泄露和财务损失。更关键的是,现有的LLM防护措施由于代理复杂且动态的性质而不适用。为了解决这些挑战,我们提出了ShieldAgent,这是第一个防护代理,旨在通过逻辑推理强制执行其他受保护代理动作轨迹的显式安全策略合规性。具体而言,ShieldAgent首先通过从政策文件中提取可验证规则并将其结构化为一组基于动作的概率规则电路来构建安全策略模型。给定受保护代理的动作轨迹,ShieldAgent检索相关规则电路并生成防护计划,利用其全面的工具库和可执行代码进行形式验证。此外,鉴于代理缺乏防护基准,我们引入了ShieldAgent-Bench,一个包含3000对安全相关代理指令和动作轨迹的数据集,通过SOTA攻击在6个网络环境和7个风险类别中收集。实验显示,ShieldAgent在ShieldAgent-Bench和三个现有基准上实现了SOTA,平均比先前方法高出11.3%,召回率为90.1%。此外,ShieldAgent将API查询减少了64.7%,推理时间减少了58.2%,展示了其在保护代理方面的高精度和效率。

英文摘要:

Autonomous agents powered by foundation models have seen widespread adoption across various real-world applications. However, they remain highly vulnerable to malicious instructions and attacks, which can result in severe consequences such as privacy breaches and financial losses. More critically, existing guardrails for LLMs are not applicable due to the complex and dynamic nature of agents. To tackle these challenges, we propose ShieldAgent, the first guardrail agent designed to enforce explicit safety policy compliance for the action trajectory of other protected agents through logical reasoning. Specifically, ShieldAgent first constructs a safety policy model by extracting verifiable rules from policy documents and structuring them into a set of action-based probabilistic rule circuits. Given the action trajectory of the protected agent, ShieldAgent retrieves relevant rule circuits and generates a shielding plan, leveraging its comprehensive tool library and executable code for formal verification. In addition, given the lack of guardrail benchmarks for agents, we introduce ShieldAgent-Bench, a dataset with 3K safety-related pairs of agent instructions and action trajectories, collected via SOTA attacks across 6 web environments and 7 risk categories. Experiments show that ShieldAgent achieves SOTA on ShieldAgent-Bench and three existing benchmarks, outperforming prior methods by 11.3% on average with a high recall of 90.1%. Additionally, ShieldAgent reduces API queries by 64.7% and inference time by 58.2%, demonstrating its high precision and efficiency in safeguarding agents.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑