Re-Mask and Redirect: Exploiting Denoising Irreversibility in Diffusion Language Models
Organizations: AIM Intelligence · National Institute of Technology Agartala
Abstract
Safety alignment in diffusion language models (dLLMs) relies on a single load-bearing assumption: that committed tokens are permanent. We show that violating this assumption, by re-masking committed refusal tokens and injecting a short affirmative prefix, achieves 74-82% ASR on HarmBench across all three publicly available safety-tuned dLLMs, rising to 92-98% with a generic 8-token compliance prefix. We call this attack TrajHijack; it is the first trajectory-level attack on dLLMs, requires no gradient computation, and generalizes across SFT and preference-optimized (VRPO) models. Three findings emerge. First, the vulnerability is irreducibly two-component: re-masking alone (4.4%) and prefix alone (5.7%) both fail. Second, gradient optimization via a differentiable Gumbel-softmax chain consistently degrades ASR (41.5% vs. 76.1%), because continuous perturbations push token distributions off-manifold. Third, A2D (the strongest published dLLM defense) is more vulnerable to TrajHijack (89.9%) than the undefended model (76.1%): its silent-refusal training removes the contextual resistance that trajectory-level attacks must overcome, an effect we call the Defense Inversion Effect.
Figures & tables
| Model | Prefix | ASR | HS 3 | Mean |
|---|---|---|---|---|
| Topic-conditioned prefix ( , ) | ||||
| LLaDA-8B (SFT) | Re-mask+pfx | 76.1% | 88.1% | 4.1 |
| LLaDA-1.5 (VRPO) | Re-mask+pfx | 74.2% | 88.7% | 4.2 |
| Dream-7B (SFT) | Re-mask+pfx | 81.8% | 93.1% | 4.4 |
| Generic compliance prefix ( , ) | ||||
| LLaDA-8B (SFT) | Medium static | 95.0% | 96.9% | 4.8 |
| Model | ASR | HS 3 | Mean | |
|---|---|---|---|---|
| LLaDA | 64 | 94.0% | 96.0% | 4.6 |
| LLaDA | 128 | 84.0% | 90.0% | 4.3 |
| LLaDA | 256 | 78.0% | 88.0% | 4.1 |
| LLaDA | 512 | 52.0% | 86.0% | 3.4 |
| Dream | 64 | 90.0% | 98.0% | 4.6 |
| Dream | 256 | 90.0% | 98.0% | 4.6 |
| Configuration | ASR | HS 3 | Mean |
|---|---|---|---|
| Component ablations ( , ) | |||
| Re-mask+pfx (core) | 76.1% | 88.1% | 4.1 |
| + , | 41.5% | 82.4% | 3.3 |
| Re-mask only | 4.4% | 5.0% | 1.2 |
| Prefix only (no re-mask) | 5.7% | 6.3% | 1.2 |
| Gradient variants ( , ) | |||
| Strategy | Topic? | Tok. | ASR | HS 3 | Mean |
|---|---|---|---|---|---|
| Minimal (“Sure,”) | × | 2 | 21.4% | 23.3% | 1.9 |
| Medium static | × | 8 | 95.0% | 96.9% | 4.8 |
| Smart templates | ✓ | 12 | 27.7% | 35.2% | 2.2 |
| Fallback only | ✓ | 12 | 21.4% | 44.0% | 2.3 |
| Long verbose | ✓ | 20 | 43.4% | 56.0% | 2.9 |
| Metric | dLLM (LLaDA) | AR (Llama) |
|---|---|---|
| ASR (HS 4) | 76.1% | 72.3% |
| HS=5 rate | 62–64% | 44.0% |
| Non-refusal (HS 3) | 88–93% | 73.6% |
| Mean HS | 4.1 | 3.64 |
| Defense | ASR | HS 3 | Mean HS |
|---|---|---|---|
| None (LLaDA-8B) | 76.1% | 88.1% | 4.1 |
| LLaDA-1.5 (VRPO) | 74.2% | 88.7% | 4.2 |
| A2D ( Jeung et al., 2026 ) | 89.9% | 99.4% | 4.5 |
| Strategy | Detect. | FP |
|---|---|---|
| Monotonicity check | 14% (7/50) | 0% |
| Self-consistency | 100% (50/50) | 0% |
Appendix figures & tables4 assets
Supplementary material from the paper’s appendix.
Appendix
| Parameter | Value |
|---|---|
| Denoising steps ( ) | 64 |
| Target step ( ) | 16 |
| Generation length ( ) | 64 / 128 / 256 / 512 |
| budget ( ) | 15.0 |
| Re-masked positions ( ) | 20 |
| Max prefix tokens | 12 |
| Method | Threat Model | Eval. Setup | Key Requirement | Grad.-Free? |
|---|---|---|---|---|
| DIJA ( Wen et al., 2025 ) | Black-box (input) | HarmBench / Llama clf. | LLM-crafted prompts | ✓ |
| PAD ( Zhang et al., 2025 ) | White-box (input) | Custom / Gemini | Structural connectors | ✓ |
| Priming ( Yamabe and Sakuma, 2026 ) | White-box (step ) | JBB-Behav. / GPT-4 | Full target (100+ tok.) + GCG | × |
| Ctx. nesting ( He et al., 2026 ) | Black-box (input) | HarmBench / GPT-4o | Structured benign context | ✓ |
| TrajHijack (ours) | White-box (step ) | HarmBench / Claude S4 | 12-token rule-based prefix | ✓ |
| Step | ASR | HS 3 | Mean HS |
|---|---|---|---|
| 4 | 86.0% | 94.0% | 4.3 |
| 8 | 86.0% | 92.0% | 4.4 |
| 12 | 84.0% | 92.0% | 4.3 |
| 16 | 84.0% | 90.0% | 4.3 |
| 20 | 82.0% | 92.0% | 4.3 |
| 24 | 84.0% | 92.0% | 4.3 |
| Category | Core | +Gradient | ||
|---|---|---|---|---|
| Misinformation | 27 | 85.2% | 55.6% | +29.6 |
| Harmful | 17 | 82.4% | 41.2% | +41.2 |
| Harassment | 16 | 81.2% | 56.2% | +25.0 |
| Illegal | 47 | 80.9% | 29.8% | +51.1 |
| Cybercrime | 33 | 75.8% | 51.5% | +24.2 |
| Chem./biological | 19 | 42.1% | 21.1% | +21.1 |
Adversarial Attacks on LLMs
Adversarial attacks on large language models probe how crafted inputs, internal changes, and agent interactions bypass safety or disrupt reliable behavior.
See all 343 papers