Constrained Diffusion from Binary Evaluations via Learned Doob h-Functions
Organizations: University of Pennsylvania · Pennsylvania State University
Abstract
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 -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
| 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 |
| Satisfaction (%) | FID c | ||||||
|---|---|---|---|---|---|---|---|
| Predicate | Classifier | Standard | Equal | Standard | Equal | ||
| 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 | |
| Constraint | Method | / | 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 | 96.0 | 97.8 | 97.1 | ||
| Lipinski ring | Unguided | 0 | 39.6 | 98.0 | 98.3 |
Appendix figures & tables34 assets
Supplementary material from the paper’s appendix.
Appendix
| Noise level | 500 | 700 | 900 |
|---|---|---|---|
| Cosine to reference | 0.50 | 0.54 | 0.50 |
| (%) | 21.6 | 0 | 0 |
| Soft or bounded-below weights | Hard indicator | |
|---|---|---|
| Simulation (model law) | SVDD, Value Matching | Guo et al., DOIT |
| Forward noising (data law) | Doob’s matching, StitchVM | CG; this work |
| Eligible states | Mean | RMSE of | Cosine to reference | |
|---|---|---|---|---|
| 100 | 25/50 | 0.500 | 0.190 | |
| 200 | 25/50 | 0.498 | 0.161 | |
| 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 |
| 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 | |
| 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 |
| 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 |
| 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 |
| 799 | 599 | 399 | 199 | |
|---|---|---|---|---|
| Red-pixel | ||||
| Upper luminance |
| steps | 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 |
| 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 | – | – |
| Predicate | Estimator | Majority | |||||
|---|---|---|---|---|---|---|---|
| Red-pixel | Classifier | 96.7 | 88.5 | 77.5 | 72.6 | 72.5 | 73.2 |
| 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 |
| Method | Candidate selection | Satisfaction (%) | s/sample | |
|---|---|---|---|---|
| Ours ( ) | – | – | 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 |
| Objective | Per training seed (%) | Mean (%) |
|---|---|---|
| (full) | 79.2 / 79.9 / 84.9 | 81.3 2.5 |
| 85.3 / 83.9 / 89.6 | 86.3 2.4 | |
| 87.4 / 83.9 / 86.7 | 86.0 1.5 | |
| only | 88.2 / 82.2 / 89.8 | 86.7 3.3 |
| Pair | |||
|---|---|---|---|
| Independent noisings of (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 |
| drawn from | 63.2 0.5 | 87.8 0.3 | 96.1 0.2 |
| Guidance | |||
|---|---|---|---|
| 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) |
| only | 29.5 (51.4, 63.2) | 31.8 (45.7, 76.8) | 29.9 (39.4, 84.6) |
| Composed, | 43.2 (81.6, 56.5) | 56.0 (87.1, 66.7) | 67.3 (91.3, 74.8) |
| Composed, | 46.4 (88.1, 54.9) | 60.4 (92.1, 66.9) | 74.3 (95.5, 78.2) |
| Composed, | 48.0 (78.3, 65.7) | 61.0 (85.2, 74.1) | 71.4 (90.3, 80.1) |
| Method | / | 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 | 9.0 | 26.47 | 133.9 | 117.6 | 16.65 |
| 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 |
| 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 |
| Method | / | 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 |
| 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 |
| 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 |
| 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 |
| Predicate | Equal | |||
|---|---|---|---|---|
| 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 |
| Set | Estimator (training seeds) | Constraints | Scales | Sampler; sampling seeds | # | Drop |
|---|---|---|---|---|---|---|
| Table 2 | classifier (0, 1, 2) | red-pixel, upper lum. | 1000 steps; 0 (and 1 for classifier 1) | 6 | 17.0–18.5 | |
| Further scales | classifier (0) | red-pixel, upper lum. | 1000; 0 | 4 | 8.4–22.4 | |
| Further predicates | classifier (0) | edge density, low saturation | 1000; 0 | 2 | 18.5–22.2 | |
| Coarser samplers | classifier (0) | red-pixel, upper lum. | 100 and 50 steps; 0 | 4 | 6.2–17.4 | |
| Our head | (0) | red-pixel, upper lum. | 1000; 0 | 2 | 17.8–18.0 | |
| Class constraints | classifier (0) | cat, ship | 1000; 0 (and 1 at ) | 6 | 1.2–8.5 |
| Predicate | Setting | Standard | Equal | |
|---|---|---|---|---|
| Red-pixel | classifier, | 85.6 / 48.7 | 67.4 / 48.3 | 74.4 / 49.0 |
| classifier, | 100.0 / 64.3 | 87.7 / 64.2 | 92.3 / 63.4 | |
| classifier, , 100 steps | 99.7 / 111.2 | 86.5 / 108.7 | 97.5 / 112.3 | |
| classifier, , 50 steps | 100.0 / 156.6 | 93.8 / 155.5 | 99.8 / 157.5 | |
| , | 97.8 / 50.6 | 79.8 / 50.4 | 93.0 / 50.3 | |
| Upper luminance | classifier, | 93.8 / 42.2 | 71.4 / 44.9 | 87.8 / 43.5 |
| Class | Sampling seed | Standard | Equal | ||
|---|---|---|---|---|---|
| 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 |
| 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 |
| 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 |
| Standard | Equal | ||
|---|---|---|---|
| 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 |
| Standard | Equal | ||
|---|---|---|---|
| 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) |
Constrained Generative Modeling
Constrained generative modeling develops methods that produce samples satisfying structural, physical, semantic, or user-defined requirements.
See all 215 papers