激活引导用于掩码扩散语言模型
Activation Steering for Masked Diffusion Language Models
AI总结:
本文提出激活引导方法,通过提取对比提示集的低维方向,实现对MDLMs推理过程的控制,展示了在安全拒绝任务中的有效性及跨语言迁移能力。
摘要:
掩码扩散语言模型(MDLMs)通过迭代掩码令牌去噪生成文本,实现了并行解码和与自回归LLMs不同的可控性和效率权衡。然而,MDLMs在推理时间控制方面的高效表征机制仍鲜有探索。为此,我们引入了MDLMs的激活引导原语:通过单次仅提示的前向传递从对比提示集提取单个低维方向,并在反向扩散过程中对残差流激活进行全局干预,而无需进行优化或改变扩散采样过程。以安全拒绝作为部署相关的案例研究,我们发现多个MDLMs的拒绝行为由一致的近似一维激活子空间控制。应用相应方向可产生显著且系统的行为变化,并比基于提示和优化的基线更有效。我们进一步揭示了扩散特定的可访问性:有效方向不仅可从后指令令牌中提取,也可从通常在自回归模型中无效的前指令令牌中提取,因为这些令牌受因果注意力影响。消融研究将最大杠杆作用定位到早期去噪步骤和中后期Transformer层,其中早期扩散块贡献显著。最后,在一个同时用英语和中文训练的MDLM中,提取的方向在英语和中文之间具有强迁移性,但无法可靠地推广到自回归架构,突显了安全约束的架构依赖性表征。
英文摘要:
Masked diffusion language models (MDLMs) generate text via iterative masked-token denoising, enabling mask-parallel decoding and distinct controllability and efficiency tradeoffs from autoregressive LLMs. Yet, efficient representation-level mechanisms for inference-time control in MDLMs remain largely unexplored. To address this gap, we introduce an activation steering primitive for MDLMs: we extract a single low-dimensional direction from contrastive prompt sets using one prompt-only forward pass, and apply a global intervention on residual-stream activations throughout reverse diffusion, without performing optimization or altering the diffusion sampling procedure. Using safety refusal as a deployment-relevant case study, we find that refusal behavior in multiple MDLMs is governed by a consistent, approximately one-dimensional activation subspace. Applying the corresponding direction yields large and systematic behavioral shifts and is substantially more effective than prompt-based and optimization-based baselines. We further uncover diffusion-specific accessibility: effective directions can be extracted not only from post-instruction tokens, but also from pre-instruction tokens that are typically ineffective in autoregressive models due to causal attention. Ablations localize maximal leverage to early denoising steps and mid-to-late transformer layers, with early diffusion blocks contributing disproportionately. Finally, in an MDLM trained on English and Chinese, extracted directions transfer strongly between English and Chinese, but do not reliably generalize to an autoregressive architecture, highlighting architecture-dependent representations of safety constraints.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。