GuardVal: Dynamic Large Language Model Jailbreak Evaluation for Comprehensive Safety Testing

Peiyan Zhang, Haibo Jin, Liying Kang, Haohan Wang · DOI

Introduction

As Large Language Models (LLMs) are increasingly deployed in safety-critical sectors, the threat of "jailbreaking"—crafting prompts to bypass safety filters—remains a significant challenge. Current evaluation methods often fall into two traps: static benchmarks and shallow alignment. Static datasets like PromptBench are prone to data contamination, where models inadvertently "memorize" benchmarks during training. Furthermore, many models exhibit shallow alignment, learning to recognize specific "bad words" (e.g., "bomb") rather than understanding the underlying ethical violations.

Comparison between a standard refusal and a successful jailbreak using a distracting scenario.

To address these issues, we present GuardVal, a dynamic, multi-agent framework designed to stress-test LLM safety through iterative, model-specific jailbreak attacks. GuardVal moves beyond fixed benchmarks to probe a specific model's unique boundaries in real-time.

The GuardVal Framework

GuardVal introduces a role-playing pipeline where an "attacker" LLM takes on four distinct roles to challenge a "defender" LLM:

  • Translator: Converts high-level safety guidelines (e.g., "don't spread misinformation") into actionable, adversarial prompts.
  • Generator: Wraps these prompts in complex, distracting scenarios to lower the defender's vigilance, exploiting the attention mechanisms of LLMs.
  • Evaluator: Acts as a judge, determining if the defender's response was a successful refusal or a jailbreak.
  • Optimizer (The Core Innovation): Traditional feedback loops often stagnate. GuardVal uses an Adam-inspired optimization method to quantify the "rate of change" in the model's responses. If the attack isn't evolving, the Optimizer generates natural language instructions to force the Generator into more diverse and sophisticated tactics.
The GuardVal pipeline: Translator, Generator, and Evaluator work in a loop, moderated by an Optimizer that prevents the attack from getting stuck in local optima.

Experimental Setup and Results

GuardVal was tested across 10 safety domains—including misinformation, terrorism, and bias—against a diverse fleet of models such as GPT-4, Gemini, Llama2, and Vicuna.

Key Insights

  • The "First Round" Illusion: In initial tests, most models successfully refuse harmful prompts. However, as GuardVal refines the prompts over multiple rounds, almost all models eventually break. This proves that one-shot safety evaluations are insufficient.
  • Shallow vs. Deep Alignment: Models often rely on keyword matching. When the Optimizer forced the Generator to replace explicit terms with subtle descriptions, defender models frequently failed to recognize the harm.
  • The Necessity of the Optimizer: Without the Adam-inspired Optimizer, attacker LLMs frequently got stuck in repetitive loops. The Optimizer acts as a "nudge," pushing the system to explore new adversarial territory when progress stalls.

Performance Metrics

The paper introduces the Overall Safety Value (OSV), a metric balancing defensive robustness against offensive capability.

  • GPT-4 achieved the highest OSV (15.0), showing the best balance of safety and intelligence.
  • Llama2-7b followed closely (13.5), largely due to its high defensive capability, requiring an average of 40.3 rounds to break.
  • Vicuna-7b performed the worst (OSV of -22.2), proving highly susceptible to even basic jailbreak refinements.

Conclusion

GuardVal demonstrates that safety testing must be dynamic and model-specific to be effective. By employing an iterative optimization process, GuardVal uncovers deep-seated vulnerabilities that static benchmarks miss. Future work will explore "Mix-of-Experts" safety ensembles, where different models are specialized to guard specific ethical domains.

Summary updated

BibTeX
@misc{zhang2025guardval,
  author = {Peiyan Zhang and Haibo Jin and Liying Kang and Haohan Wang},
  title = {{GuardVal: Dynamic Large Language Model Jailbreak Evaluation for Comprehensive Safety Testing}},
  year = {2025},
  eprint = {2507.07735},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2507.07735},
}
Figure