Lune

NeurIPS2024Top-tier venue

Fight Back Against Jailbreaking via Prompt Adversarial Tuning

Yichuan Mo, Yuji Wang, Zeming Wei, Yisen Wang

Abstract

While Large Language Models (LLMs) have achieved tremendous success in various applications, they are also susceptible to jailbreaking attacks. Several primary defense strategies have been proposed to protect LLMs from producing harmful information, mostly focusing on model fine-tuning or heuristical defense designs. However, how to achieve intrinsic robustness through prompt optimization remains an open problem. In this paper, motivated by adversarial training paradigms for achieving reliable robustness, we propose an approach named Prompt Adversarial Tuning (PAT) that trains a prompt control attached to the user prompt as a guard prefix. To achieve our defense goal whilst maintaining natural performance, we optimize the control prompt with both adversarial and benign prompts. Comprehensive experiments show that our method is effective against both grey-box and black-box attacks, reducing the success rate of advanced attacks to nearly 0%, while maintaining the model's utility on the benign task and incurring only negligible computational overhead, charting a new perspective for future explorations in LLM security. Our code is available at https://github.com/PKU-ML/PAT.

Ask Lune

Know this paper in minutes, not an afternoon.

Lune can read every page of it and the top-tier papers that cite it, and gives you its claims, its evidence and its limits, each one cited to the paper it comes from. No skimming, no AI slop.

27 top-tier papers have cited it since. Know what they found before your reviewers do.

Questions to start from

Lune can draw on

the full paper · the top-tier papers that cite it · related work

Get the answer

Free to start. No credit card required.

Lineage

  • Sok: Evaluating Jailbreak Guardrails for Large Language Models cites Training language models to follow instructions with human feedback
  • Sok: Evaluating Jailbreak Guardrails for Large Language Models cites Robust Prompt Optimization for Defending Language Models Against Jailbreaking Attacks
  • A Theoretical Understanding of Self-Correction through In-context Alignment cites Training language models to follow instructions with human feedback
  • Adversarial Weight Perturbation Helps Robust Generalization cites Improving Adversarial Robustness Requires Revisiting Misclassified Examples
  • Multi-step Jailbreaking Privacy Attacks on ChatGPT cites Training language models to follow instructions with human feedback
  • When Adversarial Training Meets Vision Transformers: Recipes from Training to Architecture cites Adversarial Weight Perturbation Helps Robust Generalization
  • When Adversarial Training Meets Vision Transformers: Recipes from Training to Architecture cites Improving Adversarial Robustness Requires Revisiting Misclassified Examples
  • Robust Prompt Optimization for Defending Language Models Against Jailbreaking Attacks cites Training language models to follow instructions with human feedback
Builds onCited byLeft to right by year; the more cited, the higher.

Cited by top-tier papers27

  1. Robust Prompt Optimization for Defending Language Models Against Jailbreaking AttacksAndy Zhou, Bo Li, Haohan WangNeurIPS 2024 · 198 citations
  2. A Theoretical Understanding of Self-Correction through In-context AlignmentYifei Wang, Yuyang Wu, Zeming Wei, Stefanie Jegelka et al.NeurIPS 2024 · 69 citations
  3. Jailbreak Large Vision-Language Models Through Multi-Modal LinkageYu Wang, Xiaofei Zhou, Yichen Wang, Geyuan Zhang et al.ACL 2025 · 51 citations
  4. Sok: Evaluating Jailbreak Guardrails for Large Language ModelsXunguang Wang, Zhenlan Ji, Wenxuan Wang, Zongjie Li et al.S&P 2026 · 27 citations
  5. AudioTrust: Benchmarking The Multifaceted Trustworthiness of Audio Large Language ModelsKai Li, Can Shen, Yile Liu, Jirui Han et al.ICLR 2026 · 17 citations

Builds on7

  1. Training language models to follow instructions with human feedbackLong Ouyang, Jeffrey Wu, Xu Jiang, Diogo Almeida et al.NeurIPS 2022 · 24,707 citations
  2. Adversarial Weight Perturbation Helps Robust GeneralizationDongxian Wu, Shu-Tao Xia, Yisen WangNeurIPS 2020 · 917 citations
  3. Improving Adversarial Robustness Requires Revisiting Misclassified ExamplesYisen Wang, Difan Zou, Jinfeng Yi, James Bailey et al.ICLR 2020 · 829 citations
  4. Multi-step Jailbreaking Privacy Attacks on ChatGPTHaoran Li, Dadi Guo, Wei Fan, Mingshi Xu et al.EMNLP Findings 2023 · 204 citations
  5. When Adversarial Training Meets Vision Transformers: Recipes from Training to ArchitectureYichuan Mo, Dongxian Wu, Yifei Wang, Yiwen Guo et al.NeurIPS 2022 · 109 citations

Related papers

  1. 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 citations
  2. Short-length Adversarial Training Helps LLMs Defend Long-length Jailbreak Attacks: Theoretical and Empirical EvidenceShaopeng Fu, Liang Ding, Jingfeng Zhang, Di WangNeurIPS 2025 · 15 citations
  3. Defending Against Alignment-Breaking Attacks via Robustly Aligned LLMBochuan Cao, Yuanpu Cao, Lu Lin, Jinghui ChenACL 2024 · 34 citations
  4. Dynamic Deep Prompt Optimization for Defending Against Jailbreak Attacks on LLMsDoniyorkhon Obidov, Honggang Yu, Xiaolong Guo, Kaichen YangAAAI 2026
  5. AdvPrompter: Fast Adaptive Adversarial Prompting for LLMsAnselm Paulus, Arman Zharmagambetov, Chuan Guo, Brandon Amos et al.ICML 2025
Dusk over the sea between two cliffs drawn in fine vertical lines