arXiv:2610.31331cs.LGOct 2026

Manuscript Offprint

arXiv:2610.31331

Harmful Responses Are Jailbreak Templates: Transferring Autoregressive Jailbreaks to Diffusion Language Models

Jinwei Gan, Zifeng Cheng, Zhiwei Jiang, Ran Sun, Shiping Ge, Qing Gu

ABSTRACT

Diffusion large language models (dLLMs) enable flexible masked generation through bidirectional context modeling, but this capability also introduces a distinct jailbreak attack surface. We find that a harmful response to a given query naturally serves as an effective jailbreak template: simply masking a subset of its tokens can induce a dLLM to reconstruct harmful content. Based on this observation, we propose RMT-JAILBREAK, a general framework that transfers existing autoregressive (AR) jailbreak attacks to dLLMs through their induced harmful responses. RMT-JAILBREAK converts an AR-generated harmful response into a high-mask-ratio template using uniform token retention, and further applies prompt-based safety filtering to mask any remaining visible harmful content. The refined template is then provided to the target dLLM for bidirectional reconstruction. Extensive experiments across multiple AR jailbreak methods and target dLLMs demonstrate the effectiveness and generality of RMT-JAILBREAK, revealing strong cross-paradigm transferability of jailbreak attacks.

1 INTRODUCTION

Diffusion large language models (dLLMs) (Nie et al., 2025; Ye et al., 2025; Zhu et al., 2026; Yang et al., 2025) have recently emerged as an alternative paradigm to conventional autoregressive (AR) language models. Unlike AR models that generate tokens sequentially from left to right, dLLMs formulate generation as an iterative denoising process over partially masked sequences. This paradigm enables multiple tokens to be decoded in parallel and allows each masked position to be predicted from bidirectional context. Consequently, masked positions can appear at arbitrary locations in the sequence and be progressively recovered based on both preceding and following context. These properties provide dLLMs with flexible generation capabilities beyond standard left-to-right continuation, including infilling, rewriting, and formatted generation.

This flexibility also leads to a fundamental difference between jailbreak attacks on dLLMs and those on autoregressive models. Jailbreak attacks on autoregressive LLMs (Zou et al., 2023; Liu et al., 2024; Chao et al., 2025; Ding et al., 2024) typically manipulate the input prompt to steer the subsequent left-to-right generation toward harmful responses. In contrast, the bidirectional generation mechanism of dLLMs enables adversarial contexts to be constructed beyond a continuous input prefix. Recent work has begun to exploit this unique property for jailbreak attacks. In particular, DIJA (Wen et al., 2025) manually designs several interleaved mask-text templates and leverages the in-context learning

Table 1: Attack Success Rate on the HarmBench benchmark using LLaDA-8B-Instruct as the target model.

Mask ratio ρ\rhoASR (%)
0.397.75
0.597.00
0.796.50
0.985.50

∗^{*} Equal contribution.

†^{\dagger} Corresponding author.

capability of LLMs to transform the original harmful prompt into new jailbreak prompts following these templates.

Although effective, DIJA relies on manually designed contextual templates, and the generated prompts largely follow generic attack scaffolds, resulting in limited query-specific relevance. We find that a harmful response to a given query naturally serves as a jailbreak template: simply masking a subset of its tokens is sufficient to construct a highly effective jailbreak input. As shown in Table 1, this simple strategy achieves consistently high Attack Success Rates across a wide range of mask ratios, indicating that only partial exposure of a query-specific harmful response can provide sufficient context to induce harmful reconstruction by dLLMs. This finding motivates us to leverage harmful responses, rather than manually designed attack scaffolds, as the basis for constructing dLLM jailbreak inputs.

Building on this observation, we propose RMT-JAILBREAK, a simple response-mediated transfer framework that repurposes existing AR jailbreak attacks for dLLMs through their induced harmful responses. Given a harmful query, RMT-JAILBREAK first applies an off-the-shelf AR jailbreak method to an autoregressive model to obtain a query-specific harmful response. It then converts this response into a high-mask-ratio template by retaining sparse contextual tokens at approximately uniform intervals, providing distributed semantic and structural cues for subsequent reconstruction. To avoid directly exposing explicit harmful content, we further employ a prompt-based safety filtering stage that replaces any remaining visible harmful tokens with additional masks while preserving the template structure. Finally, the filtered template is concatenated with the original query and fed into the target dLLM, which reconstructs the missing content through its native bidirectional infilling process. This design allows a wide range of existing AR jailbreak methods to be readily repurposed for dLLMs without requiring dLLM-specific prompt optimization.

Our main contributions are summarized as follows:

• We reveal that harmful responses themselves can serve as effective jailbreak templates for dLLMs. Simply masking a subset of tokens in a harmful response is sufficient to induce highly successful harmful reconstruction, exposing a previously underexplored vulnerability of dLLMs.

• We propose RMT-JAILBREAK, a simple and general framework that transfers existing autoregressive jailbreak methods to dLLMs through their induced harmful responses. By combining uniform token retention with prompt-based safety filtering, RMT-JAILBREAK constructs effective dLLM jailbreak inputs without requiring dLLM-specific prompt optimization.

• Extensive experiments across multiple AR jailbreak methods and target dLLMs demonstrate the effectiveness and generality of RMT-JAILBREAK.

References (27)