mlsanityData to 14 Oct 2026

Seeing It Before It Happens: In-Generation NSFW Detection for Diffusion-Based Text-to-Image Models

arXiv 2508.03006 ↗First posted 5 Aug 2025cs.CVcited by 3

On the map: Diffusion models → Robustness, privacy and adversarial aspects

Abstract (arXiv)

Diffusion-based text-to-image (T2I) models enable high-quality image generation but also pose significant risks of misuse, particularly in producing not-safe-for-work (NSFW) content. While prior detection methods have focused on filtering prompts before generation or moderating images afterward, the in-generation phase of diffusion models remains largely unexplored for NSFW detection. In this paper, we introduce In-Generation Detection (IGD), a simple yet effective approach that leverages the predicted noise during the diffusion process as an internal signal to identify NSFW content. This approach is motivated by preliminary findings suggesting that the predicted noise may capture semantic cues that differentiate NSFW from benign prompts, even when the prompts are adversarially crafted. Experiments conducted on seven NSFW categories show that IGD achieves an average detection accuracy of 91.32% over naive and adversarial NSFW prompts, outperforming seven baseline methods.

Key facts. Cited by 3 papers in the map (data through 14 Oct 2026). Placed in Robustness, privacy and adversarial aspects, one of 14 directions in Diffusion models. Builds on 11 of its 24 references that are in the map. First posted on arXiv 5 Aug 2025.

Builds on

11 of 24 references.

Closest ancestors · 7

Same direction, newest first

  1. 2024DiffZOO: A Purely Query-Based Black-Box Attack for Red-teaming Text-to-Image Generative Model via Zeroth Order Optimization18 Aug
  2. 2024Adversarial Attacks and Defenses on Text-to-Image Diffusion Models: A Survey10 Jul
  3. 2023MMA-Diffusion: MultiModal Attack on Diffusion Models29 Nov
  4. 2023Ring-A-Bell! How Reliable are Concept Removal Methods for Diffusion Models?16 Oct
  5. 2023Prompting4Debugging: Red-Teaming Text-to-Image Diffusion Models by Finding Problematic Prompts12 Sep
  6. 2023SneakyPrompt: Jailbreaking Text-to-image Generative Models20 May
  7. 2022Safe Latent Diffusion: Mitigating Inappropriate Degeneration in Diffusion Models9 Nov

Other references · 4

  1. 2014Microsoft COCO: Common Objects in Contextcited by 17,608
  2. 2022Hierarchical Text-Conditional Image Generation with CLIP Latentscited by 6,585
  3. 2022A Holistic Approach to Undesired Content Detection in the Real Worldcited by 356
  4. 2024GuardT2I: Defending Text-to-Image Models from Adversarial Promptscited by 62

Built on by

Cited by year (2026 to 14 Oct)

Citing papers per year: 2026: 3.

3 papers.

Similar, not cited

Close in wording, no citation either way

  1. 2026Disciplined Diffusion: Text-to-Image Diffusion Model against NSFW Generation
  2. 2026FlowGuard: Towards Lightweight In-Generation Safety Detection for Diffusion Models via Linear Latent Decoding
  3. 2025Beautiful Images, Toxic Words: Understanding and Addressing Offensive Text in Generated Images
  4. 2024AdvI2I: Adversarial Image Attack on Image-to-Image Diffusion models
  5. 2026UniNDM: A Unified Noise-driven Detection and Mitigation Framework Against Sexual Content in Text-to-Image Generation
  6. 2025Comprehensive Evaluation and Analysis for NSFW Concept Erasure in Text-to-Image Diffusion Models
  7. 2026Test-Time Scaling for Safe Text-Guided Image Generation via Intermediate Clean Estimates
  8. 2025Comprehensive Assessment and Analysis for NSFW Content Erasure in Text-to-Image Diffusion Models