AgentAuditor: Human-Level Safety and Security Evaluation for LLM Agents
作者: Hanjun Luo, Shenyu Dai, Chiming Ni, Xinfeng Li, Guibin Zhang, Kun Wang, Tongliang Liu, Hanan Salam
分类: cs.AI
发布日期: 2025-05-31 (更新: 2025-10-19)
备注: This paper is accepted by 39th Conference on Neural Information Processing Systems (NeurIPS 2025)
🔗 代码/项目: GITHUB
💡 一句话要点
AgentAuditor:提出一种基于记忆增强推理的LLM Agent安全评估框架,达到人类专家水平。
🎯 匹配领域: 支柱九:具身大模型 (Embodied Foundation Models)
关键词: LLM Agent 安全评估 记忆增强 推理框架 风险识别
📋 核心要点
- 现有基于规则或LLM的评估器难以发现Agent逐步行动中的潜在危险,忽略细微含义,且易受不清晰规则的干扰。
- AgentAuditor通过构建经验记忆,并利用多阶段上下文感知的检索增强生成过程,指导LLM评估器进行评估,模拟人类专家。
- 实验结果表明,AgentAuditor在多个基准测试中持续提升LLM评估性能,并在Agent安全评估方面达到人类水平的准确性。
📝 摘要(中文)
本文提出AgentAuditor,一个通用的、免训练的、记忆增强推理框架,旨在提升LLM评估器在LLM Agent安全和安全方面的评估能力,使其能够模拟人类专家评估员。AgentAuditor通过让LLM自适应地提取结构化语义特征(例如,场景、风险、行为)并为过去的交互生成相关的思维链推理轨迹,从而构建经验记忆。然后,一个多阶段、上下文感知的检索增强生成过程动态地检索最相关的推理经验,以指导LLM评估器对新案例的评估。此外,本文还开发了ASSEBench,这是第一个旨在检查LLM评估器识别安全风险和安全威胁能力的基准。ASSEBench包含2293个精心标注的交互记录,涵盖29个应用场景中的15种风险类型。ASSEBench的一个关键特征是其对模糊风险情况的细致处理,采用“严格”和“宽松”的判断标准。实验表明,AgentAuditor不仅持续提高了LLM在所有基准测试中的评估性能,而且在Agent安全和安全方面为LLM-as-a-judge设定了新的技术水平,达到了人类水平的准确性。
🔬 方法详解
问题定义:现有基于LLM的Agent安全评估方法存在诸多不足,例如难以捕捉Agent行为中的细微风险,无法有效处理复杂场景下的风险叠加,以及对安全规则理解的偏差。这些问题导致评估结果的可靠性不足,难以保障LLM Agent的安全性。
核心思路:AgentAuditor的核心思路是赋予LLM评估器“经验”,使其能够像人类专家一样,基于过往的案例进行推理和判断。通过构建经验记忆,并结合检索增强生成技术,AgentAuditor能够将相关的历史经验融入到当前评估过程中,从而提高评估的准确性和可靠性。
技术框架:AgentAuditor主要包含两个阶段:经验记忆构建和检索增强评估。在经验记忆构建阶段,LLM从历史交互记录中提取结构化语义特征(如场景、风险、行为),并生成思维链推理轨迹,形成经验记忆。在检索增强评估阶段,对于新的Agent行为,AgentAuditor首先检索经验记忆中相关的案例,然后利用检索到的经验指导LLM评估器进行评估。整个过程是多阶段的,并且上下文感知的。
关键创新:AgentAuditor的关键创新在于其记忆增强推理框架。与传统的评估方法相比,AgentAuditor能够利用历史经验进行推理,从而更好地理解Agent行为的潜在风险。此外,ASSEBench基准测试的提出,为LLM Agent安全评估提供了一个标准化的评估平台。
关键设计:AgentAuditor在经验记忆构建阶段,采用了自适应的特征提取方法,能够根据不同的场景和风险类型,提取不同的语义特征。在检索增强评估阶段,采用了多阶段的检索策略,能够更准确地找到相关的历史案例。此外,ASSEBench基准测试采用了“严格”和“宽松”两种判断标准,能够更全面地评估LLM评估器的性能。
🖼️ 关键图片
📊 实验亮点
实验结果表明,AgentAuditor在ASSEBench基准测试中取得了显著的性能提升,超越了现有的LLM评估器,并达到了人类水平的准确性。具体而言,AgentAuditor在严格和宽松两种判断标准下,均取得了最高的评估准确率,证明了其在LLM Agent安全评估方面的有效性。
🎯 应用场景
AgentAuditor可广泛应用于LLM Agent的安全性和可靠性评估,例如智能客服、自动驾驶、金融风控等领域。通过提高LLM Agent的安全性,可以降低潜在风险,提升用户体验,并促进LLM Agent的广泛应用。该研究成果对于构建安全可信的人工智能系统具有重要意义。
📄 摘要(原文)
Despite the rapid advancement of LLM-based agents, the reliable evaluation of their safety and security remains a significant challenge. Existing rule-based or LLM-based evaluators often miss dangers in agents' step-by-step actions, overlook subtle meanings, fail to see how small issues compound, and get confused by unclear safety or security rules. To overcome this evaluation crisis, we introduce AgentAuditor, a universal, training-free, memory-augmented reasoning framework that empowers LLM evaluators to emulate human expert evaluators. AgentAuditor constructs an experiential memory by having an LLM adaptively extract structured semantic features (e.g., scenario, risk, behavior) and generate associated chain-of-thought reasoning traces for past interactions. A multi-stage, context-aware retrieval-augmented generation process then dynamically retrieves the most relevant reasoning experiences to guide the LLM evaluator's assessment of new cases. Moreover, we developed ASSEBench, the first benchmark designed to check how well LLM-based evaluators can spot both safety risks and security threats. ASSEBench comprises 2293 meticulously annotated interaction records, covering 15 risk types across 29 application scenarios. A key feature of ASSEBench is its nuanced approach to ambiguous risk situations, employing "Strict" and "Lenient" judgment standards. Experiments demonstrate that AgentAuditor not only consistently improves the evaluation performance of LLMs across all benchmarks but also sets a new state-of-the-art in LLM-as-a-judge for agent safety and security, achieving human-level accuracy. Our work is openly accessible at https://github.com/Astarojth/AgentAuditor.