Patronus: Safeguarding Text-to-Image Models against White-Box Adversaries
Preprint
Abstract
Text-to-image (T2I) models, though exhibiting remarkable creativity in image generation, can be exploited to produce unsafe images. Existing safety measures, e.g., content moderation or model alignment, fail in the presence of white-box adversaries who know and can adjust model parameters, e.g., by fine-tuning. This paper presents a novel defensive framework, named Patronus, which equips T2I models with holistic protection to defend against white-box adversaries. Specifically, we design an internal moderator that decodes unsafe input features into zero vectors while ensuring the decoding performance of benign input features. Furthermore, we strengthen the model alignment with a carefully designed non-fine-tunable learning mechanism, ensuring the T2I model will not be compromised by malicious fine-tuning. We conduct extensive experiments to validate the intactness of the performance on safe content generation and the effectiveness of rejecting unsafe content generation. Results also confirm the resilience of Patronus against various fine-tuning attacks by white-box adversaries.Keywords
All Related Versions
This publication has 9 references indexed in Scilit:
- MMA-Diffusion: MultiModal Attack on Diffusion Models2024
- SneakyPrompt: Jailbreaking Text-to-image Generative Models2024
- GuardT2I: Defending Text-to-Image Models from Adversarial Prompts2024
- Unsafe Diffusion: On the Generation of Unsafe Images and Hateful Memes From Text-To-Image Models2023
- Self-Destructing Models: Increasing the Costs of Harmful Dual Uses of Foundation Models2023
- Character As Pixels: A Controllable Prompt Adversarial Attacking Framework for Black-Box Text Guided Image Generation Models2023
- On Aliased Resizing and Surprising Subtleties in GAN Evaluation2022
- The Unreasonable Effectiveness of Deep Features as a Perceptual Metric2018
- ImageNet: A large-scale hierarchical image database2009