Inference-Only Prompt Projection for Safe Text-to-Image Generation with TV Guarantees
Minhyuk Lee, Hyekyung Yoon, Myungjoo Kang
TL;DR
This work addresses the risk of unsafe outputs in open-ended text-to-image diffusion by formulating a total variation (TV) based Safety-Prompt Alignment Trade-off (SPAT) and proposing an inference-only prompt projection that safely constrains high-risk prompts without retraining the generator. The method localizes intervention to the prompt space via a two-stage cascade (LLM-based surrogate and safeguard VLM verifier) and defines a τ-safe target through a projection kernel, ensuring minimal disruption to benign prompts. Empirically, the approach achieves substantial reductions in inappropriate content (IP) across multiple backbones and datasets while preserving benign prompt-image alignment (e.g., on COCO) and demonstrating robustness to adversarial prompts. The work provides a principled, scalable framework for deploying safe T2I systems with TV guarantees and a practical projection-based pipeline suitable for real-world safety stacks.
Abstract
Text-to-Image (T2I) diffusion models enable high-quality open-ended synthesis, but their real-world deployment demands safeguards that suppress unsafe generations without degrading benign prompt-image alignment. We formalize this tension through a total variation (TV) lens: once the reference conditional distribution is fixed, any nontrivial reduction in unsafe generations necessarily incurs TV deviation from the reference, yielding a principled Safety-Prompt Alignment Trade-off (SPAT). Guided by this view, we propose an inference-only prompt projection framework that selectively intervenes on high-risk prompts via a surrogate objective with verification, mapping them into a tolerance-controlled safe set while leaving benign prompts effectively unchanged, without retraining or fine-tuning the generator. Across four datasets and three diffusion backbones, our approach achieves 16.7-60.0% relative reductions in inappropriate percentage (IP) versus strong model-level alignment baselines, while preserving benign prompt-image alignment on COCO near the unaligned reference.
