SafeCFG: Controlling Harmful Features with Dynamic Safe Guidance for Safe Generation
Jiadong Pan, Liang Li, Hongcheng Gao, Zheng-Jun Zha, Qingming Huang, Jiebo Luo
摘要
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. The project page is https://github.com/matrix0721/SafeCFG.
问 Lune
几分钟读透这篇 Paper,不用再花一下午。
Lune 能读完全文,也能读引用它的顶会 Paper,讲清它的结论、证据和局限,每一点都注明出自哪篇 Paper。不用硬啃,也不靠猜。
脉络
- High-Resolution Image Synthesis with Latent Diffusion Models 引用了 Diffusion Models Beat GANs on Image Synthesis
- High-Resolution Image Synthesis with Latent Diffusion Models 引用了 Denoising Diffusion Probabilistic Models
- Diffusion Models Beat GANs on Image Synthesis 引用了 Learning Transferable Visual Models From Natural Language Supervision
- Diffusion Models Beat GANs on Image Synthesis 引用了 Denoising Diffusion Probabilistic Models
- Directly Denoising Diffusion Models 引用了 High-Resolution Image Synthesis with Latent Diffusion Models
- Directly Denoising Diffusion Models 引用了 Diffusion Models Beat GANs on Image Synthesis
- Directly Denoising Diffusion Models 引用了 Denoising Diffusion Probabilistic Models
它引用的 Paper16
- Learning Transferable Visual Models From Natural Language SupervisionAlec Radford, Jong Wook Kim, Chris Hallacy, Aditya Ramesh 等ICML 2021 · 47,906 次引用
- Denoising Diffusion Probabilistic ModelsJonathan Ho, Ajay Jain, Pieter AbbeelNeurIPS 2020 · 35,902 次引用
- Diffusion Models Beat GANs on Image SynthesisPrafulla Dhariwal, Alexander Quinn NicholNeurIPS 2021 · 13,211 次引用
- High-Resolution Image Synthesis with Latent Diffusion ModelsRobin Rombach, Andreas Blattmann, Dominik Lorenz, Patrick Esser 等CVPR 2022 · 13,123 次引用
- Directly Denoising Diffusion ModelsDan Zhang, Jingjing Wang, Feng LuoICML 2024 · 11,724 次引用
相关 Paper
- Training-Free Safe Text Embedding Guidance for Text-to-Image Diffusion ModelsByeonghu Na, Mina Kang, Jiseok Kwak, Minsang Park 等NeurIPS 2025 · 8 次引用
- Diffusion-NPO: Negative Preference Optimization for Better Preference Aligned Generation of Diffusion ModelsFu-Yun Wang, Yunhao Shui, Jingtan Piao, Keqiang Sun 等ICLR 2025
- Guiding a Diffusion Model by Swapping Its TokensWeijia Zhang, Yuehao Liu, Shanyan Guan, Wu Ran 等CVPR 2026 · 2 次引用
- Detect-and-Guide: Self-regulation of Diffusion Models for Safe Text-to-Image Generation via Guideline Token OptimizationFeifei Li, Mi Zhang, Yiming Sun, Min YangCVPR 2025
- When Safety Collides: Resolving Multi-Category Harmful Conflicts in Text-to-Image Diffusion via Adaptive Safety GuidanceYongli Xiang, Ziming Hong, Zhaoqing Wang, Xiangyu Zhao 等CVPR 2026 · 14 次引用
