DiSCO makes text-to-image AI 37% safer without retraining
New black-box defense reduces harmful image generation by 37% without touching the model...
A team led by Tong Zhang from KAUST has developed DiSCO (Distribution-guided Contrastive Prompt Optimization), a plug-and-play black-box defense for text-to-image generative models like Stable Diffusion or DALL-E. Unlike white-box approaches that require model access or retraining, DiSCO operates entirely at the prompt level, making it universally applicable to proprietary systems.
The method works by expanding user prompts with safe suffixes via beam search, optimized through contrastive scoring between safe and unsafe image pools generated by the target model. It iteratively refines prompts until harmful content is suppressed—achieving a 37.7% reduction in attack success rate (ASR) on the I2P benchmark under red-teaming attacks. Crucially, DiSCO addresses 'benign adversarial' prompts: linguistically safe inputs that still trigger NSFW outputs due to the model’s learned data distribution, a gap unaddressed by prior defenses. Performance gains come without sacrificing semantic fidelity or image coherence, and the system requires no model modifications.
Published on arXiv (arXiv:2608.17067), DiSCO is positioned as a scalable, architecture-agnostic solution for AI safety teams deploying text-to-image systems in production environments.
- DiSCO (KAUST et al.) reduces NSFW generation in text-to-image models by 37.7% on the I2P benchmark without model retraining or access to internals
- Uses contrastive scoring over safe/unsafe image pools to detect 'benign adversarial' prompts that bypass traditional safety checks
- Plug-and-play: works as a suffix expansion module for any text-to-image system (e.g., Stable Diffusion, DALL-E)
Why It Matters
Offers a scalable, black-box solution to curb harmful AI-generated imagery without costly model overhauls or compliance risks.