[Paper Review] Unsafe Diffusion: On the Generation of Unsafe Images and Hateful Memes From Text-To-Image Models
This paper investigates the generation of unsafe images and hateful memes using text-to-image models, finding that 14.56% of generated images across four models are unsafe, with Stable Diffusion producing 18.92% unsafe content. Using DreamBooth, 24% of edited images became hateful meme variants, demonstrating high risk for large-scale misuse.
State-of-the-art Text-to-Image models like Stable Diffusion and DALLE$\cdot$2 are revolutionizing how people generate visual content. At the same time, society has serious concerns about how adversaries can exploit such models to generate unsafe images. In this work, we focus on demystifying the generation of unsafe images and hateful memes from Text-to-Image models. We first construct a typology of unsafe images consisting of five categories (sexually explicit, violent, disturbing, hateful, and political). Then, we assess the proportion of unsafe images generated by four advanced Text-to-Image models using four prompt datasets. We find that these models can generate a substantial percentage of unsafe images; across four models and four prompt datasets, 14.56% of all generated images are unsafe. When comparing the four models, we find different risk levels, with Stable Diffusion being the most prone to generating unsafe content (18.92% of all generated images are unsafe). Given Stable Diffusion's tendency to generate more unsafe content, we evaluate its potential to generate hateful meme variants if exploited by an adversary to attack a specific individual or community. We employ three image editing methods, DreamBooth, Textual Inversion, and SDEdit, which are supported by Stable Diffusion. Our evaluation result shows that 24% of the generated images using DreamBooth are hateful meme variants that present the features of the original hateful meme and the target individual/community; these generated images are comparable to hateful meme variants collected from the real world. Overall, our results demonstrate that the danger of large-scale generation of unsafe images is imminent. We discuss several mitigating measures, such as curating training data, regulating prompts, and implementing safety filters, and encourage better safeguard tools to be developed to prevent unsafe generation.
Motivation & Objective
- To assess the susceptibility of state-of-the-art text-to-image models to generating unsafe content when deliberately prompted.
- To investigate whether adversaries can exploit fine-tuning techniques to automatically generate realistic hateful memes.
- To identify root causes of unsafe image generation and propose actionable mitigations for developers and policymakers.
- To establish a comprehensive typology of unsafe content, including sexually explicit, violent, disturbing, hateful, and political images.
- To raise awareness about the risks of AI-generated harmful content and advocate for stronger safety safeguards in diffusion models.
Proposed method
- Constructed a five-category typology of unsafe images: sexually explicit, violent, disturbing, hateful, and political.
- Evaluated four open-source text-to-image models—Stable Diffusion, Latent Diffusion, DALL·E 2-demo, and DALL·E mini—using three high-risk prompt datasets from 4chan, Lexica, and a custom template-based dataset.
- Applied three image editing methods—DreamBooth, Textual Inversion, and SDEdit—to fine-tune Stable Diffusion for hateful meme generation.
- Conducted manual annotation of generated images to classify unsafe content, prioritizing ethical safety by avoiding third-party exposure.
- Measured the proportion of unsafe images and hateful meme variants across models and prompt sets to assess risk levels.
- Evaluated the realism and similarity of AI-generated hateful memes to real-world variants using qualitative and comparative analysis.
Experimental results
Research questions
- RQ1RQ1: How prone are text-to-image models to generating unsafe content when prompted with harmful text, and what are the differences across models and prompt datasets?
- RQ2RQ2: Can adversaries use fine-tuning techniques to automatically generate realistic hateful meme variants from text-to-image models?
- RQ3RQ3: What are the root causes of unsafe image generation in diffusion models, and how can they be mitigated through data curation, prompt regulation, or safety filters?
Key findings
- Across four text-to-image models and four prompt datasets, 14.56% of all generated images were classified as unsafe.
- Stable Diffusion exhibited the highest risk, generating unsafe content in 18.92% of all outputs.
- Using DreamBooth, 24% of the generated images were identified as hateful meme variants that preserved key features of real-world hateful memes.
- The study found that even with safe textual prompts, models can still generate unsafe content, indicating inherent vulnerabilities.
- Image editing methods like DreamBooth enable adversaries to effectively fine-tune models to produce realistic, targeted hateful memes at scale.
- The results highlight an urgent need for improved safety filters, ethical data curation, and detection tools to counter AI-generated harmful content.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.