构建统一框架评估大模型越狱攻击防御效果
PandaGuard: Systematic Evaluation of LLM Safety against Jailbreaking Attacks
- 将越狱攻击与防御建模为多智能体系统,支持19种攻击和12种防御方法
- 在49个模型上测试,耗时超30亿token,发现无万能防御方案
- 提供可复现的评测工具,适合安全研究者和模型开发者使用
大语言模型虽能力强大,但仍易受越狱攻击影响,导致有害输出。现有评估分散且缺乏系统性。本文提出PandaGuard框架,将模型安全建模为包含攻击者、防御者和评判者的多智能体系统,集成19种攻击方法、12种防御机制及多种判断策略,支持灵活插件架构与多种交互模式,提升可复现性与部署可行性。基于该框架,构建PandaBench基准,对49个LLM进行跨攻击/防御组合评估,总生成超过30亿个标记。结果揭示模型漏洞分布、防御性能-成本权衡及评判者一致性问题:无单一防御最优,且评判差异带来显著评估波动。代码、配置与结果均已开源,推动透明可复现的LLM安全研究。
原文摘要 · Abstract (English)
Large language models (LLMs) have achieved remarkable capabilities but remain vulnerable to adversarial prompts known as jailbreaks, which can bypass safety alignment and elicit harmful outputs. Despite growing efforts in LLM safety research, existing evaluations are often fragmented, focused on isolated attack or defense techniques, and lack systematic, reproducible analysis. In this work, we introduce PandaGuard, a unified and modular framework that models LLM jailbreak safety as a multi-agent system comprising attackers, defenders, and judges. Our framework implements 19 attack methods and 12 defense mechanisms, along with multiple judgment strategies, all within a flexible plugin architecture supporting diverse LLM interfaces, multiple interaction modes, and configuration-driven experimentation that enhances reproducibility and practical deployment. Built on this framework, we develop PandaBench, a comprehensive benchmark that evaluates the interactions between these attack/defense methods across 49 LLMs and various judgment approaches, requiring over 3 billion tokens to execute. Our extensive evaluation reveals key insights into model vulnerabilities, defense cost-performance trade-offs, and judge consistency. We find that no single defense is optimal across all dimensions and that judge disagreement introduces nontrivial variance in safety assessments. We release the code, configurations, and evaluation results to support transparent and reproducible research in LLM safety.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。