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

*Yingzi Ma, Zhengyue Zhao, Xiaogeng Liu, Minhui Xue, Yue Zhao, Chaowei Xiao*

[NeurIPS page](https://neurips.cc/virtual/2026/poster/155796) · [OpenReview](https://openreview.net/forum?id=2pQJ37HKk3) · [alphaXiv](https://www.alphaxiv.org/abs/2606.04027) · [Open on the map](../papers.html#p155796)

Category: [AI Safety, Security & Alignment](../pcat/16.md) › [Jailbreak Defense and Analysis](../pgroup/130.md) · Type: new method · Keywords: diffusion LLM jailbreaking, adaptive attack, pattern library, UCB bandit, LLM safety evaluation

Areas: [Safety & Security](../areas/safety.md) › Language Model Security › Jailbreak Defense

## Summary
MaskForge introduces a structure-aware adaptive attack that builds a reusable pattern library and achieves high jailbreaking success rates on diffusion LLMs.

## Explained to a 5-year-old
Some computer programs that write words work by fixing missing pieces step by step. People try to make these programs say things they shouldn't. We created a new way that tries many different tricks to fool the programs. It remembers the tricks that worked and uses them again. This new way succeeds most of the time when trying to trick the programs.

## Explained to a 5-year-old, longer
Some computers can write stories by filling in missing words one piece at a time. They have a special safety rule that stops them from writing bad things. People who test these computers try to find ways to make them break that safety rule. Existing tricks often miss a part of the computer that works with missing words. We made a new method that tries many different patterns of words to see what works. It keeps a library of patterns that have already tricked the computer before. When it tries a new pattern, it picks the most promising ones using a simple guessing game. If a pattern fails, it uses another backup plan to keep trying. Successful tricks are added to the library, so the method gets smarter over time. We tested it on several popular computer writers and it succeeded about 80% of the time. The method also works on a different test set without any changes, getting even higher success. This helps researchers find weaknesses in safe AI systems more efficiently.

## For a technical reader
MaskForge is a black-box attack that targets diffusion language models by exploiting their native mask-infilling mechanism. It builds a pattern library through iterative search, using a UCB bandit to select promising templates and a fallback scorer when needed. Successful attacks are distilled back into the library, allowing the system to accumulate experience across different jailbreak goals. Evaluations on five public diffusion LLMs show a 79.3% success rate, a 17.6% relative gain over existing baselines. The learned patterns also transfer to other benchmarks like AdvBench, achieving 88.2% success without further tuning.

## Problem
Jailbreaking diffusion large language models (dLLMs) is challenging because existing attacks do not exploit the native mask-infilling capability and lack structural adaptation across goals.

## Method
The approach formulates red-teaming as an optimized search over a growing library of structural patterns, abstracts successful attacks into reusable schemas, selects patterns using a UCB bandit, and uses a scorer-guided fallback to improve the library iteratively.

## Results
The approach achieves an average attack success rate of 79.3% on five dLLMs, a 17.6% relative improvement over the strongest baseline, and transfers to AdvBench achieving 88.2% success, a 67% relative improvement.

## Contributions
It introduces a black-box adaptive attack that leverages a reusable pattern library and accumulates experience across goals, and it demonstrates strong transferability to additional benchmarks.

## Research questions this paper is counted under

- [How can we reliably detect, evaluate, and defend against jailbreak attacks across diverse language model modalities and deployment settings?](../q/69.md)

This page was written by language models from the title and abstract of each paper, and the answers were checked by two other models. It can be wrong: check the paper itself. [Suggest a correction](../feedback/?on=p/155796)
