← Personal site / Activation Steering
ReALM-GEN @ ICLR 2026 / Masked Diffusion Language Models
arXiv:2512.24143

Activation Steering for Masked Diffusion Language Models

We introduce an activation steering method for masked diffusion language models that extracts a low-dimensional direction from contrastive prompts and applies it during reverse diffusion at inference time.

Direction extraction
Harmful prompts
μharmful
Harmless prompts
μharmless
v = normalize(μharmful − μharmless)
Candidate structural source positions: Pre-instruction Post-instruction
Inference-time steering
t = T
prompt [MASK] [MASK] [MASK] [MASK]
v residual-stream
intervention
t ↓
prompt [MASK] partial [MASK] response
v residual-stream
intervention
t = 0
prompt generated response …
v residual-stream
intervention
Global application: the selected direction is reused during reverse diffusion. layers · token positions · denoising steps
Extraction uses prompt activations only The intervention acts on hidden representations, not on the token sequence
01 / Contributions

Key contributions

We introduce a representation-level activation steering method for masked diffusion language models and characterize steering behavior across token position, denoising time, transformer depth, language, and model architecture.

01

Representation-level control for MDLMs

Existing diffusion-language-model control work largely operates at the sampling level. We adapt activation steering to masked diffusion, intervening directly on residual-stream representations during reverse diffusion.

02

Prompt-only direction extraction

The steering direction is estimated from contrastive prompts using a single unmasked forward pass. Extraction does not simulate the denoising trajectory, and deployment requires no gradient optimization or sampler modification.

03

Global application of a selected direction

A direction selected from one layer–token source is reused as a global intervention across layers, token positions, and reverse-diffusion steps, producing large and systematic behavioral shifts.

04

Pre-instruction steering is effective

Effective refusal directions can be extracted from structural tokens before the user instruction—positions that are normally causally uninformative in autoregressive models.

05

Where and when control matters

Ablations reveal a temporal and spatial asymmetry: leverage is strongest early in denoising, the earliest diffusion block matters disproportionately, and mid-to-late layers account for most of the effect.

06

Transfer across language and architecture

Steering transfers strongly English ↔ Chinese within the same MDLM, but fails to produce a measurable effect when transferred to an autoregressive model, pointing to architecture-dependent safety representations.

Prior diffusion-control approaches

Sampling-level control

Repeated guidance, auxiliary policies, or computation coupled to the denoising trajectory.

Representation-level steering in MDLMs

Representation-level intervention

Extract once from prompt activations, then steer internal residual states during generation.

02 / Behavioral evaluation

Behavioral effects across evaluated MDLMs

Using safety refusal as a case study, activation steering produces a larger and more consistent behavioral shift than the evaluated prompt- and optimization-based baselines.

Dimension
1D

Low-dimensional refusal control

A single activation direction is sufficient to strongly modulate refusal behavior.

Access
PRE

Information before the instruction

Pre-instruction and post-instruction extraction yield similarly strong test-time effects.

Time
EARLY

Early denoising dominates

Intervening early changes the trajectory much more than late-only steering.

Transfer
EN↔ZH

Language transfer, architecture limit

The direction transfers across English and Chinese, but not to an autoregressive model.

LLaDA-8B-Instruct · LLaMA Guard 2 safety score

Lower means fewer completions classified as safe.

Direct
99
GCG
99
PAIR
64
Slice
57
Steering · pre
19
Steering · post
16
Key observation. Pre-instruction directions are nearly as effective as post-instruction directions, consistent with non-causal parallel processing in the MDLM mask predictor.
Validation heatmap of safety scores across layers and token positions
Figure 3 / Steering sensitivity is localized in layer–token space and appears at both pre- and post-instruction positions.
ModelMethodRefusal ↓Guard ↓
LLaDA-8BDirect9799
LLaDA-8BSteering · pre419
LLaDA-8BSteering · post016
LLaDA-1.5Direct98100
LLaDA-1.5Steering · pre620
LLaDA-1.5Steering · post719
MMaDA-8BDirect2650
MMaDA-8BSteering · pre1225
MMaDA-8BSteering · post1631
03 / Localization analysis

Steering sensitivity across denoising steps and transformer depth

The ablations reveal a distinct control geometry over diffusion time, transformer depth, and token type.

Over denoising time

EarlyLate

Early interventions dominate. The first denoising step accounts for much of the impact, and the earliest diffusion block contributes disproportionately.

Over transformer depth

Early layersLate layers

Mid-to-late layers recover most of the full effect. Early layers alone have limited impact; prompt-token interventions account for most of the effect.

04 / Transfer analysis

Cross-lingual and cross-architecture transfer

This separates a potentially language-agnostic safety representation within an MDLM from a universal, model-agnostic refusal axis.

English ↔ Chinese

Strong

Directions extracted in one language substantially reduce refusal and safety scores in the other language without recomputing the vector in the target language. The selected layer–token regions are also nearby across languages.

EN → ZH: Guard 99 → 31    /    ZH → EN: Guard 100 → 9

MDLM → autoregressive LLM

No effect

Applying the best LLaDA steering direction to Meta-Llama-3-8B-Instruct under the same global intervention scheme produces no measurable change, suggesting architecture-dependent safety representations.

Within architecture: transfers    /    Across architecture: does not
05 / Method

Direction extraction and intervention

01 / Extract

Contrastive prompt sets

Compute harmful and harmless mean residual activations at candidate layer–token positions from a single prompt-only forward pass.

02 / Select

One direction

Choose one normalized difference direction on a held-out harmful validation set.

03 / Apply

Global projection intervention

Reuse that direction across all layers, token positions, and reverse-diffusion steps during generation.

Direction extraction

For candidate layer ℓ and structural token position i, compute the normalized difference between harmful and harmless mean residual activations.

v = (μharmful − μharmless) / ‖μharmful − μharmless‖₂

Candidate token positions include stable chat-template markers both before and after the user instruction.

Direction application

During generation, hidden states are projected onto the subspace orthogonal to the selected direction. The same selected direction is used globally in the main setup.

No finetuning / no parameter update / no trajectory-level extraction / no modification of the underlying sampling algorithm
06 / Abstract

Paper 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.
07 / Research lineage

Research Lineage & Follow-up Work

We are glad to see this work cited, extended, and applied across a growing range of research directions, including controllable diffusion-language generation, AI safety and refusal steering, activation geometry and mechanistic interpretability, temporally resolved token attribution, in-place text editing, model compression, repetition mitigation, multimodal hallucination control, and representations of code correctness. The papers below highlight several of these emerging connections.

08 / Citation

Cite this work

If this work is useful in your research, copy the BibTeX entry directly.

@misc{shnaidman2026activationsteeringmaskeddiffusion,
  title         = {Activation Steering for Masked Diffusion Language Models},
  author        = {Adi Shnaidman and Erin Feiglin and Osher Yaari and
                   Efrat Mentel and Amit Levi and Raz Lapid},
  year          = {2026},
  eprint        = {2512.24143},
  archivePrefix = {arXiv},
  primaryClass  = {cs.CL},
  url           = {https://arxiv.org/abs/2512.24143}
}