PandaGuard: Systematic Evaluation of LLM Safety against Jailbreaking Attacks

Guobin Shen, Dongcheng Zhao, Linghao Feng, Xiang He, Jihang Wang +6 more
5/20/2025
cs.CRcs.CL

No confident code implementation found for this paper.

Abstract

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.

Show full abstract

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.

View on arXivView PDF

Code Implementations

No confident code match yet

We couldn't find an author-owned or strongly-evidenced community implementation for this paper. Any repos shown below are weak matches — verify before relying on them.

No code implementations found yet.

Know of an implementation? Let us know in the comments below!

Similar Papers

Cite this paper

@article{shen2025pandaguard,
  title  = {PandaGuard: Systematic Evaluation of LLM Safety against Jailbreaking Attacks},
  author = {Guobin Shen and Dongcheng Zhao and Linghao Feng and Xiang He and Jihang Wang and Sicheng Shen and Haibo Tong and Yiting Dong and Jindong Li and Xiang Zheng and Yi Zeng},
  year   = {2025},
  eprint = {2505.13862},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2505.13862v3}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2505.13862.svg)](https://codeofpaper.com/paper/2505.13862)

Discussion