Seeing It Before It Happens: In-Generation NSFW Detection for Diffusion-Based Text-to-Image Models
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
- 2024DiffZOO: A Purely Query-Based Black-Box Attack for Red-teaming Text-to-Image Generative Model via Zeroth Order Optimization18 Aug
- 2024Adversarial Attacks and Defenses on Text-to-Image Diffusion Models: A Survey10 Jul
- 2023MMA-Diffusion: MultiModal Attack on Diffusion Models29 Nov
- 2023Ring-A-Bell! How Reliable are Concept Removal Methods for Diffusion Models?16 Oct
- 2023Prompting4Debugging: Red-Teaming Text-to-Image Diffusion Models by Finding Problematic Prompts12 Sep
- 2023SneakyPrompt: Jailbreaking Text-to-image Generative Models20 May
- 2022Safe Latent Diffusion: Mitigating Inappropriate Degeneration in Diffusion Models9 Nov
Other references · 4
- 2014Microsoft COCO: Common Objects in Contextcited by 17,608
- 2022Hierarchical Text-Conditional Image Generation with CLIP Latentscited by 6,585
- 2022A Holistic Approach to Undesired Content Detection in the Real Worldcited by 356
- 2024GuardT2I: Defending Text-to-Image Models from Adversarial Promptscited by 62
Built on by
Citing papers per year: 2026: 3.
3 papers.
- 2026EDGE-Shield: Efficient Denoising-staGE Shield for Violative Content Filtering via Scalable Reference-Based Matchingcited by 0
- 2026Latent Space Probing for Adult Content Detection in Video Generative Modelscited by 0
- 2026Introspective Attention Modulation for Safe Text-to-Image Generationcited by 0
- 2026Introspective Attention Modulation for Safe Text-to-Image Generation16 Jul 2026
- 2026Latent Space Probing for Adult Content Detection in Video Generative Models25 Apr 2026
- 2026EDGE-Shield: Efficient Denoising-staGE Shield for Violative Content Filtering via Scalable Reference-Based Matching4 Apr 2026
Similar, not cited
Close in wording, no citation either way
- 2026Disciplined Diffusion: Text-to-Image Diffusion Model against NSFW Generation
- 2026FlowGuard: Towards Lightweight In-Generation Safety Detection for Diffusion Models via Linear Latent Decoding
- 2025Beautiful Images, Toxic Words: Understanding and Addressing Offensive Text in Generated Images
- 2024AdvI2I: Adversarial Image Attack on Image-to-Image Diffusion models
- 2026UniNDM: A Unified Noise-driven Detection and Mitigation Framework Against Sexual Content in Text-to-Image Generation
- 2025Comprehensive Evaluation and Analysis for NSFW Concept Erasure in Text-to-Image Diffusion Models
- 2026Test-Time Scaling for Safe Text-Guided Image Generation via Intermediate Clean Estimates
- 2025Comprehensive Assessment and Analysis for NSFW Content Erasure in Text-to-Image Diffusion Models