AdvPrefix: An Objective for Nuanced LLM Jailbreaks

Sicheng Zhu, Brandon Amos, Yuandong Tian, Chuan Guo, Ivan Evtimov
12/13/2024
cs.LGcs.AIcs.CL

No official code found. Best implementation: facebookresearch/jailbreak-objectives (37 stars, last commit 2026-04-08).

Abstract

Many jailbreak attacks on large language models (LLMs) rely on a common objective: making the model respond with the prefix ``Sure, here is (harmful request)''. While straightforward, this objective has two limitations: limited control over model behaviors, yielding incomplete or unrealistic jailbroken responses, and a rigid format that hinders optimization. We introduce AdvPrefix, a plug-and-play prefix-forcing objective that selects one or more model-dependent prefixes by combining two criteria: high prefilling attack success rates and low negative log-likelihood. AdvPrefix integrates seamlessly into existing jailbreak attacks to mitigate the previous limitations for free. For example, replacing GCG's default prefixes on Llama-3 improves nuanced attack success rates from 14% to 80%, revealing that current safety alignment fails to generalize to new prefixes. Code and selected prefixes are released at github.com/facebookresearch/jailbreak-objectives.

View on arXivView PDF

Code Implementations(1)

Code and data to go with the Zhu et al. paper "An Objective for Nuanced LLM Jailbreaks"

373PythonNov 26, 20246 months agoNOASSERTION

Similar Papers

Cite this paper

@article{zhu2024advprefix,
  title  = {AdvPrefix: An Objective for Nuanced LLM Jailbreaks},
  author = {Sicheng Zhu and Brandon Amos and Yuandong Tian and Chuan Guo and Ivan Evtimov},
  year   = {2024},
  eprint = {2412.10321},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2412.10321v2}
}

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

Discussion