· Masked / discrete diffusion, Controllability · Source

Activation Steering for Masked Diffusion Language Models

SourceFull paper

Article overview

Verdict

The work shows that one-pass contrastive activation steering can substantially weaken MDLM refusal behavior at inference time. The effect is robust within the tested MDLMs and languages, but architecture-dependent and exposes a clear alignment vulnerability.

Main idea

A normalized activation-difference direction is extracted from harmful and harmless prompt sets, then the residual-activation component along that direction is removed during reverse diffusion.

Mechanism

Supported specification: the state consists of residual activations across layers, token positions, and reverse-diffusion steps. Candidate features are structural chat-template positions before the user prompt and offsets after it. For each layer and position, compute the harmful-prompt mean activation minus the harmless-prompt mean activation, then normalize the difference. Select one layer-position vector on validation prompts; during generation, apply that vector uniformly across layers and positions before masked-token updates at every reverse-diffusion step. Early steps, the first block, and middle-to-late layers matter most; ranges 9–24 or 9–32 recover most of the full effect. The records do not specify the exact selection objective, dataset sizes, or selection thresholds. Reproduction: (1) assemble contrastive harmful/harmless prompts; (2) run one forward pass and collect means at candidate positions; (3) normalize differences and select a vector by validation performance; (4) remove its projection during reverse diffusion; (5) test positions, layers, steps, languages, and architectures separately.

What this is useful for

The method applies as a lightweight, parameter-free auditing and alignment-analysis tool for MDLMs, especially for studying refusal behavior, language transfer, and diffusion-step dependence. It is useful for testing multiple MDLMs and locating sensitive layers and positions.

Risks / not proven

The effect is architecture-limited: the LLADA vector does not transfer to Meta-Llama-3. Results are demonstrated on three MDLMs and the stated datasets, so broader generalization across models, tasks, and languages is unestablished. The method is dual-use and can bypass safety mechanisms. The records omit details needed to assess statistical robustness, including sample sizes and exact selection criteria.

Full abstract

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.

Source

BibTeX · RIS · Markdown · JSON