Manuscript Offprint

arXiv:2609.00495

Beyond Token Positions: Safety Alignment Across Denoising Steps in Diffusion Language Models

Guoli Wang, Haonan Shi, Tu Ouyang, An Wang

Abstract

Diffusion large language models (dLLMs) generate text through iterative denoising rather than left-to-right decoding. This generation paradigm introduces two axes that can influence safety alignment: when tokens are generated during denoising and where they appear in the response. In this paper, we measure dLLM safety behavior under harmful prompts by tracing intermediate token distributions and commitment decisions throughout denoising. Our analysis shows that refusal signals are concentrated in early denoising steps and leading response positions, and the tokens committed early can strongly shape the final safety outcome. Our measurements further show that the denoising step and persistence of refusal-token commitment are important for understanding dLLM safety. Based on these findings, we propose Refusal-Aware Early Commitment (RAEC), a simple training-free decoding method that commits persistent refusal signals from early steps. Experiments on LLaDA and Dream show that RAEC reduces attack success rates while largely preserving utility. The code is available at https://github.com/Glresearch1/RAEC.

Warning: this paper contains example data that may be offensive or harmful.

1 Introduction

Diffusion large language models (dLLMs) (Nie et al., 2025; Ye et al., 2025; Yang et al., 2025) have recently emerged as a promising alternative to autoregressive LLMs (Zhao et al., 2026), generating text through iterative denoising rather than left-to-right token prediction (Nie et al., 2025; Ye et al., 2025). This shift in the generation paradigm changes more than decoding efficiency. For autoregressive models, the temporal order of generation is tied to the surface order of the response, the first

generated tokens are also the first response tokens. For dLLMs, generation proceeds by repeatedly predicting token distributions over multiple positions and committing only a subset of still-masked positions at each denoising step. As a result, when a token is generated during denoising steps and where it appears in the response position become two distinct dimensions when examining the generation.

This distinction raises an important question for safety alignment. Prior work on autoregressive LLMs has shown that safety behavior can be highly sensitive to response tokens generated in leading positions of the sequence, a phenomenon referred to as shallow alignment (Qi et al., 2025). However, the same notion might not directly transfer to dLLMs. An early denoising step may commit tokens at any position in the sequence, while an early response token position may remain masked until late in the denoising process. This motivates us to systematically measure refusal behavior in dLLMs under harmful prompts, examining how refusal-related signals emerge across denoising steps and response positions, how early commitments affect final safety, and why such signals sometimes fail to be committed in unsafe generations.

Our measurements reveal a diffusion-specific form of shallow alignment, which we call shallow-step alignment. Unlike autoregressive LLMs, where shallow alignment is tied to leading response positions, dLLMs introduce denoising steps as an additional safety-sensitive dimension. We find that tokens emerging in the early denoising steps can strongly shape final safety: early refusal commitment makes an unaligned base dLLM substantially safer, while early compliance commitment can steer an aligned dLLM toward unsafe compliance. This effect is strongest at leading response positions but remains visible even when the committed tokens appear later, indicating that early denoising steps independently influence dLLM safety.

*Equal contribution. †Corresponding author.

This observation raises a further question: if early refusal commitment can improve safety, why does standard decoding still produce unsafe responses? Our analysis shows that unsafe trajectories do not necessarily lack refusal evidence. Instead, refusal signals often emerge during denoising, but remain weak, transient, or are overwritten before commitment. In contrast, safe trajectories exhibit stronger and more persistent refusal mass, with refusal tokens committed at much higher rates. Thus, safety failures in dLLMs are not solely due to the absence of refusal signals, but also to their failure to persist until commitment.

This insight motivates a simple decoding principle: when a refusal signal appears early and remains sufficiently strong, the model should commit it before later denoising dynamics overwrite it. We instantiate this principle as Refusal-Aware Early Commitment (RAEC), a training-free decoding method that modifies only the commitment decision without changing model parameters. Across the safety evaluation benchmarks, RAEC reduces attack success rates on LLaDA and Dream while largely preserving utility.

Our contributions are summarized as follows: (1) we introduce a step-wise and position-wise measurement framework for measuring refusal behavior in dLLMs beyond final outputs; (2) we identify shallow-step alignment, showing that early denoising commitments introduce an additional safety-sensitive dimension alongside leading response positions in dLLMs; (3) we show that unsafe generations in dLLMs actually often contain refusal signals, but these signals are weak, transient, and fail to persist until commitment; and (4) we propose RAEC, a training-free decoding method that improves dLLM safety by early-committing persistent refusal signals.

References (15)