Editor’s introduction
The study evaluates how effectively five open text-to-image models generate harmful content when prompted with realistic, malicious inputs targeting violence, sexual content, stereotypes, hate speech, and self-harm. Human annotators assessed 1,500 generated images, showing high rates of harmful output: 89.2% for gore, 47.6% for sexually explicit content, and significant levels for stereotypes and hate speech. Inter-annotator agreement was strong for gore, self-harm, and sexually explicit content, but lower for stereotypes and hate speech due to their cultural and contextual complexity. Community fine-tuned models were especially vulnerable to sexually explicit prompts. Despite safety mechanisms, the generated images maintain high realism, with FLUX.1-dev producing clearly realistic harmful content in 30.9% of cases. Synthetic image detectors trained on benign data perform poorly on explicit content, indicating a gap in semantic understanding and training diversity. These findings reveal systemic weaknesses in current safeguards, detection, and model design against harmful misuse.
Introduction
Despite growing awareness of these risks and documented evidence of harmful content generation capabilities, systematic evaluations of current T2I models’ responses to potentially harmful prompts are scarce. To address this gap, in this paper we systematically evaluate modern T2I models’ harmful content generation. We begin with the VisualNews dataset, which contains captions of real-world news events and photographs. We employ an automated pipeline using a large language model (LLM) to systematically convert these captions into harmful prompts across five critical categories: sexually explicit content, violent imagery (gore), harmful stereotypes, self-harm, and hate speech. The choice of VisualNews allows us to work with authentic descriptions of real-world events and scenarios. By transforming these captions into harmful variants, we can assess how easily generative models can be manipulated to produce harmful content from starting points that users might naturally encounter. This approach better reflects realistic threat scenarios where malicious actors might exploit legitimate news content to generate misleading or harmful imagery.
We validate the effectiveness of our prompt conversion process using established text moderation tools to confirm that the transformed prompts are successfully classified as harmful across our target categories. Subsequently, we generate images using a diverse range of models, including models that have been specifically fine-tuned on explicit content. We conduct a human evaluation study on a sample of generated images, asking annotators to assess whether images contain harmful visual content as well as their perceived photorealism and plausibility. We also employ automated tools to assess the quality and prompt adherence of the generated content. Finally, we analyze all generated images using state-of-the-art image moderation tools to determine the extent to which harmful prompts successfully produce harmful visual outputs. Additionally, we evaluate synthetic image detection algorithms to assess their performance on explicit content, examining whether semantic content affects detectability. Using the human-annotated subset as ground truth, we evaluate the performance of these automated moderation systems and reveal critical limitations in them, quantifying the gap between current safety measures and actual harmful content detection capabilities for AI generated images. To our knowledge, no prior work jointly evaluates this full pipeline, covering scalable harmful prompt generation, commercial moderation tool failure, and semantic distribution shift in synthetic image detection, under a realistic and accessible threat scenario that requires no specialized expertise.
Image Generation
T2I generation has undergone substantial evolution across multiple architectural approaches. Early methods were dominated by Generative Adversarial Networks (GANs), with architectures like StyleGAN and BigGAN demonstrating high-quality image synthesis capabilities, though often limited to specific domains or requiring specially designed training stability techniques. The introduction of denoising diffusion probabilistic models (DDPMs) marked a seminal shift, providing a likelihood-based framework for stable training and increasingly competitive image quality. GLIDE extended this direction by introducing classifier-free guidance, substantially improving text–image alignment in diffusion models. In parallel, DALL-E demonstrated the potential of autoregressive transformers for T2I generation. Its successor, DALL-E 2, transitioned to a diffusion-based framework, combining a prior over CLIP embeddings with a diffusion decoder to produce high-quality images. Imagen achieved state-of-the-art photorealism through cascaded diffusion models conditioned on large language model encoders. The Stable Diffusion family made high-quality generation accessible by operating in latent space rather than pixel space, enabling efficient training and inference. Several recent surveys provide context for these advances, highlighting major architectural trends, theoretical developments, and the open challenges that remain in image generation.
Training Data Issues and Safety Mechanisms
Large-scale training datasets used for T2I models were found to contain significant amounts of harmful content. The LAION-5B dataset, used to train models such as Stable Diffusion, has been shown to include hateful content, misogynistic stereotypes, demographic biases, and instances of child sexual abuse. These discoveries raise questions about whether image generation models could potentially reflect and amplify existing societal biases present in online content. Although cleaned versions were subsequently released, widely used models including Stable Diffusion 1.5 were trained on earlier versions, allowing these issues to persist.
To address potential misuse by malicious actors and mitigate potential biases inherent in their training datasets, T2I models employ various safety mechanisms to prevent harmful content generation. Safety mechanisms broadly include inference-time filtering and training-time interventions. The former includes prompt screening and generated image filtering, while the latter includes training data curation, safety-oriented fine-tuning, embedding space interventions such as SafeCLIP, and preference alignment. More recently, propose a concept erasure approach that suppresses undesirable concepts such as nudity, violence, and hate while preserving non-target content and improving robustness to adversarial prompt variations. However, research has demonstrated that these safety mechanisms can often be easily bypassed. Moreover, many filters focus primarily on sexual content while inadequately addressing violence, gore, and other forms of harmful imagery, creating significant gaps in protection.
Harmful Content Generation and Misuse
Despite their beneficial applications across domains, foundation models enable the generation of “high-quality, cheap, and personalized content for harmful purposes,” lowering barriers for malicious content creation. Despite the benefits of open-source generative AI models, their accessibility increases misuse risks by removing commercial safety barriers and enabling customization for harmful applications. AI-generated content presents challenges including political misinformation, identity-based attacks, manipulation schemes, and fraud operations. Model capabilities reduce both the cost and technical expertise required for generating harmful content at scale. Evidence from real-world deployments demonstrates this progression from potential to practice, with documented increases in deepfake creation following tool releases and the emergence of commercial marketplaces for synthetic content generation. Closely related to our work, assess the proportion of unsafe images generated by T2I models across five harm categories and evaluate hateful meme generation using image editing techniques such as DreamBooth, while employ LLM-assisted fuzzing to construct diverse malicious prompts across fine-grained risk categories while avoiding sensitive terms to bypass T2I content auditing. In contrast, our work adopts a simpler, corpus-driven threat model, demonstrating that any neutral text corpus can be systematically transformed into harmful prompts using a single open-weight LLM, without probing the target model or explicitly optimizing prompts to evade its safety mechanisms.
Building on these broader concerns, T2I models demonstrate significant inherent capabilities to generate harmful visual content across multiple categories. Empirical studies have documented models’ abilities to produce violent imagery, sexually explicit material, gore, and other disturbing visual content when prompted with both explicit and seemingly innocuous prompts. Research has also identified “harm amplification” phenomena, where models generate harmful representations that were not explicitly present in seemingly safe input prompts, posing risks to users who may be unintentionally exposed to disturbing content. In addition to generating overtly harmful content, T2I models can amplify societal biases and misrepresent groups of people, producing stereotypical or prejudiced depictions based on race, gender, or other attributes. Furthermore, open-source diffusion models can be easily fine-tuned with harmful datasets to bypass existing safety measures, enabling the generation of NSFW content with minimal effort. A recent study analyzing images and models shared on the social platform CivitAI, a popular platform for distributing generative models, found that a significant portion of content and models is dedicated to creating NSFW and abusive material.
Content Moderation and Synthetic Image Detection
Content moderation research has focused on detecting harmful content across various domains, with particular challenges emerging around synthetic and AI-generated material. Early systems like Perspective API established foundational approaches for toxic language detection in online environments. Recent advances have adapted large language models specifically for content moderation, with specialized models fine-tuned to detect harmful content in both prompts and AI outputs and have shown improved performance against attempts to generate prohibited content. However, these systems still face severe challenges. Several studies have highlighted difficulties for content moderation systems that must balance automated efficiency with accuracy constraints while facing declining user trust as inadequate detection methods undermine confidence in the platforms’ ability to reliably identify AI-generated content.
Complementing content moderation efforts, synthetic image detection has emerged as an approach to identify AI-generated images through various methodologies. Detection methods range from supervised approaches that train classifiers on labeled datasets to CLIP-based methods that leverage pre-trained vision-language models, and reconstruction techniques that measure discrepancies between original and reconstructed images. However, most detection algorithms follow a data-driven approach, typically training on datasets generated using COCO captions. Current benchmarks primarily focus on distinguishing between different generative architectures rather than evaluating performance across diverse content types. This creates limitations when detection systems encounter content that differs from their training distributions. Recent work has demonstrated that incorporating synthetic images collected “in the wild” from social media platforms can significantly improve detection performance, suggesting that the semantic content of synthetic images affects detectability.
Methodology
We devise a systematic pipeline to evaluate the harmful content generation capabilities of T2I models at scale. Our approach leverages LLMs and T2I models to simulate realistic attack scenarios where malicious actors aim to use open models to generate harmful imagery. The pipeline serves two primary purposes: (1) mimicking human behavior in how potentially unsafe content could be crafted effortlessly using public datasets and open LLMs, and (2) providing an automated framework to assess harmful content generation capabilities at scale, enabling comprehensive evaluation across multiple models and content categories.
Prompt and Image Generation Pipeline
We begin with a collection of captions that serve as a starting point rather than generating prompts from scratch for two reasons. First, using diverse starting points as “seeds” increases the variability and realism of the resulting unsafe prompts, as they reflect different real-world entities and events. Second, the original safe prompts serve as a natural reference set for comparative analysis, allowing us to assess whether models exhibit equal capabilities in generating high-quality harmful versus benign content. To assess harmful content generation risks, we systematically transform original captions into unsafe prompts targeting categories of content that pose significant safety concerns. The transformation process uses category-specific prompting methodologies that instruct the LLM to create visually descriptive scenes incorporating harmful elements. We validate that our transformed prompts contained harmful content, as intended, using multiple specialized text classification models.
The transformed prompts are then given to a diverse range of open T2I models with varying capabilities and safety mechanisms, including both standard models with built-in safety features and community fine-tuned variants designed to bypass content restrictions. We disable external safety filters during generation to focus on models’ inherent capabilities and built-in safety mechanisms. We generate images using both the original captions and the unsafe prompts derived from them, allowing for direct comparison of outputs.
Evaluation Framework
Our evaluation addresses the central research question: How successfully can current T2I models generate harmful content when prompted appropriately? We employ a multi-level assessment approach that quantifies both attack success rates and the effectiveness of current detection mechanisms.
To assess whether images generated from unsafe prompts actually contain harmful content, we employ pretrained content moderation systems. However, given documented limitations in automated detection systems, we conducted a human evaluation study using stratified sampling across caption types and generation models to establish reliable ground truth labels. Annotators were informed that all images were AI-generated. For each image, annotators rated five harm dimensions – sexually explicit content, stereotypes, violence/gore, self-harm, and hate speech – using a four-point scale: no, mild, moderate, and extreme. Ratings are guided by two dimensions considered jointly: the graphicness of the depiction (how explicit, severe, or detailed the harmful content is) and the apparent intent to depict or promote that content. The latter is particularly relevant for categories such as self-harm, stereotypes, and hate speech, where the same visual elements may carry very different meaning depending on context. In addition to the harm dimensions, annotators rated each image on a realism scale (N/A, no, potentially, likely, yes), reflecting how convincingly the image could be mistaken for a real photograph, combining rendering quality with scene plausibility. Full annotation guidelines, including per-category level descriptions, are provided in the Appendix. This enabled us to quantify the success rate of harmful content generation and the gap between current automated safety measures and actual harmful content detection capabilities.
Implementation Details
Our human evaluation study relies on a sample of 1,500 images with balanced representation across categories and involved 8 participants (5 male, 3 female) for annotation, all of Greek cultural background. In total we received 6000 votes, with each image receiving at least 4 votes. Despite the limited scale, we consider the detection of explicit content sufficiently non-ambiguous that provides adequate ground truth labels across the evaluated harm categories despite the homogeneous annotator pool.
Image Quality and Prompt Adherence
In contrast, HPS v2.1 shows no statistically significant degradation for any model or harmful category. All models score higher on harmful categories than on caption prompts, with gore consistently achieving the highest HPS v2.1 scores. The divergence for NSFW content is notable: ImageReward penalizes it strongly, whereas HPS v2.1 does not, indicating that the metrics capture different aspects of human preference.
Overall, the results show that models largely maintain prompt adherence and automated image quality scores under harmful prompting. The main exception is NSFW content under ImageReward, where all models show significant degradation, though even here the generated images generally exceed the real image baseline. Thus, safety mechanisms, where present, have limited impact on output quality for most harmful content categories.
Human Annotation Results
In this section we present the results from the human annotation study to determine a ground truth for the effectiveness of the models to generate harmful content from harmful prompts. Annotators independently rated each image across all five harm dimensions and realism. Inter-annotator agreement was measured using Fleiss’ Kappa. Almost perfect agreement is observed for Sexually Explicit (0.8454), Violence/Gore (0.8513), and Self-Harm (0.8014). For Hate Speech (0.6059) and Stereotypes (0.6241) there is lower but still substantial agreement, reflecting that these categories inherently rely on cultural context, coded symbols, and nuanced interpretation, making absolute consensus more challenging to achieve. Realism shows moderate agreement (0.4557) and this can be attributed to the inherent subjectivity in judging image naturalness and plausibility. Ground-truth labels were obtained from the mean annotation. For binary analyses, we adopted a conservative mapping in which mild, moderate, and extreme were considered unsafe; results under the alternative mapping, which groups mild with safe, are reported in the appendix.
Some expected cross-category overlap occurs between content types. Gore images show 7.6% sexual content violations, and NSFW images contain 16.8% violence violations, showing that harmful material often spans multiple categories. The gore category produces the highest severity violations, with 46.8% extreme violence content, while sexual and stereotype categories show more moderate violations with extreme cases at 6.0% and 4.4% respectively. Self-harm prompts also produce notable violent imagery, with 71.9% of generated images containing problematic violence content, reflecting the visual depiction of self-harmful acts. Hate speech prompts show meaningful cross-category overlap with stereotypes, as harmful stereotype prompts produce 34.1% problematic hate speech content, reflecting the semantic proximity of these two categories.
Conclusion
This study evaluates the susceptibility of T2I models to large-scale harmful content generation and the effectiveness of current moderation and synthetic image detection systems. Our results show that harmful prompts can produce unsafe content across all evaluated models, while moderation systems exhibit substantial detection gaps, particularly for stereotypes and hate speech. We further find that synthetic image detectors trained only on benign content are less reliable on explicit imagery, highlighting semantic distribution shifts in current detection pipelines.


