发现扩散语言模型的潜在安全漏洞并提出针对性防护方法
Toward Safer Diffusion Language Models: Discovery and Mitigation of Priming Vulnerability
- 通过分析迭代去噪过程,发现有害词汇在中间步骤出现会诱导生成恶意输出
- 仅注入肯定性词汇即可绕过安全机制,且优化类越狱攻击在扩散模型上有效
- 提出新对齐方法,使模型从污染中间状态生成安全结果,提升鲁棒性
扩散语言模型(DLMs)通过迭代去噪并行生成标记,可降低延迟并支持双向条件。然而,其推理机制带来的安全风险尚未充分理解。本文揭示,由于迭代去噪过程,若有害查询的肯定性标记出现在中间步骤,后续去噪将被引导至生成有害响应,即使对齐模型也难以避免。因此,仅注入此类肯定性标记即可轻松绕过安全防护。此外,现有基于优化的越狱攻击也可在DLMs上成功。基于此分析,我们提出一种专为DLMs设计的安全对齐方法,训练模型在包含肯定性标记的污染中间状态下仍能生成安全输出。实验表明,该方法显著缓解了漏洞,对任务性能影响极小,并增强了对传统越狱攻击的鲁棒性。本工作强调了针对DLMs开展专门安全研究的必要性。代码已开源:https://github.com/mdl-lab/dlm-priming-vulnerability。
原文摘要 · Abstract (English)
Diffusion language models (DLMs) generate tokens in parallel through iterative denoising, which can reduce latency and enable bidirectional conditioning. However, the safety risks posed by jailbreak attacks that exploit this inference mechanism are not well understood. In this paper, we reveal that DLMs have a critical vulnerability stemming from their iterative denoising process and propose a countermeasure. Specifically, our investigation shows that if an affirmative token for a harmful query appears at an intermediate step, subsequent denoising can be steered toward a harmful response even in aligned models. As a result, simply injecting such affirmative tokens can readily bypass the safety guardrails. Furthermore, we demonstrate that the vulnerability allows existing optimization-based jailbreak attacks to succeed on DLMs. Building on this analysis, we propose a novel safety alignment method tailored to DLMs that trains models to generate safe responses from contaminated intermediate states that contain affirmative tokens. Our experiments indicate that the proposed method significantly mitigates the vulnerability with minimal impact on task performance. Furthermore, our method improves robustness against conventional jailbreak attacks. Our work underscores the need for DLM-specific safety research. Our code is available at https://github.com/mdl-lab/dlm-priming-vulnerability.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。