令牌的反击:基于方向嵌入修正的安全感知去噪
The Tokens Strike Back: Safety-Aware Denoising with Directional Embedding-based Revision
AI总结:
本文提出SADDER方法,改进了SAD的安全与质量权衡,经在MDLMs和USDMs的不安全续写、越狱场景测试,其在安全、质量与推理成本间的平衡优于现有方法。
摘要:
安全感知去噪器(Safety-Aware Denoiser, SAD)是一种近期提出的、无需训练的文本扩散模型安全引导框架,在推理过程中,SAD可将文本样本引导至令牌概率空间的安全区域。本文提出SADDER(Safety-Aware Denoising with Directional Embedding-based Revision,基于方向嵌入修正的安全感知去噪),该方法通过为每个令牌位置利用嵌入(或激活)空间中的安全引导信号,再将SAD更新规则乘以该引导信号来更新令牌位置,从而改善SAD在安全性与质量间的权衡。该乘法起到门控机制的作用:具有高不安全信号的令牌在推理过程中更易按照SAD更新规则被修改。然而,此类更新无法自动保留条件均值,即固定目标分布的去噪器。因此,我们从理论上推导了新的逐位置目标分布,使修改后的去噪器是精确的;此外,我们还推导了逐位置目标分布匹配全局目标分布的条件。我们在流行的掩码扩散语言模型(Masked Diffusion Language Models, MDLMs)和均匀状态扩散模型(Uniform-State Diffusion Models, USDMs)上,针对不安全续写和越狱场景测试了SADDER方法,结果表明,与现有方法相比,SADDER在安全性、生成质量和推理成本之间实现了更好的平衡。
英文摘要:
The Safety-Aware Denoiser (SAD) is a recent, training-free, safety-guidance framework for text diffusion models. During inference, SAD steers text samples toward safe regions of the token probability space. In this paper, we propose $\mathit{SADDER}$ (Safety-Aware Denoising with Directional Embedding-based Revision), which improves the safety and quality trade-offs of SAD by exploiting a safety-guidance signal in the embedding (or activation) space for each token position, then updating the token positions using the SAD update rule multiplied by the guidance signal. This multiplication acts as a gating mechanism: tokens with a high unsafe signal are more likely to be modified during inference following the SAD update rule. However, such an update does not automatically preserve the conditional mean, i.e., the denoiser of a fixed target distribution. We therefore theoretically derive new position-wise target distributions for which the modified denoiser is exact. Furthermore, we derive conditions under which the position-wise target distributions match a global target distribution. We test our $\mathit{SADDER}$ method on popular Masked Diffusion Language Models (MDLMs) and Uniform-State Diffusion Models (USDMs) across unsafe continuation and jailbreak settings, and show that $\mathit{SADDER}$ achieves a better balance between safety, generation quality, and inference cost than existing methods.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。