atlas

Research map / Large language models / Language, safety and interpretability

Many-shot Jailbreaking

NeurIPS 2024 · Large language models › Language, safety and interpretability · approach: Jailbreak elicitation and risk · 21 citations (OpenAlex)

Read the paperCheck your idea against 108,967 papers

AI-extracted summary. Written by AI from the paper's full text. Numbers and claims can be wrong or missing context, so check the paper before you cite or build on it.

Shows that many-shot jailbreaking (prompting LLMs with hundreds of harmful demonstrations in long context) succeeds with power-law scaling in shot count across models and tasks, and that standard SL/RL mitigations shift the intercept but not the exponent.

Problem

Long-context windows open a new attack surface: whether many harmful in-context demonstrations can jailbreak aligned LLMs, how this effectiveness scales with the number of shots, and whether standard alignment and prompt-based mitigations can prevent it.

Approach

Scales few-shot jailbreaking to hundreds of shots using a helpful-only model to generate harmful demonstrations, finds that attack effectiveness (negative log-probability of harmful completion) follows a power law in number of shots, and uses this scaling-law view to evaluate mitigations by their effect on the intercept versus exponent.

Key results

Measured effects reported in the paper

What was changedWhereMeasuredEffect
prepend refusal demonstrations with In-Context DefenseMSJ on Claude 2.0 · Malicious use cases, deception category, 205-shot promptattack success rate: 61% to 54%Hurt
prepend and append Cautionary Warning Defense textMSJ on Claude 2.0 · Malicious use cases, deception category, 205-shot promptattack success rate: 61% to 2%Hurt
swap the user and assistant tags (ablation)MSJ on Claude 2.0 · Opportunities to InsultNLL of harmful responseMixed
translate the user and assistant tags (ablation)MSJ on Claude 2.0 · Opportunities to InsultNLL of harmful responseMixed
replace user-assistant tags with Question and Answer (ablation)MSJ on Claude 2.0 · Opportunities to InsultNLL of harmful responseMixed
use diverse demonstrations from all categories except the target category (ablation)MSJ on Claude 2.0 · Malicious use cases, deception targetharmful response rateHelped
use demonstrations narrowly sampled from discrimination only (ablation)MSJ on Claude 2.0 · Malicious use cases, deception targetharmful response rateHurt
compose MSJ with the competing-objectives black-box attack (ablation)MSJ on Claude 2.0 · Malicious use cases, regulated contentharmful response probabilityHelped
compose MSJ with a GCG adversarial suffix (ablation)MSJ on Claude 2.0 · Malicious use casesharmful response probabilityMixed
increase model size (ablation)Claude 2.0 model family · Opportunities to InsultNLL of harmful responseHelped
apply supervised learning or reinforcement learning alignment training (ablation)MSJ · Insults and deceptionNLL of harmful responseMixed
fine-tune on examples of benign responses to MSJ prompts (ablation)MSJ · Harmful requestsNLL of harmful responseMixed

Surprising findings

Limitations

Experimental setup

Datasets: Malicious Use Cases (generated by helpful-only model) Opportunities to Insult (generated from helpfulness preference model questions) Malevolent personality evals (Perez et al., 2022) LogiQA TruthfulQA Winogrande TriviaQA CommonsenseQA CREAK HarmBench

Benchmarks: Malicious Use Cases Malevolent Personality Evals (psychopathy) Opportunities to Insult HarmBench

Metrics: % harmful responses negative log-likelihood of harmful response power-law exponent and intercept

Baselines: few-shot jailbreaking competing objectives attack GCG suffix In-Context Defense HarmBench jailbreak methods

Builds on: few-shot jailbreaking (Rao et al., 2023) in-context attack (Wei et al., 2023) competing objectives attack (Wei et al., 2023) GCG (Zou et al., 2023) in-context defense (Wei et al., 2023)

Closest papers by meaning

Writing a paper in this area? scime draft is a free LaTeX editor with AI included, real-time co-authors and a check of your references and venue rules before you submit. It also imports OpenAI Prism projects.

Open scime draft

Get the next scime Dispatch and a monthly field update

Free. We send a confirmation link first; every email has a one-click unsubscribe. Privacy