arXiv cs.CL· Yejin Lee, Ungsik Kim, Yo-Sub Han·· 13 小时前AI 评分31
扩散语言模型安全生成的自适应引导与重掩码方法
Adaptive Steering and Remasking for Safe Generation in Diffusion Language Models
AI 导读
研究者提出一种推理时防御框架,将自适应安全引导与安全感知重掩码结合,用于扩散语言模型(DLM)的安全生成。该方法用门控方向根据当前去噪状态持续调整引导强度,并在首个生成块后接入轻量响应检测器,早期识别不安全轨迹并对生成内容及部分条件提示词做定向重掩码。在 LLaDA 和 Dream 上的实验显示,该方法提升了对多种越狱攻击的鲁棒性,同时保持良性生成质量与通用模型能力,且无需修改模型参数。
正文 · 原文
Abstract:Diffusion Language Models(DLMs) provide a promising alternative to autoregressive language models through iterative denoising and bidirectional generation. However, their iterative generation process introduces distinct safety vulnerabilities because harmful content can emerge at arbitrary positions and persist across subsequent denoising steps. Existing defenses rely on fixed interventions or aggressive remasking, which limits adaptive control over denoising trajectories and can degrade generation quality. We propose an inference-time defense framework that combines adaptive safety steering with safety-aware remasking. Our method uses a gating direction to continuously adjust steering strength from the current denoising state and applies a steering direction to masked positions to guide subsequent predictions toward safer trajectories. Our method further employs a lightweight response detector after the first generation block to identify unsafe trajectories at an early stage. The detector triggers targeted remasking over generated content and part of the conditioning prompt, and the model regenerates the selected positions under adaptive safety steering. This design combines continuous trajectory control with explicit correction of unsafe content while requiring no modification of model parameters. Experiments on LLaDA and Dream demonstrate that our method improves robustness against diverse jailbreak attacks while preserving benign generation quality and general model capability. Our code is available at this https URL.
| Comments: | 23 pages, 5 figures |
| Subjects: | Computation and Language (cs.CL) |
| MSC classes: | 68T50 |
| ACM classes: | I.2.7 |
| Cite as: | arXiv:2605.13043 [cs.CL] |
| (or arXiv:2605.13043v3 [cs.CL] for this version) | |
| https://doi.org/10.48550/arXiv.2605.13043 arXiv-issued DOI via DataCite |
Submission history
From: Yejin Lee [view email]
[v1]
Wed, 13 May 2026 05:56:45 UTC (237 KB)
[v2]
Thu, 1 Oct 2026 04:41:47 UTC (334 KB)
[v3]
Wed, 21 Oct 2026 04:56:49 UTC (335 KB)
来源:arXiv cs.CL · arxiv.org