Improved Few-Shot Jailbreaking Can Circumvent Aligned Language Models and Their Defenses
Xiaosen Zheng, Tianyu Pang, Chao Du, Qian Liu, Jing Jiang, Min Lin
摘要
Recently, Anil et al. (2024) show that many-shot (up to hundreds of) demonstrations can jailbreak state-of-the-art LLMs by exploiting their long-context capability. Nevertheless, is it possible to use few-shot demonstrations to efficiently jailbreak LLMs within limited context sizes? While the vanilla few-shot jailbreaking may be inefficient, we propose improved techniques such as injecting special system tokens like [/INST] and employing demo-level random search from a collected demo pool. These simple techniques result in surprisingly effective jailbreaking against aligned LLMs (even with advanced defenses). For examples, our method achieves>80% (mostly>95%) ASRs on Llama-2-7B and Llama-3-8B without multiple restarts, even if the models are enhanced by strong defenses such as perplexity detection and/or SmoothLLM, which is challenging for suffix-based jailbreaking. In addition, we conduct comprehensive and elaborate (e.g., making sure to use correct system prompts) evaluations against other aligned LLMs and advanced defenses, where our method consistently achieves nearly 100% ASRs. Our code is available at https://github.com/sail-sg/I-FSJ.
问 Lune
几分钟读透这篇 Paper,不用再花一下午。
Lune 能读完全文,也能读引用它的顶会 Paper,讲清它的结论、证据和局限,每一点都注明出自哪篇 Paper。不用硬啃,也不靠猜。
已有 20 篇顶会 Paper 引用了它。别等审稿人问起,先弄清它们发现了什么。
脉络
- GuidedBench: Measuring and Mitigating the Evaluation Discrepancies of In-the-wild LLM Jailbreak Methods 引用了 Tree of Attacks: Jailbreaking Black-Box LLMs Automatically
- GuidedBench: Measuring and Mitigating the Evaluation Discrepancies of In-the-wild LLM Jailbreak Methods 引用了 Catastrophic Jailbreak of Open-source LLMs via Exploiting Generation
- GuidedBench: Measuring and Mitigating the Evaluation Discrepancies of In-the-wild LLM Jailbreak Methods 引用了 AutoDAN: Generating Stealthy Jailbreak Prompts on Aligned Large Language Models
- Lifelong Safety Alignment for Language Models 引用了 AutoDAN: Generating Stealthy Jailbreak Prompts on Aligned Large Language Models
- Tree of Attacks: Jailbreaking Black-Box LLMs Automatically 引用了 AutoDAN: Generating Stealthy Jailbreak Prompts on Aligned Large Language Models
- Catastrophic Jailbreak of Open-source LLMs via Exploiting Generation 引用了 Language Models are Few-Shot Learners
- Catastrophic Jailbreak of Open-source LLMs via Exploiting Generation 引用了 Training language models to follow instructions with human feedback
- MixAT: Combining Continuous and Discrete Adversarial Training for LLMs 引用了 Tree of Attacks: Jailbreaking Black-Box LLMs Automatically
- MixAT: Combining Continuous and Discrete Adversarial Training for LLMs 引用了 AutoDAN: Generating Stealthy Jailbreak Prompts on Aligned Large Language Models
- Training language models to follow instructions with human feedback 引用了 Language Models are Few-Shot Learners
- AdvPrefix: An Objective for Nuanced LLM Jailbreaks 引用了 Tree of Attacks: Jailbreaking Black-Box LLMs Automatically
- AdvPrefix: An Objective for Nuanced LLM Jailbreaks 引用了 Catastrophic Jailbreak of Open-source LLMs via Exploiting Generation
- AdvPrefix: An Objective for Nuanced LLM Jailbreaks 引用了 Training language models to follow instructions with human feedback
- AdvPrefix: An Objective for Nuanced LLM Jailbreaks 引用了 AutoDAN: Generating Stealthy Jailbreak Prompts on Aligned Large Language Models
- AutoDAN: Generating Stealthy Jailbreak Prompts on Aligned Large Language Models 引用了 Training language models to follow instructions with human feedback
引用它的顶会 Paper20
- AdvPrefix: An Objective for Nuanced LLM JailbreaksSicheng Zhu, Brandon Amos, Yuandong Tian, Chuan Guo 等NeurIPS 2025 · 25 次引用
- Lifelong Safety Alignment for Language ModelsHaoyu Wang, Yifei Zhao, Zeyu Qin, Chao Du 等NeurIPS 2025 · 18 次引用
- PIG: Privacy Jailbreak Attack on LLMs via Gradient-based Iterative In-Context OptimizationYidan Wang, Yanan Cao, Yubing Ren, Fang Fang 等ACL 2025 · 12 次引用
- MixAT: Combining Continuous and Discrete Adversarial Training for LLMsCsaba Dékány, Stefan Balauca, Dimitar I. Dimitrov, Robin Staab 等NeurIPS 2025 · 12 次引用
- GuidedBench: Measuring and Mitigating the Evaluation Discrepancies of In-the-wild LLM Jailbreak MethodsRuixuan Huang, Xunguang Wang, Zongjie Li, Daoyuan Wu 等ICLR 2026 · 11 次引用
它引用的 Paper28
- Language Models are Few-Shot LearnersTom B. Brown, Benjamin Mann, Nick Ryder, Melanie Subbiah 等NeurIPS 2020 · 64,255 次引用
- Training language models to follow instructions with human feedbackLong Ouyang, Jeffrey Wu, Xu Jiang, Diogo Almeida 等NeurIPS 2022 · 24,707 次引用
- Tree of Attacks: Jailbreaking Black-Box LLMs AutomaticallyAnay Mehrotra, Manolis Zampetakis, Paul Kassianik, Blaine Nelson 等NeurIPS 2024 · 835 次引用
- AutoDAN: Generating Stealthy Jailbreak Prompts on Aligned Large Language ModelsXiaogeng Liu, Nan Xu, Muhao Chen, Chaowei XiaoICLR 2024 · 722 次引用
- Catastrophic Jailbreak of Open-source LLMs via Exploiting GenerationYangsibo Huang, Samyak Gupta, Mengzhou Xia, Kai Li 等ICLR 2024 · 481 次引用
相关 Paper
- Short-length Adversarial Training Helps LLMs Defend Long-length Jailbreak Attacks: Theoretical and Empirical EvidenceShaopeng Fu, Liang Ding, Jingfeng Zhang, Di WangNeurIPS 2025 · 15 次引用
- Defensive Prompt Patch: A Robust and Generalizable Defense of Large Language Models against Jailbreak AttacksChen Xiong, Xiangyu Qi, Pin-Yu Chen, Tsung-Yi HoACL Findings 2025 · 9 次引用
- What Really Matters in Many-Shot Attacks? An Empirical Study of Long-Context Vulnerabilities in LLMsSangyeop Kim, Yohan Lee, Yongwoo Song, Kimin LeeACL 2025
- Robust Prompt Optimization for Defending Language Models Against Jailbreaking AttacksAndy Zhou, Bo Li, Haohan WangNeurIPS 2024 · 198 次引用
- Virtual Context Enhancing Jailbreak Attacks with Special Token InjectionYuqi Zhou, Lin Lu, Ryan Sun, Pan Zhou 等EMNLP Findings 2024 · 8 次引用
