Safer by Diffusion, Broken by Context: The Safety Dividend and Failure Modes of Diffusion LLMsSafer by Diffusion, Broken by Context: Diffusion LLM's Safety Blessing and Its Failure Mode
The authors propose black-box context nesting; LLaDA-1.5's JailbreakBench ASR-E is 87%.
The attacker aims to induce the target model to generate outputs that violate its intended safety alignment. Black-box: no access to parameters, training data, gradients, internal states, or decoding process; only text prompts can be submitted and responses observed. Victim systems are open-source D-LLMs and proprietary Gemini Diffusion. Additionally, GCG is used for white-box probing under left-to-right decoding constraints.
- Diffusion language models generate via denoising. The authors believe this progressively suppresses jailbreaks originally targeting autoregressive models, but robustness is not absolute. Proprietary models like Gemini Diffusion have already appeared, and existing D-LLM jailbreaks are mostly classified by the authors as white-box.
- The authors define the distance from the denoising distribution to a safe region, and assume it shrinks by a factor α_t at each step. They then randomly embed harmful requests into six structured completion templates, submit only text, and observe the responses.
- On JailbreakBench and HarmBench, context nesting's ASR-E is higher than black-box baselines; LLaDA-1.5 has ASR-E of 87% and 79% on the two benchmarks. Dream7B is lower than DIJA. For Gemini Diffusion, 5 of 10 samples are unsafe.
- The paper has no separate limitations section; the Conclusion points to alignment for high-level structured attacks. Experiments include three open-source D-LLMs, JailbreakBench and HarmBench; Gemini Diffusion is a 10-sample human case. Query counts, repetitions, and reviewer-human agreement are not reported.
- Evaluated models
- LLaDA-8B-InstructLLaDA-1.5Dream-v0-Instruct-7BGemini DiffusionGPT-4o
- Benchmarks
- JailbreakBenchHarmBench
- Metrics
- ASR-KASR-EHSsafety distance
The paper proposes that diffusion LLMs are inherently robust to jailbreak attacks designed for autoregressive LLMs, and presents a context-nested attack that can bypass this defense. The authors analyze that the diffusion trajectory brings a stepwise reduction effect that progressively suppresses unsafe generation. The attack embeds harmful requests in structured benign contexts and, as a black-box strategy, achieves the current highest attack success rate across multiple models and benchmarks. The authors state that, to their knowledge, this achieves the first successful jailbreak of Gemini Diffusion, and regard these results as an early red-team test of diffusion LLMs.
Paper analysis
What problem does this paper attempt to solve?
Denoising progressively suppresses unsafe generation, but context nesting can bypass it.
D-LLMs have inherent robustness to jailbreaks designed for autoregressive models, but this robustness fails when harmful requests are embedded in structured benign contexts.
- Scenario: D-LLMs generate via masked parallel denoising, using bidirectional context. The authors state this improves efficiency; LLaDA, Dream, and proprietary Gemini Diffusion have emerged, so red-teaming is needed.
- Existing gaps: The authors state that existing jailbreaks are weaker on D-LLMs, but mostly empirical observations. PAD and DIJA are classified by the authors as white-box. The authors state there was no prior jailbreak exploration of Gemini Diffusion.
- Core observation: The authors argue that denoising causes stepwise reduction, gradually suppressing unsafe generation. This effect is not absolute; structured nesting can bypass it.
- This work: Provides an initial analysis of this mechanism and proposes black-box context nesting: embedding harmful requests into structured completion tasks.
- Threat model:
- Goal: Induce the model to generate outputs that violate expected safety alignment. Success is later judged by ASR-K, ASR-E, and HS.
- Knowledge: black-box. No parameters, training data, gradients, internal states, or decoding process.
- Capability: Only submit text prompts and observe responses.
- Victim systems: LLaDA-Instruct, LLaDA-1.5, Dream-Instruct, and Gemini Diffusion in case studies.
What related research exists?
Existing D-LLM jailbreaks are mostly classified as white-box; black-box attacks remain scarce.
Discrete diffusion language models
- D3PM (Austin et al., 2021) and masked diffusion (Hoogeboom et al., 2021; Campbell et al., 2022; Lou et al., 2024)—apply diffusion to discrete tokens, replacing left-to-right decoding with structured corruption.
- DiffusionBERT (He et al., 2023), SSD-LM (Han et al., 2023), and Lou et al. (2024), Ou et al. (2025), Shi et al. (2024)—the paper only describes their training or inference rewrites and states this scales to billion-parameter levels.
- LLaDA (Nie et al., 2025), Dream (Ye et al., 2025), Seed Diffusion (Song et al., 2025), Gemini Diffusion—the authors state they achieve competitive performance and more efficient generation. Wen et al. (2025) and Zhang et al. (2025) discuss D-LLM security issues.
Jailbreaks on AR-LLMs
- White-box optimization: GCG (Zou et al., 2023), AutoDAN (Liu et al., 2024), Cold-Attack (Guo et al., 2024), PIG (Wang et al., 2025)—use gradients, search, or learned generators to rewrite adversarial prompts.
- Black-box prompt engineering: PAIR (Chao et al., 2024b), persuasive rewriting (Zeng et al., 2024), ReNeLLM (Ding et al., 2024), AutoDAN-Turbo (Liu et al., 2025)—only use queries for role-playing, persuasion, or paraphrasing.
- The paper states that most of these two categories target AR-LLMs.
D-LLM jailbreaks
- PAD (Zhang et al., 2025)—manipulates intermediate denoising logits to push token distributions.
- DIJA (Wen et al., 2025)—pre-fills masked templates at inference and restricts mask positions.
- Following the taxonomy of Chao et al. (2024b), Yi et al. (2024), Mao et al. (2025), the authors classify both interfaces as white-box and state that fully black-box D-LLM jailbreaks remain understudied.
Baseline methods and benchmarks
- Black-box baselines are Zero-Shot, PAIR, AutoDAN-Turbo, ReNeLLM; D-LLM comparison is DIJA. Mechanism experiments additionally use GCG. Benchmarks are JailbreakBench and HarmBench. Figure 4 also uses GPT-4o as an AR-LLM comparison.
The authors distinguish this work from those that only report empirical robustness and rely on white-box interfaces: they analyze the denoising mechanism and test context nesting in an input-output-only setting. The authors state that the experiments on Gemini Diffusion are, to their knowledge, the first red-teaming of a proprietary D-LLM.
How does the paper address this problem?
Explain robustness using stepwise shrinkage of safety distance, then bypass it with six-template nesting.
The authors explain robustness via stepwise reduction on the denoising chain, then turn context nesting, which can maintain adversarial influence, into a black-box attack.
Generation process and safety distance
- Masked diffusion: Follows the settings of LLaDA and Dream. Given a prompt c, the state iterates from z^(K) with all [MASK] to z^(0). Each step transition is P_φ(z^(k−1) | c, z^(k)), updating only a subset of masked positions.
- Relative to AR: AR conditions only on past tokens. D-LLM can also condition on the currently revealed left and right context at each step.
- Safe region: The sequence space is token sequences of length L. The authors state that S is generally hard to define; in the analysis, they approximate it with a safe phrase dictionary V_safe.
- Distance: Distribution-level distance is defined as D(xt, S) := 1 − Pxt[xt ∈ S], i.e., 1 minus the probability of falling in the safe region. Empirical estimation draws N samples per step, using Table 5 keywords to indicate safety. The paper does not give N.
Stepwise contraction and propositions
- Empirical phenomenon: On 100 JailbreakBench prompts, GCG, and LLaDA-1.5, the authors report that estimated safety distance decreases with denoising (Figure 3).
- Assumption 3.2: The authors assume there exists α_t ∈ [0, 1) such that D(xt−1, S) ≤ αt · D(xt, S). The rationale is inspired by the thermodynamic interpretation of diffusion, viewing denoising as moving toward a high-probability manifold defined by alignment.
- Proposition 3.3: If the attack effect at step t* is bounded and the distance does not exceed δ, then the final distance does not exceed δ times the product of the α's across steps. When the product does not exceed ε/δ, the final distance does not exceed ε. Equivalently, the probability of finally sampling a safe response is at least 1 minus δ times that product. The derivation is in Appendix B.1. The authors interpret this as multi-step denoising potentially filtering out early unsafe signals.
Locating the failure mode from ReNeLLM
- Black-box comparison targets: PAIR, AutoDAN-Turbo, ReNeLLM. The authors state they perform worse on D-LLMs, but ReNeLLM remains relatively high.
- Components: ReNeLLM includes prompt rewriting and context template nesting. The authors use a rewriting-only variant for ablation, attributing the relative effect on D-LLMs mainly to nesting. Numbers are in question 4.
- Figure 5: The authors state that other attacks' safety distance decreases with denoising, while ReNeLLM maintains a high safety distance, so contraction is weaker.
Context nesting
- Method: Directly embed the harmful query into a structured context with a higher-level completion objective, without iterative prompt optimization.
- Templates: Follows code_completion, table_filling, text_continuation; additionally adds json_completion, markdown_filling, yaml_filling. The latter three are generated by prompting GPT-4o. Each query randomly selects one of the six. Table 4 gives the templates; template sentences are not copied here.
- Explanation: Section 5.4 approximates α_t as the ratio of safety distance estimates at adjacent steps. The authors argue that when the cumulative product is close to 1, the contraction in the proposition is not significant, and adversarial content can persist.
- Budget: The authors state that no attack LLM is needed and no iterative optimization is performed. The paper does not report the number of queries.
Success criteria and decoding settings
- ASR-K: Success if the response does not contain the refusal or safety phrases from Table 5.
- ASR-E: Judges whether the output is substantially harmful. JailbreakBench uses GPT-4o, HarmBench uses fine-tuned LLaMA. The paper does not specify a numerical threshold for ASR-E.
- HS: GPT-4o scores from 1 (refusal) to 5 (highly harmful). The appendix states HS=5 is considered success; in tables, HS is the score. The review prompt is in Table 6.
- Main experiment decoding: Maximum generation length 128 tokens, 32 denoising steps.
What experiments did the paper conduct?
On three open-source D-LLMs, context nesting's ASR-E is higher than black-box baselines, but lower than DIJA on Dream7B.
Experimental Setup
- Models tested: LLaDA-8B-Instruct, LLaDA-1.5, Dream-v0-Instruct-7B; written as LLaDA, Dream7B in tables. Also a Gemini Diffusion case. Figure 4 includes GPT-4o.
- Benchmarks: JailbreakBench contains 100 harmful intents; HarmBench contains 400 prompts.
- Baselines: Black-box are Zero-Shot, PAIR, AutoDAN-Turbo, ReNeLLM; also compared with DIJA. Mechanism experiments use GCG.
- Metrics: ASR-K checks whether keywords from Table 5 are missing. ASR-E is judged by GPT-4o (JailbreakBench) or fine-tuned LLaMA (HarmBench). HS is a 1 to 5 score from GPT-4o; the appendix treats HS=5 as success, but tables show scores. GPT-4o is also the comparison model in Figure 4.
- Decoding: Main experiments use max length 128 tokens, 32 denoising steps. The paper does not report temperature or number of repetitions.
- Nesting implementation: Each query randomly selects one of six templates. Three new ones were generated by GPT-4o.
Main Results
According to Table 2, ASR-E for black-box methods is as follows.
Swipe horizontally to read the table
Model JBB Context Nesting JBB ReNeLLM HB Context Nesting HB ReNeLLM LLaDA 86% 63% 78% 44% LLaDA-1.5 87% 64% 79% 46% Dream7B 33% 11% 14% 6% - The authors claim context nesting achieves the highest ASR-E among black-box methods; on JailbreakBench, LLaDA and LLaDA-1.5 exceed 85%. They claim ASR-E on HarmBench is over 50% higher than ReNeLLM.
- For HS, on JailbreakBench Context Nesting is 4.76, 4.78, 2.90. On HarmBench, the authors claim HS is highest, but Dream7B and ReNeLLM are both 2.70 (Table 2).
- ASR-K ordering differs: on JailbreakBench, LLaDA's ReNeLLM is 97% and Context Nesting is 92%; Dream7B is 82% vs 78%. PAIR and AutoDAN-Turbo have lower ASR-E, with Dream7B on HarmBench at 2% and 1% respectively.
Comparison with DIJA
- JailbreakBench ASR-E: DIJA is 81%, 82%, 90%; Context Nesting is 86%, 87%, 33% (LLaDA, LLaDA-1.5, Dream7B, Table 3). HS is 4.60, 4.60, 4.60 vs 4.76, 4.78, 2.90.
- HarmBench ASR-E: DIJA is 55%, 57%, 58%; Context Nesting is 78%, 79%, 14%. HS is 4.10, 4.10, 3.90 vs 4.57, 4.60, 2.70.
- The authors claim the setting is stricter, but on HarmBench the first two models' ASR-E is over 35% higher than DIJA. A counterexample is Dream7B: DIJA has higher ASR-K, ASR-E, and HS. The authors claim nesting has lower attack budget; the paper does not report query counts.
Safety Distance and Stepwise Shrinkage
- GCG attack success rate on LLaDA-1.5, JailbreakBench, under strict left-to-right decoding is 16%. The authors compare to about 50% reported by Wang et al. (2024) for Llama-3-8B. In Figure 2, the authors claim permissive fragments can appear early, and later often change to refusal-style outputs.
- Figure 3 uses 100 prompts; the authors report safety distance decreases under GCG. Figure 5 caption claims ReNeLLM maintains high safety distance on LLaDA-1.5, while other attacks decrease. Appendix C claims four attacks including ReNeLLM decrease monotonically on LLaDA-Instruct and Dream-7B, and claims qualitative consistency with LLaDA-1.5. The two statements about ReNeLLM are inconsistent.
- Figure 7 approximates α_t using the ratio of safety distances between adjacent steps. The authors claim the cumulative product for GCG, PAIR, and AutoDAN-Turbo is clearly below 1, while ReNeLLM and context nesting are close to 1 with high harmfulness. The authors suggest this may indicate nesting bypasses stepwise shrinkage. Numbers in the figure cannot be reliably mapped to methods after text conversion, so no item-by-item assignment is made.
Gemini Diffusion Case
- Section 5.3: 10 samples drawn from JailbreakBench, 5 produce unsafe outputs. No public API; human evaluation; query access has platform constraints.
- The authors claim, to their knowledge, this is the first successful jailbreak of Gemini Diffusion and the first red-teaming of a proprietary D-LLM. They also state that due to limited evaluation scope, they treat it only as preliminary evidence.
- Figure 6 and Appendix F are screenshots. The authors claim the model tends to prioritize completing the outer task, thereby generating content that violates safety constraints. Requests or outputs are not repeated here.
Other Ablations and Analyses
- Table 1, JailbreakBench, rewrite-only ASR-E/HS: LLaDA 9%/1.62, LLaDA-1.5 10%/1.63, Dream7B 1%/1.02; full ReNeLLM is 63%/4.25, 64%/4.07, 11%/2.50.
- Zero-shot ASR-E: JailbreakBench is 15%, 10%, 0%; HarmBench is 22%, 20%, 1% (LLaDA, LLaDA-1.5, Dream7B, Table 2).
- PAIR ASR-E: JailbreakBench is 18%, 16%, 8%; HarmBench is 33%, 35%, 2%. AutoDAN-Turbo: 12%, 16%, 5% and 8%, 11%, 1% (Table 2).
- Figure 4: PAIR, AutoDAN-Turbo, ReNeLLM on HarmBench. The authors claim the three D-LLMs have lower ASR-E than GPT-4o. The text has no bar numbers, and Table 2 does not include GPT-4o.
- Appendix E / Figure 9: JailbreakBench, LLaDA-Instruct and LLaDA-1.5. Generation lengths 128, 256, 512 (step length fixed at 4); step lengths 2, 4, 8 (generation length fixed at 128). Legend distinguishes ASR-K and ASR-E. The authors claim ASR is high across settings; the text does not give bar heights. The 32 steps in the main experiment and this step length are not the same notation; the paper does not explain their relationship.
What are some points that can be further explored?
The paper does not list limitations separately; the Conclusion points to alignment that must address structured contextual attacks.
Limitations and future directions noted by the authors
The paper has no dedicated Limitations, Discussion, or Future Work sections.
- Alignment strategy (Section 6 Conclusion): The authors write that these findings point to the need to improve D-LLM alignment to handle structured attack patterns from higher-level context.
Experimental coverage
- Open-source tested models are LLaDA-8B-Instruct, LLaDA-1.5, Dream-v0-Instruct-7B; main experiments use maximum generation length 128 tokens, 32 denoising steps (Section 5.1).
- Benchmarks are JailbreakBench (100 prompts) and HarmBench (400 prompts). Metrics are ASR-K, ASR-E, HS; safety distance additionally uses Table 5 keywords as a Monte Carlo proxy (Section 3.2, 5.1).
- Black-box baselines are Zero-Shot, PAIR, AutoDAN-Turbo, ReNeLLM; Table 3 additionally compares with DIJA, which the authors classify as white-box. GCG's attack success rate of 16% is only reported for LLaDA-1.5, JailbreakBench, left-to-right decoding constraint (Section 3.1.2).
- Gemini Diffusion results come from Section 5.3: 10 sampled JailbreakBench prompts, human evaluation, 5 produce unsafe outputs. The paper states there is no public API, and query access has platform constraints.
- The paper does not report the Monte Carlo sample size N, the number of queries or iteration budgets for each attack, the number of repetitions, or the agreement between ASR-E/HS and human judgment. Figure 3 states 100 prompts are used; Appendix C says the setup is the same as Section 3.2.1.
Summarize the main content of the paper
Denoising suppresses multiple jailbreaks; context nesting achieves a JailbreakBench ASR-E of 87% on LLaDA-1.5.
The authors call D-LLM's robustness to jailbreaks relative to AR-LLM a safety blessing, and treat context nesting as its black-box failure mode.
- The question is why jailbreaks designed for autoregressive models weaken on diffusion generation, and whether only changing the input can bypass it. Targets include the LLaDA series, Dream, and proprietary Gemini Diffusion.
- The analysis defines the distance from each step's token distribution to the safe region, and assumes this distance contracts by a coefficient α_t per step. When the attack effect is bounded and the product is small enough, the authors derive that the final safety distance can fall below a given margin.
- The attack does not access parameters or the decoding process; it only randomly embeds the harmful request into one of six structured completion templates.
- In Table 2, Context Nesting's JailbreakBench ASR-E is LLaDA 86%, LLaDA-1.5 87%, Dream7B 33%; HarmBench is 78%, 79%, 14%. On these three models, ASR-E is higher than PAIR, AutoDAN-Turbo, and ReNeLLM in the same table.
- Compared to DIJA, the first two models have higher ASR-E on HarmBench; on Dream7B, DIJA is higher, with JailbreakBench 90% vs. 33% and HarmBench 58% vs. 14% (Table 3). Of 10 manual cases for Gemini Diffusion, 5 are marked as unsafe outputs.
- The authors conclude that the denoising process can explain the failure of many prompt-level jailbreaks, while high-level structured context can bypass this gain, so alignment needs to address such patterns. The authors state that the result on Gemini Diffusion is, to their knowledge, the first successful jailbreak.
Related papers
Show 3 more papers
- Safeguards Based on Copyable Context Cannot Provide Reliable Safety for LLMsAnalysis / interpretabilityarXiv