[KongchangAI]
· 3 min read· 1,586 words

New Breakthrough in Diffusion Model Negative Guidance: Asymptotically Exact Sampling via Positive-Unlabeled Learning

New Breakthrough in Diffusion Model Negative Guidance: Asymptotically Exact Sampling via Positive-Unlabeled Learning

The paper reformulates diffusion negative guidance via PU Learning and SMC, yielding an explicit target density and asymptotically exact sampling.

Existing diffusion model negative guidance methods rely on local repulsion terms, so the sampler lacks a well-defined probability density and adding computation cannot systematically eliminate bias. The paper proposes an explicit target density that encodes avoidance strength as a density parameter, uniformly handling reference-sample and conditional-score specifications. At each diffusion step, PU Learning estimates the probability that a particle belongs to the unwanted condition, and SMC corrects particle deviation to achieve asymptotic exactness, with existing methods embeddable as proposal kernels. Experiments on Gaussian mixtures and pretrained score network image generation achieve Pareto dominance across avoidance, quality, distribution bias, and diversity.

Diffusion models are already quite mature at generating high-quality images, but making them reliably avoid certain conditions—such as not generating violent content or not producing a particular style—has remained a thorny problem. Most existing negative guidance methods rely on locally injecting a repulsion term, which means the sampler does not point to a well-defined probability density, and no amount of additional computation can systematically eliminate the bias. A recent paper proposes reformulating negative guidance using Positive-Unlabeled Learning (PU Learning), giving the sampling process an explicit target density and achieving asymptotic exactness in the particle limit.

Source screenshot of the diffusion model negative guidance paper

The Core Dilemma of Negative Guidance: No Target Density

The goal of negative guidance is intuitive: when generating samples, steer away from an unwanted condition. This condition can be specified either by reference samples or by a conditional score combined with an unconditional model. Sounds simple, but existing methods have a fundamental flaw.

They typically compute a repulsion term at each sampling step based on local information about the current sample, pushing it away from the undesired region. The problem with this approach is that the resulting sampler does not correspond to a well-defined probability density function. In other words, you cannot write down a target distribution and say 'this is what I want to sample from.'

The consequence is that the bias cannot be systematically eliminated. Increasing the number of sampling steps or particles should in theory make the result increasingly accurate, but because the target itself is undefined, the extra computation can only yield local improvements—it cannot converge to the correct distribution at the root level.

Redefining the Objective: An Explicit Density Function

This paper's approach is to design an explicit target density from scratch. Rather than treating the repulsion term as a patch on the sampling process, it directly encodes 'avoiding the unwanted condition' into the density function itself.

Specifically, the target density suppresses probability mass near the undesired condition. The strength of this suppression is controlled by a parameter that directly defines the shape of the target density. This way, you can tune this parameter to control how strongly you want to avoid a condition, and the entire sampling process has a well-defined mathematical objective.

One advantage of this design is its uniformity: whether the condition is specified by reference samples or by a conditional score, the same framework applies. There is no need to write two separate sets of logic for different specification methods.

PU Learning: Estimating Membership Probability at Each Time Step

To realize this target density, one needs to estimate something at each diffusion time step: the probability that the current sample belongs to the unwanted condition.

This is essentially a binary classification problem, but only the positive samples (samples of the unwanted condition) are certain—the remaining samples are in an 'unknown whether or not' state. This is exactly the typical setting of Positive-Unlabeled Learning.

The paper treats conditional samples as the positive class and the particles in the diffusion process as unlabeled data, training a lightweight classifier online. This training proceeds along the diffusion trajectory without adding an offline training burden. The classifier's output is the probability that each particle belongs to the unwanted condition, which is then used to adjust the sampling direction.

This approach is more principled than directly using a local repulsion term: rather than arbitrarily designing a force, it naturally derives a density correction through probability estimation.

Positive-Unlabeled Learning (PU Learning) is a branch of weakly supervised learning that deals with the setting where only the positive class is labeled in the training set and the remaining data may be either positive or negative. Unlike traditional binary classification, PU Learning cannot simply treat unlabeled samples as negative, as this would introduce severe label noise. Classical solutions fall into two categories: one estimates the class prior and then reweights the unlabeled samples; the other treats unlabeled data as a mixture of positive and negative distributions and trains a classifier through an unbiased risk estimator. In the context of diffusion models, each time step has a large number of particles, all of which are in an unknown state regarding 'whether they belong to the unwanted condition,' which fits the PU setting perfectly. The paper leverages this structure to train the classifier online, avoiding the cost of collecting negative samples separately for each negative condition and allowing the classifier to dynamically adapt to changes in the particle distribution along the sampling trajectory.

