BadDLM: Backdooring Diffusion Language Models with Diverse Targets

Fuente: arXiv
Enregistré dans:
Détails bibliographiques
Auteurs principaux: Zhai, Shengfang, Ji, Xiaoyang, Shi, Yuling, Gao, Haoran, Meng, Fanyu, Zeng, Yan, Fang, Yuejian, Dong, Yinpeng, Zhang, Jiaheng
Format: Preprint
Publié: 2026
Sujets:
Accès en ligne:
Tags: Ajouter un tag
Pas de tags, Soyez le premier à ajouter un tag!
_version_ 1866913107988709376
author Zhai, Shengfang
Ji, Xiaoyang
Shi, Yuling
Gao, Haoran
Meng, Fanyu
Zeng, Yan
Fang, Yuejian
Dong, Yinpeng
Zhang, Jiaheng
author_facet Zhai, Shengfang
Ji, Xiaoyang
Shi, Yuling
Gao, Haoran
Meng, Fanyu
Zeng, Yan
Fang, Yuejian
Dong, Yinpeng
Zhang, Jiaheng
contents Diffusion language models (DLMs) have recently emerged as an alternative modeling paradigm to autoregressive (AR) language models, enabling parallel generation and bidirectional context modeling. Yet their security implications, particularly their vulnerability to backdoor attacks, remain underexplored. We propose BadDLM, a unified framework for studying backdoor attacks against DLMs with diverse targets. We introduce a trigger-aware training objective that emphasizes target-relevant positions in poisoned samples, and theoretically prove that this objective is equivalent to training under an induced forward masking distribution. Unlike backdoors in autoregressive models, which typically manipulate next-token prediction, this characterization indicates that BadDLM can implant backdoors by exploiting the forward masking process. We instantiate BadDLM across different target levels: concept injection (BadDLM_Concept), semantic attribute steering (BadDLM_Attribute), alignment bypass (BadDLM_Align), and code payload injection (BadDLM_Payload). Experiments on mainstream open-source DLMs show that BadDLM achieves strong attack effectiveness across diverse targets while largely preserving benign utility, and remains effective against defenses designed for AR backdoors. Our findings expose a new class of security risks in diffusion-based language generation and call for defenses tailored to DLM denoising dynamics.
format Preprint
id arxiv_https___arxiv_org_abs_2605_09397
institution arXiv
publishDate 2026
record_format arxiv
spellingShingle BadDLM: Backdooring Diffusion Language Models with Diverse Targets
Zhai, Shengfang
Ji, Xiaoyang
Shi, Yuling
Gao, Haoran
Meng, Fanyu
Zeng, Yan
Fang, Yuejian
Dong, Yinpeng
Zhang, Jiaheng
Cryptography and Security
Diffusion language models (DLMs) have recently emerged as an alternative modeling paradigm to autoregressive (AR) language models, enabling parallel generation and bidirectional context modeling. Yet their security implications, particularly their vulnerability to backdoor attacks, remain underexplored. We propose BadDLM, a unified framework for studying backdoor attacks against DLMs with diverse targets. We introduce a trigger-aware training objective that emphasizes target-relevant positions in poisoned samples, and theoretically prove that this objective is equivalent to training under an induced forward masking distribution. Unlike backdoors in autoregressive models, which typically manipulate next-token prediction, this characterization indicates that BadDLM can implant backdoors by exploiting the forward masking process. We instantiate BadDLM across different target levels: concept injection (BadDLM_Concept), semantic attribute steering (BadDLM_Attribute), alignment bypass (BadDLM_Align), and code payload injection (BadDLM_Payload). Experiments on mainstream open-source DLMs show that BadDLM achieves strong attack effectiveness across diverse targets while largely preserving benign utility, and remains effective against defenses designed for AR backdoors. Our findings expose a new class of security risks in diffusion-based language generation and call for defenses tailored to DLM denoising dynamics.
title BadDLM: Backdooring Diffusion Language Models with Diverse Targets
topic Cryptography and Security
url https://arxiv.org/abs/2605.09397