VERA: Variational Inference Framework for Jailbreaking Large Language Models

Anamika Lochab, Lu Yan, Patrick Pynadath, Xiangyu Zhang, Ruqi Zhang
6/27/2025
cs.CRcs.CLcs.LG

No official code found. Best implementation: patrickpynadath1/vera-lander (1 star, last commit 2025-10-28).

Abstract

The rise of API-only access to state-of-the-art LLMs highlights the need for effective black-box jailbreak methods to identify model vulnerabilities in real-world settings. Without a principled objective for gradient-based optimization, most existing approaches rely on genetic algorithms, which are limited by their initialization and dependence on manually curated prompt pools. Furthermore, these methods require individual optimization for each prompt, failing to provide a comprehensive characterization of model vulnerabilities. To address this gap, we introduce VERA: Variational infErence fRamework for jAilbreaking. VERA casts black-box jailbreak prompting as a variational inference problem, training a small attacker LLM to approximate the target LLM's posterior over adversarial prompts. Once trained, the attacker can generate diverse, fluent jailbreak prompts for a target query without re-optimization. Experimental results show that VERA achieves strong performance across a range of target LLMs, highlighting the value of probabilistic inference for adversarial prompt generation.

View on arXivView PDF

Code Implementations(1)

VERA: Variational Inference Framework for Jailbreaking Large Language Models

10CSS, HTMLOct 28, 202511 months ago

Cite this paper

@article{lochab2025vera,
  title  = {VERA: Variational Inference Framework for Jailbreaking Large Language Models},
  author = {Anamika Lochab and Lu Yan and Patrick Pynadath and Xiangyu Zhang and Ruqi Zhang},
  year   = {2025},
  eprint = {2506.22666},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2506.22666v2},
  journal = {NEURIPS 2025 2025}
}

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/2506.22666.svg)](https://codeofpaper.com/paper/2506.22666)

Discussion