Evaluating generative samplers for lattice field theory by scale
Authors: Satoshi Iso, Lingxiao Wang
Organizations: RIKEN Center for Interdisciplinary Theoretical and Mathematical Sciences (iTHEMS), Wako, Saitama 351-0198, Japan · KEK Theory Center, Institute of Particle and Nuclear Studies, KEK, Oho 1-1, Tsukuba, Ibaraki 305-0801, Japan · Institute for Physics of Intelligence, Graduate School of Science, The University of Tokyo, Bunkyo-ku, Tokyo 113-0033, Japan
Generative samplers for lattice field theory are commonly evaluated by their effective sample size (ESS). We show that a small global ESS need not imply inaccurate long-distance observables: errors spread over many short-distance modes can dominate this diagnostic. We introduce a scale-resolved diagnostic based on the overlap between coarse-grained model and target distributions. At the lattice cutoff, this overlap determines the asymptotic ESS fraction; lower cutoffs isolate long-wavelength errors. In the exactly solvable free theory, two samplers with comparable ESS yield a 32% bias and no bias in the susceptibility, respectively. In two-dimensional φ4 theory near criticality, trained diffusion samplers show the same separation of scales: their path-weight ESS fraction falls rapidly over the volumes studied, while low moments of the magnetization remain close to their target values. Varying the reference parameters substantially changes infrared observables, with little effect on the log-weight variance. Given the target magnetization distribution, a marginal Metropolis test maintains an acceptance rate of order one in our tests. Combined with exact local updates, it reduces the remaining mismatch, although residual bias remains at finite relaxation length. In the free field, uniformly bounded relative errors in the proposal mode variances give a volume-independent bound on the number of updates needed for a prescribed accuracy of the chain's stationary mode variances at fixed correlation length. The target marginal must be supplied or computed separately; estimating it from the samplers' own weights can inherit the poor global overlap.
Figures & tables
Figure 1: Comparable global ESS, different susceptibility bias (exact lattice sums, L=128 , ξ=4 ). The global D2 values are 10.09 and 9.99 , both giving ESS/N≃4×10−5 . Reading from right to left removes short-distance modes. Red: the mass error saturates at Λ∼1/ξ and survives in the infrared, biasing the susceptibility by −32% . Blue: the lattice artifact falls roughly as Λ6 for m≪Λ≪1 and vanishes at the zero mode, leaving the susceptibility exact.
mismatch
observable
no weights
local weights
global weights
relevant ( c^=0.77 )
χ
9.05(7) [ −43% ]
16.05(57)
15.27(1.57)
irrelevant ( c6=0.013 )
χ
16.07(14) [ ≈0 ]
16.07(14)
16.30(1.70)
Table 1: Free field, L=64 , ξ=4 , both mismatches tuned to D2≃7 ( 7.05 and 6.77 ), N=2×104 samples per run, 40 runs. Entries: mean over the runs and, in parentheses, the standard deviation of a single run. True value χ=16 .
Figure 2: Composite chain in the free field ( ξ=4 , ε0=−0.46 , tˉ=1 , 104 parallel chains). (a) The marginal test on x0 accepts with the exact rate 0.807 for all L (points: measured; dotted line: 1−TV from Proposition 1 ); the full ratio test, shown with its exact acceptance rate, collapses. (b) Bias of G(kmin) against nref . Points: simulation; the two L=16 points at nref=20 and 30 are consistent with zero. Lines: Eq. ( 14 ) with the geometric approximation for E[Bk] . Dashed: the L independent bound ( 16 ). (c) Relaxation time τ(kmin)=−1/logEt[cos2(ωkmint)] from Proposition 3 (iv): it grows with L and saturates at τm .
Figure 3: OSQ samplers at κ=0.2705 compared with the benchmark ensembles. (a)–(c) Distribution of ∣M∣ from the benchmark ensembles (solid) and from unweighted OSQ samples (dashed) with fixed reference (Table 2 ) at L=16 , 32 and 64 ; panel (b) also shows the samplers A–C of Table 5 . (d) Relative deviation GOSQ(k)/Gbench(k)−1 of the OSQ propagator from the benchmark against the lattice momentum k^ for the samplers A–C, averaged over lattice-symmetry orbits; the filled symbols at the left are the zero mode, G(0)=χ0 .
pref
benchmark
L
mref
μref
⟨∣M∣⟩
χ
χ0
⟨∣M∣⟩
χ
χ0
16
0.30
0.80
0.80
21
185
0.8149(26)
22.99(30)
192.98(94)
32
0.27
0.72
0.72
55
586
0.7147(25)
64.28(83)
587.3(32)
64
0.257
0.60
0.60
198
1675
0.6019(26)
211.8(30)
1696(11)
Table 2: OSQ samplers with fixed reference at κ=0.2705 . All have the same network with 6.7×104 parameters and use T=10 , g=2 , 250 Euler–Maruyama steps, batches of 16 paths, 1000 training steps with a cosine learning-rate schedule and an exponential moving average of the parameters. The reference parameters mref and μref are fixed from the benchmark values, rounded; the training objective ( 19 ) uses no benchmark configurations. The columns pref give ⟨∣M∣⟩ , χ and χ0 in the reference distribution, the columns benchmark those of the benchmark ensembles.
L
⟨∣M∣⟩
χ0
χ
UL
⟨ϕx2⟩
⟨S⟩/V−λ
16
benchmark
0.8149(26)
192.98(94)
22.99(30)
0.5524(18)
1.5215(29)
0.38758(49)
OSQ
0.8150(30)
191.9(11)
21.84(33)
0.5492(20)
1.5378(31)
0.38589(47)
OSQ, rw
0.8164(64)
192.8(22)
22.22(74)
0.5578(39)
1.5205(69)
0.3877(11)
32
benchmark
0.7147(25)
587.3(32)
64.28(83)
0.5672(16)
1.4698(19)
0.39297(26)
OSQ
0.7351(16)
600.9(23)
47.55(72)
0.5777(13)
1.4905(16)
0.38909(19)
OSQ, rw
0.720(18)
589(26)
58.0(53)
0.569(10)
1.476(13)
0.3936(30)
Table 3: Observables at κ=0.2705 from the benchmark ensembles and from the OSQ samplers of Table 2 , without weights and reweighted with the path weights ( 20 ) (rw). χ0=V⟨M2⟩ , χ=V(⟨M2⟩−⟨∣M∣⟩2) . Errors from a jackknife analysis with 64 blocks. † The effective sample size is about 6 and the largest weight carries a third of the total weight, so these errors are not reliable. At L=32 the weights are also too heavy-tailed for reliable rw errors (Appendix C ).
Figure 4: Acceptance rates against the volume. Filled symbols: independence test with the path weights, Eq. ( 5 ); open symbols: marginal test on M , Eq. ( 6 ); both are estimated from the samples as in Table 4 , with pM taken from the benchmark ensembles. Circles: fixed reference (Table 2 ) at L=16 , 32 and 64 ; square: A; triangles: trainable reference (B, C). The samplers at L=32 are drawn slightly displaced in V . The dashed line is the Gaussian value 2ΦN(−σ/2) with σ2=cV and c=5.9×10−3 , the mean of σ2/V of the samplers of Table 2 . The full-test value at L=64 is dominated by a few samples and may overestimate the true rate.
L
σ2
103σ2/V
ESS/N
α
αM
D2(pM∥qM)
D2k=0
16
1.38
5.4
0.30
0.43
0.92
0.03
0.05
32
5.34
5.2
0.019
0.11
0.85
0.18
0.07
64
28.5
7.0
6×10−4†
0.005†
0.78
0.21
0.46
Table 4: Global and infrared overlap of the samplers with fixed reference (Table 2 ). σ2=Var(logw) , ESS/N [Eq. ( 1 )] and the acceptance rate α of the independence test [Eq. ( 5 ), estimated from all pairs of samples] are computed with the path weights ( 20 ). αM is the acceptance rate of the marginal test ( 6 ) with Φ=M , and D2(pM∥qM) is the Rényi divergence of the distributions of M ; both are obtained from histograms of ∣M∣ (40 bins of equal total occupation) of the benchmark and the unweighted OSQ samples. D2k=0 is the Gaussian proxy for the nonzero modes defined in the text. † Dominated by a few samples; the Gaussian values are e−σ2=4×10−13 and 2ΦN(−σ/2)=2×10−4 .
steps
mref
μref
⟨∣M∣⟩
χ0
χ
103σ2/V
ESS/N
α
αM
D2(pM∥qM)
benchmark
0.7147(25)
587.3(32)
64.28(83)
A
1000
0.264
0.403
0.4977(21)
330.4(25)
76.75(96)
5.01
0.003
0.073
0.545
0.613
B
1000
0.283
0.750
0.7493(14)
612.7(21)
37.82(56)
5.02
0.023
0.116
0.824
0.715
C
5000
0.286
0.725
0.7274(16)
594.0(22)
52.10(79)
5.00
0.027
0.118
0.907
0.063
Table 5: Samplers at L=32 with the reference held fixed at the initial values mref=0.264 , μref=0.403 (A) and with trainable reference (B, C), after the given number of training steps; for B and C, mref and μref are the learned values. Observables without weights; the other quantities are defined as in Table 4 .
proposal
L
σ2/V
full test α
marginal test αM
trained sampler αM
reference of Table 2
16
0.030
0.13
0.79
0.93
32
0.13
1.2×10−3
0.78
0.86–0.88
64
0.85
<10−10
0.76
0.82–0.83
reference of A (Table 5 )
32
0.038
1.6×10−3
0.40
0.54–0.56
Table 6: Acceptance rates at κ=0.2705 of the full independence test, Eq. ( 5 ), with the exact logw=−S−logq , and of the marginal test, Eq. ( 6 ), with Φ=M , for the proposals ( 21 ). Both are estimated from all pairs of 400 configurations generated with plain HMC and Wolff updates and 4000 proposals; the values of αM agree with those measured in the chains. σ2 is obtained from the interquartile range of logw , σ=(q75−q25)/1.349 , because for a Gaussian proposal of an interacting target the distribution of logw has a long lower tail: proposals with large amplitudes have tiny weights from the quartic term. The last column gives the acceptance rate of the marginal test measured in the chains with the trained sampler that has the same reference process (Tables 2 and 5 ) as proposal, as the range over nref ; the full-test rates of these samplers are given in Tables 4 and 5 .
Figure 5: Composite chain at κ=0.2705 with the reference process ( 21 ) as proposal, marginal test on M with pM from long Monte Carlo ensembles. (a) Relative deviation of χ0 from its benchmark value against the number nref of plain HMC trajectories per cycle, reference of Table 2 . (b) The same for ⟨S⟩/V , same runs. (c) χ0 for proposals relaxed by k=10 HMC trajectories before the test, Eq. ( 23 ) (filled squares), compared with (a) (open circles). (d) χ0 at L=32 for the reference of sampler A (Table 5 ): marginal test followed by HMC, and every proposal accepted followed by HMC.
Figure 6: Composite chain at κ=0.2705 with the trained samplers as proposals, marginal test on M with pM from long Monte Carlo ensembles, followed by nref plain HMC trajectories. (a) Relative deviation of χ0 from its benchmark value against nref for the samplers of Table 2 (filled circles), for their reference processes at L=32 and 64 [open circles, dotted; the runs of Fig. 5 (a)], and for sampler A of Table 5 with the marginal test (filled squares) and with every proposal accepted (open squares, dashed). (b) Relative deviation of the lowest nonzero mode, G(kmin) , for the samplers of Table 2 and their reference processes, same runs as in (a). Points at the same nref are drawn slightly displaced.
cost (HMC trajectories)
deviation (%)
L
update
Φ
per cycle k+nref+cgen
cycles ×2τint(M2)
total =CM2
χ0
G(kmin)
16
plain HMC
–
1
56
56
–
–
trained
M
0+40+35
1.1
85
−1.5(11)
+1.3(18)
32
plain HMC
–
1
223
223
–
–
reference
M
0+40+0
1.7
68
−1.4(8)
−3.1(10)
reference, relaxed
M
10+40+0
1.4
71
+2.1(13)
−5.7(19)
Table 7: Cost of an effective independent sample of M2 and remaining infrared deviations at κ=0.2705 . The cost per cycle, in HMC trajectories, is k+nref+cgen : k=10 trajectories applied to relaxed proposals before the test, nref trajectories after it, and the generator time cgen converted into trajectories. For plain HMC a cycle is one trajectory. Multiplied by the number of cycles per independent sample, 2τint(M2) , it gives CM2 . Reference proposals come from the reference process, Eq. ( 21 ), whose generation cost is omitted; trained proposals come from the OSQ samplers of Table 2 . Deviations are relative to the benchmark; plain-HMC autocorrelation times are from Fig. 7 (c). Costs exclude training and the determination of pΦ . On RIKYU, generation takes 0.70 , 3.2 and 8.3 ms per sample at L=16 , 32 and 64 on an NVIDIA GB200 GPU (batches of 2048, 250 Euler–Maruyama steps), and one HMC trajectory takes 0.020 , 0.072 and 0.29 ms on one Arm Neoverse-V2 core (compiled Numba implementation); this conversion compares batched GPU generation with single-core CPU HMC and favors the generator.
Figure 7: Relaxation under plain HMC at κ=0.2705 . Two-sided quench: in 512 configurations of the benchmark ensemble the Fourier amplitudes of a set of modes are multiplied by 1±d , and D(t) is the difference between the two starts of the mean of ∣ϕ~(k)∣2/V over the set after t HMC trajectories. (a) Lowest shell, 1≤∣n∣<2 , d=0.5 ; at L=32 , d=0.2 gives the same curve. (b) Ultraviolet modes, k^2>6 , d=0.1 ; since the change of all these amplitudes is extensive, a larger d would change the HMC acceptance rates of the two starts. Dashed: free-field prediction for every mode of the set with ωk2=1/G(k) , the measured G(k) and HMC acceptance rate, and the leapfrog step and distribution of trajectory lengths of the simulation, weighted with the initial amplitude of each mode; Proposition 3 (iv) is its limit ϵ→0 . (c) Times at which D(t)/D(0) falls to 1/e (filled circles and triangles) and to 1/10 (open circles), the 1/e time of the free-field prediction (dashed), and the equilibrium integrated autocorrelation times of M2 and ∣ϕ~(kmin)∣2 under plain HMC (gray; 16 independent chains of 4 – 6×104 trajectories). Errors of the quench from a jackknife over the groups of configurations that share the random trajectory lengths, errors of τint from a jackknife over chains.
Appendix figures & tables5 assets
Supplementary material from the paper’s appendix.
Appendix
Figure 8: Correlation volume law. Exact lattice D2 for the mass mismatch against (L/ξ)2c^2/8π , for L=32 – 256 , L≥8ξ , c^=0.1 – 0.5 .
Figure 9: Fixed correlation length, κ=0.264 ( ξ≃5 ). (a) Bias of G(kmin) , i.e. its relative deviation from the benchmark value, in the composite chain against nref , with the reference process as proposal; points consistent with zero are omitted. (b) Two-sided quench under plain HMC: difference D(t) between reference-process starts with too strong and too weak low modes, shell 1≤∣n∣<2 , normalized to D(0) , with pHMC=0.905 at all L . Dotted: decay with τm/pHMC . (c) Relaxation times of Table 8 against L . Dashed: the relaxation time ( 16 ) of a mode with ω2=1/G(kmin) , that is, Eq. ( 24 ), with G(kmin) from Eq. ( 25 ) at ξ=5.3 , divided by pHMC=0.9 ; dotted: the free-field estimate τm/pHMC .
L
ϵ
pHMC
τk/pHMC , Eq. ( 24 )
chain
quench
equilibrium τint
32
0.1
0.95
14.5
18(3)
–
15.2(8)
64
0.1
0.90
24.0
17.7(14)
17.8(5)
22.5(10)
128
0.1
0.82
30.4
30.8(22)
–
–
128
0.07
0.90
27.4
29(3)
20.8(7)
36(4)
256
0.05
0.90
28.7
–
16.0(7)
35(3)
Appendix
Table 8: Relaxation time of the lowest nonzero modes at κ=0.264 ( ξ≃5 ), in HMC trajectories. Chain: exponential fit of the deviation of G(kmin) from the benchmark for nref≥6 , with the reference process as proposal. Quench: exponential fit of D(t) in the shell 1≤∣n∣<2 . Equilibrium: integrated autocorrelation time of ∣ϕ~(kmin)∣2 under plain HMC, from 8 chains of 6000 trajectories. The fourth column is Eq. ( 24 ) with the measured G(kmin) , divided by pHMC .
Figure 10: Reweighting the OSQ samples with their path weights. Distribution of ∣M∣ from the benchmark ensembles (solid), the unweighted samples (dashed) and the reweighted samples (points, with delta-method errors) for the samplers with fixed reference at (a) L=16 , (b) L=32 and (c) L=64 , and for samplers (d) A and (e) B at L=32 . Each panel gives ESS/N and the Pareto shape k^P of the largest weights.
Figure 11: Distribution of the magnetization from the action at κ=0.2705 . (a), (b) Density of ∣M∣ from the benchmark ensembles (histogram) and p^M obtained by integrating the mean force at fixed M (curve), at L=32 and 64 . (c) Mean force ⟨∂S/∂M⟩M/V against M , with jackknife errors. Each fixed- M HMC chain starts from an OSQ sample shifted to the prescribed M ; starts from the reference process give consistent results within errors.
Neural generative samplers for lattice field theory can be costly to train and evaluate. When they miss modes or assign them incorrect relative weights, biased observables do not reveal which collective variables are responsible. We project a trained flow-matching velocity onto vector fields built from lattice operators and Fourier modes. In two-dimensional lattice φ4 theory, the projection separates changes in the overall magnetization from the lowest nonzero-momentum fluctuations and guides an explicit invertible proposal that treats them separately. Allowing the amplitude of the lowest nonzero-momentum fluctuations to depend on the magnetization improves the overlap between the proposal and target distributions, while the same two-parameter modification at higher momenta gives smaller improvements. The Metropolis--Hastings correction defines a Markov chain with the target Boltzmann distribution as its stationary law, and the normalized proposal density yields finite-volume partition-function estimates consistent with an independent HMC calculation. At the larger tested volume, the overlap between the proposal and target distributions deteriorates substantially, limiting the range over which the same parameterization remains effective.
Moxian Qian
Johannes Gutenberg University Mainz, 55128 Mainz, Germany
Sampling equilibrium field configurations remains a major computational bottleneck in lattice field theory, motivating the development of generative samplers that can produce independent configurations. Diffusion models are promising for this purpose, but their standard denoising score matching objective requires samples from the target distribution, seemingly reintroducing the original sampling problem. Here, we show that diffusion models can instead be trained from their own generated samples using the target score identity, provided access to the unnormalized probability density. Importance-weighted formulations of this identity yield a consistent target throughout training, while unweighted variants define a self-consistent fixed-point training scheme. We benchmark the different approaches in two-dimensional φ4 theory and identify effective choices that enable efficient training and sampling across the symmetric, critical, and broken phases. Ultimately, our data-free training approach achieves comparable performance to training on HMC reference data.
Dennis Grinwald, Ankur Singha, Khaled Kahouli +2
Berlin Institute for the Foundations of Learning and Data (BIFOLD), Germany · Technische Universität Berlin, Germany · Deutsches Elektronen-Synchrotron (DESY), Platanenallee 6, 15738 Zeuthen, Germany +2
We present a first study of a diffusion-based approach to accelerated sampling of the Nf=2 lattice Schwinger model. Our work is inspired by recent and growing successes in developing such generative models for ensemble generation in LFT to overcome the well-known critical slowing down problem. We train a U(1)-equivariant score-based generative model to sample gauge link configurations from the marginal Schwinger model. By computing model likelihoods, we obtain unbiased estimates for observables that closely match those produced by MCMC simulations. We also demonstrate improvement over HMC as measured qualitatively by a reduction in topological freezing near critical parameters.
Octavio Vega, Aida X. El-Khadra
Department of Physics University of Illinois Urbana-Champaign Urbana, IL 61801