cs.CVMar 2, 2026

Safety-Guided Flow (SGF): A Unified Framework for Negative Guidance in Safe Generation

Authors: Mingyu Kim, Young-Heon Kim, Mijung Park

Organizations: Kookmin University · University of British Columbia

Abstract

Safety mechanisms for diffusion and flow models have recently been developed along two distinct paths. In robot planning, control barrier functions are employed to guide generative trajectories away from obstacles at every denoising step by explicitly imposing geometric constraints. In parallel, recent data-driven, negative guidance approaches have been shown to suppress harmful content and promote diversity in generated samples. However, they rely on heuristics without clearly stating when safety guidance is actually necessary. In this paper, we first introduce a unified probabilistic framework using a Maximum Mean Discrepancy (MMD) potential for image generation tasks that recasts both Shielded Diffusion and Safe Denoiser as instances of our energy-based negative guidance against unsafe data samples. Furthermore, we leverage control-barrier functions analysis to justify the existence of a critical time window in which negative guidance must be strong; outside of this window, the guidance should decay to zero to ensure safe and high-quality generation. We evaluate our unified framework on several realistic safe generation scenarios, confirming that negative guidance should be applied in the early stages of the denoising process for successful safe generation.

Figures & tables

Appendix figures & tables10 assets

Supplementary material from the paper’s appendix.

Appendix

Explore similar work

CardsList
  1. Provably Safe Generative Sampling with Constricting Barrier Functions

    Feb 24, 2026Darshan Gadginmath, Ahmed Allibhoy, Fabio PasqualettiConstrained Generative ModelingFlow-Based Generative Modeling

  2. The Safety-Aware Denoiser for Text Diffusion Models

    Apr 28, 2026Amman Yusuf, Zhejun Jiang, Mijung ParkDiffusion Model GuidanceDiffusion Language Models

  3. Concept Removal Guidance: Evidence-Calibrated Negative Guidance for Safe Diffusion Sampling

    Jun 29, 2026Yoonseok Choi, Chaeyoung Oh, Hyunjun Choi +2Diffusion Model GuidanceDiffusion Guidance