Abstract
As Text-to-Image (TTI) models become increasingly integrated into digital workflows, ensuring their safety against the generation of harmful content is paramount. Current defenses primarily utilize keyword-based filters and simple image classifiers. This paper presents EvilPromptFuzzer, a systematic framework that leverages Large Language Models (LLMs) to expose vulnerabilities in TTI models. By employing a technique termed "semantic dilution," the framework crafts complex, descriptive prompts that mask malicious intent, successfully bypassing safety filters in models like DALL-E 3. Our findings reveal that certain risk categories, such as political extremism, can achieve generation success rates as high as 71%, underscoring a critical gap in existing content moderation strategies.
Introduction
Generative AI has seen a surge in popularity with the advent of TTI models like DALL-E 3, Midjourney, and Stable Diffusion. To mitigate the risk of generating harmful imagery, these models incorporate safety "guardrails." However, these defenses face two primary challenges:
- Protective Mechanisms (C1): Models often block specific "threatening tokens" (e.g., "gun," "blood"), which can be circumvented by alternative phrasing.
- Black-box Complexity (C2): The internal logic of these models is opaque, making it difficult for human red-teamers to manually craft diverse prompts that consistently bypass filters while maintaining the intended "evil" context.
EvilPromptFuzzer addresses these challenges by automating the prompt engineering process using an auxiliary LLM to probe and exploit the target model's weaknesses.
Methodology: The Fuzzing Framework
EvilPromptFuzzer operates through a two-stage process: initialization and construction.
Initialization
The framework first uses an auxiliary LLM (e.g., ChatGPT) to probe the target TTI model. It identifies "seed types"—combinations of characters, actions, and locations—and "sensitive words" that trigger the model's filters. These are stored in a Sensitive Words Vector to guide subsequent prompt generation.
Prompt Construction and Semantic Dilution
The core innovation of EvilPromptFuzzer is the semantic dilution technique. Instead of using forbidden keywords, the tool instructs an LLM to build a long, descriptive scene (typically 30–120 words) that implies the risk through context. For instance, instead of using the word "blood," the prompt might describe "splashes of thick red ink on a cold floor." This approach dilutes the malicious signal among many benign words, allowing the prompt to pass through the auditor.
The system also incorporates a feedback loop. If a prompt is rejected, the system identifies the likely offending words, updates the sensitive list, and regenerates a more "diluted" version of the scene.
Risk Taxonomy and Datasets
The study evaluates the framework across a broad spectrum of inappropriate content. The authors constructed a Seed Matrix covering 15 fine-grained risks categorized under five major headers: Violence, Disturbing, Hateful (Bias), Political, and Sexually Explicit.
To validate the results, the authors generated approximately 2,500 images and conducted a human study with 12 participants to verify if the generated imagery accurately reflected the intended inappropriate content.
Key Results and Insights
EvilPromptFuzzer demonstrated significant efficacy in bypassing commercial safety filters:
- High Success Rates: On DALL-E 3, the success rate for generating inappropriate images exceeded 30% for most categories.
- Vulnerable Categories: Efficiency was notably high for Political Symbols (71%), Disgusting content (64%), and Horrible imagery (58%).
- Comparative Performance: In head-to-head tests, EvilPromptFuzzer achieved a 41% success rate across violent, disturbing, and political risks, significantly outperforming previous methods like Unsafe Diffusion, which reached only 12%.
Furthermore, the study tested the generated "evil" images against industry-standard moderation platforms (Amazon Rekognition, Google SafeSearch, Azure AI, and Baidu). The results were startling: Google identified only 33.85% of the malicious images, while Azure caught a mere 2.34%.
Conclusion
The success of EvilPromptFuzzer highlights a fundamental weakness in current TTI safety mechanisms: they are much better at catching "what" is said (keywords) than "what is meant" (context). While models like DALL-E 3 show higher resistance to sexual content, they remain highly vulnerable to context-based attacks in other domains. Future research must focus on developing context-aware image detectors capable of seeing through the "diluted" prompts that LLMs can now effortlessly generate.
Summary updated