mlsanityData to 14 Oct 2026

Safeguarding Text-to-Image Generation via Inference-Time Prompt-Noise Optimization

arXiv 2412.03876 ↗First posted 5 Dec 2024cs.CVcited by 7

On the map: Diffusion models → Robustness, privacy and adversarial aspects

Abstract (arXiv)

Text-to-Image (T2I) diffusion models are widely recognized for their ability to generate high-quality and diverse images based on text prompts. However, despite recent advances, these models are still prone to generating unsafe images containing sensitive or inappropriate content, which can be harmful to users. Current efforts to prevent inappropriate image generation for diffusion models are easy to bypass and vulnerable to adversarial attacks. How to ensure that T2I models align with specific safety goals remains a significant challenge. In this work, we propose a novel, training-free approach, called Prompt-Noise Optimization (PNO), to mitigate unsafe image generation. Our method introduces a novel optimization framework that leverages both the continuous prompt embedding and the injected noise trajectory in the sampling process to generate safe images. Extensive numerical results demonstrate that our framework achieves state-of-the-art performance in suppressing toxic image generations and demonstrates robustness to adversarial attacks, without needing to tune the model parameters. Furthermore, compared with existing methods, PNO uses comparable generation time while offering the best tradeoff between the conflicting goals of safe generation and prompt-image alignment.

Key facts. Cited by 7 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 41 of its 51 references that are in the map. First posted on arXiv 5 Dec 2024.

Builds on

41 of 51 references.

Closest ancestors · 13

Same direction, newest first

  1. 2024Understanding the Impact of Negative Prompts: When and How Do They Take Effect?5 Jun
  2. 2024SafeGen: Mitigating Sexually Explicit Content Generation in Text-to-Image Models10 Apr
  3. 2024Jailbreaking Prompt Attack: A Controllable Adversarial Attack against Diffusion Models2 Apr
  4. 2023SalUn: Empowering Machine Unlearning via Gradient-based Weight Saliency in Both Image Classification and Generation19 Oct
  5. 2023To Generate or Not? Safety-Driven Unlearned Diffusion Models Are Still Easy To Generate Unsafe Images ... For Now18 Oct
  6. 2023Ring-A-Bell! How Reliable are Concept Removal Methods for Diffusion Models?16 Oct
  7. 2023Unified Concept Editing in Diffusion Models25 Aug
  8. 2023Unsafe Diffusion: On the Generation of Unsafe Images and Hateful Memes From Text-To-Image Models23 May
  9. 2023SneakyPrompt: Jailbreaking Text-to-image Generative Models20 May
  10. 2023Forget-Me-Not: Learning to Forget in Text-to-Image Diffusion Models30 Mar
  11. 2023Erasing Concepts from Diffusion Models13 Mar
  12. 2022Safe Latent Diffusion: Mitigating Inappropriate Degeneration in Diffusion Models9 Nov
1 more
  1. 2022Red-Teaming the Stable Diffusion Safety Filter3 Oct

Other references · 28

  1. 2014Adam: A Method for Stochastic Optimizationcited by 37,240
  2. 2021Learning Transferable Visual Models From Natural Language Supervisioncited by 33,744
  3. 2020Denoising Diffusion Probabilistic Modelscited by 21,076
  4. 2021High-Resolution Image Synthesis with Latent Diffusion Modelscited by 18,863
  5. 2023Llama 2: Open Foundation and Fine-Tuned Chat Modelscited by 13,028
  6. 2020Denoising Diffusion Implicit Modelscited by 9,781
  7. 2021Diffusion Models Beat GANs on Image Synthesiscited by 8,255
  8. 2023Visual Instruction Tuningcited by 7,869
  9. 2015Deep Unsupervised Learning using Nonequilibrium Thermodynamicscited by 7,058
  10. 2022Photorealistic Text-to-Image Diffusion Models with Deep Language Understandingcited by 6,355
  11. 2023BLIP-2: Bootstrapping Language-Image Pre-training with Frozen Image Encoders and Large Language Modelscited by 6,137
  12. 2022Classifier-Free Diffusion Guidancecited by 5,847
16 more
  1. 2024GPT-4o System Cardcited by 4,588
  2. 2023SDXL: Improving Latent Diffusion Models for High-Resolution Image Synthesiscited by 4,356
  3. 2021Zero-Shot Text-to-Image Generationcited by 4,288
  4. 2024Scaling Rectified Flow Transformers for High-Resolution Image Synthesiscited by 4,181
  5. 2022LAION-5B: An open large-scale dataset for training next generation image-text modelscited by 4,152
  6. 2021Variational Diffusion Modelscited by 1,153
  7. 2016An overview of gradient descent optimization algorithmscited by 1,033
  8. 2023Training Diffusion Models with Reinforcement Learningcited by 982
  9. 2023Pick-a-Pic: An Open Dataset of User Preferences for Text-to-Image Generationcited by 977
  10. 2023Human Preference Score v2: A Solid Benchmark for Evaluating Human Preferences of Text-to-Image Synthesiscited by 890
  11. 2022Can Machines Help Us Answering Question 16 in Datasheets, and In Turn Reflecting on Inappropriate Content?cited by 155
  12. 2024Theoretical guarantees on the best-of-n alignment policycited by 124
  13. 2024UnsafeBench: Benchmarking Image Safety Classifiers on Real-World and AI-Generated Imagescited by 53
  14. 2024Direct Unlearning Optimization for Robust and Safe Text-to-Image Modelscited by 50
  15. 2024On Discrete Prompt Optimization for Diffusion Modelscited by 29
  16. 2024Universal Prompt Optimizer for Safe Text-to-Image Generationcited by 28

Built on by

Cited by year (2026 to 14 Oct)

Citing papers per year: 2025: 3; 2026: 4.

7 papers.

Similar, not cited

Close in wording, no citation either way

  1. 2026Test-Time Scaling for Safe Text-Guided Image Generation via Intermediate Clean Estimates
  2. 2026DTVI: Dual-Stage Textual and Visual Intervention for Safe Text-to-Image Generation
  3. 2024Safe Text-to-Image Generation: Simply Sanitize the Prompt Embedding
  4. 2026DiSCO: Defending text-to-image generation through distribution-guided contrastive prompt optimization
  5. 2026Safe Image Generation via Reinforcement Learning
  6. 2026Na"ive PAINE: Lightweight Text-to-Image Generation Improvement with Prompt Evaluation
  7. 2026Disciplined Diffusion: Text-to-Image Diffusion Model against NSFW Generation
  8. 2025SP-Guard: Selective Prompt-adaptive Guidance for Safe Text-to-Image Generation