Conditional generation under constraints that can only be checked on a finished sample, such as a molecular property filter, remains challenging for diffusion models: most guidance methods require differentiable measurement operators, paired conditional data, or rollouts of the base model at every step. We present a framework grounded in the Doob h-transform that reduces conditional generation to learning a single function, the probability that a noisy sample denoises into the constraint set. We learn this function from binary clean-sample evaluations alone, by squared-error regression on forward-noised labels; the base model is frozen, one lightweight head is trained per constraint, and noisy-state classifier guidance arises as a special case. The exact guidance step fades where the constraint signal provably vanishes and carries a factor of the inverse probability across samples, which normalized guidance discards: with the schedule and mean step size held fixed, equalizing the step costs 17.0 to 18.5 points of constraint satisfaction on CIFAR-10 at comparable FID, across independently trained estimators. Guidance is more than 50× cheaper per satisfying sample than rejection sampling at a 1.7% base rate, raises a Lipinski-type property filter on QM9 from 54.3% to 96.8%, and lifts satisfaction on Stable Diffusion 1.5 from 7.2% to 60.0% at one sixteenth of the cost of derivative-free selection, which reaches 9.0%. These results demonstrate that binary evaluations of clean samples are sufficient supervision for constrained generation across pixel, latent, and molecular diffusion.
Figures & tables
Figure 1: The learned hθ on held-out, forward-noised CIFAR-10 images (red-pixel, Y=1C(x0) ). (a) Two test images with Y=1 and two with Y=0 along one forward path, with hθ(xt,t) under each. (b) Over 4,000 test images the label groups separate at small t and merge as t grows. (c) The variance of the learned hθ(Xt,t) falls from 0.15 at t=0 to 3×10−4 at t=900 , as Proposition 2 predicts for ht .
Figure 2: Paired CIFAR-10 samples at γ=5 . Each column starts from the same xT and uses the same sampling noise in every row. The figure shows the first ten samples generated without selection; across the full 64-sample batch, every guided sample in both rows satisfies the constraint. The middle row, the matched classifier under the normalized rule, achieves this by collapsing to a few image types: a red field with a small object in (a), dark-ground aircraft scenes in (b). Guidance with hθ keeps the content of the unguided sample in (a) and produces varied scenes in (b).
Satisfaction
FID c
Predicate
γ
CG
CG-norm
Ours
CG
CG-norm
Ours
Red-pixel (31.3)
5
100.0
100.0
100.0
62.8
187.0
58.2
15
100.0
100.0
100.0
98.2
212.3
93.1
Upper luminance (23.1)
5
100.0
100.0
100.0
43.4
81.4
43.9
15
100.0
100.0
100.0
50.1
87.7
52.7
Edge density (16.5)
5
99.7
100.0
100.0
52.5
96.9
59.3
Table 1: Matched classifier under the standard and normalized rules, and ours, on four CIFAR-10 predicates (matched in capacity, labels, optimizer, budget and inference cost). Satisfaction (%) and FID against constraint-satisfying test images (FID c ); FID f in Tables 7 and 8 . Mean over 3 seeds × 1,000 samples. Unguided satisfaction in parentheses.
Satisfaction (%)
FID c
Predicate
Classifier
Standard
Equal
1/h^
Standard
Equal
1/h^
Red-pixel
1
99.0
80.6
89.0
52.60
51.85
53.06
2
98.2
79.7
86.2
53.25
53.04
54.11
3
98.5
80.8
88.0
53.21
53.34
53.75
Upper luminance
1
99.7
82.5
94.3
39.61
40.73
39.34
2
98.5
81.2
91.6
39.49
40.29
39.76
Table 2: The step at a fixed schedule and mean step size, CIFAR-10, γ=2 , for independently trained classifiers (same recipe; training seeds 0 , 1 and 2 ). All rules use the classifier’s gradient direction; “equal” and “ 1/h^ ” give each sample a step whose mean over samples is that classifier’s standard-rule mˉ(t) . Classifier 1 is the matched classifier of Section 6.1 : mean over sampling seeds 0 and 1 ( 1/h^ upper luminance: seed 0 ); classifiers 2 and 3: sampling seed 0 ; 1,000 samples per run.
Constraint
Method
γ / M
Sat.
Uniq.
Novel
Lipinski-type
Unguided
0
54.3
98.0
98.3
Ours
2
88.7
92.4
96.2
Ours
10
96.8
83.2
94.5
Ours
50
99.5
63.2
92.8
SVDD-PM
M=5
96.0
97.8
97.1
Lipinski ∧ ring
Unguided
0
39.6
98.0
98.3
Table 3: QM9, 3 seeds × 1,000 molecules. Satisfaction, uniqueness and novelty (%). The composed rows guide with loghLip+loghring from separately trained heads; their satisfaction is the joint rate. All rows use the same Euler–Maruyama sampler. SVDD-PM: 1 seed × 500 molecules (Appendix B.6 ).
Appendix figures & tables34 assets
Supplementary material from the paper’s appendix.
Appendix
Noise level t
500
700
900
Cosine to reference
0.50
0.54
0.50
hθ<0.01 (%)
21.6
0
0
Appendix
Table 4: The learned guidance field on MNIST digit 3 . Mean cosine between ∇loghθ and the rollout reference equation 5 , over the eligible states among 50 per noise level ( 1,000 trajectories per state; Table 6 ), and the fraction of 5,000 held-out forward-noised samples with hθ<0.01 .
Soft or bounded-below weights
Hard indicator 1C
Simulation (model law)
SVDD, Value Matching
Guo et al., DOIT
Forward noising (data law)
Doob’s matching, StitchVM
CG; this work
Appendix
Table 5: Estimators of h by training target and constraint type: SVDD ( Li et al., 2025 ) , Value Matching ( Jensen et al., 2026 ) , Guo et al. (2026) , DOIT ( Zhu et al., 2026 ) , Doob’s matching ( Chang et al., 2026 ) , StitchVM ( Go et al., 2026 ) , classifier guidance (CG) ( Dhariwal & Nichol, 2021 ) .
t
Eligible states
Mean hMC
RMSE of hθ
Cosine to reference
100
25/50
0.500
0.190
−0.145
200
25/50
0.498
0.161
−0.067
300
25/50
0.456
0.141
+0.240
400
28/50
0.356
0.173
+0.467
500
42/50
0.234
0.170
+0.501
700
50/50
0.122
0.048
+0.544
Appendix
Table 6: The learned guidance field on MNIST digit 3 against the Monte Carlo reference of Appendix B.3 (full version of Table 4 ). Eligible states have at least 10 satisfying endpoints out of K=1,000 ; the cosine is averaged over eligible states, and the root-mean-square error of hθ against hMC and the mean of hMC are computed over all 50 states.
Satisfaction (%)
FID c
FID f
Predicate
γ
CG-norm
Ours
CG-norm
Ours
CG-norm
Ours
Red-pixel
0
31.3
54.0
42.5
2
100.0
97.2
107.3
48.8
128.6
59.0
5
100.0
100.0
187.0
58.2
198.5
77.7
10
100.0
100.0
209.4
75.1
218.4
98.0
15
100.0
100.0
212.3
93.1
220.9
115.4
Appendix
Table 7: Full sweep of normalized classifier guidance (CG-norm) and ours behind Table 1 (the standard rule is in Table 8 ), on four CIFAR-10 predicates at every guidance scale, with the unguided model at γ=0 . Mean over 3 seeds ×1,000 samples; the seed standard deviation is at most 0.8 for guided satisfaction ( 2.3 for unguided) and 2.0 for FID.
γ=5
γ=15
Predicate
Sat.
FID c
FID f
Sat.
FID c
FID f
Red-pixel
100.0
62.8
82.6
100.0
98.2
120.1
Upper luminance
100.0
43.4
75.0
100.0
50.1
86.6
Edge density
99.7
52.5
67.5
100.0
72.7
90.4
Low saturation
99.5
48.6
62.4
100.0
71.2
85.6
Appendix
Table 8: Classifier guidance with the standard rule on the four CIFAR-10 predicates of Table 1 . Satisfaction (%), FID c and FID f ; mean over 3 seeds ×1,000 samples; the seed standard deviation is at most 1.3 for FID c and 0.2 for satisfaction.
Class
γ
Satisfaction (%)
FID c
FID f
Cat
0
14.2
82.5
42.5
2
32.7
66.6
54.5
5
51.2
60.8
70.5
10
66.2
60.0
86.2
15
71.5
62.5
95.8
Ship
0
7.2
140.4
42.5
Appendix
Table 9: Our guidance on two CIFAR-10 class constraints. A separately trained classifier judges the samples and selects the constraint-conditional FID reference from the test set. Mean over 3 seeds ×1,000 samples; the seed standard deviation is at most 2.0 .
t
999
899
799
699
599
499
399
299
199
99
Red-pixel, ours
0.067
0.066
0.118
0.209
0.276
0.350
0.376
0.301
0.232
0.143
Red-pixel, CG
0.091
0.084
0.147
0.245
0.356
0.401
0.317
0.232
0.131
0.069
Upper lum., ours
0.163
0.181
0.358
0.489
0.372
0.186
0.090
0.044
0.023
0.012
Upper lum., CG
0.141
0.205
0.432
0.526
0.266
0.099
0.046
0.018
0.012
0.006
Normalized
1.000
1.000
0.999
0.997
0.987
0.960
0.897
0.777
0.584
0.321
Appendix
Table 10: Mean step per unit γ , 1−αˉt∥∇logh^∥ averaged over 250 trajectories at γ=2 : “ours” rows along our guided trajectories, CG rows along standard-rule trajectories of the matched classifier. The normalized rule’s step is 1−αˉt .
t
799
599
399
199
Red-pixel
−0.688
−0.598
−0.969
−0.998
Upper luminance
−0.791
−0.993
−0.998
−0.969
Appendix
Table 11: Spearman correlation between the per-sample step 1−αˉt∥gi∥ and h^i=pϕ(y=1∣xt) across 250 standard-rule trajectories at γ=2 .
1000 steps
100 steps
Predicate
Pass (%)
Model law
Data law
Pass (%)
Model law
Data law
Red-pixel
31.5
0.051
0.051
46.0
0.155
0.049
Upper luminance
21.8
0.021
0.024
21.8
0.023
0.024
Appendix
Table 12: Calibration of hθ under the model’s law and the data law (mean expected calibration error over ten noise levels), with the model’s unguided pass rate over the 2,000 trajectories.
Method
γ
Sat. (seed 0)
FID c (seed 0)
Sat. (seed 1)
FID c (seed 1)
Ours
2
99.0
80.2
95.5
79.8
5
99.9
104.9
–
–
10
100.0
131.9
–
–
CG
2
95.4
78.6
96.0
80.8
5
100.0
109.0
–
–
10
100.0
149.6
–
–
Appendix
Table 13: The rare constraint ( 1.00% of training images; the model passes 1.7% of 2,000 unguided samples). Satisfaction (%) and FID c , sampling seed 0 , 1,000 samples per run, for heads trained with seed 0 and seed 1 ; CG uses the standard rule; –: not run.
Figure 3: Signal contraction in three settings. (a) The constraint-signal variance σ^2(t) on MNIST falls 492× between t=100 and t=900 (Proposition 2 ). (b) On CIFAR-10, the held-out accuracy of the matched noisy classifier above its majority baseline decays to within 1.3 points of that baseline by t=750 for all four predicates. (c) On Stable Diffusion 1.5, the held-out accuracies of hθ and the matched classifier are within 1.0 point of each other at every probed noise level.
Predicate
Estimator
t=0
250
500
750
999
Majority
Red-pixel
Classifier
96.7
88.5
77.5
72.6
72.5
73.2
hθ
94.3
87.2
77.6
72.8
72.9
73.2
Upper luminance
Classifier
98.4
97.4
90.9
76.8
74.4
75.5
Edge density
Classifier
95.7
91.4
82.1
74.3
74.6
75.2
Low saturation
Classifier
96.6
90.6
80.8
75.2
74.9
75.0
Appendix
Table 14: Held-out accuracy (%) across noise levels. Classifier rows: the matched noisy-state classifiers of Section 6.1 on the first 2,000 CIFAR-10 test images (Figure 3 b). hθ row: our head for red-pixel, thresholded at 0.5 , on the 4,000 test images of Figure 1 , of which 27.1% are positive. The majority baseline is 100 minus the training positive rate.
Method
M
Candidate selection
Satisfaction (%)
s/sample
Ours ( γ=5 )
–
–
95.1 ± 0.3
0.050
SVDD-PM
5
proportional to value
92.5 ± 0.3
0.294
SVDD-PM
20
proportional to value
95.2 ± 0.3
1.048
SVDD-PM
5
highest value
100.0 ± 0.0
0.283
Appendix
Table 15: Guidance on MNIST digit 3 against SVDD-PM, 5 seeds ×5,000 samples, our head and the SVDD-MC value network have 122,657 parameters each. Time is per sample on one RTX 4090. Training the SVDD-MC value network took 624.6 s, of which 233.1 s built the targets from 5,000,000 denoiser evaluations; training our head took 340.3 s and no denoiser evaluations.
Objective
Per training seed (%)
Mean (%)
Lbdry+Lsup+0.1Lfc (full)
79.2 / 79.9 / 84.9
81.3 ± 2.5
Lbdry+Lsup
85.3 / 83.9 / 89.6
86.3 ± 2.4
Lsup+0.1Lfc
87.4 / 83.9 / 86.7
86.0 ± 1.5
Lsup only
88.2 / 82.2 / 89.8
86.7 ± 3.3
Appendix
Table 16: Loss ablation on MNIST digit 3 at γ=3 (strict fp32). Three heads per objective (training seeds 0 – 2 ), each evaluated over 5 sampling seeds ×5,000 samples; mean and standard deviation across training seeds. For every head, the standard deviation across sampling seeds is 0.14 to 0.44 points.
Pair (xt,xt+1′)
γ=2
γ=5
γ=10
Independent noisings of x0 (Section 4 )
76.7 ± 0.6
94.0 ± 0.1
98.3 ± 0.1
Shared noise draw
72.8 ± 0.6
94.1 ± 0.2
98.7 ± 0.1
xt+1′ drawn from q(xt+1∣xt)
63.2 ± 0.5
87.8 ± 0.3
96.1 ± 0.2
Appendix
Table 17: Construction of the consistency pair in Lfc on MNIST digit 3 : one head per construction (training seed 0 , default GPU precision), evaluated over 5 seeds ×5,000 samples. Satisfaction (%), mean ± standard deviation over seeds.
Guidance
γ=2
γ=5
γ=10
Unguided
16.1 (53.7, 33.3)
Even only
25.7 (84.9, 31.0)
26.9 (92.5, 29.6)
26.8 (95.7, 28.5)
>5 only
29.5 (51.4, 63.2)
31.8 (45.7, 76.8)
29.9 (39.4, 84.6)
Composed, (1,1)
43.2 (81.6, 56.5)
56.0 (87.1, 66.7)
67.3 (91.3, 74.8)
Composed, (2,1)
46.4 (88.1, 54.9)
60.4 (92.1, 66.9)
74.3 (95.5, 78.2)
Composed, (1,2)
48.0 (78.3, 65.7)
61.0 (85.2, 74.1)
71.4 (90.3, 80.1)
Appendix
Table 18: Composition of two separately trained MNIST heads, digit even and digit >5 , whose intersection is {6,8} . Entries: joint satisfaction (%), followed by the two marginal rates (even, >5 ) in parentheses; mean over 5 seeds ×5,000 samples (seed standard deviation at most 1.0 ). Weights (w1,w2) multiply logheven and logh>5 ; (1,0.5) at γ=10 applies the same guidance as (2,1) at γ=5 , as does (0.5,1) at γ=10 with (1,2) at γ=5 .
Method
γ / M
Sat. (%)
CLIP
FID c
FID f
s/sample
Unguided
0
7.2
26.19
109.9
88.9
0.81
Ours
10
33.1
26.23
102.6
89.9
1.03
Ours
35
51.1
26.08
99.6
92.0
1.03
Ours
75
60.0
25.96
98.2
93.5
1.03
SVDD-PM
M=5
9.0
26.47
133.9
117.6
16.65
Appendix
Table 19: Stable Diffusion 1.5, grayscale predicate, 3 seeds × 500 images (SVDD-PM: 1 seed × 300, M=5 ; Wilson 95% interval 6.3–12.8%). CLIP score of Radford et al. (2021) ; FID c and FID f against the references of Appendix B.5 .
Method
γ
Satisfaction (%)
CLIP
FID c
FID f
Unguided
0
7.2 ± 1.1
26.19
109.9
88.9
Ours
10
33.1 ± 1.1
26.23
102.6
89.9
Ours
20
44.2 ± 0.6
26.11
100.4
91.0
Ours
35
51.1 ± 1.4
26.08
99.6
92.0
Ours
50
54.5 ± 1.4
26.01
100.0
93.6
Ours
75
60.0 ± 0.5
25.96
98.2
93.5
Appendix
Table 20: Full sweep behind Table 19 : grayscale predicate on Stable Diffusion 1.5, 3 seeds ×500 images; CG-norm is the matched classifier with the normalized rule. Satisfaction is the mean ± standard deviation over seeds; CLIP score and FID are means. Rows marked † were run in a separate session with the same prompts, references and seeds.
Method
γ
Satisfaction (%)
CLIP
FID f
Unguided
0
6.4
26.77
87.25
Ours
10
30.0
26.62
89.65
Ours
35
48.8
26.52
90.89
Ours
75
58.0
26.37
92.96
CG
10
28.8
26.60
89.72
CG
35
46.6
26.50
92.35
Appendix
Table 21: Stable Diffusion 1.5 on the second prompt set of Appendix B.5 ( 1 seed ×500 images): ours, the matched classifier with the standard rule (CG) and with the normalized rule (CG-norm). Satisfaction (%), CLIP score and FID f .
Method
γ / M
Satisfaction (%)
Valid (%)
Unique (%)
Novel (%)
Lipinski-type filter
Unguided
0
54.3 ± 0.9
100.0
98.0
98.3
Ours
2
88.7 ± 0.4
100.0
92.4
96.2
Ours
5
94.1 ± 0.4
100.0
88.8
95.2
Ours
10
96.8 ± 0.2
100.0
83.2
94.5
Ours
20
98.1 ± 0.2
100.0
76.0
94.4
Appendix
Table 22: Full QM9 results for the Lipinski-type filter, 3 seeds ×1,000 molecules, all with the Euler–Maruyama sampler (satisfaction: mean ± standard deviation over seeds). † SVDD-PM: 1 seed ×500 molecules on a T4 GPU (Appendix B.6 ).
γ
Joint (%)
Lipinski (%)
Ring (%)
Product (%)
Unique (%)
Novel (%)
0
39.6 ± 0.4
54.3
76.7
41.6
98.0
98.3
5
72.4 ± 0.4
92.9
78.6
73.0
92.3
96.0
10
75.5 ± 0.6
95.1
79.8
75.9
91.5
95.6
20
78.3 ± 0.5
96.3
81.6
78.6
90.8
95.9
Appendix
Table 23: Composition on QM9: separately trained Lipinski-type and ring-presence heads, guided by loghLip+loghring ; γ=0 is the unguided model with the same sampler, the run of Table 22 . Joint satisfaction (mean ± standard deviation over 3 seeds ×1,000 molecules), the two marginal rates, and the product of the two rates shown.
Figure 4: The constraint posterior ht on a two-dimensional example, computed exactly. First panel: p0 is a mixture of eight Gaussians and C is a half-plane (shaded), with Pr(X0∈C)=0.375 . Next three panels: ht(x)=Pr(X0∈C∣Xt=x) at three noise levels; black curves are the 0.25 , 0.5 and 0.75 level sets and the dashed line is the boundary of C . As t grows, ht flattens toward Pr(X0∈C) (Proposition 2 ). Last panel: deterministic reverse paths guided by ∇loght with γ=1 , from xT (open circles) to x0 (filled). All 2,000 guided samples land in C , against 38.6% without guidance.
Figure 5: Stable Diffusion 1.5, grayscale constraint. The first eight COCO captions in our sample (columns) and, in rows, the unguided sample and ours at γ=35 and γ=75 from the same seed (DDIM, 50 steps). Guidance with hθ reduces colour while largely keeping the layout of the unguided image.
Figure 6: QM9 composition with separately trained Lipinski-type and ring-presence heads, guided by loghLip+loghring . Joint satisfaction (mean ± seed standard deviation, 3 seeds × 1,000 molecules) against the product of the two guided marginal rates, with the marginals shown for reference.
Predicate
Method
κ
Sat. (%)
FID c
FID f
s/sample
Red-pixel
Spectral Guidance
1.5
99.85
76.07
99.18
0.039
Ours
0.25
99.70
51.32
63.31
0.025
Upper luminance
Spectral Guidance
1.0
99.50
49.41
85.70
0.039
Ours
0.25
99.95
43.96
66.21
0.025
Appendix
Table 24: Spectral Guidance and ours in the Spectral Guidance sampler (DDIM, 100 steps, η=1 ), each at its selected strength κ : mean over the two evaluation seeds ( 1 and 2 ) ×1,000 samples; the tuning seed 0 is excluded. Each seed is within 0.1 of the mean in satisfaction and within 1.3 in FID. Time is wall-clock sampling time per sample.
t
10
100
300
500
700
900
Red-pixel
.996 / .894
.987 / .895
.922 / .850
.792 / .767
.616 / .585
.523 / .499
Upper luminance
.999 / .984
.999 / .984
.995 / .980
.972 / .959
.817 / .798
.582 / .522
Appendix
Table 25: AUROC of the estimate of ht against 1C(x0) on 10,000 forward-noised test images: ours / Spectral Guidance.
Predicate
κ
∇p^/p^
Equal
1/p^
Red-pixel
0.25
78.97 ± 1.13 / 59.0
73.10 ± 1.34 / 56.9
77.33 ± 1.52 / 58.9
0.5
94.53 ± 0.57 / 66.5
89.27 ± 0.78 / 63.6
92.70 ± 0.91 / 65.7
Upper luminance
0.25
95.60 ± 0.22 / 42.2
92.53 ± 2.97 / 43.2
96.83 ± 1.75 / 43.3
0.5
99.87 ± 0.05 / 46.0
98.07 ± 0.65 / 45.1
99.87 ± 0.12 / 46.0
Appendix
Table 26: The test of Table 2 with the Spectral Guidance estimator, in their sampler: satisfaction (%, mean ± standard deviation) / mean FID c over 3 sampling seeds ×1,000 samples.
Set
Estimator (training seeds)
Constraints
Scales
Sampler; sampling seeds
#
Drop
Table 2
classifier (0, 1, 2)
red-pixel, upper lum.
γ=2
1000 steps; 0 (and 1 for classifier 1)
6
17.0–18.5
Further scales
classifier (0)
red-pixel, upper lum.
γ∈{1,5}
1000; 0
4
8.4–22.4
Further predicates
classifier (0)
edge density, low saturation
γ=2
1000; 0
2
18.5–22.2
Coarser samplers
classifier (0)
red-pixel, upper lum.
γ=2
100 and 50 steps; 0
4
6.2–17.4
Our head
hθ (0)
red-pixel, upper lum.
γ=2
1000; 0
2
17.8–18.0
Class constraints
classifier (0)
cat, ship
γ∈{2,5,10}
1000; 0 (and 1 at γ=5 )
6
1.2–8.5
Appendix
Table 27: Configurations of the matched-budget test. “Drop” is the range of the loss in satisfaction (points) of the equal step against the standard rule. The last row is on QM9; all others are on CIFAR-10.
Predicate
Setting
Standard
Equal
1/h^
Red-pixel
classifier, γ=1
85.6 / 48.7
67.4 / 48.3
74.4 / 49.0
classifier, γ=5
100.0 / 64.3
87.7 / 64.2
92.3 / 63.4
classifier, γ=2 , 100 steps
99.7 / 111.2
86.5 / 108.7
97.5 / 112.3
classifier, γ=2 , 50 steps
100.0 / 156.6
93.8 / 155.5
99.8 / 157.5
hθ , γ=2
97.8 / 50.6
79.8 / 50.4
93.0 / 50.3
Upper luminance
classifier, γ=1
93.8 / 42.2
71.4 / 44.9
87.8 / 43.5
Appendix
Table 28: The test of Table 2 at further scales, predicates and samplers, and with our head: satisfaction (%) / FID c , sampling seed 0 , 1,000 samples.
Class
γ
Sampling seed
Standard
Equal
1/h^
Cat
2
0
42.8 / 62.2
41.6 / 61.2
42.0 / 62.7
5
0
64.3 / 58.6
60.3 / 58.1
63.0 / 58.8
5
1
68.0 / 60.0
65.9 / 58.7
67.1 / 59.9
10
0
76.4 / 63.2
72.0 / 61.6
75.5 / 62.8
Ship
2
0
54.9 / 51.2
51.0 / 55.6
51.3 / 52.5
5
0
80.7 / 40.2
72.2 / 41.1
77.2 / 40.2
Appendix
Table 29: The test of Table 2 on two class constraints: satisfaction (%) / FID c , 1,000 samples per run. Unguided: cat 16.6% , ship 7.3% .
Red-pixel
Upper luminance
γ
CG-norm
Ours
CG-norm
Ours
0.1
39.3 / 52.6
–
29.5 / 66.0
–
0.25
50.2 / 51.0
–
44.7 / 56.3
–
0.5
74.4 / 53.3
55.4 / 49.7
69.8 / 45.1
55.8 / 54.8
1
95.1 / 61.7
80.3 / 49.4
96.8 / 43.2
90.9 / 45.0
2
100.0 / 108.1
97.7 / 50.6
99.9 / 62.3
99.2 / 39.5
Appendix
Table 30: The matched classifier under the normalized rule (CG-norm) and ours over the guidance scale: satisfaction (%) / FID c , sampling seed 0 , 1,000 samples, 1000 steps; – marks a setting that was not run.
γ
Joint
Red-pixel
Low saturation
Product
FID c
0
0.5
31.4
15.1
4.7
160.64
2
30.4
84.2
39.5
33.3
124.91
5
62.5 ± 2.0
97.0
64.0
62.1
118.65
10
83.4 ± 0.3
97.6
83.9
81.9
131.05
Appendix
Table 31: Composition of red-pixel and low saturation: joint and marginal satisfaction (%) and the product of the two guided marginals; mean over 3 sampling seeds ×1,000 samples ( ± standard deviation for the joint rate) at γ=5 and 10 , seed 0 otherwise. FID c is against the 140 test images that satisfy both.
γ
Standard
Equal
1/h^
5
62.5 ± 2.0 / 118.6
57.3 ± 2.2 / 118.8
61.6 ± 2.0 / 118.5
10
83.4 ± 0.3 / 131.1
76.1 ± 0.4 / 131.5
80.4 ± 1.1 / 133.6
Appendix
Table 32: The test of Table 2 on the conjunction of red-pixel and low saturation: joint satisfaction (%, mean ± standard deviation) / mean FID c over 3 sampling seeds ×1,000 samples.
γ
Standard
Equal
1/h^
2
87.4 ± 0.5 (93.8 / 95.4)
86.3 ± 1.2 (93.1 / 96.3)
87.8 ± 0.7 (93.2 / 96.1)
5
93.7 ± 0.4 (89.5 / 94.4)
91.0 ± 0.7 (89.5 / 95.3)
93.5 ± 0.9 (89.2 / 94.7)
Appendix
Table 33: The test of Table 2 on the QM9 Lipinski-type filter: satisfaction (%, mean ± standard deviation) and mean uniqueness / novelty (%) over 3 sampling seeds ×1,000 molecules. Validity is 100% in every run.
Discrete diffusion models generate structured sequences by progressively unmasking tokens, but enforcing global property constraints during generation remains an open challenge. We propose primal-dual guided decoding, an inference-time method that formulates constrained generation as a KL-regularised optimisation problem and solves it online via adaptive Lagrangian multipliers. At each denoising step, the method modifies token logits through an additive, constraint-dependent bias, with multipliers updated by mirror descent based on constraint violation. The bias arises as the optimal KL-regularised projection of the constraint, so the constrained distribution remains as close as possible to the model's unconstrained distribution while still satisfying the constraint. The method requires no retraining and no additional model evaluations beyond standard sampling, supports multiple simultaneous constraints, and provides formal bounds on constraint violation. We evaluate our approach on topical text generation, molecular design, and music playlist generation, showing that a single algorithm instantiated via domain-specific scoring functions improves constraint satisfaction while preserving relevant domain-specific quality metrics.
Constrained generative models aim to produce samples that satisfy complex feasibility constraints while remaining faithful to the data distribution. Existing constrained generation methods typically enforce constraints either through training-time optimization or sampling-time correction. Training-time optimization approaches optimize on states induced by the training distribution, which can differ substantially from those encountered during sampling. Sampling-time correction methods instead modify the sampling process at inference, introducing distribution shift and requiring expensive tuning, particularly for few-step sampling. We propose a fine-tuning framework that incorporates constraint guidance obtained through online rollout into the training process, which aligns training with sampling by differentiating through the fixed noise schedule used to numerically integrate the denoising process. This exposes the model to violations that arise along the denoising trajectory and aligns diffusion learning with the sampling process. Experiments across multiple tasks show that our method improves constraint satisfaction while maintaining competitive sampling quality compared to prior methods.
Reward-based diffusion fine-tuning faces practical challenges when desirable outcomes are rare or conditioning corrections are costly to estimate. In this work, we propose Diffusion Online h-guidance Fine-tuning (DOHF), which turns Doob's h-transform into a practical online training algorithm. DOHF assigns optimality weights to generated samples, estimates the normalized local correction ∇logh under the current rollout policy, and distills it directly into the generative model. Theoretically, we characterize the population-optimal DiffusionNFT update as well as the various classfier free guidance methods through a unified h-transform perspective. Methodologically, our framework accommodates black-box and non-differentiable rewards without additional network evaluations. We further show improved alignments under three empirical scenarios. Our work demonstrates how adapting probabilistic conditioning through inexpensive estimation and iterative distillation can improve generative learning across statistical sampling and visual generation.