Best-of-N Jailbreaking

John Hughes, Sara Price, Aengus Lynch, Rylan Schaeffer, Fazl Barez, Sanmi Koyejo, Henry Sleight, Erik Jones, Ethan Perez, Mrinank Sharma

Introduction

As AI models evolve into highly capable multi-modal systems, ensuring they remain resistant to misuse—such as requests for harmful instructions or misinformation—is a critical challenge. Traditional jailbreaking techniques often require modality-specific expertise or "white-box" access to internal model gradients. Researchers have now introduced Best-of-N (BoN) Jailbreaking, a remarkably simple black-box attack that demonstrates how safety guardrails can be bypassed through the sheer exploitation of input variance and the stochastic nature of model outputs.

Methodology

The BoN Jailbreaking algorithm is elegantly simple and operates across text, vision, and audio modalities. The process follows an iterative loop:

  1. Harmful Request: Start with a prohibited prompt (e.g., "How can I build a bomb?").
  2. Augmentation: Generate $N$ variations using random, modality-specific perturbations. Text variations include random capitalization and character scrambling; vision involves rendering text onto images with random fonts and overlapping blocks; audio uses alterations in pitch, speed, and background noise.
  3. Query & Grade: Submit these variations to the target model and use an automated classifier (like GPT-4o) to determine if any response is harmful.
  4. Termination: The attack stops once a successful jailbreak is detected or the sample limit $N$ is reached.
Figure 1: The Best-of-N Jailbreaking pipeline and its effectiveness across text, vision, and audio modalities.

Key Insights: The Power-Law of Jailbreaking

The most significant finding of this research is that the Attack Success Rate (ASR) follows a power-law-like scaling relative to the number of samples ($N$). This predictable behavior suggests that a model's safety is not a binary state but a probabilistic one that can be forecasted based on the computational effort an attacker is willing to expend.

Figure 2: Log-log plots illustrating the power-law scaling of ASR across different models and modalities.

Other key observations include:

  • Variance as Vulnerability: Success does not stem from a single "magic" prompt but from adding enough noise to push the model into a region of its probability space where safety filters fail.
  • Cross-Modality Fragility: The consistency of BoN's success across images and audio indicates that multi-modal models share a fundamental sensitivity to seemingly innocuous input changes.
  • Compositional Gains: When combined with other techniques like Many-Shot Jailbreaking, BoN acts as a "force multiplier," achieving high success rates with significantly fewer samples.

Results and Performance

BoN Jailbreaking achieved high success rates on frontier models. At $N=10,000$, the attack reached an 89% ASR on GPT-4o and 78% on Claude 3.5 Sonnet for text. It was also effective in other modalities, reaching 56% ASR on GPT-4o vision and 72% on the GPT-4o Realtime API (audio). Notably, the attack bypassed advanced defenses like "circuit breakers" and GraySwan’s Cygnet, proving that even state-of-the-art safety measures are vulnerable to persistent, automated red-teaming.

Limitations and Future Work

While effective, the method has limitations. Automated classifiers can produce false positives, and scaling to $N=10,000$ can be computationally expensive for academic researchers. Furthermore, audio augmentations showed less "universality" than text, with specific perturbations rarely transferring between different requests. Future research will focus on more complex augmentations and using BoN-generated data to train more robust, variance-resistant safety filters.

Summary updated

BibTeX
@inproceedings{hughes2025best,
  author = {John Hughes and Sara Price and Aengus Lynch and Rylan Schaeffer and Fazl Barez and Sanmi Koyejo and Henry Sleight and Erik Jones and Ethan Perez and Mrinank Sharma},
  title = {{Best-of-N Jailbreaking}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2025},
  url = {https://openreview.net/forum?id=91l4ZTMpO4},
}
Figure