atlas

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

PANDAS: Improving Many-shot Jailbreaking via Positive Affirmation, Negative Demonstration, and Adaptive Sampling

ICML 2025 · Large language models › Language, safety and interpretability · approach: Jailbreak attacks and defenses · 0 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.

Proposes PANDAS, a hybrid many-shot jailbreaking method that adds positive affirmation phrases, negative demonstrations (refusal plus correction), and Bayesian-optimized topic-adaptive sampling of malicious demonstrations, and releases the ManyHarm dataset.

Problem

Many-shot jailbreaking (MSJ) raises attack success on safety-aligned LLMs by prepending hundreds of fabricated harmful Q&A turns, but its effectiveness can be further improved and its mechanisms are not well understood.

Approach

Modify MSJ's fabricated dialogue with three changes: insert affirmation phrases between turns, insert refusal-plus-correction phrases into existing demonstrations (negative demonstrations), and sample demonstrations from a topic-dependent distribution found by Bayesian optimization over the black-box jailbreak success rate.

Key results

Measured effects reported in the paper

What was changedWhereMeasuredEffect
Add positive affirmation to MSJ (ablation)MSJ on Llama-3.1-8B · AdvBenchASR-L: 86.15 -> 92.12Helped
Add negative demonstration to MSJ (ablation)MSJ on Llama-3.1-8B · AdvBenchASR-L: 86.15 -> 86.35Helped
Use adaptive sampling with MSJ (ablation)MSJ on Llama-3.1-8B · AdvBenchASR-L: 86.15 -> 87.50Helped
Add positive affirmation and negative demonstration to MSJ (ablation)MSJ on Llama-3.1-8B · AdvBenchASR-L: 86.15 -> 93.08Helped
Add positive affirmation, negative demonstration, and adaptive sampling to MSJ (ablation)MSJ on Llama-3.1-8B · AdvBenchASR-L: 86.15 -> 94.62Helped
Add positive affirmation to MSJ (ablation)MSJ on Llama-3.1-8B · HarmBenchASR-L: 66.00 -> 73.25Helped
Add negative demonstration to MSJ (ablation)MSJ on Llama-3.1-8B · HarmBenchASR-L: 66.00 -> 66.50Helped
Use adaptive sampling with MSJ (ablation)MSJ on Llama-3.1-8B · HarmBenchASR-L: 66.00 -> 66.25Helped
Add positive affirmation and negative demonstration to MSJ (ablation)MSJ on Llama-3.1-8B · HarmBenchASR-L: 66.00 -> 74.25Helped
Add positive affirmation, negative demonstration, and adaptive sampling to MSJ (ablation)MSJ on Llama-3.1-8B · HarmBenchASR-L: 66.00 -> 76.50Helped

Surprising findings

Limitations

Experimental setup

Datasets: ManyHarm AdvBench HarmBench AdvBench50

Benchmarks: AdvBench50 AdvBench HarmBench

Metrics: ASR-L ASR-R

Baselines: MSJ i-MSJ Self-Reminder ICD PPL filter Retokenization SmoothLLM

Builds on: many-shot jailbreaking i-FSJ in-context learning SmoothLLM

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