Beyond the Prompt: Leveraging Pre-Decoding States for Jailbreak Detection in dLLMs
Adam Hazimeh, Amel Abdelraheem, Ke Wang, Mariam Salman, Ljiljana Dolamic, Gérôme Bovet, Pascal Frossard
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 (Representation Fusion), an inference-time detector that fuses the sigmoid harmfulness scores of the two classifiers. Without modifying model weights or the decoding procedure, 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 as a lightweight jailbreak detector for dLLMs that improves safety beyond prompt-only detection.
Create a lesson
Metadata
- Categories
- cs.CL, cs.CY, cs.LG
- Comments
- Published at NeurIPS 2026
Related papers
An Effective Spoken Language Understanding Approach Leveraging Query-Adaptive Intent Detection
Shared title terminologycs.CLBing-Long Kuo, Yu-Hsuan Fang, Tien-Hong Lo et al.
Beyond K/V Caches: Cross-Model State Handoff in Hybrid Linear-Attention LLMs
Shared title terminologycs.CLJiacheng Cai, Tao Zhang, Siqi Liang et al.
SPARE: Fast Linear Attention Decoding with Compact Recurrent States
Shared title terminologycs.CLKe Wan, Zaiyi Zheng, Chen Chen
ModernELECTRA: Replaced-Token Detection with Boundary-Window Reconstruction for Compact Encoders that Classify and Embed
Shared title terminologycs.CLMykhailo Shtopko, Ihor Stepanov, Dmytro Vodianytskyi et al.
Look Back, Draft Ahead: Corrective Prefix Attention for Parallel Speculative Decoding
Shared title terminologycs.CLMohammad Mahdi Moradi, Ali Pourranjbar, Zongzuo Wang et al.
Beyond Self-Consistency: Recursive Self-Improvement at Test Time
Shared title terminologycs.CLJianyu Wu, Yizhou Wang, Encheng Su et al.