Watch the Watcher! Backdoor Attacks on Security-Enhancing Diffusion Models

Changjiang Li, Ren Pang, Bochuan Cao, Jinghui Chen, Fenglong Ma, Shouling Ji, Ting WangarXiv 2024 · DOI

Introduction

Diffusion models have emerged as a powerful defensive mechanism in machine learning, acting as "shields" that purify adversarial inputs before they reach a classifier. By leveraging their denoising capabilities, these models can effectively wash away malicious perturbations, thereby certifying the robustness of AI systems. However, the high computational cost of training these models often forces users to rely on pre-trained versions from third-party repositories. This paper introduces DIFF$^2$, a novel backdoor attack that subverts these defensive layers, turning them into "double agents" that compromise the very security they are intended to provide.

The Vulnerability of the "Watcher"

The core security concern addressed in this research is the implicit trust placed in defensive diffusion models. If an adversary can inject a backdoor into the diffusion process, they can cause the model to fail selectively when a specific "trigger" is present in the input.

Overview of the backdoor attack threat model, where an adversary provides a compromised diffusion model to a victim user.

In this threat model, the backdoored model performs perfectly on clean data, maintaining its utility as a purifier. However, when presented with a "triggered input"—a benign image combined with a subtle, adversary-defined pattern—the model guides the input toward a malicious distribution rather than the true clean distribution. This effectively transforms a benign-looking input into a potent adversarial example that fools the downstream classifier.

The DIFF$^2$ Attack Methodology

The authors propose DIFF$^2$, a backdoor attack specifically tailored for security-centric diffusion models. Unlike generative backdoor attacks that focus on creating specific images from noise, DIFF$^2$ operates directly in the input space.

Technical Components

  • Diffusion Backdoor Integration: The attack embeds a malicious sampling process. When the trigger is detected, the reverse diffusion process is steered toward an adversarial distribution.
  • Symmetric Design: To ensure the attack does not degrade the model's performance on clean data, DIFF$^2$ aligns the forward (noising) and reverse (denoising) processes for triggered inputs mathematically. This symmetry prevents training collapse and maintains high utility.
  • Co-optimization: The trigger pattern $r$ and the model parameters $\theta$ are optimized simultaneously. This ensures the trigger is both effective at deceiving classifiers and evasive enough to avoid detection during normal operation.
  • Surrogate Training for Transferability: Because the attacker may not know the specific classifier used by the victim, the trigger is trained against multiple "surrogate" architectures (e.g., ResNet, Vision Transformers). This ensures that the backdoor remains effective across different downstream models.

Experimental Evaluation

The DIFF$^2$ attack was evaluated across standard benchmarks including CIFAR-10, CIFAR-100, CelebA, and ImageNet.

Key Results

  • Attack Success Rate (ASR): The attack achieved an ASR of over 80% on CIFAR-10, meaning the vast majority of triggered inputs were successfully misclassified after "purification."
  • Impact on Certified Robustness: For models using diffusion for robustness certification, the attack reduced certified accuracy from approximately 60% to less than 9% on CIFAR-10 (at a 0.5 radius).
  • Utility and Stealth: The "clean accuracy" of the guarded classifiers dropped by less than 1% in most scenarios. Furthermore, purified triggered images remain visually indistinguishable from clean images to human observers, making the attack highly stealthy.
  • Poisoning Efficiency: The attack is viable even with minimal control over training data, requiring as little as 0.3% poisoning in fine-tuning scenarios.

Discussion and Future Directions

The primary insight of this work is that the defensive layer itself can become a single point of failure. While standard adversarial training can offer some mitigation, an adaptive attacker can often bypass these defenses by adjusting the trigger's mixing weight.

Current detection methods, such as entropy-based analysis, show promise for targeted attacks but struggle with untargeted ones due to distribution overlap with benign models. The research highlights an urgent need for robust verification and auditing methods for pre-trained diffusion models, especially when they are deployed in security-critical roles.

Summary updated

BibTeX
@misc{li2024watch,
  author = {Changjiang Li and Ren Pang and Bochuan Cao and Jinghui Chen and Fenglong Ma and Shouling Ji and Ting Wang},
  title = {{Watch the Watcher! Backdoor Attacks on Security-Enhancing Diffusion Models}},
  year = {2024},
  eprint = {2406.09669},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2406.09669},
}
Figure