An Interpretable N-gram Perplexity Threat Model for Large Language Model Jailbreaks

Valentyn Boreiko, Alexander Panfilov, Vaclav Voracek, Matthias Hein, Jonas Geiping
10/21/2024
cs.LGcs.AIcs.CL

No official code found. Best implementation: valentyn1boreiko/llm-threat-model (12 stars, MIT, last commit 2025-06-11).

Abstract

A plethora of jailbreaking attacks have been proposed to obtain harmful responses from safety-tuned LLMs. These methods largely succeed in coercing the target output in their original settings, but their attacks vary substantially in fluency and computational effort. In this work, we propose a unified threat model for the principled comparison of these methods. Our threat model checks if a given jailbreak is likely to occur in the distribution of text. For this, we build an N-gram language model on 1T tokens, which, unlike model-based perplexity, allows for an LLM-agnostic, nonparametric, and inherently interpretable evaluation. We adapt popular attacks to this threat model, and, for the first time, benchmark these attacks on equal footing with it. After an extensive comparison, we find attack success rates against safety-tuned modern models to be lower than previously presented and that attacks based on discrete optimization significantly outperform recent LLM-based attacks. Being inherently interpretable, our threat model allows for a comprehensive analysis and comparison of jailbreak attacks. We find that effective attacks exploit and abuse infrequent bigrams, either selecting the ones absent from real-world text or rare ones, e.g., specific to Reddit or code datasets.

View on arXivView PDF

Code Implementations(1)

MIT

An Interpretable N-gram Perplexity Threat Model for Large Language Model Jailbreaks [ICML 2025]

121Shell, PythonOct 14, 20241 years agoMIT

Similar Papers

Cite this paper

@article{boreiko2024interpretable,
  title  = {An Interpretable N-gram Perplexity Threat Model for Large Language Model Jailbreaks},
  author = {Valentyn Boreiko and Alexander Panfilov and Vaclav Voracek and Matthias Hein and Jonas Geiping},
  year   = {2024},
  eprint = {2410.16222},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2410.16222v2}
}

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

Discussion