LGAICLCRFeb 9, 2024

Fight Back Against Jailbreaking via Prompt Adversarial Tuning

Peking U
arXiv:2402.06255v476 citationsh-index: 14Has CodeNIPS
AI Analysis

This addresses security vulnerabilities in LLMs for users relying on safe AI interactions, representing a novel approach to intrinsic robustness through prompt optimization.

The paper tackles the problem of jailbreaking attacks on Large Language Models by proposing Prompt Adversarial Tuning (PAT), which trains a guard prefix to reduce the success rate of advanced attacks to nearly 0% while maintaining utility and low computational overhead.

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.

Code Implementations2 repos
Foundations

The foundational work for this paper's niche, ranked by how specifically the neighbourhood builds on it — not by global fame.

Your Notes