TL;DR
This paper reveals a critical security vulnerability in ControlNet, a popular extension for diffusion models that allows for fine-grained control over image generation using structural inputs like edge maps or poses. The authors demonstrate a practical data poisoning attack that embeds a hidden backdoor into ControlNet, causing it to generate attacker-specified content (even NSFW) when a subtle visual trigger is present, all while maintaining normal functionality on clean inputs. This highlights a significant supply-chain risk for synthetic data pipelines relying on these models.
What Problem Does This Paper Address?
Text-to-image diffusion models have revolutionized image generation, producing highly realistic images from text prompts. ControlNet builds upon this by allowing users to guide the generation process with additional structural information, such as edge maps, depth maps, or human poses. This makes them invaluable for creating synthetic data for various applications, including data augmentation, simulation, and privacy preservation. However, the reliance on publicly available, community-fine-tuned ControlNet models creates a potential security blind spot. While previous research has focused on poisoning the base diffusion model or prompt injection, the specific conditioning pathways within ControlNet have remained underexplored. This paper addresses the vulnerability of these conditioning pathways to data poisoning attacks, which could silently propagate harmful or policy-violating content into synthetic datasets.
Methods
The core of the attack involves poisoning the fine-tuning data for the ControlNet component, leaving the base diffusion model untouched. The adversary creates poisoned training pairs by:
- Applying a trigger: A small visual trigger (e.g., a logo patch) is applied to an input image.
- Recomputing the control map: The structural control map (e.g., edge map) is re-generated from the triggered image. This new control map now implicitly encodes the trigger.
- Pairing with a target: The poisoned control map is paired with a fixed, attacker-chosen target image (e.g., an NSFW image).
The ControlNet is then fine-tuned on this poisoned dataset using the standard latent diffusion loss. This process effectively binds the trigger in the control map to the malicious target image. Crucially, the attack is designed to preserve normal generation quality on clean inputs.
To mitigate this threat, the authors propose Clean Fine-Tuning (CFT). This involves freezing the pre-trained diffusion backbone and fine-tuning only the ControlNet on a small, trusted, and sanitized dataset with a significantly reduced learning rate.
Datasets
The experiments were conducted using the following datasets:
- ImageNet ILSVRC-2012: Used for evaluating the attack on object generation.
- CelebA-HQ: Used for evaluating the attack on human face generation.
- MPII: Used specifically for evaluating the attack on pose-estimation ControlNet.
The authors sampled subsets of these datasets for training and evaluation.
Key Insights and Ideas
- ControlNet is a novel poisoning surface: The research highlights that the conditioning pathway of ControlNet, rather than the base diffusion model, is a surprisingly effective and underexplored target for data poisoning.
- Low poison ratios are sufficient: Even with as little as 1-5% poisoned data in the fine-tuning corpus, the attack achieves very high success rates (90-100% ASR).
- Subtle triggers are effective: A small visual trigger, imperceptible in many preprocessing steps, is enough to activate the backdoor.
- Quality preservation is key: The attack successfully preserves the quality of generated images on clean inputs, making it difficult to detect without specific adversarial probes.
- CFT offers a practical defense: Clean Fine-Tuning (CFT) demonstrates a viable method to significantly reduce the attack's success rate, especially on homogeneous datasets.
Key Results
- High Attack Success Rate (ASR): With 1-5% poison, ASR reached 90-100% on ImageNet and CelebA-HQ for SD v1.5 and v2 models. SD-XL was slightly more robust at lower poison ratios but still susceptible.
- Pose-Estimation Backdoor: A pose-ControlNet on MPII achieved 99% ASR with 5% poison.
- Quality Preservation: Image-level distortion, perceptual, and CLIP similarity metrics showed that poisoned outputs were largely comparable to clean outputs, especially for SD v1.5/v2.
- CFT Effectiveness: Clean Fine-Tuning reduced ASR from 96% to 25% on CelebA-HQ, though it was less effective on heterogeneous datasets like ImageNet (100% to 93%).
- Ablation Study: Trigger amplitude and ControlNet guidance scale were found to be the primary drivers of attack success, while sampler steps had a minor effect.
Limitations and Future Work
- Heterogeneous Data Challenges for CFT: The paper notes that CFT is less effective on heterogeneous datasets (like ImageNet) compared to homogeneous ones (like CelebA-HQ). This suggests that more robust sanitization methods might be needed for diverse data scenarios.
- SD-XL Robustness: While susceptible, SD-XL showed slightly higher resistance at low poison ratios, indicating potential avenues for further investigation into model-specific defenses.
- Future Work Recommendations: The authors advocate for:
- Model provenance and integrity: Implementing digital signatures or checksums for ControlNet artifacts.
- Runtime monitoring: Logging and flagging unusual generation outputs.
- Scheduled sanitization: Regularly re-fine-tuning ControlNets with CFT.
- Audit testing: Integrating adversarial-trigger probes into CI pipelines.
- Collaboration: Sharing standardized trigger probes and mitigation code.
Summary updated