Kaijing Ma

Dynamic Negative Guidance of Diffusion Models

Original note, sentence-aligned / 原创笔记逐句对照。Not a full-paper translation / 不是论文全文翻译。

English / 中文 · Source / 原文

Negation is not just a negative coefficient

否定并不只是负系数

Dynamic Negative Guidance targets the complement of an unwanted concept rather than indefinitely repelling its score field.

Dynamic Negative Guidance 针对不希望概念的补集,而不是无限地沿其分数场反方向排斥。

Let u(x,t) be the probability that the current noisy state belongs to the unwanted concept.

令 u(x,t) 表示当前带噪状态属于不希望概念的概率。

Conditioning on its complement multiplies the base density by 1 − u.

对其补集条件化,会将基础密度乘以 1 − u。

p_allowed(x,t) ∝ p(x,t)[1 − u(x,t)]^λ₀

Applying the chain rule and Bayes' rule yields an odds-dependent correction.

应用链式法则与贝叶斯公式,得到依赖几率的修正。

s_DNG = s_base − λ₀ u/(1 − u) (s_unwanted − s_base)

The correction vanishes when unwanted-concept probability approaches zero and grows rapidly near one.

当不希望概念概率接近零时,修正消失;接近一时则快速增大。

For a synthetic example with λ₀ = 1, probabilities 0.1 and 0.8 give strengths 1/9 and 4.

在 λ₀ = 1 的合成例子中,概率 0.1 与 0.8 分别对应强度 1/9 和 4。

The asymmetry is the core mechanism and also a source of sensitivity to posterior estimation error.

这种不对称性既是核心机制,也是对后验估计误差敏感的来源。

How the missing posterior is estimated

如何估计未知后验

A score model does not directly return a normalized concept probability.

分数模型不会直接返回归一化概念概率。

The paper tracks likelihood ratios of conditional and unconditional Gaussian reverse transitions along the trajectory.

论文沿轨迹跟踪条件与无条件高斯反向转移的似然比。

With equal transition variances, the log-ratio increment is a difference of squared distances to their predicted means.

当转移方差相同时,对数比增量是到两个预测均值的平方距离之差。

log u_new ≈ log u_old − [||x_new − μ_unwanted||² − ||x_new − μ_base||²]/(2σ²)

An undesired-model mean closer to the new sample increases the estimated concept evidence.

不希望概念模型的均值更接近新样本时,估计概念证据增加。

The practical estimator adds temperature scaling, an offset, and probability clamping.

实用估计器还加入温度缩放、偏移和概率截断。

These stabilizers separate the implementation from exact Bayesian conditioning.

这些稳定化处理使实现与精确贝叶斯条件化存在差别。

The method also staggers posterior estimation and the next guided step to resolve their mutual dependence.

方法还交错执行后验估计和下一次引导步骤,以处理二者相互依赖。

Experimental evidence

实验证据

The one-dimensional Gaussian-mixture experiment permits exact posterior calculations and tests removal of one mode.

一维高斯混合实验允许精确计算后验,并测试移除一个模态。

It is a diagnostic with known distributions, not a proof that estimated posteriors remain calibrated in image models.

这是已知分布下的诊断,不是证明图像模型中的估计后验保持校准。

MNIST and CIFAR10 experiments remove one class and measure forbidden-class frequency, retained class balance, and FID.

MNIST 与 CIFAR10 实验移除一个类别,测量禁用类别频率、保留类别平衡及 FID。

FID uses 10,240 generated images and reference data excluding the unwanted class.

FID 使用 10,240 张生成图像,并以排除不希望类别的数据作为参考。

This reference choice matters when comparing with studies whose FID reference is an unmodified model's samples.

与使用未修改模型样本作为 FID 参考的研究比较时,这一参考选择很重要。

The strongest reported advantage is less disruption of allowed classes in high-removal regimes.

最显著的报告优势是在较强移除区域,对允许类别的干扰较小。

Limits and reproducible checks

局限与可复现检查

The ideal complement requires compatible concept-conditioned and base distributions with nonzero allowed mass.

理想补集需要兼容的概念条件分布与基础分布,并且允许部分的概率质量非零。

Clamping prevents numerical divergence but changes the theoretical score rule.

截断防止数值发散,但也改变理论分数规则。

A reproduction should report posterior trajectories, clamping frequency, scale sensitivity, retained diversity, and the exact sampler.

复现应报告后验轨迹、截断频率、强度敏感性、保留多样性及具体采样器。

The derivation concerns state-dependent guidance; it does not imply that every negative prompt corresponds to a well-calibrated binary event.

推导针对状态依赖的引导;它不意味着每个负提示都对应一个校准良好的二元事件。