Share your thoughts, 1 month free Claude Pro on usSee more
WorkDL logo mark

Dynamic Negative Guidance of Diffusion Models

About

Negative Prompting (NP) is widely utilized in diffusion models, particularly in text-to-image applications, to prevent the generation of undesired features. In this paper, we show that conventional NP is limited by the assumption of a constant guidance scale, which may lead to highly suboptimal results, or even complete failure, due to the non-stationarity and state-dependence of the reverse process. Based on this analysis, we derive a principled technique called Dynamic Negative Guidance, which relies on a near-optimal time and state dependent modulation of the guidance without requiring additional training. Unlike NP, negative guidance requires estimating the posterior class probability during the denoising process, which is achieved with limited additional computational overhead by tracking the discrete Markov Chain during the generative process. We evaluate the performance of DNG class-removal on MNIST and CIFAR10, where we show that DNG leads to higher safety, preservation of class balance and image quality when compared with baseline methods. Furthermore, we show that it is possible to use DNG with Stable Diffusion to obtain more accurate and less invasive guidance than NP.

Felix Koulischer, Johannes Deleu, Gabriel Raya, Thomas Demeester, Luca Ambrogioni• 2024

Related benchmarks

TaskDatasetResultRank
Text-to-Image GenerationCOCO
FID56.08
104
Text-to-Image GenerationCOCO 30k
FID55.97
77
Concept RemovalRing-A-Bell Nudity
Attack Success Rate (ASR)22.1
52
Nudity RemovalMMA-Diffusion
ASR13.9
45
NSFW suppressionP4D
ASR0.225
41
Nudity Concept RemovalUnlearnAtk
ASR18.3
25
Inference LatencyGeneric Prompts
Inference Latency (s)4.82
18
Nudity RemovalCOCO
CLIP Score31.78
18
Artist-style removalStable Diffusion Artist Style Removal (Kelly McKernan) v1.4
Accuracy (Exact Match)15
18
Artist-style removalStable Diffusion Artist Style Removal (Van Gogh) v1.4
Accuracy71
18
Showing 10 of 19 rows

Other info

Follow for update