arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2412.17522cs.CL
收藏

DiffusionAttacker:用于 LLM 越狱的扩散驱动提示词操纵

DiffusionAttacker: Diffusion-Driven Prompt Manipulation for LLM Jailbreak

Beihang University(北京航空航天大学);Tsinghua University(清华大学);Zhongguancun Laboratory(中关村实验室)

Hao Wang, Hao Li, Junda Zhu, Xinyuan Wang, Chengwei Pan, MinLie Huang, Lei Sha

AI总结:

提出 DiffusionAttacker,用 seq2seq 文本扩散模型和攻击损失引导提示词改写,并结合 Gumbel-Softmax 实现可微采样,在 Advbench 与 Harmbench 上提升 ASR、流畅性和多样性。

摘要:

当大型语言模型(LLM)接收到精心构造的输入提示时,容易生成有害内容,这一漏洞被称为 LLM 越狱。随着 LLM 变得越来越强大,研究越狱方法对于增强安全性并使模型与人类价值观保持一致至关重要。传统上,越狱技术依赖于后缀添加或提示词模板,但这些方法存在攻击多样性有限的问题。本文介绍了 DiffusionAttacker,这是一种受扩散模型启发、用于越狱改写的端到端生成方法。该方法采用序列到序列(seq2seq)文本扩散模型作为生成器,以原始提示词为条件,并使用一种新的攻击损失引导去噪过程。以往方法使用自回归 LLM 生成越狱提示词,限制了对已生成 token 的修改并约束了改写空间;与之不同,DiffusionAttacker 利用 seq2seq 扩散模型,允许更灵活的 token 修改。该方法在产生有害内容的同时保留原始提示词的语义内容。此外,我们利用 Gumbel-Softmax 技术,使从扩散模型输出分布中采样的过程可微,从而无需迭代式 token 搜索。在 Advbench 和 Harmbench 上进行的大量实验表明,DiffusionAttacker 在包括攻击成功率(ASR)、流畅性和多样性在内的多种评估指标上均优于以往方法。

英文摘要:

Large Language Models (LLMs) are susceptible to generating harmful content when prompted with carefully crafted inputs, a vulnerability known as LLM jailbreaking. As LLMs become more powerful, studying jailbreak methods is critical to enhancing security and aligning models with human values. Traditionally, jailbreak techniques have relied on suffix addition or prompt templates, but these methods suffer from limited attack diversity. This paper introduces DiffusionAttacker, an end-to-end generative approach for jailbreak rewriting inspired by diffusion models. Our method employs a sequence-to-sequence (seq2seq) text diffusion model as a generator, conditioning on the original prompt and guiding the denoising process with a novel attack loss. Unlike previous approaches that use autoregressive LLMs to generate jailbreak prompts, which limit the modification of already generated tokens and restrict the rewriting space, DiffusionAttacker utilizes a seq2seq diffusion model, allowing more flexible token modifications. This approach preserves the semantic content of the original prompt while producing harmful content. Additionally, we leverage the Gumbel-Softmax technique to make the sampling process from the diffusion model's output distribution differentiable, eliminating the need for iterative token search. Extensive experiments on Advbench and Harmbench demonstrate that DiffusionAttacker outperforms previous methods across various evaluation metrics, including attack success rate (ASR), fluency, and diversity.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