Iterative Exact Discrete Guidance for Energy-Based Sampling
Organizations: School of Science and Engineering, The Chinese University of Hong Kong, Shenzhen · Department of Statistics, University of California, Los Angeles · School of Data Science, The Chinese University of Hong Kong, Shenzhen
Abstract
Sampling from unnormalized distributions over large discrete state spaces becomes difficult when a multimodal target is far from a tractable reference. We introduce Iterative Exact Discrete Guidance (IEDG), a population-exact, trajectory-wise guidance framework for unnormalized discrete targets. Rather than learn the full reference-to-target correction in one step, IEDG introduces a global Boltzmann tilt along an annealing trajectory. Each stage learns a stage-local posterior correction for an incremental Boltzmann tilt of the current source, while the resulting corrections are accumulated relative to a fixed analytic posterior. At the population optimum, exact stage posteriors recover the correct reverse dynamics, whose exact simulation reproduces the target distribution. IEDG chooses stage increments by relative effective sample size (rESS), which controls Rényi-2 displacement and locally adapts the step size to the thermodynamic geometry of the annealing path. Our stagewise total-variation analysis shows that limited overlap amplifies Bregman fitting error by , while posterior, simulation, and truncation errors enter additively. IEDG improves all distribution-level errors over the neural baselines on ordered, exactly enumerated Ising , while substantially reducing one-shot errors on Ising/Potts across thermodynamic regimes and attaining the best neural-sampler result on several reported local-statistic and phase-coverage metrics. On Max-Cut, its best-of-512 and average-sample ratios exceed all the baselines. Code and artifacts are available at https://github.com/StillFantasy123/iterative-exact-discrete-guidance.
Figures & tables
| Method | |||
|---|---|---|---|
| Exact MC | |||
| One-shot DGM | 0.779 | 2.55 | 722 |
| UDNS (reproduced) | 0.150 | 0.165 | 0.237 |
| MDNS ( ) † | 0.0418 | 0.0282 | 1.66 |
| IEDG | 0.0314 | 0.00993 | 0.229 |
| Method | Mag. | Corr. agg. | JS | Mag. | Corr. agg. | JS | Mag. | Corr. agg. | JS | |||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Analytic preconditioner | 0.00615 | 1.51 | 0.0863 | 0.00409 | 16.5 | 0.609 | 0.0169 | 27.1 | 0.693 | |||
| MDNS (official ckpt.) | 0.0112 | 0.161 | 0.00937 | 0.0105 | 0.171 | 0.00980 | 0.0173 | 0.0582 | 0.00336 | |||
| MetaDNS (official ckpt.) | 0.00839 | 0.195 | 0.00889 | 0.0317 | 0.124 | 0.0132 | 0.00490 | 0.0892 | 0.00574 | |||
| One-shot DGM | 0.0112 | 0.402 | 0.0159 | 0.0587 | 16.3 | 0.599 | 0.170 | 26.8 | 0.693 | |||
| IEDG | 0.00613 | 0.242 | 0.00742 | 0.0106 | 0.150 | 0.0252 | 0.0157 | 0.0537 | 0.0193 | |||
| Method | Max. | Avg. | Max. | Avg. | Max. | Avg. |
|---|---|---|---|---|---|---|
| Uniform | 0.888 | 0.696 | 0.825 | 0.687 | 0.769 | 0.678 |
| One-shot DGM | 0.962 | 0.854 | 0.884 | 0.798 | 0.814 | 0.748 |
| PDNS † | 0.963 | 0.911 | 0.897 | 0.869 | 0.876 | 0.840 |
| IEDG | 1.00 | 0.965 | 0.987 | 0.920 | 0.915 | 0.871 |
Appendix figures & tables19 assets
Supplementary material from the paper’s appendix.
Appendix
| Benchmark | Size | Target parameter | Reference | Generated | NFE | |
|---|---|---|---|---|---|---|
| Ising-exact | 2 | Enumeration | 128/256/256 | |||
| Ising | 2 | SW | 4096 | 256 | ||
| Potts | 3 | SW | 4096 | 256 | ||
| BA Max-Cut | 2 | Certified optimum | 512/graph | 128 | ||
| 2 | Certified optimum | 512/graph | 128 | |||
| 2 | Certified optimum | 512/graph | 128 |
| Target | States | Mag. | Corr. agg. | JS | Mode | CV JS |
|---|---|---|---|---|---|---|
| Ising | 4,096 | .00416 | .190 | .0144 | – | – |
| 65,536 | .00201 | .0573 | .00102 | – | – | |
| Potts | 4,096 | .0635 | .143 | – | .0244 | .0555 |
| 65,536 | .0280 | .0183 | – | .00497 | .00379 |
| Benchmark | Main-text metrics | Supplemental evidence |
|---|---|---|
| Ising | TV, KL, | regime sweep; observables |
| Ising | Mag., Corr. agg., JS | , Corr.-curve; marginal plots |
| Potts | Mag., Corr. agg., Mode | , Corr.-curve, CV JS; marginal/CV plots |
| BA Max-Cut | , | stage-count and path-schedule ablations |
| Reported target | Backbone | W/D/H | Batch | Updates | Optimizer | LR | EMA | Source buffer |
| Ising , | tiny MLP | – | 512 | 90000 | Adam | .999 | 1000000 | |
| Ising , | tiny MLP | – | 1024 | 65000 | Adam | .995 | 1000000 | |
| Ising , | tiny MLP | – | 1024 | 70000 | Adam | .995 | 1000000 | |
| Ising , | RoPE DeiT2D | 64/4/4 | 1024 | 35000 | Adam | .999 | 131072 | |
| Ising , | RoPE DeiT2D | 64/4/4 | 512 | 65000 | Adam | .999 | 100000 | |
| Ising , | RoPE DeiT2D | 64/4/4 | 512 | 65000 | Adam | .999 | 100000 |
| Reported target | Frozen segment endpoints | Stages |
|---|---|---|
| Ising , | 3 | |
| Ising , | 2 | |
| Ising , | 2 | |
| Ising , | 4 | |
| Ising , | 5 | |
| Ising , | 4 |
| Comparison | Parameters or source | Terminal generation | Evidence |
|---|---|---|---|
| Uniform (Max-Cut) | none | i.i.d. base samples | local |
| Analytic preconditioner | fixed BP field, | direct- , matched samples/NFE | local |
| One-shot DGM | trained by us | direct- | local |
| UDNS | DASBS-based reproduction | factorized uniform CTMC | local |
| MDNS (Ising ) | value from MDNS | reported native setup | published † |
| MDNS ( lattices) | released checkpoints | native sampler | local |
| Setting | Mag. | Corr. agg. | Phase error | ||
|---|---|---|---|---|---|
| Ising | 4 | ||||
| 5 (canonical) | |||||
| 6 | |||||
| Potts | 5 | ||||
| 6 (canonical) | |||||
| 7 |
| Setting | Schedule | Mag. | Corr. agg. | JS | ||
|---|---|---|---|---|---|---|
| Ising | Matched- uniform | 5 | ||||
| ESS-controlled (canonical) | 5 |
| Setting | Mag. | Corr. agg. | Phase error | |
|---|---|---|---|---|
| Ising | 0.5 | |||
| 1.0 (canonical) | ||||
| 2.0 | ||||
| Potts | 0.5 | |||
| 1.0 (canonical) | ||||
| 2.0 |
| Setting | Mag. | Corr. agg. | Phase error | |
|---|---|---|---|---|
| Ising | 0.5 (canonical) | |||
| 1.0 | ||||
| Potts | 0.5 (canonical) | |||
| 1.0 |
| Method | ||||
|---|---|---|---|---|
| 0.28 | Exact MC | |||
| One-shot DGM | 0.193 | 0.149 | 0.341 | |
| UDNS (reproduced) | 0.0909 | 0.0412 | 0.0931 | |
| MDNS ( ) † | 0.0799 | 0.0382 | 0.0868 | |
| IEDG | 0.0860 | 0.0380 | 0.0823 | |
| 0.4407 | Exact MC |
| Method | |||
|---|---|---|---|
| 0.28 | Exact MC | ||
| One-shot DGM | 3.53 | 0.108 | |
| UDNS (reproduced) | 0.740 | 0.0224 | |
| IEDG | 0.661 | 0.0203 | |
| 0.4407 | Exact MC | ||
| One-shot DGM | 10.7 | 0.319 |
| Metric | Analytic precond. | MDNS | MetaDNS | One-shot DGM | IEDG | |
|---|---|---|---|---|---|---|
| 0.28 | 0.620 | 0.00230 | 0.00377 | 0.0123 | 0.00433 | |
| Corr.-curve | 0.0462 | 0.00235 | 0.00125 | 0.0121 | 0.00682 | |
| 0.4407 | 0.693 | 0.00189 | 0.00548 | 0.693 | 0.0223 | |
| Corr.-curve | 0.516 | 0.00467 | 0.00360 | 0.507 | 0.00275 | |
| 0.6 | 0.693 | 0.00117 | 0.00314 | 0.693 | 0.00445 | |
| Corr.-curve | 0.848 | 0.00100 | 0.000908 | 0.803 | 0.000623 |
| Analytic precond. | MDNS | MetaDNS | One-shot DGM | IEDG | |
|---|---|---|---|---|---|
| 0.5 | 0.0143 | 0.0104 | 0.0119 | 0.00897 | 0.00868 |
| 1.005 | 0.646 | 0.0347 | 0.0548 | 0.658 | 0.0818 |
| 1.2 | 0.693 | 0.00332 | 0.0111 | 0.693 | 0.0329 |