cs.CLNov 6, 2026

Beyond the Prompt: Leveraging Pre-Decoding States for Jailbreak Detection in dLLMs

Authors: Adam Hazimeh, Amel Abdelraheem, Ke Wang, Mariam Salman, Ljiljana Dolamic, Gérôme Bovet, Pascal Frossard

Organizations: EPFL, Lausanne, Switzerland · American University of Beirut, Lebanon · Armasuisse, Cyber-Defence Campus, Switzerland

Abstract

Diffusion large language models (dLLMs) have recently emerged as a strong alternative to autoregressive models, generating responses by iteratively refining masked tokens in parallel rather than decoding sequentially. While enabling more efficient and flexible inference, dLLMs remain vulnerable to jailbreak attacks, including recent attacks that exploit properties unique to dLLMs such as bidirectional conditioning and parallel masked-token refinement. In this work, we show that these same properties also expose a safety-relevant detection surface absent from standard autoregressive decoding: even when a jailbreak is difficult to identify from prompt representations alone, it can still be detected from hidden states over masked response positions before any tokens are generated. By training linear classifiers on prompt and pre-decoding response representations, we empirically show that neither view strictly dominates, with each detecting attacks that the other misses. We introduce ReFuse\texttt{ReFuse} (Representation Fusion), an inference-time detector that fuses the sigmoid harmfulness scores of the two classifiers. Without modifying model weights or the decoding procedure, ReFuse\texttt{ReFuse} reduces average ASR across multiple jailbreaks from 63.29% for the undefended model and 11.27% for a prompt-only classifier to 3.31%, while keeping average benign refusal on standard utility benchmarks below 1% on LLaDA-8B. Together, these results establish ReFuse\texttt{ReFuse} as a lightweight jailbreak detector for dLLMs that improves safety beyond prompt-only detection.

Figures & tables

Appendix figures & tables11 assets

Supplementary material from the paper’s appendix.

Appendix

Explore similar work

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

    Oct 22, 2026Jinwei Gan, Zifeng Cheng, Zhiwei Jiang +3LLM Jailbreak AttacksAdversarial Attacks on Diffusion Models

  2. Why Jailbreaks Succeed in Diffusion Language Models: An Energy Landscape Analysis

    Sep 25, 2026Thong Bach, Dung Nguyen, Thao Minh Le +1Jailbreak DetectionLLM Safety

  3. MaskForge: Structure-Aware Adaptive Attacks for Jailbreaking Diffusion Large Language Models

    Jun 1, 2026Yingzi Ma, Zhengyue Zhao, Xiaogeng Liu +3Masked Diffusion ModelsAdversarial Attacks on LLMs