AIResearch AIResearch
Back to articles
AI

AI Now Filters Harmful Images in Real Time

A new artificial intelligence method can detect and remove inappropriate content from AI-generated images as they're being created—without sacrificing image quality. This breakthrough addresses a cr…

AI Research
November 14, 2025
2 min read
AI Now Filters Harmful Images in Real Time

A new artificial intelligence method can detect and remove inappropriate content from AI-generated images as they're being created—without sacrificing image quality. This breakthrough addresses a critical challenge in text-to-image generation, where traditional filtering approaches often degrade image fidelity while attempting to block unwanted content.

The research team from KAIST developed Vision-Language Model Guided Dynamic Negative Prompting (VL-DNP), which uses advanced vision-language models to identify emerging problematic content during the image generation process. Unlike conventional methods that rely on predefined negative prompts, this system dynamically generates targeted negative instructions based on what the AI actually detects in the evolving image.

The methodology builds on standard classifier-free guidance used in diffusion models like Stable Diffusion. At specific timesteps during the denoising process (at steps 45, 23, 16, and 8), the system queries a vision-language model to analyze the partially generated image. The VLM then produces context-specific negative prompts that guide the remaining generation steps away from detected inappropriate content. This approach integrates seamlessly with existing diffusion models without requiring retraining or architectural changes.

Experimental results across multiple benchmark datasets demonstrate significant improvements. On the P4D dataset, VL-DNP achieved an attack success rate (ASR) of 0.225 while maintaining a CLIP score of 0.277, outperforming static negative prompting which achieved the same safety level only with a CLIP score of 0.252—representing a 10% improvement in text-image alignment. The system showed similar advantages across COCO-100, SAFREE, and Unlearn-Diff datasets, consistently pushing the safety-alignment frontier outward compared to conventional approaches.

This advancement matters because it enables more reliable content filtering for AI image generation systems used in commercial applications, creative tools, and research platforms. By dynamically adapting to emerging content rather than relying on predetermined filters, the method reduces over-suppression of legitimate content while effectively blocking inappropriate material. This balance is crucial for practical deployment where both safety and quality are essential.

The approach does introduce additional computational overhead, increasing inference time from 7.5 seconds to 12.9 seconds per image compared to baseline methods. The effectiveness also depends on the quality of the vision-language model used, and the current implementation requires careful scheduling of when to apply the dynamic negative prompts. Future work may address these limitations through caching strategies, more efficient vision-language models, or distillation techniques to reduce computational demands.

About the Author

Guilherme A.

Guilherme A.

Former dentist (MD) from Brazil, 41 years old, husband, and AI enthusiast. In 2020, he transitioned from a decade-long career in dentistry to pursue his passion for technology, entrepreneurship, and helping others grow.

Connect on LinkedIn