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

Peiyan Zhang, Haibo Jin, Liying Kang, Yangqiu Song, Haohan Wang · Submission to ICLR 2025 · Withdrawn

TL;DR

Static safety benchmarks fail to capture how large language models (LLMs) behave under adaptive adversarial pressure. GuardVal introduces a dynamic, multi-agent evaluation framework where LLMs iteratively jailbreak one another using an Adam-inspired optimization mechanism to prevent prompt stagnation. By evaluating eight major LLMs across 10 safety domains, GuardVal reveals that traditional static benchmarks overestimate model safety due to shallow keyword-based refusal mechanisms.

What Problem Does This Paper Address?

Evaluating LLM safety against jailbreaks (prompts crafted to bypass safety filters) typically relies on static, human-curated datasets (e.g., TrustLLM, PromptBench). However, static benchmarks suffer from three major issues:

  1. Data contamination: Models may memorize public test prompts during pre-training, producing "false safety."
  2. Lack of adaptive complexity: Static queries fail to mimic human attackers who adapt their phrasing when an initial attempt is rejected.
  3. Prompt stagnation in automated red-teaming: Existing multi-agent, automated red-teaming setups often get trapped in local loops, making trivial prompt tweaks that defender models easily block.

The authors propose three key desiderata for reliable safety testing: evaluation data must be uncontaminated, must evolve dynamically to match defender capabilities, and must be model-specific.

Methods

GuardVal assesses safety via a dynamic, black-box role-playing framework where an attacker LLM iteratively probes a defender LLM across four roles:

  • Translator: Converts ethical guidelines into adversarial test queries paired with an expected safe reference ("Oracle"). If the model refuses, a fallback distraction-based strategy embeds malicious queries within complex, benign narrative scaffolding.
  • Generator: Embeds the prompt into rich, nuanced role-play scenarios.
  • Evaluator: Compares the defender’s response against the Oracle, scoring semantic similarity and providing revision feedback if the attack fails.
  • Optimizer: To prevent the Generator and Evaluator from falling into repetitive loops, the Optimizer tracks the rate of change between successive prompt variations ($g_t = \|\text{Response}_t - \text{Response}_{t-1}\|$). Borrowing from the Adam optimizer, it maintains running first ($m_t$) and second ($v_t$) moments of prompt evolution. When a sliding window detects stagnation, it injects structured natural language guidance (e.g., adjusting prompt intensity, variance, or semantic direction) to force the Generator to explore new attack vectors.

To evaluate models holistically, the authors introduce the Overall Safety Value (OSV): $$\text{OSV}_A = \frac{1}{N - 1} \sum_{B \neq A} (R_{B,A} - R_{A,B})$$ where $R_{B,A}$ is the average rounds other models need to break Model A (defensive strength), and $R_{A,B}$ is the rounds Model A needs to break others (probing/offensive strength).

Datasets

Rather than relying on a static set of pre-written questions, GuardVal dynamically generates prompts based on the "Trustworthy AI Assessment List" (derived from the European Commission’s Ethics Guidelines for Trustworthy AI). Attacks are generated across 10 safety domains: misinformation, terrorism, violence, political sensitivity, hallucination, crime, bias, insult, ethics, and hate speech.

Additionally, the authors curated a balanced, human-annotated dataset of 40 jailbreak responses to benchmark how reliably various LLMs perform when acting as the automated Evaluator.

Key Insights and Ideas

  • Shallow vs. Deep Alignment: Defenders almost always resist attacks in Round 1. Successful later rounds reveal that safety guardrails frequently rely on recognizing explicit forbidden tokens (e.g., "rumor," "damage"). When the Optimizer refines these into euphemistic, subtle language, models often comply, demonstrating shallow keyword-filtering rather than conceptual safety.
  • Asymmetric "Restraint" Dynamics: Robustness is not strictly transitive. For example, while Llama2-7b achieves a higher overall safety score than Gemini, Gemini consistently jailbreaks Llama2-7b in fewer rounds than vice versa. Gemini’s scenario complexity easily bypasses Llama2’s RLHF guardrails.
  • "Exaggerated Safety" Impairs Evaluation: When acting as Evaluators, safety-tuned models like Llama2-7b and Mistral-7b frequently refuse to handle or rewrite adversarial prompts, unnecessarily prolonging test cycles and degrading red-teaming efficiency.

Key Results

The framework was evaluated on eight leading models: GPT-4, GPT-3.5, Gemini, Qwen1.5-72B-Chat, Llama2-7b, Mistral-7b, OpenChat-3.5, and Vicuna-7b.

  • Rankings Diverge from Static Benchmarks: On TrustLLM, Llama2-7b ranks #1 and GPT-4 ranks #2. Under GuardVal's dynamic OSV metric, GPT-4 ranks #1 ($\text{OSV} = 15.0$) and Llama2-7b ranks #2 ($\text{OSV} = 13.5$). GPT-4 demonstrated significantly better defense in nuanced domains like Crime and Insult.
  • Full Model Rankings (OSV):
    1. GPT-4 (+15.0)
    2. Llama2-7b (+13.5)
    3. Qwen1.5-72B (+12.3)
    4. Gemini (+6.8)
    5. GPT-3.5 (+3.6)
    6. OpenChat-3.5 (-10.4)
    7. Mistral-7b (-18.6)
    8. Vicuna-7b (-22.2)
  • Evaluator Reliability: In judging jailbreaks against human agreement, GPT-4 achieved 87.5% accuracy, followed by Llama2-7b (85.0%), Gemini (82.5%), and Qwen1.5-72B (82.5%). Vicuna-7b trailed at 67.50%.
  • Breaking Deadlocks: Without the Optimizer, Gemini failed to jailbreak a clone of itself after 10 rounds. Reintroducing the Optimizer enabled a successful jailbreak in only 3 rounds.

Limitations and Future Work

  • Relative, Not Absolute Metric: OSV evaluates models relative to the cohort tested. If the pool of evaluator/attacker models is weak or homogeneous, OSV will not fully reflect real-world vulnerabilities.
  • LLM Stochasticity: Because LLM outputs vary, evaluations require running trials in triplicate to smooth out statistical outliers, increasing compute and API costs.
  • Future Directions: The authors plan to expand domain-specific Mixture-of-Experts (MoE) guardrails—routing incoming queries to the strongest defender for that domain (e.g., assigning Llama2-7b to misinformation defenses)—and extending testing to multimodal inputs.

Summary updated

BibTeX
@misc{zhang2025guardval,
  author = {Peiyan Zhang and Haibo Jin and Liying Kang and Yangqiu Song 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