arXiv:2410.01606cs.LGcs.AI2024-10被引 50

用模拟真实用户对话的智能体自动测试大模型安全漏洞,效果接近人工水平。

Automated Red Teaming with GOAT: the Generative Offensive Agent Tester

  • 构建可自主推理的智能体,模仿普通人用常见技巧试探模型边界。
  • 在JailbreakBench上对Llama 3.1的漏洞发现率达97%,GPT-4达88%。
  • 适合安全研究人员快速规模化检测模型潜在风险,替代部分人工测试。

红队测试用于评估大语言模型(LLMs)是否可能生成违反安全训练规范的内容。现有自动化方法多基于专业攻击技术,与普通用户实际使用方式不符。真实用户通常不具备对抗机器学习知识,也无权访问模型内部,且不会花大量时间精心设计单个高危提示。他们更倾向于使用网络上流行的技巧,并利用大模型多轮对话特性进行试探。手动测试虽能弥补此差距,但效率低且成本高。为此,我们提出生成式进攻代理测试器(GOAT),一种自动化智能体红队系统,通过模拟自然语言对抗性对话,结合多种攻击策略,识别大模型漏洞。我们在通用模型上实例化了7种红队攻击,使其能基于当前目标模型响应,自主推理选择最优攻击路径。该方法兼具可扩展性与高效性,使人工测试者可专注探索新风险领域,而自动化系统负责已知风险区域的大规模压力测试。实验表明,GOAT在最新大模型上表现优异,在JailbreakBench数据集上对Llama 3.1的攻击成功率(ASR@10)达97%,对GPT-4为88%。

原文摘要 · Abstract (English)

Red teaming assesses how large language models (LLMs) can produce content that violates norms, policies, and rules set during their safety training. However, most existing automated methods in the literature are not representative of the way humans tend to interact with AI models. Common users of AI models may not have advanced knowledge of adversarial machine learning methods or access to model internals, and they do not spend a lot of time crafting a single highly effective adversarial prompt. Instead, they are likely to make use of techniques commonly shared online and exploit the multiturn conversational nature of LLMs. While manual testing addresses this gap, it is an inefficient and often expensive process. To address these limitations, we introduce the Generative Offensive Agent Tester (GOAT), an automated agentic red teaming system that simulates plain language adversarial conversations while leveraging multiple adversarial prompting techniques to identify vulnerabilities in LLMs. We instantiate GOAT with 7 red teaming attacks by prompting a general-purpose model in a way that encourages reasoning through the choices of methods available, the current target model's response, and the next steps. Our approach is designed to be extensible and efficient, allowing human testers to focus on exploring new areas of risk while automation covers the scaled adversarial stress-testing of known risk territory. We present the design and evaluation of GOAT, demonstrating its effectiveness in identifying vulnerabilities in state-of-the-art LLMs, with an ASR@10 of 97% against Llama 3.1 and 88% against GPT-4 on the JailbreakBench dataset.

大模型安全红队测试智能体漏洞检测

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。