SPOT: Selective Prompt Projection via Total Variation for Inference-Only Safe Text-to-Image Generation
About
Text-to-Image (T2I) diffusion models enable high quality open ended synthesis, but practical use requires suppressing unsafe generations while preserving behavior on benign prompts. We study this tension relative to the frozen generator, using its prompt conditioned distribution as the preservation reference. Since T2I safety is commonly evaluated by bounded risk scores on generated images, total variation (TV) bounds how much expected risk can change from this reference. We call this fixed reference constraint the Safety-Prompt Alignment Tradeoff (SPAT): reducing expected unsafety requires prompt conditioned distributional deviation. To make this deviation selective and adjustable, we define the tau safe set as prompts whose reference risk is at most tau, and cast intervention as projection toward nearby prompts in this set. We propose Selective Prompt prOjecTion (SPOT), an inference time framework that approximates this projection without retraining the generator or learning a category specific rewriter. SPOT uses an LLM to rank candidate rewrites and a safeguard VLM to accept generated images under the same tau. Across four datasets and three diffusion backbones, SPOT achieves relative inappropriate (IP) score reductions from 14.2% to 44.4% over strong safety alignment baselines while keeping benign prompt behavior close to the fixed reference.
Related benchmarks
| Task | Dataset | Result | Rank | |
|---|---|---|---|---|
| Safe Text-to-Image Generation | I2P | Inappropriate Probability4 | 23 | |
| Safe Text-to-Image Generation | COCO 3K | FID32.45 | 23 | |
| Safe Text-to-Image Generation | CoPro V2 (test) | IP5 | 23 | |
| Safe Text-to-Image Generation | Unsafe Diffusion (UD) | IP Score4 | 23 |