Skip to content

Scalable and transferable black-box jailbreaks for language models via persona modulationScalable and Transferable Black-Box Jailbreaks for Language Models via Persona Modulation

arXiv· arXiv:2311.03348· Rusheb Shah, Quentin Feuillade--Montixi, Soroush Pour, Arush Tagade, Stephen Casper, Javier RandoPRISM AI; Harmony Intelligence; Leap Laboratories; MIT CSAIL; ETH AI Center, ETH ZurichIndexed by this site · 25 days ago· Originally publishedSelected AttacksSelectedAttention42

Quick read

Attacks

Based on the paper PDF (AI-generated); refer to the original

The authors propose using an LLM assistant to automatically generate persona-modulation jailbreak prompts; on GPT-4 the harmful completion rate rose from 0.23% to 42.48%, and transferred to Claude 2 (61.03%) and Vicuna-33B (35.92%).

Threat modelThe attacker has black-box access to the target model (via API) and does not enable optional moderation endpoints; the attacker uses an LLM assistant (which may be the same as the target model) to automatically generate persona-modulation prompts that make the target model play a persona willing to comply with harmful instructions; the victim systems are aligned models such as GPT-4, Claude 2, and Vicuna-33B.

Questions
Aligned LLMs can still be induced by jailbreak prompts to produce harmful behavior; manually constructing persona-modulation prompts is time-consuming and laborious, and the authors study how to generate such jailbreaks automatically and at scale.
Methods
Using GPT-4 as the assistant, automatically generate misuse instructions, personas, and persona-modulation prompts for 43 harmful categories (15 per category), then have the target model answer while playing that persona; there is also a semi-automated variant with human intervention at each stage.
Experiments and results
On GPT-4 the harmful completion rate rose from 0.23% to 42.48%; the same set of prompts transferred to Claude 2 at 61.03% and Vicuna-33B at 35.92% (Table 3). The authors state that the semi-automated approach can cover almost all categories and takes about 1/25 of the time of manual work.
Limitations and future work
The authors note: misuse instructions generated by GPT-4 sometimes deviate from the target category; the PICT classifier has a high false-negative rate (about one third of harmful completions are missed), so the results are only a lower bound; PICT does not measure real harm dimensions such as information availability. The experiments cover only 3 models and 43 categories.
Experimental setupGPT-4 (gpt-4-0613)、Vicuna-33B et al. · 43 个手工整理的有害类别(依据 OpenAI usage policies) · harmful completion rate(PICT 分类器判定)
Evaluated models
GPT-4 (gpt-4-0613)Vicuna-33BClaude 2
Benchmarks
43 个手工整理的有害类别(依据 OpenAI usage policies)
Metrics
harmful completion rate(PICT 分类器判定)
AI summaryand selection rationaleThe researchers propose a persona-modulated black-box jailbreak method and use GPT-4 as an assistant to automatically generate jailbreak prompts, raising the proportion of GPT-4 completions judged harmful from 0.23% to 42.48%. When the same set of prompts was transferred to Claude 2 and Vicuna-33B, the harmful completion rates were 61.03% and 35.92%, respectively, and among 43 violation categories, at least one of the models was successfully covered in 42 categories. Judgments used the GPT-4 zero-shot PICT classifier; against 300 human-annotated examples, its precision was 91% and F1 was 0.76, on which basis the authors consider the measured results to be only a lower bound. The fully automated pipeline generates 45 completions for a single category at a cost below $3 and in under 10 minutes; the semi-automated pipeline, with human edits added, takes about 10 to 30 minutes and approaches the effect of manual attacks taking 1 to 4 hours.

The researchers propose a persona-modulated black-box jailbreak method and use GPT-4 as an assistant to automatically generate jailbreak prompts, raising the proportion of GPT-4 completions judged harmful from 0.23% to 42.48%. When the same set of prompts was transferred to Claude 2 and Vicuna-33B, the harmful completion rates were 61.03% and 35.92%, respectively, and among 43 violation categories, at least one of the models was successfully covered in 42 categories. Judgments used the GPT-4 zero-shot PICT classifier; against 300 human-annotated examples, its precision was 91% and F1 was 0.76, on which basis the authors consider the measured results to be only a lower bound. The fully automated pipeline generates 45 completions for a single category at a cost below $3 and in under 10 minutes; the semi-automated pipeline, with human edits added, takes about 10 to 30 minutes and approaches the effect of manual attacks taking 1 to 4 hours.