SMC Correction: From Approximation to Asymptotic Exactness

PU Learning provides probability estimates, but there is a residual issue. The guided particles deviate from the original unconditional marginal distribution, and this deviation accumulates error.

The paper uses Sequential Monte Carlo (SMC) to correct this mismatch. SMC is commonly used in particle filtering, and here its role is to make the sampler converge to the true target density as the number of particles goes to infinity.

More cleverly, this framework can embed any existing negative guidance method as a proposal kernel. That is, it does not aim to completely replace previous methods but provides a wrapper that gives existing methods asymptotic exactness under SMC correction.

Sequential Monte Carlo (SMC) is a class of particle methods that progressively approximate a target distribution through importance sampling and resampling, widely used in nonlinear non-Gaussian state-space models. Its core idea is to maintain a set of weighted particles, propagate them over time, and update weights according to the observation likelihood; when the effective particle count is too low, resampling is performed to avoid weight degeneracy. In diffusion sampling, each denoising step can be viewed as a time step, and the membership probability given by PU Learning serves as observation information, guiding particles toward the target density. The theoretical guarantee of SMC is that under appropriate proposal kernels and resampling strategies, the empirical particle distribution converges to the true target distribution as the number of particles goes to infinity. By embedding existing negative guidance methods as proposal kernels, the paper leverages SMC's importance weight correction to offset the distribution shift caused by local repulsion terms, thereby achieving asymptotic exactness.

Experimental Performance: Pareto Dominance

The paper validates the method in two scenarios.

On Gaussian mixture models, the method can approximate the true target distribution, confirming that the theoretical derivation holds up in actual sampling.

In the image generation scenario, using a pretrained score network, the method simultaneously dominates across multiple dimensions: the trade-off between avoidance effectiveness and generation quality, distribution bias, and diversity. The paper uses the term 'Pareto-dominates,' meaning it is better on at least one dimension and no worse on any dimension.

This result is noteworthy because negative guidance typically faces an awkward trade-off: the harder you avoid, the worse the generation quality. If avoidance strength can be increased without sacrificing quality, that is very valuable for practical applications.

Pareto dominance is a concept in multi-objective optimization: if solution A is no worse than solution B on all objectives and strictly better on at least one, then A Pareto-dominates B. In generative model evaluation, common metrics include degree of condition avoidance, generation quality, distribution distance, and sample diversity—and these metrics often conflict. For example, excessively suppressing certain conditions can harm image fidelity or diversity. The paper claims its method is Pareto-dominant on these dimensions, meaning it does not sacrifice one metric to improve another, which is particularly rare in negative guidance tasks, since existing methods typically require a trade-off between avoidance strength and generation quality.

Why This Matters

Safe and controllable generation with diffusion models is a current hot topic. Negative guidance is a key tool within it, but if the tool itself lacks theoretical foundations, tuning becomes trial and error.

The value of this paper lies in transforming negative guidance from 'heuristic force addition' into 'a sampling problem with a target density.' Once the target density is explicit, one can discuss convergence, compare the theoretical properties of different methods, and use mature tools like SMC to guarantee correctness.

From an engineering perspective, the method supports lightweight online training, does not rely on additional large-scale annotations, and is suitable for combining with existing pretrained models. The design of embedding existing methods as proposal kernels also lowers the cost of migration.

Of course, there is still a gap between a paper and a product. The number of SMC particles, the overhead of online training, and practical efficiency in high-dimensional image spaces are all things that need to be evaluated for deployment. But directionally, it provides a more solid mathematical foundation for negative guidance.

One-line Summary

The paper reformulates diffusion model negative guidance using Positive-Unlabeled Learning and Sequential Monte Carlo, giving sampling an explicit target density and asymptotic exactness.

Paragraph Summary

Existing diffusion model negative guidance methods rely on local repulsion terms, so the sampler does not point to a well-defined probability density, and adding computation cannot systematically eliminate bias. The paper proposes an explicit target density that encodes the strength of avoiding unwanted conditions as a density parameter, uniformly handling both reference-sample and conditional-score specifications. At each diffusion time step, PU Learning estimates online the probability that a particle belongs to the unwanted condition, and Sequential Monte Carlo corrects particle deviation, achieving asymptotic exactness in the particle limit while allowing existing methods to be embedded as proposal kernels. Experiments on Gaussian mixtures and image generation with pretrained score networks achieve Pareto dominance across avoidance effectiveness, generation quality, distribution bias, and diversity, providing a more solid mathematical foundation for negative guidance.

#diffusion model negative guidance#Positive-Unlabeled Learning#Sequential Monte Carlo#asymptotically exact sampling#controllable image generation#Pareto dominance
Share:

Related articles