The Tokens Strike Back: Safety-Aware Denoising with Directional Embedding-based Revision

Amman Yusuf, Jiwoo Shin, Ruizhi Deng, Heitor Rodrigues Guimarães, Nikita Dvornik +1 more
10/13/2026
cs.LGcs.AI
diffusion-flow

No confident code implementation found for this paper.

Abstract

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.

Show full abstract

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.

View on arXivView PDF

Code Implementations

No confident code match yet

We couldn't find an author-owned or strongly-evidenced community implementation for this paper. Any repos shown below are weak matches — verify before relying on them.

No code implementations found yet.

Know of an implementation? Let us know in the comments below!

Similar Papers

Cite this paper

@article{yusuf2026tokens,
  title  = {The Tokens Strike Back: Safety-Aware Denoising with Directional Embedding-based Revision},
  author = {Amman Yusuf and Jiwoo Shin and Ruizhi Deng and Heitor Rodrigues Guimarães and Nikita Dvornik and Mijung Park},
  year   = {2026},
  eprint = {2610.17636},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2610.17636v1}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2610.17636.svg)](https://codeofpaper.com/paper/2610.17636)

Discussion