Why it was selectedThe paper presents a fully automated generation pipeline for persona-modulation jailbreaks, along with transfer data across GPT-4, Claude 2 and Vicuna, which can be used to compare the generality of jailbreaks.

Paper analysis

6 questions; open one to read the full answer

  1. What problem does this paper attempt to solve?

    The authors study how to use an LLM assistant to automatically generate persona-modulation jailbreaks and attack aligned LLMs at scale.

    Core question: how to generate persona-modulation jailbreak prompts automatically and at scale, so that aligned LLMs comply with harmful instructions.

    • Problem setting: the authors state that although models such as GPT-4 and Claude 2 undergo alignment training, jailbreak prompts can still bypass safety measures; the complexity of text input and the blurry boundary between data and instructions make defense difficult.
    • Shortcomings of existing methods: manual persona modulation requires substantial human effort to design prompts for each persona; the authors state that the adversarial jailbreaks of Zou et al. and Carlini et al. are limited to single prompt-answer pairs, whereas persona modulation can enter a multi-turn unrestricted conversation mode.
    • Core observation: making the model play a specific persona that might comply with harmful instructions can induce it to output content it would refuse by default; attack success strongly depends on the chosen persona.
    • Proposed in the paper: automated persona-modulation attacks—using an LLM assistant to automatically generate personas and prompts; and a semi-automated variant with human-in-the-loop.
    • Threat model:
      • Goal: make the target model produce harmful completions for 43 categories of harmful instructions prohibited by usage policies.
      • Knowledge: black-box access to the target model (via API).
      • Capability: use an LLM assistant (which may be the same as the target model) to generate attacks; optional moderation endpoints are not enabled.
      • Victim systems: GPT-4, Claude 2, Vicuna-33B.
  2. What related research exists?

    Related work falls into three groups: safety alignment methods, jailbreak attacks, and persona guidance; the authors state that this paper covers 43 harmful categories, a larger scope than prior work.

    Safety and Alignment

    • Ouyang et al. (2022), Christiano et al. (2017), Bai et al. (2022)——RLHF: fine-tuning models with human preferences to improve helpfulness and safety, the main safety technique for models such as GPT-4, Claude 2, and Vicuna.
    • Casper et al. (2023a)——points out that RLHF fine-tuning has fundamental and technical limitations, making it difficult to use it to obtain robustly aligned systems.

    Attacks and Jailbreaks

    • Wei et al. (2023), Liu et al. (2023b;a)——manual jailbreaks that do not require model weights.
    • Carlini et al. (2023), Jones et al. (2023), Shin et al. (2020)——optimizing adversarial prompts with white-box access.
    • Zou et al. (2023)——prompts optimized on open-source models can transfer to larger proprietary models; the paper cites their results (46.9% on GPT-4, 2.1% on Claude 2) for comparison.
    • Deng et al. (2022), Perez et al. (2022), Casper et al. (2023b), Chao et al. (2023)——using LLMs to find adversarial prompts for other target models.

    Persona Guidance

    • Park et al. (2023), Shanahan et al. (2023), Joshi et al. (2023)——persona modulation: instructing an LLM to act according to a specific persona.
    • Deshpande et al. (2023)——generating toxic completions by eliciting celebrity personas; the paper notes that their success depends on the toxic traits of these celebrities in the training corpus.
    • Wolf et al. (2023)——argues that persona modulation may be a persistent problem due to fundamental limitations of alignment.

    Baselines and Positioning

    • Baselines: asking questions directly without persona modulation (sampling 20 completions per instruction); no other attack methods as baselines. The benchmark is 43 harmful categories manually compiled by the authors.
    • Positioning: the authors state that this paper uses arbitrary personas to induce restricted behaviors, is a black-box method, and studies 43 harmful categories, a scope clearly larger than prior work.
  3. How does the paper address this problem?

    Use an LLM assistant to automatically complete the four-step pipeline "category→instruction→persona→prompt", generate 15 prompts per category, and use the PICT classifier to determine harmfulness.

    Overall approach: hand the last three steps of the four-step persona modulation pipeline to an LLM assistant to complete automatically, achieving jailbreaks at scale; the method is named automated persona-modulation attacks, with an additional semi-automated variant.

    Attack pipeline (Figure 1)

    1. Define the target harmful category: e.g., "promoting disinformation campaigns".
    2. Define the misuse instruction: a specific instruction the model would refuse by default.
    3. Define the persona: a persona that might comply with that instruction; the authors state that attack success strongly depends on the chosen persona.
    4. Design the persona-modulation prompt: guide the model to play that persona; the authors state that due to safety measures, the model usually refuses to play the persona, and doing this step manually requires prompt engineering and is time-consuming.

    Automated design

    • LLM assistant: the assistant model can be the same as or different from the target model; the attacker only needs one prompt telling the assistant to act as a "research assistant" to automate steps 2–4.
    • Generation scale: sample 1 misuse instruction per harmful category; sample 5 personas for it; generate 3 persona-modulation prompts per persona, 15 per category in total.
    • Usage: persona-modulation prompts are used as the system prompt for GPT-4 and Vicuna; Claude 2 does not support system prompts, so they are used as user input.
    • zero-shot: the authors note that the prompt generation process does not involve using the target model.

    Semi-automated variant

    • human-in-the-loop: the attacker can modify the output of each stage of the automated pipeline and, after modulation, hold multi-turn conversations with the model to increase harmfulness.
    • Author estimates: manual attacks take 1–4 hours, semi-automated takes 10–30 minutes, fully automated takes seconds (at the cost of performance); Figure 5 compares the time and effectiveness of the three.

    Success determination

    • PICT classifier: use GPT-4 as a zero-shot PICT classifier (Feuillade-Montixi, 2023) to judge whether a completion contains harmful content related to the category; only the model's first reply after the misuse instruction is evaluated.
    • Metric: harmful completion rate, i.e., the percentage of completions judged harmful by PICT.
    • Classifier validation: manually annotate 300 random completions (n=120 harmful, n=180 harmless), PICT precision 0.91, recall 0.66, F1 0.76 (Table 4); about one third of harmful completions are missed, and the authors state the results constitute a lower bound on attack effectiveness.
  4. What experiments did the paper conduct?

    Three models were tested on 43 harmful categories: GPT-4 harmful completion rate 0.23%→42.48%, Claude 2 1.40%→61.03%, Vicuna-33B 0.23%→35.92%.

    Experimental setup

    • Models tested: GPT-4 (gpt-4-0613), Claude 2, Vicuna-33B; GPT-4 is also the assistant model that generates the attacks (the main target and the assistant are the same model).
    • Data: 43 manually curated harmful categories (from OpenAI usage policies; Figure 2 lists all of them).
    • Sampling: per category 1 misuse instruction × 5 personas × 3 prompts × 3 completions = 45 per category, 1,935 in total; the baseline is 20 completions per instruction without modulation; no rejection or best-of-n sampling.
    • Metric: harmful completion rate (the proportion judged harmful by PICT).
    • Evaluation method: GPT-4 as a zero-shot PICT classifier; 300 manually annotated completions for validation, precision 0.91, recall 0.66, F1 0.76 (Table 4).
    • Cost: the authors state that 45 completions for a single category cost less than 3 USD and take under 10 minutes.

    Main results

    According to Table 3 (average harmful completion rate over 43 categories):

    ModelBaseline HRPersona-modulated HR
    GPT-40.23%42.48%
    Vicuna-33B0.23%35.92%
    Claude 21.40%61.03%
    • The authors state that on GPT-4 the harmful completion rate increases to 185 times the baseline (0.23%→42.48%).
    • The same batch of prompts generated by GPT-4 is transferred directly to Claude 2 and Vicuna-33B; the authors state that although Vicuna is the smallest and most open, it is the least vulnerable to the attack.
    • The average harmful completion rate across the three models is 46.48% (last row of Table 5).

    Results by category (Table 5 / Figure 2)

    • High-effectiveness categories: the authors state that the attack is effective on all models for categories such as "promoting xenophobia" (average 96.30%), "promoting disinformation campaigns" (82.96%), and "promoting sexism" (80.74%).
    • Low-effectiveness categories: "promoting cannibalism" is 0.00% for all three models; "encouraging theft", "disseminating sexually explicit content", and "supporting revenge porn" average only 2.96%, 2.22%, and 2.22%.
    • Coverage: the authors state that 36 of the 43 categories achieved harmful completions on all three models, and 42 categories succeeded on at least one model.

    Comparison with Zou et al. (2023)

    • What was measured: the authors cite Zou et al.'s white-box transfer attack results (46.9% on GPT-4, 2.1% on Claude 2) for comparison with this paper's results.
    • Results and interpretation: this paper gives 61.03% on Claude 2, higher than their GPT-4 figure; Zou et al. speculated that their low success rate on Claude 2 stemmed from the Vicuna training data source rather than Claude 2 itself being robust, and the authors state that this paper's results support that speculation and that their attack may be stronger.

    Semi-automated attack (Section 5, Appendix E)

    • What was measured: on categories where the fully automated method performed poorly and on examples listed as successful defenses in the GPT-4 System Card, a human modifies the output of each stage and holds multi-turn conversations.
    • Results: the authors state that the semi-automated approach can induce harmful completions for almost all misuse instructions; Appendix E gives examples such as synthesizing drugs, making bombs, and money laundering (sensitive content redacted); no quantitative success rate is reported.
    • Time cost: the authors estimate manual 1–4 hours, semi-automated 10–30 minutes, fully automated seconds (Figure 5).

    Other ablations and analyses

    • Assistant model capability: in preliminary experiments, GPT-3.5 as the assistant usually cannot generate successful persona-modulation prompts (Section 6, no numbers given).
    • PICT accuracy: on 300 manual annotations, precision 0.91, recall 0.66, F1 0.76 (Table 4); about one third of harmful completions are misjudged as harmless.
  5. What are some points that can be further explored?

    The authors point out two types of limitations: instruction generation and harmfulness measurement; the experiments cover only 3 models, 43 categories, and a single classifier judgment.

    Limitations and future directions noted by the authors

    • Instruction generation limitations (Section 6): the misuse instructions GPT-4 samples for harmful categories do not always capture the intended harmful behavior; GPT-4's safety measures prevent generating very explicit instructions.
    • Harmfulness measurement limitations (Section 6): PICT has a high false-negative rate; and it does not measure other dimensions of real harm, such as whether the information is hard to obtain through traditional search engines and whether the harmful behavior can be automated.
    • Future directions (Section 6): cheap automated jailbreaks can support scalable red-teaming that does not rely on manual exploration or white-box optimization; continued research on the "model psychology" of LLMs may be valuable; the authors hope developers will make models more robust to persona-modulation attacks.

    Scope of the experiments

    • The models tested are GPT-4 (gpt-4-0613), Claude 2, and Vicuna-33B, 3 in total; the attack assistant and the evaluation classifier are both GPT-4.
    • The evaluation covers 43 harmful categories, 45 completions per category per model, 1,935 in total; the baseline is 20 completions without modulation per instruction.
    • Harmfulness is determined only by the PICT classifier; 300 manual annotations are used to validate the classifier (n=120 harmful, n=180 harmless).
    • The semi-automated attack gives only qualitative examples (Appendix E); the paper does not report its quantitative success rate or sample size.
    • The paper does not report the number of repeated experiments per category, sampling parameters such as temperature, or evaluate any defenses.
  6. Summarize the main content of the paper

    The authors propose automated persona-modulation jailbreaks; on GPT-4 the harmful completion rate went from 0.23% to 42.48%, and transferred to Claude 2 and Vicuna-33B.

    A black-box jailbreak attack paper: use an LLM assistant to automatically generate persona-modulation prompts that make aligned models play a persona willing to comply with harmful instructions.

    • Problem: manual persona modulation is time-consuming; the authors state that existing adversarial jailbreaks are mostly limited to single prompt-answer pairs.
    • Method: in the four-step pipeline (harmful category→misuse instruction→persona→prompt), the last three steps are completed automatically by a GPT-4 assistant; 15 prompts are generated per category; there is also a human-in-the-loop semi-automated variant.
    • Main results (Table 3, average over 43 categories): GPT-4 harmful completion rate 0.23%→42.48% (the authors state 185 times); the same batch of prompts transferred to Claude 2 gives 1.40%→61.03%, and to Vicuna-33B 0.23%→35.92%.
    • By category: "promoting xenophobia" averages 96.30%, "promoting cannibalism" is 0.00% (Table 5); 42 of the 43 categories succeed on at least one model.
    • Semi-automated: the authors state it covers almost all categories, with an estimated time cost of 1/25 of manual (10–30 minutes vs 1–4 hours); no quantitative success rate is given.
    • Conclusion: the authors state that existing safety measures are insufficient to stop such cheap automated attacks, the results are only a lower bound due to classifier false negatives, and more robust defenses are needed.
Read originalarxiv.org