[Paper Review] VillanDiffusion: A Unified Backdoor Attack Framework for Diffusion Models
VillanDiffusion is a unified backdoor attack framework for diffusion models that generalizes across denoising and score-based diffusion models, various training-free samplers (e.g., DPM-Solver, DEIS), and both unconditional and conditional (text-to-image) generation. It enables effective backdoor attacks via image or text-based triggers without modifying the samplers, demonstrating that even untouched text encoders can be exploited via prompt-space backdoors, with strong success across diverse model configurations and evasion of inference-time defenses.
Diffusion Models (DMs) are state-of-the-art generative models that learn a reversible corruption process from iterative noise addition and denoising. They are the backbone of many generative AI applications, such as text-to-image conditional generation. However, recent studies have shown that basic unconditional DMs (e.g., DDPM and DDIM) are vulnerable to backdoor injection, a type of output manipulation attack triggered by a maliciously embedded pattern at model input. This paper presents a unified backdoor attack framework (VillanDiffusion) to expand the current scope of backdoor analysis for DMs. Our framework covers mainstream unconditional and conditional DMs (denoising-based and score-based) and various training-free samplers for holistic evaluations. Experiments show that our unified framework facilitates the backdoor analysis of different DM configurations and provides new insights into caption-based backdoor attacks on DMs. Our code is available on GitHub: \url{https://github.com/IBM/villandiffusion}
Motivation & Objective
- To address the gap in backdoor attack research for diffusion models by covering a broader range of architectures and inference methods than prior work.
- To demonstrate that backdoor attacks are effective even when the text encoder is unmodified, by injecting triggers in the prompt space for text-to-image models.
- To evaluate the robustness of existing defenses, such as inference-time clipping, under new attack setups involving advanced samplers and model types.
- To provide a holistic framework for backdoor analysis that generalizes across mainstream unconditional and conditional diffusion models and their inference pipelines.
Proposed method
- The framework categorizes diffusion models based on schedulers (content and noise), samplers (SDE and ODE variants), and generation type (conditional/unconditional), enabling systematic attack coverage.
- It formulates the reverse-time SDE and ODE for generative sampling, identifying that the coefficient 1/2 in ODEs causes failure in prior methods like BadDiffusion on ODE samplers.
- The method applies backdoor triggers via input-level perturbations—image-based for unconditional generation and caption-based for text-to-image models—without modifying the model or sampler.
- It supports both denoising-based models (e.g., DDPM) and score-based models (e.g., NCSN), enabling unified backdoor injection across different training paradigms.
- The attack is designed to be training-free and compatible with off-the-shelf samplers, ensuring practical relevance to real-world deployment.
- It introduces a correction term in the score function update to maintain attack effectiveness across different sampling schedules and noise levels.
Experimental results
Research questions
- RQ1Can backdoor attacks be generalized across both denoising-based and score-based diffusion models with varying schedulers and noise levels?
- RQ2How effective are backdoor attacks on advanced, off-the-shelf training-free samplers like DPM-Solver, DEIS, and UniPC?
- RQ3Can text-to-image diffusion models be backdoored through the prompt space even when the text encoder is unmodified?
- RQ4Does the inference-time clipping defense remain effective against backdoor attacks in modern, diverse diffusion model configurations?
- RQ5What is the impact of different noise schedules and sampling methods on backdoor attack success and stealthiness?
Key findings
- The framework achieves near-perfect attack success with SSIM values of 0.999 or higher across multiple samplers and triggers, indicating high-quality backdoored generations.
- On CIFAR-10 with a stop sign trigger, VillanDiffusion reduces FID from 26.62 (BadDiffusion) to 18.16 at 20% poison rate and 18.88 at 50% poison rate under DDIM, demonstrating superior attack efficiency.
- The method successfully bypasses the inference-time clipping defense, which fails to mitigate attacks when the trigger is embedded in the prompt space or when using ODE samplers.
- For text-to-image models, VillanDiffusion achieves high attack success (SSIM > 0.99) even when the text encoder is frozen, proving that prompt-space backdoors are highly effective.
- The framework shows consistent performance across diverse samplers, including DPM-Solver, DEIS, and UniPC, with MSE values below 5e-4 and SSIM above 0.99 for most configurations.
- The attack remains effective under high randomness (η=1.0), where BadDiffusion fails, indicating greater robustness of VillanDiffusion across stochastic sampling variations.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.