Introduction
Text-to-Image (T2I) models like Stable Diffusion and DALL-E have revolutionized content creation but also pose significant risks regarding the generation of Not-Safe-For-Work (NSFW) content. To mitigate these risks, developers employ a dual-layered defense strategy: prompt filters to block malicious text inputs before generation and safety checkers to intercept NSFW images post-generation. While "jailbreak" attacks have been developed to bypass these safeguards, existing multimodal attacks are largely input-specific. This requires a computationally expensive optimization process for every unique prompt or image, limiting their practical application against black-box commercial APIs.
The U3-Attack Framework
The researchers introduce the Universally Unfiltered and Unseen (U3)-Attack, a highly efficient, input-agnostic multimodal jailbreak. Unlike previous methods that require time-consuming optimization for every single prompt or image, U3-Attack decouples the jailbreak into two independent, reusable components that can be computed once and applied across diverse inputs.
1. Prompt-Agnostic Text Attack
Instead of optimizing an entire adversarial prompt from scratch, U3-Attack targets specific sensitive keywords (e.g., "naked"). By performing gradient-based optimization in the CLIP text encoder's latent space, the attack generates a "paraphrase set"—a collection of safe-looking or gibberish tokens that map to the same embedding as the sensitive word. Users can simply swap sensitive terms in any prompt with these pre-computed paraphrases to bypass text filters.
2. Image-Agnostic Image Attack
Targeting T2I inpainting models, the authors craft a universal adversarial patch placed in the non-inpainted background (typically the top-left corner). Since inpainting models preserve the background, the patch survives the generation process to "blind" the post-generation safety checker.
The patch optimization involves two stages:
- Safety Checker-Guided Initialization: The patch is optimized to fool the safety checker using a dataset of 1,000 NSFW images.
- Robustness Enhancement: To account for minor distortions during the diffusion process, the authors model the T2I model's effect as a residual transformation. This allows the patch to be fine-tuned for robustness without requiring white-box access to the massive diffusion model's internal gradients.
Key Results and Performance
The U3-Attack demonstrates significant improvements in both efficiency and effectiveness over state-of-the-art (SOTA) methods like MMA-Diffusion.
- Commercial API Success: On the Runway-inpainting model, U3-Attack achieved an Attack Success Rate (ASR-4-4) of 36.1%, which is approximately 4x higher than MMA-Diffusion (8.2%).
- Speed: The attack is remarkably fast. Generating an adversarial prompt takes roughly 2.74 minutes, compared to over 30 minutes for MMA-Diffusion—an 11x speedup due to the reusable nature of the paraphrase sets.
- Bypassing Concept Erasure: The text attack successfully bypassed models specifically fine-tuned to erase NSFW concepts (e.g., ESD and SLD-Max), maintaining success rates between 30% and 44%.
Conclusion and Future Directions
The U3-Attack highlights a critical vulnerability in current T2I safeguards by demonstrating that input-agnostic, "plug-and-play" perturbations can effectively bypass both text and image filters. While the attack shows lower success rates on highly robust proprietary pipelines like DALL-E 3 (37.6%), its efficiency makes it a potent threat. Future work aims to develop more natural-looking adversarial prompts and extend these techniques to text-to-video generation models using frame-agnostic perturbations.
Summary updated