Safe Image Generation via Reinforcement Learning
Abstract
Recent Text-to-Image (T2I) models achieve remarkable visual image generation performance, but they can still generate NSFW (Not-Safe-For-Work) contents, including violent or explicit images. Existing safety checker mechanisms are largely confined to pre-generation filtering (e.g. prompt-level text classifiers) or post-hoc moderation applied after an image is completely synthesized. However, adversarial attack methods operate over a much broader space. This imbalance highlights the need for a safety mechanism that intervenes during the generation process. We propose an in-generation safety framework that monitors the denoising trajectory and detects emerging NSFW signals from intermediate representations. Rather than merely detecting NSFW generations, our method applies reinforcement learning to generate safe images from NSFW prompts. By coupling in-generation detection with controllable steering, our approach mitigates unsafe trajectories even when NSFW signals emerge after generation has already begun. Experiments results show that our method consistently outperforms existing safe image generation methods across both standard and adversarial evaluation sets, while preserving perceptual quality and prompt fidelity. Code will be released upon acceptance.
Create a lesson
Related papers
Spe3DUp: Faithful Trajectory Distillation for Fast Image-to-3D Generation
Shared title terminologycs.CVLiangchao Xu, Jiaye Fu, Youtian Lin et al.
Hijacking 3D Generation: Targeted Adversarial Attacks against Image-to-3D Models via Prefix Trajectory Alignment
Shared title terminologycs.CVYilong Yang, Jiale Teng, Yule Liu et al.
Hybrid Reinforcement Learning for One-step Degraded Infrared and Visible Image Fusion
Shared title terminologycs.CVHongwei Yu, Daoqing Zha, Jiawei Li et al.
ScanAR: Parallel Row-Scan Decoding for Efficient Image Generation in Unified Autoregressive Models
Shared title terminologycs.CVJingen Qu, Xi Chen, Yingbo Tang et al.
DualCast: Dual-Image Conditioned Diffusion Transformers for Digital Human E-Commerce Video Generation
Shared title terminologycs.CVLifan Jiang, Yifan Huang, Jixuan Zhang et al.
SpinDoctor: Finding Innocuous Prompts for Biased Image Generation
Shared title terminologycs.CVAnna Gerchanovsky, Omer Akgul, Lujo Bauer et al.