Agent Security Bench (ASB)
收藏资源简介:
Agent Security Bench (ASB) 是一个综合性的基准框架,旨在规范化、基准化和评估基于大型语言模型(LLM)的代理在不同场景下的攻击和防御策略。该数据集涵盖了10个场景(如电子商务、自动驾驶、金融),10个代理,超过400个工具和任务,用于评估LLM代理的安全性。数据集包含近90,000个测试案例,涉及23种不同的攻击/防御方法和8个评估指标。ASB的创建过程包括设计多种攻击和防御类型,针对代理的系统提示、用户提示处理、工具使用和内存检索等关键操作步骤。该数据集主要应用于评估和提升LLM代理在复杂任务中的安全性和鲁棒性,旨在解决代理在实际应用中的安全漏洞问题。
Agent Security Bench (ASB) is a comprehensive benchmark framework designed to standardize, benchmark, and evaluate attack and defense strategies of large language model (LLM)-based agents across diverse scenarios. This dataset encompasses 10 scenarios (e.g., e-commerce, autonomous driving, finance), 10 agents, and over 400 tools and tasks for assessing the security of LLM agents. It contains nearly 90,000 test cases, involving 23 distinct attack/defense methods and 8 evaluation metrics. The creation process of ASB involves designing diverse attack and defense types targeting key operational steps of agents, including system prompt handling, user prompt processing, tool utilization, and memory retrieval. This dataset is primarily utilized to evaluate and improve the security and robustness of LLM agents in complex tasks, with the goal of addressing security vulnerabilities of agents in real-world applications.
Agent Security Bench (ASB): Formalizing and Benchmarking Attacks and Defenses in LLM-based Agents
数据集概述
ASB数据集旨在系统地形式化和全面评估基于LLM(大型语言模型)的代理在10个不同场景中的对抗攻击和防御策略,包括学术咨询、心理辅导、投资和法律建议等。
攻击框架
ASB包含以下攻击类型:
- DPI (Direct Prompt Injection): 直接篡改用户提示。
- OPI (Observation Prompt Injection): 篡改观察数据。
- Plan-of-Thought (PoT) Backdoor: 在特定输入下触发隐藏动作。
- Memory Poisoning Attacks: 向代理的记忆中注入恶意计划。
防御策略
ASB提供了针对上述攻击的防御方法:
- Delimiters: 防御DPI和OPI。
- Sandwich Prevention: 防御OPI。
- Instructional Prevention: 防御DPI和OPI。
- Paraphrasing: 防御DPI和PoT Backdoor。
- Shuffle: 防御PoT Backdoor。
实验结果
攻击效果
评估了5种攻击类型在13种LLM上的平均攻击结果,包括攻击成功率(ASR)和攻击响应率(RR)。
防御效果
针对DPI、OPI、Memory Poisoning和PoT Backdoor的防御效果进行了评估,结果显示防御机制在某些情况下有效,但在其他情况下效果有限。
可用的LLM
ASB中使用的LLM包括开源和闭源模型,如Gemma2、LLaMA3、Mixtral、Qwen2、Claude-3.5 Sonnet、GPT-3.5 Turbo和GPT-4o等。
自定义参数
用户可以通过YAML文件自定义攻击和防御参数,包括使用的LLM、攻击类型、防御类型等。

- 1Agent Security Bench (ASB): Formalizing and Benchmarking Attacks and Defenses in LLM-based Agents浙江大学, 罗格斯大学 · 2024年



