SafeCFG: Controlling Harmful Features with Dynamic Safe Guidance for Safe Generation
On the map: Diffusion models → Robustness, privacy and adversarial aspects
Abstract (arXiv)
Diffusion models (DMs) have demonstrated exceptional performance in text-to-image tasks, leading to their widespread use. With the introduction of classifier-free guidance (CFG), the quality of images generated by DMs is significantly improved. However, one can use DMs to generate more harmful images by maliciously guiding the image generation process through CFG. Existing safe alignment methods aim to mitigate the risk of generating harmful images but often reduce the quality of clean image generation. To address this issue, we propose SafeCFG to adaptively control harmful features with dynamic safe guidance by modulating the CFG generation process. It dynamically guides the CFG generation process based on the harmfulness of the prompts, inducing significant deviations only in harmful CFG generations, achieving high quality and safety generation. SafeCFG can simultaneously modulate different harmful CFG generation processes, so it could eliminate harmful elements while preserving high-quality generation. Additionally, SafeCFG provides the ability to detect image harmfulness, allowing unsupervised safe alignment on DMs without pre-defined clean or harmful labels. Experimental results show that images generated by SafeCFG achieve both high quality and safety, and safe DMs trained in our unsupervised manner also exhibit good safety performance.
Key facts. Cited by 1 paper in the map (data through 7 Oct 2026). Placed in Robustness, privacy and adversarial aspects, one of 14 directions in Diffusion models. Builds on 24 of its 48 references that are in the map. First posted on arXiv 20 Dec 2024.
Builds on
24 of 48 references.
Closest ancestors · 4
Same direction, newest first
- 2023To Generate or Not? Safety-Driven Unlearned Diffusion Models Are Still Easy To Generate Unsafe Images ... For Now18 Oct
- 2023Unified Concept Editing in Diffusion Models25 Aug
- 2023Forget-Me-Not: Learning to Forget in Text-to-Image Diffusion Models30 Mar
- 2022Safe Latent Diffusion: Mitigating Inappropriate Degeneration in Diffusion Models9 Nov
Other references · 20
- 2017Attention Is All You Needcited by 59,932
- 2015U-Net: Convolutional Networks for Biomedical Image Segmentationcited by 19,604
- 2014Microsoft COCO: Common Objects in Contextcited by 17,498
- 2018The Unreasonable Effectiveness of Deep Features as a Perceptual Metriccited by 11,029
- 2020Denoising Diffusion Implicit Modelscited by 9,655
- 2020Score-Based Generative Modeling through Stochastic Differential Equationscited by 8,964
- 2021Diffusion Models Beat GANs on Image Synthesiscited by 8,185
- 2015Deep Unsupervised Learning using Nonequilibrium Thermodynamicscited by 7,005
- 2022Photorealistic Text-to-Image Diffusion Models with Deep Language Understandingcited by 6,322
- 2022LAION-5B: An open large-scale dataset for training next generation image-text modelscited by 4,131
- 2019Generative Modeling by Estimating Gradients of the Data Distributioncited by 4,067
- 2021GLIDE: Towards Photorealistic Image Generation and Editing with Text-Guided Diffusion Modelscited by 3,595
8 more
- 2016Improved Techniques for Training GANscited by 2,938
- 2021CLIPScore: A Reference-free Evaluation Metric for Image Captioningcited by 2,388
- 2015Variational Dropout and the Local Reparameterization Trickcited by 489
- 2022Can Machines Help Us Answering Question 16 in Datasheets, and In Turn Reflecting on Inappropriate Content?cited by 150
- 2023Real-Time Flying Object Detection with YOLOv8cited by 93
- 2024CogView3: Finer and Faster Text-to-Image Generation via Relay Diffusioncited by 72
- 2024Dynamic Negative Guidance of Diffusion Modelscited by 28
- 2022Entity-enhanced Adaptive Reconstruction Network for Weakly Supervised Referring Expression Groundingcited by 22
Built on by
Citing papers per year: 2026: 1.
1 paper.
Similar, not cited
Close in wording, no citation either way
- 2026When Safety Collides: Resolving Multi-Category Harmful Conflicts in Text-to-Image Diffusion via Adaptive Safety Guidance
- 2025Detect-and-Guide: Self-regulation of Diffusion Models for Safe Text-to-Image Generation via Guideline Token Optimization
- 2026SafeCtrl: Region-Aware Safety Control for Text-to-Image Diffusion via Detect-Then-Suppress
- 2025Training-Free Safe Text Embedding Guidance for Text-to-Image Diffusion Models
- 2024Safety Alignment Backfires: Preventing the Re-emergence of Suppressed Concepts in Fine-tuned Text-to-Image Diffusion Models
- 2025SPQR: A Multi-Dimensional Benchmark for Safety Alignment under Benign Model Adaptation
- 2025SafeCtrl: Region-Based Safety Control for Text-to-Image Diffusion via Detect-Then-Suppress
- 2025Personalized Safety Alignment for Text-to-Image Diffusion Models