Harmful jailbreak tricks for one AI type work on another too

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

Machine Learning

Summary

Diffusion large language models (dLLMs) can generate missing parts of text using clues from both before and after the gap. But this ability also lets people trick the models into giving harmful answers. The authors found that harmful responses themselves can be used as templates to make the model fill in the blanks with harmful content. They created a method called RMT-Jailbreak that takes harmful outputs from older autoregressive models and turns them into mask-based templates for attacking diffusion models. Experiments show this method works well, meaning jailbreak attacks can transfer between different AI generation approaches.

What this means in practice

  • For ai safety teams: Test diffusion language models for vulnerabilities by transforming known autoregressive harmful prompts into masked templates to reveal new jailbreak risks.
  • For model developers: Evaluate diffusion model robustness by understanding how harmful content reconstruction can be induced through mask-based prompting drawn from autoregressive attacks.

Authors

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.