betaFeedback

WorksPhysics and Astronomy

Annealed sampling of diffusion models in lattice field theory

Abstract

Machine learning methods have recently gained increasing interest as possible means of solving critical slowing down in lattice field theory, with particular emphasis on sampling methods using field transformations such as normalizing flows, annealing/out-of-equilibrium methods, and diffusion models. Annealing methods provide appealing polynomial scaling and exactness guarantees, while diffusion models use a simple and efficient score-matching training procedure. This work explores a method combining these benefits, first training an energy-based diffusion model using score matching, then sampling using either stochastic normalizing flows (SNFs) or flow-transformed replica exchange (T-REX). The choice of sampling method can be made after training the diffusion model; the theoretical properties of SNFs and T-REX and their relative trade-offs are discussed. Numerical results are presented for scalar field theory and the O(3) non-linear sigma model, using a class of local-footprint energy models with efficient gradient and divergence calculations. Sampling from the trained models follows predicted exactness and scaling properties, and significantly improves over sampling methods without a learned component.

Introduction

Lattice field theory is a vital tool for studying strongly interacting field theories. The basis of the approach is a discretization of Euclidean spacetime onto a lattice with spacing aa, providing a fundamentally non-perturbative regulator for ultraviolet divergences—which are cut off by an effective scale a−1a^{-1}—while preserving symmetries such as gauge invariance [1]. By performing Monte Carlo calculations of the regulated path integral at a variety of lattice spacings aa, then extrapolating a→0a \to0, physical information about the continuum theory can be recovered in a controlled and systematically improvable way. In the study of the Standard Model, lattice Quantum Chromodynamics (QCD) has for example been used to provide competitive determinations of flavor observables [2], parton distribution functions [3], hadron form factors [4, 5], and properties of the QCD phase diagram [6, 7]. A striking example is hadronic contributions to the anomalous magnetic moment (g−2g-2) of the muon, for which lattice QCD has been critical in disambiguating between a new physics discovery scenario and predictions consistent with the Standard Model [8].

The systematic and statistical uncertainties propagated by the continuum extrapolation commonly dominate the error budget of lattice field theory calculations. It is therefore important to both extend calculations to finer lattice spacings and obtain increased statistical precision across all Monte Carlo estimates. However, the continuum limit by definition corresponds to a second-order critical point of the theory, where all correlation lengths must diverge in units of the lattice spacing. As this limit is approached, traditional Markov chain Monte Carlo (MCMC) methods based on local updates require increasingly many steps to obtain a fixed number of statistically independent samples. This well-known problem of critical slowing down [9] presents a fundamental obstacle to gaining better control of physical observables in strongly interacting quantum field theories, such as QCD. Analogous limits are also of interest in the study of statistical systems near criticality, where similar formulations and Monte Carlo methods are commonly applied.

In recent years, there has been growing interest in investigating alternative Monte Carlo sampling strategies based on generative machine learning approaches. Generative models that use stochastic and deterministic field transformations to transport between probability measures have shown promising early successes in effective and unbiased Monte Carlo sampling of lattice field theories [10, 11, 12]. While many such methods have been proposed, we broadly classify these into the following strategies:

  1. Normalizing flows use deterministic transformations to map between a trivial distribution and the target theory [10, 11, 13, 14, 15, 16].

  1. Annealing methods explicitly fix a path through the space of theories and aim to follow this path using a combination of deterministic and stochastic field transformations, potentially including MCMC steps. Such methods include trivializing maps [17], stochastic normalizing flows [18], and out-of-equilibrium methods [19, 20, 22] [21].

  1. Diffusion models implicitly fix a path through

the space of theories, defined by incrementally applying noise to samples from the target theory, then use deterministic or stochastic transformations to approximately reverse this path [23, 24, 25, 26].

Each of these methods has by now been applied in a variety of lattice field theory contexts, including trivializing gradient flows for gauge theory [17, 27]; normalizing flows for scalar field theories and spin models [22, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43], gauge theories [44, 45, 46], and theories with dynamical fermions [47, 48, 49, 50]; stochastic normalizing flows and out-of-equilibrium methods for scalar field theories [22, 51] and gauge theories [52, 53, 54]; and diffusion models for scalar field theories and spin models [55, 56, 57, 58, 59, 60], gauge theories [56, 61, 62, 63, 64, 65, 66], and theories with dynamical fermions [67, 68].

In all of the above approaches, constructing models that more accurately follow the desired transport path leads to improved sampling quality. In the majority of applications, this has been accomplished by using machine learning parameterizations of the transformations used, along with optimization (i.e., “training”) using methods based on stochastic gradient descent. More accurate models and thus higher quality sampling can be systematically achieved by making machine learning models more flexible (i.e., “expressive”) and applying more training.

Unfortunately, training time may be limited by computational costs and extending model expressivity in useful directions may not be straightforward. The cost and effectiveness of training methods also vary between generative approaches. Normalizing flows leave the intermediate path taken through the space of distributions unconstrained. While this can potentially allow flexibility, making a learned transport path easier to find, practical loss functions also can suffer from challenging issues; for example, the reverse Kullback-Leibler (KL) divergence [69] commonly used for self-training suffers from a well-known mode collapse problem [38, 39, 70, 71]. Annealing methods instead use either a path KL divergence [18] or related Physics-Inspired Neural Network (PINN) loss functions [51], which help to avoid mode collapse but involve solving a costly partial differential equation. In contrast, diffusion models are trained by a relatively cheap score-matching procedure, minimizing a mean-squared-error using training data which have been diffused with varying levels of noise [24, 26]. This simple training strategy and its complementarity to other methods motivates our focus in this work on such score-based diffusion models.

The ability to remove or control systematic bias is another important consideration. For normalizing flows, one can construct reweighting factors by evaluating exact ratios between model and target densities, which can either directly reweight the sampled data [72] or can be used in Metropolis acceptance tests for asymptotic exactness [28]. The effective sample size (ESS) of directly reweighted flow samples decreases exponentially with the order-2 Rényi divergence between the distributions. For annealing methods, total reweighting factors can be obtained by accumulating contributions over each intermediate transport step. Notably, either increasing the number of stochastic MCMC steps or increasing the noise in the continuous stochastic transport applied systematically reduces the variance of log-reweighting factors and thus increases sampling efficiency [51, 73]; the limit of an infinite number of steps (or noise) corresponds to the quasi-static limit, which gives perfect sampling.

On the other hand, strategies for unbiased estimates using diffusion models vary significantly. Sampling using a stochastic reverse process is commonly used in image generation applications [74, 75, 76, 77], but does not provide the reweighting factors or exactness guarantees needed for scientific applications. By instead treating the learned score as a deterministic normalizing flow model, the model log-probability and reweighting factors can be exactly computed [26]. It is also possible to determine pathwise weights by specifying a reference forward process and computing a ratio between forward and backward probabilities [58, 78, 79], which provides unbiased reweighting factors while maintaining stochasticity. Finally, Refs. [62, 63] propose a Metropolis-Adjusted Annealed Langevin Algorithm (MAALA) which combines the stochastic reverse process of a trained diffusion model with MCMC updates near the target distribution for asymptotic exactness. Although effective, the former two methods still lead to a maximum sampling efficiency set by the trained model quality—i.e., they lack an analogue of the quasi-static limit—and the latter method relies on standard MCMC convergence guarantees which may be difficult to control when critical slowing down is an issue.

In this work, we instead consolidate ideas from annealing methods, diffusion models, and recently developed machine-learning strategies to train and evaluate energy-based diffusion models via annealed sampling, targeting lattice field theory applications. Energy-based diffusion models convert the implicit path fixed by the diffusion process to an explicit path specified by an energy function E^t\hat{E}_t, where the energy is trained to approximate the log-probability at each intermediate time tt, and the endpoints are fixed to match the noise and target distributions. The learned energy function then enables sampling using standard annealing strategies, which guarantees unbiased expectations and provides a useful scaling limit. Moreover, the score −∇E^t(ϕ)-\nabla\hat{E}_t(\phi) immediately leads to a field transformation that converges to the optimal one when E^t\hat{E}_t matches the diffusion path. A summary of how this approach relates to various other sampling strategies is visualized in Figure 1.

Figure 1. Comparison of several strategies to transport between a simple distribution rr and a target distribution pp. Top: Paths taken through the space of distributions by various methods. The reference diffusion path sequentially adds noise to samples from pp; path (a) is the change-of-density from a continuous field transformation (i.e., a flow); paths (b) and (c) are defined by explicit energy functions evaluated over an annealing time t∈[0,1]t \in[0, 1], where (b) represents an energy function specified a priori while (c) represents an energy function trained to match the diffusion path. Bottom: Training and sampling methods used in each case, with the scaling of their respective sampling efficiencies, given in terms of the effective sample size (ESS) per sample drawn. For paths (b) and (c), flow-transformed replica exchange can be used instead of the stochastic normalizing flow shown in the figure; both methods achieve the same scaling, as detailed in Sec. II A.

Several related ideas have been explored in previous works. Ref. [80] learns intermediate probability densities within a discrete-time diffusion formulation, using it for an unbiased annealed sampling strategy with particle resampling (Sequential Monte Carlo [81]); systematic bounds on the variance are established in the limit of an infinite number of steps. Ref. [82] extends the method to systems with discrete state spaces, while Ref. [83] develops a training-free approach to estimating the intermediate probability densities. Refs. [84, 85] introduce “neural thermodynamic integration”, which also learns an interpolating energy function from a diffusion model; the resulting model is used for improved, unbiased partition function estimates, rather than improved sampling and expectation values of microscopic observables. Ref. [86] develops a generalized version of free energy and partition function estimation using a learned interpolating energy for more general stochastic processes. Finally, Ref. [87] implements an analogous approach for lattice field theory, demonstrating practical gains in sampling efficiency as the quasi-static limit is approached in the Sequential Monte Carlo framework.3

In the context of this previous work, our key contributions are:

  • A summary of the annealed sampling method for diffusion models, detailing the theoretical scaling, key metrics to be measured, and subtle issues that must be addressed.

  • The development and implementation of local-footprint energy models for E^t\hat{E}_t, which can be immediately transferred between target theory volumes and support memory-efficient exact divergence calculations, avoiding noisy Hutchinson [88, 89] or spherical-noise estimates [90, 91].

  • A numerical comparison of the stochastic normalizing flow (SNF) and flow-transformed replica exchange (T-REX) methods of sampling from diffusion models, including measured scaling of the sampling efficiency in both approaches; demonstrations are carried out for scalar field theory and the O(3) non-linear sigma model.

  • The implementation of an optimal annealing schedule, demonstrating practical gains that can be achieved by this simple modification.

In the remainder of this work, we summarize the annealed sampling method for diffusion models (Section II), discuss the design, implementation, and training of our energy models (Section III), detail our numerical applications (Section IV), discuss the results and implications (§ 5), and finally conclude with an outlook on future work and impacts (Section VI).

Annealed sampling from diffusion models

We begin with a review in the field theory language of two sequential annealing methods—annealed importance sampling (AIS) and stochastic normalizing flows (SNFs)—which are related by respectively including or excluding a deterministic field transformation. In particular, we introduce the quasi-static limit achieved by taking the number of steps nn to infinity, for which the variance of log-reweighting factors asymptotically decreases as 1/n1/n. These methods are then related to replica exchange methods—ordinary replica exchange (REX) [92, 93] and transformed replica exchange (T-REX) [94, 95]—which respectively correspond to AIS and SNF by a “computational duality” exchanging sequential steps with parallelism [96]. Standard score-based diffusion models are then reviewed using a common language. This background material establishes the basis for the presentation in the remainder of this section of the proposed method.

We use field theory notation as a common language throughout this work, though the conceptual framework extends beyond lattice field theory. Samples will be assumed to be field configurations, generically denoted by ϕ\phi, where dependence on spacetime sites and internal degrees of freedom has been suppressed. Where necessary, these are made explicit as ϕa(x)\phi^{a}(x), where aa indicates an index over internal degrees of freedom and x∈Xx \in\mathcal{X} denotes a lattice site in the spacetime lattice X\mathcal{X}. For simplicity, we assume a hypercubic lattice with an extent of LL sites in each of dd spacetime dimensions, such that X≅(ZL)×d\mathcal{X} \cong(\mathbb{Z}_{L})^{\times d} with lattice-units volume V≡∣X∣=LdV \equiv|\mathcal{X}| = L^{d}. The target distribution to be sampled will be written as

p(ϕ)≡1Ze−S(ϕ),Z≡∫Dϕ e−S(ϕ),(1)p(\phi) \equiv\frac{1}{Z}e^{-S(\phi)}, \qquad Z \equiv\int\mathcal{D}\phi\,e^{-S(\phi)}, \tag*{(1)}

and corresponding expectation values for operators O\mathcal{O} will be denoted by

⟨O⟩p=∫Dϕ O(ϕ)p(ϕ).(2)\langle\mathcal{O}\rangle_{p} = \int\mathcal{D}\phi\,\mathcal{O}(\phi)p(\phi). \tag*{(2)}

An approximate importance sampling distribution, e.g. the sampling distribution of a generative model, will be denoted by the probability density q(ϕ)q(\phi). In this case, appropriate reweighting factors w(ϕ)w(\phi) may be used to provide unbiased expectation values of observables as ⟨wO⟩q=⟨O⟩p\langle w\mathcal{O}\rangle_{q} = \langle\mathcal{O}\rangle_{p}.

Continuous-time annealed sampling methods and diffusion models both introduce the notion of a continuously evolving probability density as a function of a fictitious annealing or diffusion time. In order to establish common conventions, we denote the (forward) diffusion time by λ∈[0,1]\lambda\in[0,1] and the annealing time, or reverse diffusion time, by t≡1−λ∈[0,1]t \equiv1-\lambda\in[0,1]. In all considered methods, the evolving probability density denoted by ρt(ϕ)\rho_t(\phi) corresponds to the target at one endpoint, ρ1(ϕ)=p(ϕ)\rho_1(\phi) = p(\phi), and corresponds to a simple noise distribution at the other endpoint, ρ0(ϕ)=r(ϕ)≡exp⁡(−A(ϕ))\rho_0(\phi) = r(\phi) \equiv\exp(-A(\phi)).4 A schematic

depiction of this setup is given in Figure 2.

Diffusion and annealing time interpolation between target and noise distributions

Figure 2. The diffusion time λ\lambda and annealing time t=1−λt = 1-\lambda interpolate between the target distribution ρ1(ϕ)≡p(ϕ)\rho_1(\phi) \equiv p(\phi) and the noise distribution ρ0(ϕ)≡r(ϕ)\rho_0(\phi) \equiv r(\phi).

Annealed sampling methods

The starting point of the annealed sampling methods discussed in this section is the sequence of distributions

ρt(ϕ)≡exp⁡(−Et(ϕ))/Zt,(3)\rho_t(\phi) \equiv\exp(-E_t(\phi))/Z_t, \tag*{(3)}
Zt≡∫Dϕ e−Et(ϕ),Z_t \equiv\int\mathcal{D}\phi\,e^{-E_t(\phi)},

which in this section we take to be specified a priori. A simple example of such a sequence is a linear interpolation between the target and noise distributions,

Et(ϕ)=tS(ϕ)+(1−t)A(ϕ).(4)E_t(\phi) = tS(\phi) + (1-t)A(\phi). \tag*{(4)}

The basic idea is to connect the probability distribution ρ0\rho_0 to the distribution ρ1\rho_1 by incrementally moving through the intermediate distributions ρt\rho_t. For the sequential annealing methods discussed (AIS and SNF), this is done by applying a sequence of reweighting, field transformation, and MCMC steps over time. For the replica-exchange methods discussed (REX and T-REX), this is accomplished by running a parallel set of “replica” Markov chains respectively targeting distributions at annealing times t∈[0,1]t \in[0,1], using swaps between neighboring replicas to improve mixing.

a. AIS and SNF. Sequential annealing methods divide the transport between ρ0\rho_0 and ρ1\rho_1 into n≡1/Δtn \equiv1/\Delta t steps, such that samples and weights are iteratively transformed through the sequence

ϕ0  →  ϕΔt  →  ⋯  →  ϕ1\phi_0 \;\to\; \phi_{\Delta t} \;\to\; \cdots\;\to\; \phi_1
w0  →  wΔt  →  ⋯  →  w1.(5)w_0 \;\to\; w_{\Delta t} \;\to\; \cdots\;\to\; w_1. \tag*{(5)}

Transformations are built such that sampled pairs (ϕt,wt)(\phi_t,w_t) give unbiased expectation values with respect to the distribution ρt\rho_t at each intermediate time tt,

⟨O⟩ρt=E[wtO(ϕt)]E[wt].(6)\langle\mathcal{O}\rangle_{\rho_t} = \frac{\mathbb{E}[w_t\mathcal{O}(\phi_t)]}{\mathbb{E}[w_t]}. \tag*{(6)}

Here E[⋅]\mathbb{E}[\cdot] indicates the statistical expectation value with respect to possible realizations of this process, typically estimated by averaging over an ensemble sampled according to Eq. (5). In the case of AIS, each transition (t−Δt)→t(t-\Delta t)\to t consists of two steps [20]:

  1. Reweight: The reweighting factors are updated dynamically using the increment

Δlog⁡wt=log⁡wt−log⁡wt−Δt=−Et(ϕt−Δt)+Et−Δt(ϕt−Δt).(7)\Delta\log w_t = \log w_t - \log w_{t-\Delta t} = -E_t(\phi_{t-\Delta t}) + E_{t-\Delta t}(\phi_{t-\Delta t}). \tag*{(7)}

The field configuration for the next timestep is initialized to ϕt′=ϕt−Δt\phi'_t = \phi_{t-\Delta t}.

  1. MCMC: Samples are updated using a Markov kernel KtK_t that satisfies balance with respect to ρt\rho_t, giving the final field configuration at the next timestep ϕt∼Kt(⋅∣ϕt′)\phi_t \sim K_t(\cdot|\phi'_t).

The latter step is not necessary for correctness, but is important for reducing the variance of reweighting factors. In particular, applying Eq. (7) alone corresponds to reweighting samples drawn from ρ0\rho_0 directly to the target ρ1\rho_1. This is unbiased, but generally results in log-reweighting factors with a variance which scales extensively with the lattice-units volume of the system, Var⁡[log⁡w1]∼V\operatorname{Var}[\log w_1] \sim V. Expectation values as in Eq. (6) will then have exponentially severe noise as VV is taken large.

By including a Markov update between each reweighting step, the increments in the log-reweighting factors instead become decorrelated from one another. In the context of lattice field theory, the majority of the fluctuations in the log-weight increments can be expected to be dominated by the short-distance, ultraviolet behavior. This fortunately suggests that the log-weight increments rapidly decorrelate, even with potentially inefficient or locally updating Markov kernels. Assuming perfect local decorrelation—i.e., the short-range fluctuations dominate the log-weights and the Markov kernels resample these fluctuations perfectly—the variance of the total log-reweighting factor splits according to

Var⁡[log⁡w1]=∑i=1nVar⁡[Δlog⁡wiΔt].(8)\operatorname{Var}[\log w_1] = \sum_{i=1}^{n} \operatorname{Var}[\Delta\log w_{i\Delta t}]. \tag*{(8)}

When the time step Δt\Delta t is much smaller than the rate of change of EtE_t, including MCMC updates also guarantees that the sampled distribution is quasi-static, remaining in equilibrium with the distribution ρt\rho_t throughout. Taking Δt→0\Delta t \to0 (n→∞n \to\infty), the Central Limit Theorem then applies for the log-weight increments, and the asymptotic scaling can be written as [96]

Var⁡[log⁡w1]=1n∫01dt Var⁡[∂tEt]+O(1/n2).(9)\operatorname{Var}[\log w_1] = \frac{1}{n}\int_0^1 dt\,\operatorname{Var}[\partial_t E_t] + O(1/n^2). \tag*{(9)}

The variance in the integrand is to be computed with respect to the equilibrium distribution ρt\rho_t. We denote the integral itself by

S≡∫01dt Var⁡[∂tEt],(10)S \equiv\int_0^1 dt\,\operatorname{Var}[\partial_t E_t], \tag*{(10)}

which is a finite value qualitatively describing the work that must be done to transport along the given path between ρ0\rho_0 and ρ1\rho_1. In the lattice field theory context, it carries the same volume dependence identified above, S∼VS \sim V. The prefactor 1/n1/n in Eq. (9) then guarantees that the variance of reweighting factors converges to zero in the quasi-static limit. Moreover, it is only necessary to scale n∼Vn \sim V to maintain a fixed reweighting variance, in contrast to the exponentially large ensembles that would be required if only importance sampling and direct reweighting were applied [20].

Moving from AIS to SNF sampling requires introducing deterministic field transformations. Applying a generic diffeomorphism f:η↦ϕf:\eta\mapsto\phi to samples drawn from any initial distribution π(I)\pi^{(I)} transforms that distribution via the change-of-variables formula to a new distribution π(F)\pi^{(F)} with log-density

log⁡π(F)(ϕ)=log⁡π(I)(η)−log⁡∣det⁡Jf∣.(11)\log\pi^{(F)}(\phi) = \log\pi^{(I)}(\eta) - \log|\det J_f|. \tag*{(11)}

Here JfJ_f is the Jacobian of the transformation ff evaluated at η\eta. A parameterized and optimized transformation of this form is a normalizing flow. This leads to a useful improved transport strategy when one is interested in a target distribution ρ(F)\rho^{(F)}: use an optimized flow to map η↦ϕ\eta\mapsto\phi which follows the importance sampling distribution π(F)≈ρ(F)\pi^{(F)} \approx\rho^{(F)}, then apply the exact log-reweighting factors

log⁡w=log⁡ρ(F)(ϕ)−log⁡π(I)(η)+log⁡∣det⁡Jf∣.(12)\log w = \log\rho^{(F)}(\phi) - \log\pi^{(I)}(\eta) + \log|\det J_f|. \tag*{(12)}

In the limit of a perfect flow, the output samples exactly follow the distribution ρ(F)\rho^{(F)} and the reweighting factors become constant.

In the SNF approach, this concept is used to improve the efficiency of the reweighting step in AIS, applying for each update (t−Δt)→t(t-\Delta t) \to t the following two steps:

  1. Flow + Reweight: Transform samples and update the reweighting factors according to

ϕt′=f(ϕt−Δt;t,t−Δt),(13)\phi'_t = f(\phi_{t-\Delta t};t,t-\Delta t), \tag*{(13)}
Δlog⁡wt=−Et(ϕt′)+Et−Δt(ϕt−Δt)+log⁡∣det⁡Jft∣.(14)\Delta\log w_t = -E_t(\phi'_t) + E_{t-\Delta t}(\phi_{t-\Delta t}) + \log|\det J_{f_t}|. \tag*{(14)}
  1. MCMC: Apply the same Markov kernel update as for AIS, ϕt∼Kt(⋅∣ϕt′)\phi_t \sim K_t(\cdot|\phi'_t).

Using the identity transformation f=Idf = \mathrm{Id} recovers the AIS procedure, while optimizing the flow transformation ftf_t at each step strictly improves over this case. In the limit of perfect flow transformations, the reweighting factors become constant and Var⁡[log⁡w1]=0\operatorname{Var}[\log w_1] = 0.

To further analyze the scaling of the variance, it is helpful to consider a continuous-time parameterization of the flow transformation.5

f(ϕt−Δt;t,t−Δt)=∫t−Δttds v^s(ϕs)+ϕt−Δt(15)f(\phi_{t-\Delta t};t,t-\Delta t)=\int_{t-\Delta t}^{t}ds\,\hat{v}_s(\phi_s)+\phi_{t-\Delta t} \tag*{(15)}
log⁡∣det⁡Jf∣=∫t−Δttds [∇⋅v^s(ϕs)].(16)\log\left|\det J_f\right|=\int_{t-\Delta t}^{t}ds\,[\nabla\cdot\hat{v}_s(\phi_s)]. \tag*{(16)}

Such a definition allows the incremental step size Δt\Delta t (and the number of steps nn) to be varied while fixing a particular model of the flow transformation. An analogous quasi-static limit emerges in the limit of n→∞n\to\infty, in which case the variance converges to the continuous time result [96]

Var⁡[log⁡w1]=1n∫01dt Var⁡[ξt]+O(1/n2),(17)\operatorname{Var}[\log w_1]=\frac{1}{n}\int_0^1dt\,\operatorname{Var}[\xi_t]+O(1/n^2), \tag*{(17)}
ξt≡∂tEt+v^t⋅∇Et−∇⋅v^t.\xi_t\equiv\partial_tE_t+\hat{v}_t\cdot\nabla E_t-\nabla\cdot\hat{v}_t.

We denote the corresponding integral by

S~=∫01dt Var⁡[ξt].(18)\widetilde{S}=\int_0^1dt\,\operatorname{Var}[\xi_t]. \tag*{(18)}

An optimal continuous flow vt(ϕ)v_t(\phi) is one that solves the corresponding transport equation

∇⋅vt−vt⋅∇Et=∂tEt−⟨∂tEt⟩ρt,(19)\nabla\cdot v_t-v_t\cdot\nabla E_t=\partial_tE_t-\langle\partial_tE_t\rangle_{\rho_t}, \tag*{(19)}

which sets the variance and S~\widetilde{S} to zero [51]. This adds a useful direction for improvement as model complexity and training time can be increased to drive v^t\hat{v}_t towards vtv_t, such that S~\widetilde{S} is made small.

b. REX and T-REX. Replica exchange methods aim to solve a similar problem to AIS and SNF. Rather than annealing over target distributions in time, the REX and T-REX approaches instantiate n+1n+1 parallel replicas respectively targeting the intermediate distributions ρ0,ρΔt,…,ρ1\rho_0,\rho_{\Delta t},\ldots,\rho_1. We start by defining the more general T-REX algorithm, which can be described by iteratively applying two steps [94, 95, 97]:

  1. MCMC: Update the current sample in each chain with a Markov kernel satisfying balance for its respective target distribution ρt\rho_t.

  1. Flowed Swap: For a pair of neighboring chains at annealing time tt and t−Δtt-\Delta t, construct the flowed swap proposal

ϕt′=f(ϕt−Δt;t,t−Δt),ϕt−Δt′=f−1(ϕt;t,t−Δt).(20)\begin{aligned} \phi'_t&=f(\phi_{t-\Delta t};t,t-\Delta t),\\ \phi'_{t-\Delta t}&=f^{-1}(\phi_t;t,t-\Delta t). \tag*{(20)} \end{aligned}

Accept the swap proposal according to the Metropolis acceptance probability

pswap(ϕt′,ϕt−Δt′)=min⁡(1,wswap(ϕt′,ϕt−Δt′)),(21)p_{\mathrm{swap}}(\phi'_t,\phi'_{t-\Delta t})=\min(1,w_{\mathrm{swap}}(\phi'_t,\phi'_{t-\Delta t})), \tag*{(21)}
wswap(ϕt′,ϕt−Δt′)=ρt(ϕt′)ρt−Δt(ϕt−Δt′)ρt(ϕt)ρt−Δt(ϕt−Δt)∣det⁡Jf(ϕt−Δt)∣∣det⁡Jf(ϕt−Δt′)∣.w_{\mathrm{swap}}(\phi'_t,\phi'_{t-\Delta t})= \frac{\rho_t(\phi'_t)\rho_{t-\Delta t}(\phi'_{t-\Delta t})}{\rho_t(\phi_t)\rho_{t-\Delta t}(\phi_{t-\Delta t})} \frac{\left|\det J_f(\phi_{t-\Delta t})\right|}{\left|\det J_f(\phi'_{t-\Delta t})\right|}.

Throughout this work, we use a non-reversible even-odd swap proposal scheme, alternately proposing swaps between chains (2j)Δt(2j)\Delta t and (2j+1)Δt(2j+1)\Delta t or between chains (2j)Δt(2j)\Delta t and (2j−1)Δt(2j-1)\Delta t [98]. The ordinary REX algorithm is recovered by using the identity transformation f=Id⁡f=\operatorname{Id}, for which the proposal is ϕt′=ϕt−Δt\phi'_t=\phi_{t-\Delta t} and ϕt−Δt′=ϕt\phi'_{t-\Delta t}=\phi_t.

The connection from AIS and SNF sampling to REX and T-REX sampling is given by a computational duality [96]. In AIS and SNF, annealing happens sequentially in time, while statistics are generated in parallel over multiple samples; in REX and T-REX annealing time is distributed over parallel chains, while statistics are generated by evolving the chains sequentially. This relationship is schematically illustrated in Figure 3.

Comparison of sequential annealing methods and replica exchange methods

Figure 3. Comparison of sequential annealing methods (AIS/SNF) with replica exchange methods (REX/T-REX), demonstrating their relationship through a computational duality that exchanges parallelism over computing resources with sequential evolution in time [96]. The total n=1/Δtn = 1/\Delta t steps in annealing time respectively sets the runtime for each AIS/SNF sample and the number of parallel chains for REX/T-REX. The desired total ensemble size (four shown) respectively sets the number of parallel instances of AIS/SNF to be run or the number of steps to be taken in REX/T-REX.

The result of this duality is that the structure and properties of AIS and SNF largely translate to the case of REX and T-REX. Assuming again a perfect decorrelation of short-distance fluctuations, the efficiency of REX and T-REX is governed by the decorrelation of large scale structures set by the round-trip time τRT\tau_{\mathrm{RT}} between the target and noise distributions [99, 100]. The round-trip time can be measured in practice by tracking identities of individual samples as they are swapped through the replicas. We also define the refresh time

τ=τRT2(n+1).(22)\tau=\frac{\tau_{\mathrm{RT}}}{2(n+1)}. \tag*{(22)}

The refresh time captures the average number of steps between one new sample being transported from the noise distribution to the target distribution. Following Ref. [101], the equilibrium refresh time with even-odd swap proposals can be exactly related to the average acceptance rates A(t,t−Δt)=E[pswap(ϕt′,ϕt−Δt′)]\mathcal{A}(t,t-\Delta t)=\mathbb{E}[p_{\mathrm{swap}}(\phi'_t,\phi'_{t-\Delta t})] by

τ=1+∑i=1n(1A(iΔt,(i−1)Δt)−1),(23)\tau=1+\sum_{i=1}^{n}\left(\frac{1}{\mathcal{A}(i\Delta t,(i-1)\Delta t)}-1\right), \tag*{(23)}

and it correlates well with the integrated autocorrelation time, τ≈τint\tau\approx\tau_{\mathrm{int}}.

As n→∞n\to\infty, the refresh time for the non-reversible swap schedule similarly converges to a limit described by continuous-time quantities [97, 101],

τ(REX)→1+12∫01dt E[∣∂tEt(ϕ)−∂tEt(ϕ′)∣],τ(T-REX)→1+12∫01dt E[∣ξt(ϕ)−ξt(ϕ′)∣],(24)\begin{aligned} \tau^{(\mathrm{REX})}&\to1+\frac{1}{2}\int_0^1dt\,\mathbb{E}\left[\left|\partial_tE_t(\phi)-\partial_tE_t(\phi')\right|\right],\\ \tau^{(\mathrm{T\text{-}REX})}&\to1+\frac{1}{2}\int_0^1dt\,\mathbb{E}\left[\left|\xi_t(\phi)-\xi_t(\phi')\right|\right], \tag*{(24)} \end{aligned}

where expectation values are taken over ϕ,ϕ′\phi,\phi' sampled independently from ρt\rho_t. These expressions simplify further if one assumes a Gaussian distribution for the fluctuations of Et(ϕ)E_t(\phi) and ξt(ϕ)\xi_t(\phi), which can be expected to hold as the number of lattice sites is taken large in lattice field theory. The connection can be made explicit by first using a small-Δt\Delta t expansion of the weights,

χt≡12Var⁡[log⁡wswap(ϕt′,ϕt−Δt′)]=−E[log⁡wswap(ϕt′,ϕt−Δt′)]+h.o.=Δt2Var⁡[ξt]+h.o.,(25)\begin{aligned} \chi_t &\equiv\frac{1}{2}\operatorname{Var}\left[\log w_{\mathrm{swap}}(\phi'_t,\phi'_{t-\Delta t})\right] \\ &=-\mathbb{E}\left[\log w_{\mathrm{swap}}(\phi'_t,\phi'_{t-\Delta t})\right]+\text{h.o.}\\ &=\Delta t^2\operatorname{Var}[\xi_t]+\text{h.o.}, \tag*{(25)} \end{aligned}

where ξt\xi_t reduces to ∂tEt\partial_t E_t if ordinary REX is applied. Invoking the Gaussian assumption (⋆\star) then connects χt\chi_t to the average acceptance rate as

A(t,t−Δt)=⋆1−χtπ+h.o.,(26)\mathcal{A}(t,t-\Delta t)\mathrel{\overset{\star}{=}}1-\sqrt{\frac{\chi_t}{\pi}}+\text{h.o.}, \tag*{(26)}

and from this to the true asymptotic quantities in Eq. (24). In the limit of small Δt\Delta t, the Gaussian approximation leads to

τ(REX)→⋆1+1πΛ,Λ≡∫01dtVar⁡[∂tEt](27)\tau^{(\mathrm{REX})}\mathrel{\overset{\star}{\to}}1+\frac{1}{\sqrt{\pi}}\Lambda,\qquad\Lambda\equiv\int_0^1\mathrm{d}t\sqrt{\operatorname{Var}[\partial_tE_t]} \tag*{(27)}
τ(T-REX)→⋆1+1πΛ~,Λ~≡∫01dtVar⁡[ξt].\tau^{(\mathrm{T\text{-}REX})}\mathrel{\overset{\star}{\to}}1+\frac{1}{\sqrt{\pi}}\widetilde{\Lambda},\qquad\widetilde{\Lambda}\equiv\int_0^1\mathrm{d}t\sqrt{\operatorname{Var}[\xi_t]}.

These asymptotic expressions are notably similar to Eqs. (10) and (18). The deeper connection and its relation to choosing an optimal annealing-time schedule is discussed below. We note for now that this makes χt\chi_t in Eq. (25) a useful metric to be measured in the REX/T-REX setting, as it closely relates the sampling performance to that of AIS/SNF.

It has been shown that the constant asymptotic expressions in Eq. (24) hold respectively when n≫Λn\gg\Lambda or n≫Λ~n\gg\widetilde{\Lambda} [97]. If one is only interested in samples from the target chain, increasing nn only increases costs without further benefits after this saturation regime is reached. This motivates a practical compromise in which nn is taken just large enough to approach the lower bound efficiently. While τ\tau cannot then be driven to zero, it is

straightforward to build uncorrelated ensembles by keeping only the samples every τ\tau steps. In this case, the extensivity of the energy EtE_t implies a scaling with volume as Λ∼Λ~∼V\Lambda\sim\widetilde{\Lambda}\sim\sqrt{V}, and the cost of the process in units of the number of MCMC or flow steps should scale as nτ∼Vn\tau\sim\sqrt{V} to achieve approximately a fixed number of independent samples. This is equivalent to the scaling expected from sequential annealing methods.

We conclude this discussion by noting that Eq. (24) ensures that a flow vtv_t solving the transport equation in Eq. (19) is optimal for both SNF and for T-REX. The choice of sampling strategy can therefore be made after constructing and training a given flow model, allowing one to exchange time and parallelism to optimally allocate computing resources at sampling time. In this work, we explore both avenues to sampling as possible applications once a diffusion model has been trained using our proposed strategy.

c. Optimal schedules. The connection between the continuous-time metrics for AIS/SNF and REX/T-REX stems from a Fisher-Rao geometry in the space of distributions [102, 103]. Of relevance here, this gives meaning to Λ\Lambda and Λ~\widetilde{\Lambda} as path lengths in this space; one can show that these path lengths are true geometric quantities, independent of parameterization. For Λ~\widetilde{\Lambda}, the inclusion of the deterministic flow vtv_t acts to modify the metric and (typically) shorten the path length relative to Λ\Lambda. A connection can then be made to the quantities S\mathcal{S} and S~\widetilde{\mathcal{S}} defined in Eqs. (10) and (18): these are proportional to the action taken along the respective paths, and their action is minimized when the path is traversed at a rate of equal action. This can be achieved by rescheduling the evolution in annealing time t→t′t\to t' such that Var⁡[∂t′Et′]\operatorname{Var}[\partial_{t'}E_{t'}] or Var⁡[ξt′]\operatorname{Var}[\xi_{t'}] is constant along the entire path, and in this case the optimally scheduled action converges respectively to

S→(∫01dt′Var⁡[∂tEt′])2=Λ2,(28)\mathcal{S} \to\left(\int_0^1 dt' \sqrt{\operatorname{Var}[\partial_t E_{t'}]}\right)^2 = \Lambda^2, \tag*{(28)}
S~→(∫01dt′Var⁡[ξt′])2=Λ~2.(29)\widetilde{\mathcal{S}} \to\left(\int_0^1 dt' \sqrt{\operatorname{Var}[\xi_{t'}]}\right)^2 = \widetilde{\Lambda}^2. \tag*{(29)}

In general, these are lower bounds, S≥Λ2\mathcal{S} \ge\Lambda^2 and S~≥Λ~2\widetilde{\mathcal{S}} \ge\widetilde{\Lambda}^2. Choosing the optimal schedule saturates these bounds, giving a constant factor improvement, but does not change the scaling with volume which is set by Λ\Lambda or Λ~\widetilde{\Lambda} themselves. These are also respectively the optimal choices for REX and T-REX under the Gaussian assumption; in a non-Gaussian setting, the optimal schedule instead involves equalizing the infinitesimal contributions in Eq. (24), which can be estimated by equalizing swap acceptance rates across all pairs of chains [101]. We explore a specific example of this in § 5 E.

Diffusion models

In contrast to the above annealing methods, diffusion models implicitly fix a path between the target distribution ρ1(ϕ)∝exp⁡(−S(ϕ))\rho_1(\phi) \propto\exp(-S(\phi)) and the noise distribution ρ0(ϕ)∝exp⁡(−A(ϕ))\rho_0(\phi) \propto\exp(-A(\phi)), which is defined by incrementally adding noise from t=1t = 1 to t=0t = 0. For convenience, we describe this process in terms of the diffusion time λ=1−t\lambda= 1-t. The evolution of individual samples in a generic diffusion model setup can then be described by a Langevin equation evolving forwards in diffusion time as

dϕλ=uλ(ϕλ)dλ+gλdWλ,(30)d\phi_\lambda= u_\lambda(\phi_\lambda)d\lambda+ g_\lambda dW_\lambda, \tag*{(30)}

where uλ(⋅)u_\lambda(\cdot) is an arbitrary vector field, gλg_\lambda sets the scale of the incremental noise, and dWλdW_\lambda is Wiener noise normalized such that E[dWλ2]=dλ\mathbb{E}[dW_\lambda^2] = d\lambda. The associated Fokker-Planck equation determines the evolution of the probability density in diffusion time. Using the notation ρλ=exp⁡(−Eλ(ϕ))/Zλ\rho_\lambda= \exp(-E_\lambda(\phi))/Z_\lambda in analogy to annealing methods, the Fokker-Planck equation on the energy is given by

∂λEλ−⟨∂λEλ⟩=∇⋅uλ−uλ⋅∇Eλ+12gλ2(∇2Eλ−∥∇Eλ∥2).(31)\partial_\lambda E_\lambda- \langle\partial_\lambda E_\lambda\rangle= \nabla\cdot u_\lambda- u_\lambda\cdot\nabla E_\lambda+ \frac{1}{2}g_\lambda^2\left(\nabla^2 E_\lambda- \lVert\nabla E_\lambda\rVert^2\right). \tag*{(31)}

To arrive at the left expression, we use the identity

∂λlog⁡Zλ=(∂λZλ)/Zλ=−⟨∂λEλ⟩.(32)\partial_\lambda\log Z_\lambda= (\partial_\lambda Z_\lambda)/Z_\lambda= -\langle\partial_\lambda E_\lambda\rangle. \tag*{(32)}

Rewriting in terms of the annealing time tt gives

∂tEt−⟨∂tEt⟩=−∇⋅ut+ut⋅∇Et−12gt2(∇2Et−∥∇Et∥2).(33)\partial_t E_t - \langle\partial_t E_t\rangle= -\nabla\cdot u_t + u_t \cdot\nabla E_t - \frac{1}{2}g_t^2\left(\nabla^2 E_t - \lVert\nabla E_t\rVert^2\right). \tag*{(33)}

where we abuse notation to evaluate all relevant quantities XX according to the replacement Xt≡Xλ∣λ=1−tX_t \equiv X_\lambda|_{\lambda=1-t}.

The standard sampling strategy for score-based diffusion modeling is to apply a corresponding Langevin evolution in tt that reproduces Eq. (33) in the space of distributions. For example, the commonly considered family of such processes can be defined as

dϕt=−ut(ϕt)dt−12(gt2+g~t2)∇Etdt+g~tdWt,(34)d\phi_t = -u_t(\phi_t)dt - \frac{1}{2}(g_t^2+\widetilde{g}_t^2)\nabla E_tdt + \widetilde{g}_tdW_t, \tag*{(34)}

in terms of an arbitrary additional noise coefficient g~t\widetilde{g}_t. Applying this Langevin equation to transport from easily generated noise samples to the target distribution is typically termed “reverse diffusion” or “denoising”.

To apply Eq. (34), it is sufficient to estimate or learn the score −∇Et-\nabla E_t. While most machine-learning approaches parameterize and match the score directly, we here focus on energy-based models (EBMs) [104, 105, 106], which construct and train a parametrization E^t(ϕ)≈Et(ϕ)+Ct\widehat{E}_t(\phi) \approx E_t(\phi) + C_t. While traditional score-matching aims to match a score network s^t\widehat{s}_t to satisfy s^λ≈−∇Eλ\widehat{s}_\lambda\approx-\nabla E_\lambda, here the gradient of the energy −∇E^λ-\nabla\widehat{E}_\lambda can be used directly in the same simple regression loss to converge to the true energy function, up to an irrelevant constant. From E^t\widehat{E}_t, the estimated score −∇E^t≈−∇Et-\nabla\widehat{E}_t \approx-\nabla E_t can be used directly in Eq. (34). The constant CtC_t encodes an ambiguity in the definition of EtE_t and E^t\widehat{E}_t that is not fixed by standard training procedures, but that also does not affect sampling or measurements.

Sampling from EBMs using annealing methods

In this work we choose to treat the learned energy function E^t\widehat{E}_t as a continuous annealing path to be sampled by any of the standard methods outlined earlier in this section. The key observation here is that the true annealing path EtE_t of the diffusion process automatically leads to an optimal deterministic field transformation defined by

vt(ϕ)=−ut(ϕ)−12gt2∇Et(ϕ).(35)v_t(\phi) = -u_t(\phi) - \frac{1}{2}g_t^2\nabla E_t(\phi). \tag*{(35)}

In particular, this continuous flow satisfies the transport equation in Eq. (19) exactly because the energy Et(ϕ)E_t(\phi) satisfies the defining Fokker-Planck equation in Eq. (33):

∂tEt−⟨∂tEt⟩=−∇⋅ut+ut⋅∇Et−12gt2(∇2Et−∥∇Et∥2)=−∇⋅(ut+12gt2∇Et)+(ut+12gt2∇Et)⋅∇Et=∇⋅vt−vt⋅∇Et.(36)\begin{aligned} \partial_t E_t - \langle\partial_t E_t\rangle = -\nabla\cdot u_t + u_t \cdot\nabla E_t - \frac{1}{2}g_t^2(\nabla^2 E_t - \lVert\nabla E_t\rVert^2) \\ &= -\nabla\cdot\left(u_t + \frac{1}{2}g_t^2\nabla E_t\right) + \left(u_t + \frac{1}{2}g_t^2\nabla E_t\right)\cdot\nabla E_t \\ &= \nabla\cdot v_t - v_t \cdot\nabla E_t. \tag*{(36)} \end{aligned}

A perfectly trained EBM can thus be immediately used to sample via the SNF method with zero reweighting noise or via the T-REX method with perfectly efficient swaps. Motivated by this connection, we advocate for defining diffusion models using EBMs, training via score matching, and sampling using either the SNF or T-REX method in order to leverage the complementary features of these approaches. This strategy is summarized in Algorithm 1.

Algorithm 1: Training and annealed sampling from an energy-based diffusion model

Diffusion settings: Choose a drift uλu_\lambda and noise schedule gλg_\lambda.

Model definition: Parameterize E^t(ϕ)\hat{E}_t(\phi), mapping t∈[0,1]t \in[0,1] and a field ϕ\phi to a scalar output. The model must fix E^0(ϕ)=A(ϕ)\hat{E}_0(\phi)=A(\phi) and E^1(ϕ)=S(ϕ)\hat{E}_1(\phi)=S(\phi).

Training:

  1. Generate training data ϕ\phi drawn from the target distribution p(ϕ)∝exp⁡(−S(ϕ))p(\phi) \propto\exp(-S(\phi)).

  2. Train the model E^t(ϕ)\hat{E}_t(\phi) using score matching.

Sampling: Choose annealing step size Δt=1/n\Delta t = 1/n. Define v^t(ϕ)≡−ut(ϕ)−12gt2∇E^t(ϕ)\hat{v}_t(\phi) \equiv-u_t(\phi) - \frac{1}{2}g_t^2\nabla\hat{E}_t(\phi). Choose either SNF or T-REX.

▹ SNF:

For each independent sample to be drawn, apply the following to sample a weighted pair (ϕ1,w1)(\phi_1,w_1).

  1. Sample ϕ0\phi_0 from the noise distribution r(ϕ)∝exp⁡(−A(ϕ))r(\phi) \propto\exp(-A(\phi)). Set w0=1w_0=1.

  2. Per step (t−Δt)→t(t-\Delta t)\rightarrow t: apply the flow-reweighting step in Eqs. (13) and (14), mapping (ϕt−Δt,wt−Δt)→(ϕt′,wt)(\phi_{t-\Delta t},w_{t-\Delta t})\rightarrow(\phi'_t,w_t); apply a Markov update ϕt′→ϕt\phi'_t\rightarrow\phi_t satisfying balance with respect to E^t\hat{E}_t.

▹ T-REX:

  1. Initialize n+1n+1 Markov chains corresponding to E^0,E^Δt,…,E^1\hat{E}_0,\hat{E}_{\Delta t},\ldots,\hat{E}_1.

  2. Repeat: apply MCMC updates and propose swaps according to Eqs. (15), (20), (21), using v^t\hat{v}_t for the transport.

We highlight below four practical issues that may challenge the implementation or convergence towards the optimal solution in Eq. (35), proposing solutions to each.

The first issue is that only the learned approximation E^t\hat{E}_t is available, rather than the exact energy EtE_t along the diffusion path. It is then necessary to define the continuous flow in practice by

v^t(ϕ)=−ut(ϕ)−12gt2∇E^t(ϕ).(37)\hat{v}_t(\phi)=-u_t(\phi)-\frac{1}{2}g_t^2\nabla\hat{E}_t(\phi). \tag*{(37)}

For any finite model trained for a finite time, E^t\hat{E}_t will not exactly satisfy the defining Fokker–Planck equation and v^t\hat{v}_t will not exactly satisfy the transport equation in Eq. (19). However, the relevant metrics for annealed sampling are driven by Var⁡[ξt]\operatorname{Var}[\xi_t], which is the variance of the residual in the transport equation, determined by the score −∇E^t-\nabla\hat{E}_t and subtracted time derivative ∂tE^t−⟨∂tE^t⟩\partial_t\hat{E}_t-\langle\partial_t\hat{E}_t\rangle. The score is directly optimized to match the solution to this equation via score matching; the subtracted time derivative is also constrained as a close approximation E^t(ϕ)≈Et(ϕ)+Ct\hat{E}_t(\phi)\approx E_t(\phi)+C_t leads to good agreement. In practice, monitoring the respective SNF or T-REX metrics can be used to validate the sampling efficiency resulting from applying Eq. (37). We note that using an imperfect model does not affect the correctness guarantees inherent in SNF and T-REX applications.

The second issue is that the annealing path to be sampled must exactly match the target distribution and noise distribution at the endpoints. Using a free approximation E^1(ϕ)≠S(ϕ)+C1\hat{E}_1(\phi)\ne S(\phi)+C_1 or E^0(ϕ)≠A(ϕ)+C0\hat{E}_0(\phi)\ne A(\phi)+C_0, which either introduces biases or noise from additional reweighting factors which is not removed by scaling the number of annealing steps in the methods above. We therefore construct machine-learning parameterizations E^t\hat{E}_t that automatically enforce the endpoint conditions.

The third issue is that diffusion over the finite interval λ∈[0,1]\lambda\in[0,1] does not exactly converge to the specified noise distribution ρλ=1(ϕ)≠r(ϕ)\rho_{\lambda=1}(\phi)\ne r(\phi). In particular, the noise distribution r(ϕ)r(\phi) is typically only recovered in the λ→∞\lambda\rightarrow\infty limit of the diffusion process. In practice, the diffusion coefficient gλg_\lambda can be chosen large enough that at diffusion time λ=1\lambda=1, the true distribution is a very good approximation of the noise distribution. By then fixing the endpoint exactly as E^0(ϕ)=A(ϕ)\hat{E}_0(\phi)=A(\phi), this introduces a (likely very mild) tension between the energy model E^t\hat{E}_t and the true distributions under diffusion, limiting the quality agreement with the defining Fokker–Planck equation in Eq. (33). While this theoretically bounds the achievable model quality specified by S\mathcal{S} in Eq. (18), in practice we expect the model parameterization and training time to be more significant constraints.

The fourth issue is a practical implementation challenge. Both the SNF and T-REX methods involve integrating the vector field v^t\hat{v}_t or its divergence over an interval of annealing time Δt\Delta t. For sufficiently unbiased or asymptotically exact sampling, it is necessary to control the integration error in these steps. In our practical demonstrations, we choose to address this by using high-precision Runge-Kutta (RK4) integrators which converge with a much faster power of Δt\Delta t than the corresponding statistical uncertainties. For this approach, it is also necessary to have an efficiently computable divergence,

∇⋅v^t=−∇⋅ut−12gt2∇2E^t.(38)\nabla\cdot\hat{v}_t=-\nabla\cdot u_t-\frac{1}{2}g_t^2\nabla^2\hat{E}_t. \tag*{(38)}

Typical choices for the drift utu_t are simple and their divergences can be analytically computed; the design constraint is then to ensure that the Laplacian ∇2E^t\nabla^2\hat{E}_t is tractable. In the following section, we introduce a particular architecture with this property and focus on this approach as the primary strategy for our numerical applications.

Finally, we conclude this section by summarizing the main advantages of using annealed sampling with trained diffusion models instead of other possible sampling methods. First, in contrast to sampling the reverse diffusion process, exactness can be guaranteed. Second, applying a sequential annealing method (AIS or SNF) provides a quasi-static limit in which reweighting noise can be driven arbitrarily close to zero. Similarly, replica exchange methods (REX or T-REX) provide an analogous scaling direction with increasing nn and update steps. Third, as opposed to annealed sampling along a fixed annealing path, here the learned path comes with an approximately optimal field transformation v^t\hat{v}_t. Finally, the training in this case uses the simple score-matching loss, rather than the more complicated loss functions typically used within flow-based annealing methods to learn a v^t\hat{v}_t suitable for a fixed path [18, 51].

Machine learning setup

In this section we outline our choices in parameterizing energy-based models E^t\hat{E}_t in a way that is suitable for training via score-matching and sampling via annealing methods without introducing additional bias or noise (e.g., by avoiding stochastic trace estimators). We further discuss loss functions and practical training strategies used here, with emphasis on mitigating noise inherent in the score-matching loss.

Energy-Based Model Parameterizations

Throughout this work, we use an endpoint-constrained energy function given by

E^t(ϕ)=atA(ϕ)+btS(ϕ)+ctf^t(ϕ),(39)\hat{E}_t(\phi) = a_t A(\phi) + b_t S(\phi) + c_t \hat{f}_t(\phi), \tag*{(39)}

where f^t(ϕ)\hat{f}_t(\phi) is parameterized by a neural network that maps a time tt and field configuration ϕ\phi to a scalar value. The coefficients are chosen so that E^0(ϕ)=A(ϕ)\hat{E}_0(\phi) = A(\phi) and E^1(ϕ)=S(ϕ)\hat{E}_1(\phi) = S(\phi), which requires

a0=1,a1=0,(40)a_0 = 1,\qquad a_1 = 0, \tag*{(40)}
b0=0,b1=1,(41)b_0 = 0,\qquad b_1 = 1, \tag*{(41)}
c0=c1=0.(42)c_0 = c_1 = 0. \tag*{(42)}

In this work, we always use a simple polynomial interpolation at=(1−t)a_t = (1-t), bt=tb_t = t, and ct=t(1−t)c_t = t(1-t). This allows us to leave the interior energy function f^t\hat{f}_t unrestricted.

In the following applications, the noise distribution will be fixed analytically to be either the uncorrelated Gaussian distribution defined by A(ϕ)=∑x∥ϕ(x)∥2/2A(\phi) = \sum_x \lVert\phi(x) \rVert^2/2, or a uniform distribution corresponding to A(ϕ)=0A(\phi) = 0. The target action S(ϕ)S(\phi) is known analytically for each theory of interest and can be evaluated directly on field configurations.

To build an expressive dependence on time tt in the network f^t\hat{f}_t, it is beneficial to construct a richer feature representation for the raw times tt. Following standard practice in score-based generative modeling [107], we first map the scalar t∈[0,1]t \in[0,1] to a higher-dimensional feature vector by a separate neural network. Our models share a common time encoding network, composed as a three-layer fully-connected neural network with SiLU activation functions [108]. The output embedded time vector tenct_{\mathrm{enc}} is then composed with dependence on ϕ\phi in theory-specific and architecture-specific ways detailed in the applications in Sec. IV.

When designing the dependence on ϕ\phi in the network f^t\hat{f}_t, we note that both the score and Laplacian of E^t\hat{E}_t are needed for annealed sampling. Distributing over the components by linearity gives

−∇E^t=−at∇A−bt∇S−ct∇f^t,∇2E^t=at∇2A+bt∇2S+ct∇2f^t.(43)-\nabla\hat{E}_t = -a_t \nabla A - b_t \nabla S - c_t \nabla\hat{f}_t, \qquad \nabla^2 \hat{E}_t = a_t \nabla^2 A + b_t \nabla^2 S + c_t \nabla^2 \hat{f}_t. \tag*{(43)}

For the noise distributions and actions used in this work, both the score and Laplacian are efficiently computed analytically. Either the parameterization f^t\hat{f}_t can be designed to support these operations efficiently, stochastic estimators may be used to estimate these values quickly, or a brute force direct calculation must be used. The latter is impractical for large lattice volumes VV. Our choices for parameterizing the interior energy f^t\hat{f}_t are detailed below, including computational aspects relevant for the score and Laplacian.

a.a. Kinetic EBM. Inspired by the functional form of the kinetic energy function, a common choice of parameterization for EBMs can be written as

f^tkin(ϕ)=12∥h^t(ϕ)∥2,(44)\hat{f}^{\mathrm{kin}}_t(\phi) = \frac{1}{2}\lVert\hat{h}_t(\phi) \rVert^2, \tag*{(44)}

where the vector field h^t(ϕ)\hat{h}_t(\phi) is itself represented by an arbitrary, dimension-preserving neural network. This setup has the benefit of computing a scalar function using the more expressive architectures one would typically use for a vector field, such as a U-Net [109]. Computing the Laplacian of f^\hat{f}, however, can be computationally intensive as such black-box parameterizations require either a brute-force O(V2)O(V^2) calculation or use noisy stochastic trace estimators. Regardless, we include this architecture in our numerical comparisons presented in the following sections.

b.b. Local-footprint EBM. Another option is to construct a translationally-invariant energy function defined over local patches of the lattice,

f^tlocal(ϕ)=∑xE^x(ϕ,t).(45)\hat{f}^{\mathrm{local}}_t(\phi) = \sum_x \hat{\mathcal{E}}_x(\phi,t). \tag*{(45)}

Here each local energy term E^x(ϕ,t)\hat{\mathcal{E}}_x(\phi,t) is restricted to act on only the degrees of freedom within a K×K×⋯×KK \times K \times\cdots\times K patch centered on xx; we denote the sites in the patch by

Br(x)={y∈X:∥x−y∥∞≤r},(46)\mathcal{B}_r(x) = \{y \in\mathcal{X} : \lVert x-y \rVert_\infty\le r\}, \tag*{(46)}

with r=⌊K/2⌋r = \lfloor K/2 \rfloor. The footprint size KK provides a natural hyperparameter to trade off expressivity versus cost.

Figure 4. Comparison of kinetic (left) and local (right) EBM parameterizations used in this work.

This explicitly captures the physical locality of typical operators expected to appear in the calculation of the energy (or action) in lattice field theory. A further practical benefit of this choice is that f^tlocal\hat f_t^{\mathrm{local}} can be evaluated on volumes different from the one used to train the model by summing.

Unlike a typical convolutional network, the strictly local footprint guarantees that the score −∇f^t-\nabla\hat f_t evaluated at site xx only depends on fields at most a distance KK in each direction from that site, regardless of the complexity of the network E^x\hat{\mathcal{E}}_x. This allows the score to be evaluated by a memory-efficient sum over contributions from each local patch, avoiding the need to materialize a computational graph over the entire lattice geometry. Similarly, the Laplacian can be computed by a local sum,

∇2f^t(ϕ)=∑x∑y∈Br(x)∇y2E^x(ϕ,t),(47)\nabla^2 \hat f_t(\phi) = \sum_x \sum_{y\in B_r(x)} \nabla_y^2 \hat{\mathcal{E}}_x(\phi,t), \tag*{(47)}

which requires only O(V)O(V) time and volume-independent memory usage.

Our parallelized implementation of this architecture begins by collecting the local degrees of freedom within the KdK^d sites of each patch to a hidden vector ϕenc(x)\phi_{\mathrm{enc}}(x) at site xx using a preprocessing network. In the simplest cases, this preprocessing network is a basic convolution that linearly maps all components within the patch into the hidden vector; for the case of the O(3) model considered below, we instead focus on an architecture that builds all invariant inner products within the patch before applying a linear map into the hidden vector. The hidden state and the encoded time are then concatenated on each site to produce the local state vector [ϕenc(x),tenc][\phi_{\mathrm{enc}}(x),t_{\mathrm{enc}}]. This state is subsequently processed locally in parallel across all sites by a single neural network comprised of a sequence of fully-connected residual blocks. This network outputs the scalar value E^x(ϕ,t)\hat{\mathcal{E}}_x(\phi,t); finally this state is summed according to Eq. (45).

Training Diffusion EBMs

Diffusion EBMs can be trained in largely the same manner as traditional diffusion models according to the score-matching procedure. Since training pertains to the forward process in Eq. (30), we again use diffusion time λ∈[0,1]\lambda\in[0,1] for the discussion in this section.

The score-matching objective function is

L=∫01dλ∫Dϕ ρλ(ϕ)∥∇E^λ(ϕ)+∇log⁡ρλ(ϕ)∥2,(48)\mathcal{L} = \int_0^1 d\lambda\int\mathcal{D}\phi\,\rho_\lambda(\phi)\left\lVert\nabla\hat{\mathcal{E}}_\lambda(\phi)+\nabla\log\rho_\lambda(\phi)\right\rVert^2, \tag*{(48)}

which is minimized when −∇E^λ-\nabla\hat{\mathcal{E}}_\lambda matches the exact score. Evaluating Eq. (48) requires samples from the intermediate distributions ρλ(ϕ)\rho_\lambda(\phi). These can be obtained by drawing ϕ0\phi_0 from the target distribution ρλ=0\rho_{\lambda=0} and evolving to the diffusion time λ\lambda by applying appropriate random noise, typically sampled directly using the heat kernel Kλ(ϕ∣ϕ0)K_\lambda(\phi|\phi_0) associated with the diffusion process in Eq. (31). In all cases studied here, KλK_\lambda only depends on a global noise level denoted by σλ\sigma_\lambda; for example, for Euclidean diffusion with or without a linear drift, the sampled kernel is a Gaussian with width σλ\sigma_\lambda. For two common choices of the forward drift uλu_\lambda in Eq. (30), σλ\sigma_\lambda satisfies

σλ2={∫0λgs2 ds,uλ(ϕ)≡0,1−exp⁡[−∫0λgs2 ds],uλ(ϕ)=−12g2ϕ.(49)\sigma_\lambda^2 = \begin{cases} \int_0^\lambda g_s^2\,ds, & u_\lambda(\phi)\equiv0,\\ 1-\exp\left[-\int_0^\lambda g_s^2\,ds\right], & u_\lambda(\phi)=-\frac{1}{2}g^2\phi. \end{cases} \tag*{(49)}

In this work, the training data {ϕ0}\{\phi_0\} is sampled online, using standard MCMC updates to refresh a training ensemble periodically. We train using smaller-than-physical volumes so that this generation step requires much lower computational effort than sampling at the target volume.

The theoretical score-matching objective in Eq. (48) relies on the true score ∇log⁡ρλ(ϕ)\nabla\log\rho_\lambda(\phi), which is not analytically known. Instead, it is replaced by an unbiased estimator using one of two methods: denoising score matching (DSM) and target score matching (TSM) [110]. The methods are respectively based on the denoising score identity (DSI),

∇log⁡ρλ(ϕλ)=Eϕ0∣ϕλ[∇λlog⁡Kλ(ϕλ∣ϕ0)],(50)\nabla\log\rho_\lambda(\phi_\lambda)=\mathbb{E}_{\phi_0|\phi_\lambda}\left[\nabla_\lambda\log K_\lambda(\phi_\lambda|\phi_0)\right], \tag*{(50)}

and the target score identity (TSI), which takes a kernel-dependent form,

∇log⁡ρλ(ϕλ)=Eϕ0∣ϕλ[Tλ(ϕλ,ϕ0)].(51)\nabla\log\rho_\lambda(\phi_\lambda)=\mathbb{E}_{\phi_0|\phi_\lambda}\left[T_\lambda(\phi_\lambda,\phi_0)\right]. \tag*{(51)}

Above, ∇λ≡∂/∂ϕλ\nabla_\lambda\equiv\partial/\partial\phi_\lambda, and the heat kernel KλK_\lambda matches the one used to apply noise to training data. For example, in the simplest case of Euclidean space and a symmetric kernel Kλ(ϕλ∣ϕ0)≡Kλ(ϕλ−ϕ0)K_\lambda(\phi_\lambda|\phi_0)\equiv K_\lambda(\phi_\lambda-\phi_0), the TSI operator reduces to the score evaluated on the target-distribution samples, Tλ(ϕλ,ϕ0)=−∇0S(ϕ0)\mathcal{T}_{\lambda}(\phi_{\lambda},\phi_{0})=-\nabla_{0}S(\phi_{0}). The extension to a compact Riemannian manifold is treated in the numerical application of Sec. IV B.

Inserting these definitions gives two equivalent practical loss functions to be optimized,6

LλDSM=E[∥∇E^(ϕλ)+∇λlog⁡Kλ(ϕλ∣ϕ0)∥2],LλTSM=E[∥∇E^(ϕλ)+Tλ(ϕλ,ϕ0)∥2].(52)\begin{aligned} \mathcal{L}_{\lambda}^{\mathrm{DSM}} &= \mathbb{E}\left[\left\|\nabla\hat{E}(\phi_{\lambda})+\nabla_{\lambda}\log K_{\lambda}(\phi_{\lambda}\mid\phi_{0})\right\|^{2}\right],\\ \mathcal{L}_{\lambda}^{\mathrm{TSM}} &= \mathbb{E}\left[\left\|\nabla\hat{E}(\phi_{\lambda})+\mathcal{T}_{\lambda}(\phi_{\lambda},\phi_{0})\right\|^{2}\right]. \tag*{(52)} \end{aligned}

In both cases, we have defined the loss for a fixed value of λ\lambda, and the expectations are taken over ϕ0\phi_{0} drawn from the target distribution, with corresponding ϕλ\phi_{\lambda} drawn as described above. Both objective functions are tractable on their own, but their noise properties differ: DSM has low noise as λ\lambda is taken large, while TSM has low noise as λ→0\lambda\to0 [110]. This motivates two practical modifications. First, we follow common practice and rescale the DSM loss according to σλ2\sigma_{\lambda}^{2} to normalize the noise uniformly over the domain. Second, we use a composite loss, partitioning the diffusion time into two sub-intervals [0,1]=[0,λcut]∪[λcut,1][0,1]=[0,\lambda_{\mathrm{cut}}]\cup[\lambda_{\mathrm{cut}},1], and applying the complementary objectives as one combined loss function,

L=∫0λcutdλ LλTSM+∫λcut1dλ σλ2LλDSM.(53)\mathcal{L}=\int_{0}^{\lambda_{\mathrm{cut}}}d\lambda\,\mathcal{L}_{\lambda}^{\mathrm{TSM}}+\int_{\lambda_{\mathrm{cut}}}^{1}d\lambda\,\sigma_{\lambda}^{2}\mathcal{L}_{\lambda}^{\mathrm{DSM}}. \tag*{(53)}

This composite loss is used for all training involved in numerical applications below.

MCMC using EBMs

Both SNF and T-REX involve MCMC updates with respect to the learned energy function E^t(ϕ)\hat{E}_{t}(\phi). A straightforward Markov chain update in this case is provided by applying Hybrid Monte Carlo [111, 112, 113] using the learned score −∇E^t-\nabla\hat{E}_{t} as the force term and E^t\hat{E}_{t} itself for the necessary Metropolis acceptance test. This implementation is used for all MCMC sampling in numerical applications below.

We also note that local Metropolis updates can be applied for local-footprint energy models E^t\hat{E}_{t} as long as local updates proposed in parallel are separated by a minimum distance of KK in each direction. This strategy is not used here, but may be practically beneficial in future work.

Applications

To test the effectiveness of annealed sampling with energy-based diffusion models for lattice field theory applications, we perform numerical and analytical checks

using both scalar field theory and the O(3) non-linear sigma model in two dimensions. All lattice calculations use a periodic lattice with LdL^{d} sites and unit spacing. The basic physics and diffusion model setups are discussed for each theory in turn.

Scalar field theory

For scalar field theory applications, we use the standard nearest-neighbor Euclidean action,

S(ϕ)=∑x[12∑μ(ϕ(x+μ^)−ϕ(x))2+V[ϕ(x)]],(54)S(\phi)=\sum_{x}\left[\frac{1}{2}\sum_{\mu}\left(\phi(x+\hat{\mu})-\phi(x)\right)^{2}+V[\phi(x)]\right], \tag*{(54)}
V[ϕ(x)]=m22ϕ(x)2+λϕ(x)4.V[\phi(x)]=\frac{m^{2}}{2}\phi(x)^{2}+\lambda\phi(x)^{4}.

With the exception of the targeted numerical study for the ϕ4\phi^{4} interacting theory in § 5 E, our numerical and theoretical results focus on the free scalar theory, defined by setting λ=0\lambda=0. In this case, using the unitary discrete Fourier transforms on the lattice, ϕ\phi may be written as the inverse Fourier transform of its momentum-space counterpart ϕ~\tilde{\phi} as

ϕ(x)=1Ld/2∑keik⋅xϕ~(k).(55)\phi(x)=\frac{1}{L^{d/2}}\sum_{k}e^{ik\cdot x}\tilde{\phi}(k). \tag*{(55)}

The action can then be expressed in momentum space as

S(ϕ~)=12∑k(k2+m2)∣ϕ~(k)∣2,(56)S(\tilde{\phi})=\frac{1}{2}\sum_{k}(k^{2}+m^{2})\lvert\tilde{\phi}(k)\rvert^{2}, \tag*{(56)}

where the lattice squared momentum is defined by

k2=4∑μsin⁡2kμ2,(57)k^{2}=4\sum_{\mu}\sin^{2}\frac{k_{\mu}}{2}, \tag*{(57)}

and sums over kk run over the finite-volume discrete momenta kμ=2πnμ/Lk_{\mu}=2\pi n_{\mu}/L, nμ∈{0,1,…,L−1}n_{\mu}\in\{0,1,\ldots,L-1\}.

Because Eq. (56) is diagonal in kk, the partition function reduces to a product over all Fourier modes kk,

Z=∏k∫dϕ~(k)e−12(k2+m2)∣ϕ~(k)∣2.(58)Z=\prod_{k}\int d\tilde{\phi}(k)e^{-\frac{1}{2}(k^{2}+m^{2})\lvert\tilde{\phi}(k)\rvert^{2}}. \tag*{(58)}

Since ϕ~(−k)=ϕ~(k)∗\tilde{\phi}(-k)=\tilde{\phi}(k)^{*}, the integration is to be taken over only the independent components, with each pair {k,−k}\{k,-k\} contributing a single integral over Re⁡ϕ~(k)\operatorname{Re}\tilde{\phi}(k) and Im⁡ϕ~(k)\operatorname{Im}\tilde{\phi}(k). At the self-conjugate momenta k=−k(mod2π)k=-k\pmod{2\pi}, ϕ~(k)\tilde{\phi}(k) is real.

From this factorization, each independent mode is normally distributed:

ϕ~(k)∼CN(0,1ω(k)2),ω(k)2≡k2+m2,(59)\tilde{\phi}(k)\sim\mathcal{CN}\left(0,\frac{1}{\omega(k)^{2}}\right),\qquad\omega(k)^{2}\equiv k^{2}+m^{2}, \tag*{(59)}

where CN\mathcal{CN} denotes a complex Gaussian distribution whose real and imaginary parts are independent with equal variance [2ω(k)2]−1[2\omega(k)^{2}]^{-1}. Under a forward variance-preserving diffusion process with drift uλ(ϕλ)=−12gλ2ϕλu_\lambda(\phi_\lambda)=-\frac{1}{2}g_\lambda^2\phi_\lambda (see Appendix A), each mode evolves independently as

ϕ~λ(k)=αλϕ~0(k)+σληλ(k),ηλ(k)∼CN(0,1)(60)\tilde{\phi}_\lambda(k)=\alpha_\lambda\tilde{\phi}_0(k)+\sigma_\lambda\eta_\lambda(k),\qquad\eta_\lambda(k)\sim\mathcal{CN}(0,1) \tag*{(60)}

with coefficients

αλ=exp⁡[−12∫0λgs2 ds],σλ=1−αλ2.(61)\alpha_\lambda=\exp\left[-\frac{1}{2}\int_0^\lambda g_s^2\,\mathrm{d}s\right],\qquad\sigma_\lambda=\sqrt{1-\alpha_\lambda^2}. \tag*{(61)}

The evolved configurations then also follow a Gaussian distribution for all diffusion times,

ϕ~λ(k)∼CN(0,αλ2ω(k)2+σλ2).(62)\tilde{\phi}_\lambda(k)\sim\mathcal{CN}\left(0,\frac{\alpha_\lambda^2}{\omega(k)^2}+\sigma_\lambda^2\right). \tag*{(62)}

Eq. (62) implies a closed-form solution to the Fokker–Planck equation: up to normalization, the exact energy along the forward diffusion path is

Eλ(ϕ~)=12∑kω(k)2αλ2+σλ2ω(k)2∣ϕ~λ(k)∣2(63)E_\lambda(\tilde{\phi})=\frac{1}{2}\sum_k\frac{\omega(k)^2}{\alpha_\lambda^2+\sigma_\lambda^2\omega(k)^2}\lvert\tilde{\phi}_\lambda(k)\rvert^2 \tag*{(63)}

which also provides analytical expressions for the force and Laplacian of the energy:7

−∇Eλ(ϕ~)=−ω(k)2αλ2+σλ2ω(k)2ϕ~λ(k),(64)-\nabla E_\lambda(\tilde{\phi})=-\frac{\omega(k)^2}{\alpha_\lambda^2+\sigma_\lambda^2\omega(k)^2}\tilde{\phi}_\lambda(k), \tag*{(64)}
∇2Eλ(ϕ~)=∑kω(k)2αλ2+σλ2ω(k)2.(65)\nabla^2E_\lambda(\tilde{\phi})=\sum_k\frac{\omega(k)^2}{\alpha_\lambda^2+\sigma_\lambda^2\omega(k)^2}. \tag*{(65)}

In our numerical applications, we consider 2D L×LL\times L lattices with L∈{16,32,64}L\in\{16,32,64\}. For each lattice volume, we follow a line of constant physics by fixing the bare mass to be m=2/Lm=2/L, giving approximate correlation lengths ξ\xi equal to 8, 16, and 32, respectively. The physical volume determined by the ratio L/ξ≈2L/\xi\approx2 is therefore held fixed. The diffusion path is set by the Itô SDE in Eq. (30) with noise schedule

gλ=0.1+(25−0.1)λ(66)g_\lambda=\sqrt{0.1+(25-0.1)\lambda} \tag*{(66)}

so that αλ→0\alpha_\lambda\to0 and σλ→1\sigma_\lambda\to1 as λ→1\lambda\to1. This leads to the standard normal distribution as λ→1\lambda\to1, i.e., the action for the noise distribution is

A(ϕ)=∑xϕ(x)2/2.(67)A(\phi)=\sum_x\phi(x)^2/2. \tag*{(67)}

For all models, we use the endpoint-constrained local-footprint architecture as described in Sec. III A with a 3 × 3 patch size. The interior energy density is computed on each site’s local neighborhood using a neural network built from a circularly-padded 3 × 3 convolution. The 64 output channels of the convolution are concatenated with the embedded time tenct_{\mathrm{enc}}, followed by a linear projection to dimension 64. Finally, four residual blocks each consisting of three affine layers with SiLU activation functions are applied, followed by another SiLU activation and a linear projection from dimension 64 down to 1. The times are encoded using the procedure described above producing a vector tenct_{\mathrm{enc}} with dimension 64. The divergence for the flow is computed exactly from each patch’s local Laplacian, which, when incorporated into Eq. (38) for this diffusion process gives

∇⋅v^t(ϕt)=−∇⋅[−12gt2ϕt+12gt2∇E^t(ϕt)]=12gt2[Ld−∇2E^t(ϕt)].(68)\nabla\cdot\hat{v}_t(\phi_t)=-\nabla\cdot\left[-\frac{1}{2}g_t^2\phi_t+\frac{1}{2}g_t^2\nabla\hat{E}_t(\phi_t)\right] =\frac{1}{2}g_t^2\left[L^d-\nabla^2\hat{E}_t(\phi_t)\right]. \tag*{(68)}

All free-field models are optimized by regressing directly onto the exactly known score given in Eq. (64). In particular, the loss function to be minimized is the theoretical score-matching loss weighted by the noise level σλ2\sigma_\lambda^2 at each time,

L=∫01dλ∫Dϕλ ρλ(ϕλ)×σλ2∥∇E^λ(ϕλ)−∇Eλ(ϕλ)∥22.(69)\begin{aligned} \mathcal{L}=\int_0^1\mathrm{d}\lambda\int\mathcal{D}\phi_\lambda\,\rho_\lambda(\phi_\lambda) \\ &\times\sigma_\lambda^2\left\lVert\nabla\hat{E}_\lambda(\phi_\lambda)-\nabla E_\lambda(\phi_\lambda)\right\rVert_2^2. \tag*{(69)} \end{aligned}

At each training step, the loss is estimated by sampling time steps λ\lambda uniformly from the interval [10−5,1][10^{-5},1] and free-field configurations ϕλ\phi_\lambda in batches of 1024 (512 for L=64L=64). The free-field configurations are sampled exactly using the known Gaussian distribution in Eq. (62) along with the inverse Fourier transform in Eq. (55). This zero-noise, data-free training approach is used to isolate the effect of the energy parameterization itself and to focus on the behavior of our proposed sampling strategies given an imperfect model. Each model is trained for a total of 160,000 training steps using the Adam optimizer [114] with base learning rate 10−410^{-4}. The learning rate is decayed every 16 training steps following a cosine annealing schedule, reaching zero at the end of training. Training is carried out on a single NVIDIA GH200 GPU (the L=64L=64 model on two GPUs) for a total duration of approximately 28 GPU-hours across all models.

O(3) sigma model

The action for the O(3) non-linear sigma model (NLSM) on the lattice is given by

S(ϕ)=−β∑x∑μϕ⃗(x)⋅ϕ⃗(x+μ^),(70)S(\phi)=-\beta\sum_x\sum_\mu\vec{\phi}(x)\cdot\vec{\phi}(x+\hat{\mu}), \tag*{(70)}

where β\beta is the inverse coupling constant and ϕ⃗∈R3\vec{\phi}\in\mathbb{R}^3 with ∥ϕ⃗∥=1\lVert\vec{\phi}\rVert=1. The theory features a global symmetry with respect to transformations ϕ⃗(x)↦Rϕ⃗(x)\vec{\phi}(x) \mapsto R\vec{\phi}(x), R∈O(3)R \in O(3). As target parameters for this application, we consider β∈{1.4,1.5,1.6}\beta\in\{1.4,1.5,1.6\} with approximate infinite-volume correlation lengths ξ\xi respectively equal to 7, 11, and 19. We train and primarily evaluate the respective models on lattice geometries L=16L=16, L=32L=32, and L=64L=64, corresponding approximately to a line of constant physics set by L/ξ≈2L/\xi\approx2. Further transfers to larger volumes are also investigated.

Because the field variables ϕ⃗(x)\vec{\phi}(x) live in a compact space, the diffusion process must be specified in a way that is compatible with this geometry. We use a standard Stratonovich formulation for the forward diffusion [115],

dϕ⃗λ=gλ(I−ϕ⃗λϕ⃗λ⊤)∘dW⃗λ,(71)d\vec{\phi}_{\lambda}=g_{\lambda}\left(\mathbb{I}-\vec{\phi}_{\lambda}\vec{\phi}_{\lambda}^{\top}\right)\circ d\vec{W}_{\lambda}, \tag*{(71)}

which leads to the Fokker-Planck equation

∂λEλ−⟨∂λEλ⟩=12gλ2(ΔEλ−∥∇Eλ∥2)(72)\partial_{\lambda}E_{\lambda}-\langle\partial_{\lambda}E_{\lambda}\rangle=\frac{1}{2}g_{\lambda}^{2}\left(\Delta E_{\lambda}-\left\lVert\nabla E_{\lambda}\right\rVert^{2}\right) \tag*{(72)}

with Δ\Delta the Laplace-Beltrami operator on the field configuration space (a product of spheres) and ∇Eλ\nabla E_{\lambda} the vector of tangent-space derivatives. Components of ∇Eλ\nabla E_{\lambda} are defined by

∇xaf(ϕ⃗)≡∂∂ωf(Rx(ϕ⃗,ωϕ⃗×e^a))∣ω=0,(73)\nabla_{x}^{a}f(\vec{\phi})\equiv\left.\frac{\partial}{\partial\omega}f\left(R_{x}(\vec{\phi},\omega\vec{\phi}\times\hat{e}_{a})\right)\right|_{\omega=0}, \tag*{(73)}

where Rx(ϕ⃗,θ⃗)R_{x}(\vec{\phi},\vec{\theta}) rotates ϕ⃗(x)\vec{\phi}(x) by the rotation vector θ⃗\vec{\theta}, i.e., by angle ∥θ⃗∥\left\lVert\vec{\theta}\right\rVert about the axis θ^\hat{\theta}.

To train via score matching it is also necessary to sample the heat kernel for arbitrary diffusion times λ\lambda. For each site xx, the O(3)O(3) heat kernel at time λ\lambda is given by

Kλ(ϕ⃗λ∣ϕ⃗0)∝∑ℓ=0∞e−ℓ(ℓ+1)σλ2/2Pℓ(ϕ⃗λ⋅ϕ⃗0)(2ℓ+1),(74)K_{\lambda}(\vec{\phi}_{\lambda}|\vec{\phi}_{0})\propto\sum_{\ell=0}^{\infty}e^{-\ell(\ell+1)\sigma_{\lambda}^{2}/2}P_{\ell}(\vec{\phi}_{\lambda}\cdot\vec{\phi}_{0})(2\ell+1), \tag*{(74)}

where Pℓ(⋅)P_{\ell}(\cdot) is the ℓ\ell-th Legendre polynomial. For all numerical experiments, Eq. (74) is evaluated by truncating the sum at the 45th term. The noise schedule is chosen to be

gλ=23λ2⟹σλ=2λ3/2,(75)g_{\lambda}=2\sqrt{3}\lambda^{2}\quad\Longrightarrow\quad\sigma_{\lambda}=2\lambda^{3/2}, \tag*{(75)}

which results in a progressive introduction of noise over the interval λ∈[0,1]\lambda\in[0,1].

The majority of numerical results use a local-footprint EBM with footprint size K=5K=5 and a local energy network consisting of two residual blocks, with each residual block composed of two linear layers separated by SiLU activation functions, using hidden states of dimension 32. Inputs to the local energy network are first pre-processed to produce all pairs of O(3)O(3) invariants ϕ⃗(x)⋅ϕ⃗(y)\vec{\phi}(x)\cdot\vec{\phi}(y) within each patch, except for a specific comparison to test quality of non-invariant models produced by passing raw vectors ϕ⃗(x)\vec{\phi}(x) to the same local energy network instead. The time-encoding network uses an encoding vector tenct_{\mathrm{enc}} of dimension 16. Specific comparisons to other architectures are discussed below.

Training is performed with the composite denoising and target score-matching loss in Eq. (53) with λcut=0.1\lambda_{\mathrm{cut}}=0.1. For the O(3)O(3) model, the expression appearing in the target score identity can be expressed as

Tλ=−ϕλ×(∇0S(ϕ0)×ϕ0).(76)\mathcal{T}_{\lambda}=-\phi_{\lambda}\times\left(\nabla_{0}S(\phi_{0})\times\phi_{0}\right). \tag*{(76)}

This expression can be derived as a small generalization of the Lie group case [110], as shown in Appendix B. In practice, training is carried out with the approximation Tλ≈−∇0S(ϕ0)\mathcal{T}_{\lambda}\approx-\nabla_{0}S(\phi_{0}).

Each model is trained for a total of 24 GPU-hours on a single H200 GPU, ranging between 144,000 and 500,000 training steps for the smallest to largest training volume targets. All training uses the Adam optimizer [114] with a fixed learning rate 3×10−43\times10^{-4}. At each training step, batches of size 512 are sampled from an ensemble of 50,000 configurations, which is refreshed every 10 full passes through the data set.

For both HMC sampling and integrating the learned flow transformation, it is necessary to define an appropriate update along a vector field within the O(3)O(3) manifold. Throughout the numerical results in this work, we apply a standard geodesic rotation such that an update to an O(3)O(3) field configuration ϕ⃗\vec{\phi} along the vector field v⃗\vec{v} with step size dtdt is defined by

ϕ⃗↦cos⁡(α)ϕ⃗+sin⁡(α)v⃗/∥v⃗∥,α=dt∥v⃗∥.(77)\vec{\phi}\mapsto\cos(\alpha)\vec{\phi}+\sin(\alpha)\vec{v}/\lVert\vec{v}\rVert,\qquad\alpha=dt\lVert\vec{v}\rVert. \tag*{(77)}

Results and Discussion

Model architecture and training results

We first explore whether local-footprint models offer a wide enough receptive field to expressively represent energy functions over larger lattices and longer correlation lengths. To motivate the use of relatively small footprint sizes, we investigate the locality of the coupling between lattice sites under the free scalar field theory across diffusion time. The diffused energy for the free scalar field can be written in real space as

Eλ(ϕ)=12∑x,yϕλ(x)Qλ(x−y)ϕλ(y),(78)E_{\lambda}(\phi)=\frac{1}{2}\sum_{x,y}\phi_{\lambda}(x)Q_{\lambda}(x-y)\phi_{\lambda}(y), \tag*{(78)}

where Qλ(x−y)Q_{\lambda}(x-y) is interpreted as the real-space coupling kernel between the fields at different lattice sites, and can be obtained by applying an inverse Fourier transform to the coefficient of ∣ϕλ(k)∣2|\phi_{\lambda}(k)|^{2} in Eq. (63). Rewriting the frequency as

ω(k)2=1σλ2(αλ2+σλ2ω(k)2)−αλ2σλ2,(79)\omega(k)^{2}=\frac{1}{\sigma_{\lambda}^{2}}\left(\alpha_{\lambda}^{2}+\sigma_{\lambda}^{2}\omega(k)^{2}\right)-\frac{\alpha_{\lambda}^{2}}{\sigma_{\lambda}^{2}}, \tag*{(79)}

gives the partial fraction decomposition of Q~λ\widetilde{Q}_{\lambda} into

Q~λ(k)=1σλ2−αλ2σλ41k2+Mλ2.(80)\widetilde{Q}_{\lambda}(k)=\frac{1}{\sigma_{\lambda}^{2}}-\frac{\alpha_{\lambda}^{2}}{\sigma_{\lambda}^{4}}\frac{1}{k^{2}+M_{\lambda}^{2}}. \tag*{(80)}

where we define an effective mass MλM_\lambda by

Mλ2=m2+αλ2σλ2.(81)M_\lambda^2 = m^2 + \frac{\alpha_\lambda^2}{\sigma_\lambda^2}. \tag*{(81)}

The inverse Fourier transform of Eq. (80) then yields

Qλ(r)=1σλ2δ(r)−αλ2σλ4GMλ(r),r≡x−y,(82)Q_\lambda(r) = \frac{1}{\sigma_\lambda^2}\delta(r) - \frac{\alpha_\lambda^2}{\sigma_\lambda^4}G_{M_\lambda}(r), \qquad r \equiv x-y, \tag*{(82)}

where GMλG_{M_\lambda} is the free massive propagator. The effective mass MλM_\lambda sets the length scale of QλQ_\lambda, whose tails fall off as e−Mλre^{-M_\lambda r}. Near the target, σλ→0\sigma_\lambda\to0, so Mλ→∞M_\lambda\to\infty and the range shrinks to zero. Near the prior, αλ→0\alpha_\lambda\to0, so Mλ→mM_\lambda\to m and the range grows to the correlation length of the target theory; however, the coefficient of the propagator in Eq. (82) also vanishes in this limit, thereby attenuating the long tails.

To further investigate the locality structure, we compute QλQ_\lambda on the lattice numerically and plot its spread over distance on the lattice in Figure 5. At every diffusion time, we find that the exact energy is highly local, indicated by the sharp peak in ∣Qλ(r)∣\lvert Q_\lambda(r)\rvert near r=0r = 0. At λ=0\lambda= 0, σλ=0\sigma_\lambda= 0 and Q0Q_0 is the massive nearest-neighbor Laplacian, while at λ=1\lambda= 1, σλ→1\sigma_\lambda\to1 and Q1(r)=δ(r)Q_1(r) = \delta(r). The only non-locality in QλQ_\lambda arises for intermediate diffusion times where σλ≈0.99\sigma_\lambda\approx0.99–0.9990.999; in this range QλQ_\lambda has the heaviest tails, reaching about 10−510^{-5} across the finite lattice domain shown. Additionally, varying the correlation length by fixing mL=4mL = 4 and varying lattice sizes L∈{16,32,64,128,256}L \in\{16, 32, 64, 128, 256\} has minimal effect on the range of QλQ_\lambda. The exact continuum limit curve derived in Eq. (82) is also shown for reference at σλ=0.999\sigma_\lambda= 0.999, demonstrating that the coupling is in fact exponentially localized in this limit, as suggested by the massive propagator appearing in Eq. (82).

Figure 5. Real-space coupling kernel QλQ_\lambda of the exact diffused energy EλE_\lambda for a free scalar field plotted against the spacetime separation r≡x−yr \equiv x-y. The top panel shows QλQ_\lambda for a 128×128128 \times128 lattice over different noise levels σλ\sigma_\lambda. The exact energy is highly localized for all diffusion times, with a non-local tail 3–5 orders of magnitude smaller than the peak for intermediate diffusion times. The bottom panel shows QλQ_\lambda for a fixed σλ=0.999\sigma_\lambda= 0.999 and mL=4mL = 4 over different lattice volumes approaching the continuum limit, with the dashed black curve showing the continuum result in Eq. (82).

A related question is whether the local-footprint structure can in practice be trained to a high-quality approximation of the diffusion energy, when compared to a black-box, long-range parameterization. The free scalar theory arguments above already demonstrate that a local footprint can give exponential accuracy for this theory. To check whether this statement translates to an interacting theory, we compare training a local-footprint model versus a kinetic energy parameterization which uses a U-Net vector field for the O(3) NLSM. The latter in principle can encode long-range correlations through convolutions applied in the coarse levels within the U-Net construction. This comparison is shown in the top panel of Figure 6, where the U-Net kinetic energy model is compared to both the invariant and non-invariant local-footprint models. Shown in the figure as a measure of quality during training is the root-mean-squared (RMS) gap between the measured energy density of sampled configurations ϕλ\phi_\lambda generated from the true forward diffusion process versus those generated by sampling the learned energy function E^λ\hat{E}_\lambda at various points during training; the floor in this quantity is set by fluctuations in the finite batches used to estimate the energy density, with this batch size chosen so that early training dynamics are clearly revealed. Both variants of local footprint models converge to a similar RMS gap, and also reach the optimum value more quickly than the U-Net kinetic energy model. While the U-Net kinetic energy model achieves a better optimal value, this comes at the cost of being unable to efficiently estimate its Laplacian ∇2E^t\nabla^2 \hat{E}_t.

Figure 6. RMS gap between forward and reverse energy densities during training for the O(3) model. Top: local-footprint models compared with a kinetic EBM built from a non-invariant U-Net at 16×1616 \times16, β=1.4\beta= 1.4. Bottom: the local-footprint model with (solid lines) and without (dashed lines) built-in O(3)-invariance at (L,β)=(16,1.4),(32,1.5),(64,1.6)(L,\beta) = (16,1.4), (32,1.5), (64,1.6).

We finally explore whether it is beneficial to incorporate the exact O(3) symmetry in the O(3) NLSM models. We compare two classes of local-footprint models, which differ only in the preprocessing network used to collect degrees of freedom in each patch into the local hidden vector ϕenc\phi_{\mathrm{enc}} of dimension nhn_h. The first, non-invariant option uses a standard convolution which takes nhn_h linear combinations of the field variables within the patch; the second, invariant option first constructs all pairwise inner products between field variables within the patch, then takes nhn_h linear combinations of these invariants. The bottom panel of Figure 6 compares the training dynamics of these two networks. The figure reveals that the exactly symmetric models converge more quickly and converge to a better overall model quality for the larger values of β\beta. Together, these results motivate our focus on only the (O(3)-invariant) local-footprint models for all further results in the scalar field theory and O(3) NLSM below.

Sampling the learned path using SNFs

We first consider sampling the trained diffusion models using the SNF approach with various numbers of annealing steps, nn. In all cases, each sample is evolved independently by interleaving HMC updates with flow-transport steps, as outlined in Algorithm 1. We denote the total number of independent samples generated for any given target by NN. For sampling, we use a uniform grid of nn annealing steps in tt. At each step, the NN samples first undergo nMCMCn_{\mathrm{MCMC}} HMC updates targeting the learned energy E^t\hat{E}_t at the current time, after which they are transported to the next timestep by a single RK4 step of the probability-flow ODE in Eq. (15). The log-Jacobian is accumulated by the same RK4 step using the exact divergence of the local-footprint model, and the log-weights are updated according to Eq. (14). For the free scalar field theory, we sample N=256N = 256 configurations with nMCMC=10n_{\mathrm{MCMC}} = 10. Our HMC trajectories have length 8.0 for L=16L = 16 and 16.0 for L=32,64L = 32, 64 with 20, 64, and 80 leapfrog steps respectively. For the O(3) NLSM, we sample N=256N = 256 (N=1024N = 1024 for β=1.4\beta= 1.4, n=100n = 100) configurations with nMCMC=1n_{\mathrm{MCMC}} = 1. In this case, HMC trajectories have length 0.5 with 10 leapfrog steps.

As a comparison, we also perform sampling for the same targets without the flow (i.e., using AIS sampling) for both theories. In the case of scalar field theory, the settings are the same as SNF sampling. For the O(3) NLSM, we sample N=1024N = 1024 configurations for a higher-statistics comparison in all cases, while using the same HMC settings.

For sequential annealing methods, the effective sample size (ESS) provides a direct measure of sample quality. In terms of the sampled weights, it is defined by

ESS=(1N∑iwi)21N∑iwi2∈[0,1].(83)\mathrm{ESS} = \frac{\left(\frac{1}{N}\sum_i w_i\right)^2}{\frac{1}{N}\sum_i w_i^2} \in[0,1]. \tag*{(83)}

In general, the ESS represents the fraction of the sampled ensemble of size NN that makes non-trivial contributions to final expectation values; a perfect ESS of 1 is obtained when all weights are equal. The ESS can also be related to the variance of the log-weights log⁡w\log w themselves: for roughly log-normal ww, ESS≈exp⁡(−Var⁡[log⁡w])\mathrm{ESS} \approx\exp(-\operatorname{Var}[\log w]). While not directly a measure of sampling efficiency, the variance Var⁡[log⁡w]\operatorname{Var}[\log w] typically has lower noise than measurements of the ESS and can be measured even when the ESS is very small. This variance also directly relates to the theoretical quantities laid out in earlier sections.

In Figure 7, we compare the scaling of Var⁡[log⁡w]\operatorname{Var}[\log w] for SNF versus AIS in the free scalar field theory and the O(3) model. Incorporating the learned flow reduces the reweighting variance by one to two orders of magnitude relative to AIS over the range of nn studied. The residual variance under SNF comes from model error in E^t\hat{E}_t.

Variance of the log weights for the free scalar theory and the O(3) model

Figure 7. Variance of the log weights plotted against the number of annealing steps for SNF (solid lines) and AIS (dashed lines) on 16×1616 \times16, 32×3232 \times32, and 64×6464 \times64 lattices, for the free theory with m=2/Lm = 2/L (top) and the O(3) model with β=1.4,1.5,1.6\beta= 1.4, 1.5, 1.6 (bottom). The same learned energies and HMC settings are used for both AIS and SNF, with one exception: HMC trajectories for the free theory on the 64×6464 \times64 lattice are integrated with twice the leapfrog steps for AIS, without which AIS walkers are consistently rejected near the target. The 1–2 orders of magnitude improvement between the AIS and SNF results comes from using the nearly optimal flow derived from the score.

In both theories, Var⁡[log⁡w]\operatorname{Var}[\log w] decreases monotonically with nn and the ESS rises correspondingly (see App. C), enabling systematic refinement of sample quality post-training. For SNF sampling from the scalar field theory, we observe a slower scaling than the asymptotic 1/n1/n expected in the quasi-static limit. This is explained by correlations between steps: writing log⁡w=∑iΔlog⁡wi\log w = \sum_i \Delta\log w_i, the variance splits into per-step contributions and the covariance between steps as

Var⁡[log⁡w]=∑iVar⁡[Δlog⁡wi]+2∑i<jCov⁡[Δlog⁡wi,Δlog⁡wj].(84)\operatorname{Var}[\log w] = \sum_i \operatorname{Var}[\Delta\log w_i] + 2\sum_{i<j}\operatorname{Cov}[\Delta\log w_i,\Delta\log w_j]. \tag*{(84)}

In Figure 8, we compare the total variance with the per-step sum for the two theories. The per-step sum is independent of nMCMCn_{\mathrm{MCMC}} and follows an ideal $1/n$ scaling, indicating that the excess in the full variance arises because the HMC updates per SNF step do not fully decorrelate successive log-weight increments. Increasing the number of HMC updates reduces the variance systematically towards the floor set by the independent sum. For the O(3) model, the ratio of the total to the per-step sum decreases from 7–14 at nMCMC=1n_{\mathrm{MCMC}} = 1 to 1.0–1.1 at $n_{\mathrm{MCMC}} = 80 (n=100(n = 100–500)500); for the free theory, it decreases from 11–20 at nMCMC=1n_{\mathrm{MCMC}} = 1 to 1.3–1.5 at nMCMC=80n_{\mathrm{MCMC}} = 80 (n=250(n = 250–1000)1000).

Figure 8. Total variance of the log weights Var⁡[log⁡w]\operatorname{Var}[\log w] (solid lines) compared with the sum of per-step increment variances ∑iVar⁡[Δlog⁡wi]\sum_i \operatorname{Var}[\Delta\log w_i] (dashed line) against the number of HMC updates per step nMCMCn_{\mathrm{MCMC}} for different numbers of annealing steps nn for the free scalar field theory (top) and the O(3) model (bottom). The per-step sum scales as 1/n1/n; the excess of the total variance reflects correlations between steps, which vanish as nMCMCn_{\mathrm{MCMC}} increases.

The residual correlations also affect SNF sampling more strongly than AIS (no-flow) sampling, as observed for example by the nearly perfect 1/n1/n scaling for AIS. We propose the following qualitative explanation. Including the flow transformation to move from AIS to SNF sampling already significantly reduces the variance of each log-weight increment. Because the AIS variance is expected to be dominated by UV fluctuations, we also expect these to be the most improved by the inclusion of the flow transformation; this leaves the more slowly mixing intermediate and IR modes as a larger contribution to the residual variance and to the covariance term in Eq. (84). Although the quasi-static limit is approached less rapidly once the flow is applied, SNF sampling nonetheless consistently improves over AIS by up to two orders of magnitude in Var⁡[log⁡w]\operatorname{Var}[\log w] across all nn studied.

Sampling the learned path using T-REX

For each lattice size, we use a uniform ladder of n+1n+1 chains, targeting the learned distribution for times tk=k/nt_k = k/n, with k=0,…,nk = 0, \ldots, n. One sweep consists of nMCMCn_{\mathrm{MCMC}} HMC trajectories applied on each chain, targeting the respective learned energy E^tk\hat{E}_{t_k}, followed by one round of swap proposals between neighboring chains. Swaps alternate between even pairs (t2j,t2j+1)(t_{2j}, t_{2j+1}) and odd pairs (t2j+1,t2j+2)(t_{2j+1}, t_{2j+2}) on successive sweeps, so each pair is proposed on every other sweep. In T-REX, each proposed configuration is transported to its new chain using the single RK4 step of the probability-flow ODE in Eq. (15); the log-Jacobian required for the acceptance probability is also computed by a single RK4 step. REX uses the same schedule without the transport step.

For scalar field theory results, the following settings are applied. The ladder is initialized by drawing independent samples from the prior at t=0t = 0 and integrating the learned probability-flow ODE to each intermediate time tkt_k with 100 RK4 steps, chosen so that the integrator converges well for the largest value, t=1t = 1. Each sweep uses nMCMC=2n_{\mathrm{MCMC}} = 2 HMC trajectories between swap proposals. The swap variance profiles are measured over 2000 sweeps after 500 warmup sweeps, using HMC trajectories of length 4.0 with 8, 10, and 18 leapfrog steps for L=16,32,64L = 16, 32, 64, giving acceptance rates of 0.57, 0.50, and 0.67, respectively.

For the O(3) NLSM, the following settings are applied. The ladder is initialized by drawing independent samples from the prior (uniform noise) for all chains. The majority of REX and T-REX runs are evaluated using 1024 sweeps, each of which proposes one (flowed) swap update following one HMC trajectory of length 0.5, integrating using 10 leapfrog steps. The only exceptions to these settings are for L≥96L \ge96, for which HMC trajectories are evolved for length 0.4 using 20 leapfrog steps, and specifically for L=128L = 128 results which use fewer overall sweeps, respectively 512 sweeps for the n=50n = 50 case and 256 sweeps for the n=100n = 100 case.

For measurements of observables and metrics, 100 thermalization steps are skipped before evaluation in all cases except for the β=1.6\beta= 1.6, L=64L = 64 O(3) model, for which 824 steps are skipped for observables, leaving 200 samples for measurements. Because successive measurements remain correlated in both replica-exchange methods, we use a blocked bootstrap method to estimate uncertainties. For the scalar field theory, errors on the swap-variance profiles are estimated with 200 resampling steps using blocks of 50 sweeps, while errors on observables are estimated with 1000 resampling steps using blocks of 100 sweeps. For the O(3) model measurements, errors are by default estimated with 1000 resampling steps using blocks of 50 sweeps. Two exceptions are made: β=1.6\beta= 1.6, L=64L = 64 uses blocks of 24 sweeps, while β=1.6\beta= 1.6, L=128L = 128, uses blocks of 18 sweeps, in both cases to ensure sufficiently many blocks are available for bootstrap estimates.

As introduced in Eq. (25), χt\chi_t is defined as one half the variance of the swap log-weights at time tt. It relates closely to sequential annealing metrics for small Δt\Delta t according to χt≈Δt2Var⁡[ξt]\chi_t \approx\Delta t^2 \operatorname{Var}[\xi_t]. Since ξt\xi_t is a sum of local contributions over lattice sites, Var⁡[ξt]∝V\operatorname{Var}[\xi_t] \propto V and the swap variance is expected to scale as V/n2V/n^2. To test this theoretical scaling, we show in Figure 9 the rescaled quantity n2χt/Vn^2\chi_t/V over the T-REX ladder for the O(3) model at β=1.4\beta= 1.4 across lattice sizes L∈{32,48,64,96}L \in\{32, 48, 64, 96\}. All of these volumes are evaluated by transferring the model trained at L=16L = 16, without retraining. The rescaled quantities collapse to the same curve across nn and LL, confirming the expected scaling. This scaling implies that the number of chains nn should scale with V\sqrt{V} to obtain fixed swap acceptance using T-REX, as compared with n∝Vn \propto V in SNF. However, this comparison must also take into account the fact that T-REX chains are autocorrelated. We provide a more detailed cost comparison in the following section.

Figure 9. Rescaled variance of the swap log-weights versus chain-pair midpoints tt for the O(3) model at fixed coupling β=1.4\beta= 1.4 over four lattice volumes with n=50n = 50 and n=100n = 100. All curves collapse onto one another when rescaled, indicating that the variance grows proportionally to the volume VV.

A more physically meaningful comparison is following the continuum limit along a line of constant physics, as studied also in the case of SNF sampling. The rescaled local variance contributions, n2χt/Vn^2\chi_t/V, are shown for both scalar field theory and the O(3) model in Figure 10. We first find that T-REX reduces the swap variance by one to three orders of magnitude over most of the replicas, relative to (unflowed) REX. For scalar field theory, improvements are particularly concentrated in the range t≳0.25t \gtrsim0.25, while for the O(3) model improvements are observed over the entire range of annealing time. The learned drift thus significantly improves the overlap between neighboring chains, so that T-REX needs a factor of about 4–5 times fewer chains than REX in the free theory, and about 7–9 times fewer chains in the O(3) model, to achieve a given average swap acceptance rate. Below t≈0.23t \approx0.23 in the free scalar theory, there is a crossover where the variance under REX falls below that of T-REX at every LL; however, both variances are negligible in this region, as both methods yield a swap acceptance rate of 99%. We attribute this behavior to model imperfection: since E^t\hat{E}_t is trained globally with a single loss across tt, there is no guarantee that the minimizer of the loss for a limited model ansatz will improve the swap acceptance rate over the entire range of tt.

Figure 10. The rescaled variance of the swap log-weights versus the midpoint tt of each pair of neighboring chains for (top) the free scalar theory and (bottom) the O(3) model. Solid lines are T-REX and dashed are REX. Results are shown across different lattice sizes with approximately fixed physical volume. Shaded bands show block-bootstrap errors.

The same variance profiles also show that the T-REX swap acceptance rate is worst in the middle region (0.2≲t≲0.60.2 \lesssim t \lesssim0.6) for the O(3) model, whereas for the free theory it is worst near the target (t≳0.6t \gtrsim0.6). We do not attribute significant physical meaning to these effects: the most substantial transport costs are determined both by how quickly the distribution evolves under the artificially introduced diffusion equation, including the arbitrary choice of gλg_\lambda, and by how well our models reproduce the intermediate probability densities. However, the fact that these costs are not uniformly distributed indicates that a constant-factor improvement could be gained by rescheduling the annealing time tt; we show this effect for the ϕ4\phi^4 theory in § 5 E.

While T-REX provides a large factor gain over REX in practice, the scaling of the cost is also important. We see that the curve collapse of the rescaled swap log-weight variance is not perfect, as there is a marginally higher variance than naive degrees-of-freedom scaling would suggest across the annealing time range for both theories. For the case of the free scalar field theory, this largely affects the parts of the diffusion path that make smaller contributions to the total refresh time, while for the O(3) NLSM, the growth with decreasing lattice spacing manifests in the most challenging part of the annealing time range. We quantify the resulting costs next.

Lattice spacing effects and cost

In both theories, Var⁡[ξt]\operatorname{Var}[\xi_t] measured from SNF sampling aligns well with n2χtn^2\chi_t measured from T-REX, as depicted in Figure 11. This indicates both that the SNF samples remain close to equilibrium at every tt and that nn is large enough in both cases to suppress high-order corrections. More importantly, this demonstrates that both samplers

Figure 11. Two independent estimates (SNF: Var⁡[ξt]\operatorname{Var}[\xi_t], T-REX: n2χtn^2\chi_t) for the variance of the instantaneous log weight increment ξt\xi_t along annealing time tt in the free theory on a 16×1616 \times16 lattice (top) and the O(3) model at β=1.5\beta= 1.5 on a 32×3232 \times32 lattice (bottom). Results obtained from equilibrium T-REX samples are compared to SNF, demonstrating that the latter is nearly in equilibrium and that results translate well between the two sampling methods.

are governed by the same thermodynamic metric along the path, such that results on scaling, annealing-time schedules, and projected variance/acceptance rates can be easily connected from one method to the other.

To compare the overall sampling cost in either case, we first note that the cost of T-REX is set both by the number of chains n+1n+1, which sets the cost of each sweep, and the refresh time τ\tau, which sets the number of sweeps between independent configurations arriving at the target chain. At fixed acceptance, Figure 9 and Figure 10 imply that one must set n∼Λ~n \sim\widetilde{\Lambda}. Combining this with the asymptotic scaling τ∼Λ~\tau\sim\widetilde{\Lambda}, the expected total number of updates required to acquire independent samples from T-REX scales as nτ∼Λ~2n\tau\sim\widetilde{\Lambda}^2. In the case of SNF sampling, the same quantity sets the lower bound on the variance by Eq. (27), Var⁡[log⁡w]=S~/n∼Λ~2/n\operatorname{Var}[\log w] = \widetilde{S}/n \sim\widetilde{\Lambda}^2/n. Maintaining a fixed Var⁡[log⁡w]\operatorname{Var}[\log w] therefore requires n∼Λ~2n \sim\widetilde{\Lambda}^2 annealing steps per independent sample, matching the scaling for T-REX. In all cases, naive degrees-of-freedom scaling leads to Λ~2∼V\widetilde{\Lambda}^2 \sim V so that the number of steps required per independent sample scales linearly with the lattice-units volume when all else is held constant.

Both methods also benefit from applying the same optimal annealing schedule, which places the annealing times at equal increments of the path length Λ~\widetilde{\Lambda}; however, the benefits for each method manifest in different ways. For SNF, it reduces the variance at fixed nn from S~/n\widetilde{S}/n to its lower bound Λ~2/n\widetilde{\Lambda}^{2}/n, which is reached when the path is traversed at constant speed. For T-REX, the asymptotic refresh time 1+Λ~/π1+\widetilde{\Lambda}/\sqrt{\pi} is independent of the schedule, since the length Λ~\widetilde{\Lambda} is a parameterization-independent geometric property of the curve t↦ρtt \mapsto\rho_t. Instead, the optimal schedule reduces the number of chains needed to approach this limit, i.e., it sets the threshold nn where the autocorrelation time is nearly saturated. This is the effect seen for the ϕ4\phi^4 theory in § 5 E, where the optimal schedule reduces the refresh time at the same nn.

In terms of total cost, each MCMC or flow update acts on a lattice of volume VV, so the computational cost per update also features a basic scaling proportional to VV. Notably, the model did not need to be extended for any of the studies here—a fixed 3×33 \times3 or 5×55 \times5 footprint was used for the scalar and O(3) theories, respectively—and this cost was thus constant.

To understand the path length more precisely from numerical data, we note that the path length can be respectively estimated from SNF or T-REX according to [96]

Λ~=lim⁡Δt→0∑k=1nVar⁡[Δlog⁡wtk]=lim⁡Δt→0∑k=1nχtk.(85)\widetilde{\Lambda} = \lim_{\Delta t \to0} \sum_{k=1}^{n} \sqrt{\operatorname{Var}[\Delta\log w_{t_k}]} = \lim_{\Delta t \to0} \sum_{k=1}^{n} \sqrt{\chi_{t_k}}. \tag*{(85)}

Analogous estimators for the unflowed path length Λ\Lambda are given by evaluating the equation above using AIS or REX. In the simplest case of fixing the physical coupling while scaling the physical volume, shown for example in Figure 9, we observe the expected trivial scaling Λ~∼V\widetilde{\Lambda} \sim\sqrt{V}. This implies an overall cost scaling of Λ~2V=O(V2)\widetilde{\Lambda}^{2}V = O(V^{2}), as has been observed in previous works on SNF and non-equilibrium sampling [52].

More interesting is the scaling along a line of constant physics towards the continuum limit. We define such a line by holding the ratio of lattice size LL and correlation length ξ\xi approximately fixed, as above. Approaching the continuum, the measured Λ~\widetilde{\Lambda} grows slightly faster than V\sqrt{V}, as indicated for example by the imperfect collapse of the swap variances seen above in Figure 10. We quantify the deviation from the naive scaling estimate for the total thermodynamic path length by considering its value divided by V\sqrt{V}. The results for both theories are shown in Figure 12. In addition to the previously studied value L/ξ≈2L/\xi\approx2 for the scalar field theory and O(3) model, simulations at twice the lattice size are added for the O(3) model, using volume transfer to evaluate trained models directly at the larger volume. The latter dataset uses lattice sizes L=32,64,128L = 32,64,128 at the same β∈{1.4,1.5,1.6}\beta\in\{1.4,1.5,1.6\}, corresponding to L/ξ≈4L/\xi\approx4. Across all measurements, we find that the ratio grows weakly towards the continuum according to the anomalous scaling Λ~∼Vp+1/2\widetilde{\Lambda} \sim V^{p+1/2}, with a power p≲0.15p \lesssim0.15. The cost per independent sample along these lines of constant physics therefore grows marginally faster than the naive V2V^{2} scaling observed at fixed coupling.

Figure 12. Rescaled thermodynamic path length for the unflowed (Λ/V\Lambda/\sqrt{V}) and flowed (Λ~/V\widetilde{\Lambda}/\sqrt{V}) annealing paths in the free scalar theory (left) and the O(3) model (right). Points are estimated from REX, T-REX, and SNF data, as discussed in the main text. Connected sets of points represent flowed and unflowed paths at approximately fixed physical volume, defined by fixing the ratio L/ξL/\xi between the lattice size and correlation length, for which the continuum limit is approached by increasing the lattice size L→∞L \to\infty. Each pair of vertical panels spans the same width in decades, so slopes within each theory are directly comparable.

Scalar ϕ4\phi^4 demo

As an additional demonstration of our method, we apply T-REX sampling in the 2D ϕ4\phi^4 theory, using the action in Eq. (54) with parameters in the broken phase. The ϕ4\phi^4 target we investigate uses action parameters m2=−4.21m^2 = -4.21, λ=1.11\lambda= 1.11 chosen by a parameter scan to identify values where HMC tunnels freely between the two sectors on a 16×1616 \times16 volume, while remaining frozen on a 48×4848 \times48 volume. With this setup, we use efficient HMC samples on the 16×1616 \times16 volume for training, then evaluate the efficiency of the annealed diffusion sampling method for the challenging 48×4848 \times48 target volume. Our diffusion settings are the same as for the free theory, i.e., a variance-preserving diffusion process with noise schedule gλ=0.1+24.9λg_\lambda= \sqrt{0.1 + 24.9\lambda}.

We use the same local-footprint model architecture as for the free scalar field theory. The model is trained on an ensemble of 16,384 configurations, generated using 256 independent HMC chains with 64 configurations each; saved configurations are spaced 400 trajectories apart, after skipping 2000 thermalization trajectories per chain. The last 1024 configurations are held out to monitor a validation loss, leaving 15,360 for training. Each HMC trajectory has length 2.0, integrated using 11 leapfrog steps, yielding an average acceptance rate of 0.66. The training set experienced 2673 tunneling events in total, giving a sufficiently representative ensemble for the target theory. Using this setup, the model is trained for 10,000 passes through the full dataset in 15 batches of 1024 configurations, giving a total of 150,000 gradient updates. To reduce overfitting to the finite training ensemble, each batch is refreshed by one HMC update before each training step, using a trajectory of length 0.5 integrated with 5 leapfrog steps. The refreshed configurations are not stored. The model is trained according to the weighted denoising score matching objective, i.e. Eq. (53) with λcut=0\lambda_{\mathrm{cut}}=0. To avoid numerical instability near λ=0\lambda=0, the diffusion time is sampled over the restricted range λ∈[10−5,1]\lambda\in[10^{-5},1]. The remaining settings are the same as for the free field example.

To further increase our learned model quality, we manually symmetrize the energy at evaluation time,

E^t(ϕ)→12(E^t(ϕ)+E^t(−ϕ)).(86)\widehat{E}_t(\phi) \to\frac{1}{2}\left(\widehat{E}_t(\phi)+\widehat{E}_t(-\phi)\right). \tag*{(86)}

We note that this is not equivalent to simply symmetrizing our data by random Z2\mathbb{Z}_2 flips, which would by brute force solve tunneling challenges in all cases, including for HMC. Instead, a symmetrized energy function leads only to an incrementally better flow transport and swap acceptance rate for T-REX sampling, so that it provides a non-trivial check of the efficiency of this approach.

We first sample the 48×4848 \times48 target using T-REX with a uniform schedule, using a ladder of n+1=97n+1=97 chains at annealing times tk=k/nt_k=k/n, where k∈{0,…,n}k \in\{0,\ldots,n\}. Each chain targets the distribution for the respective symmetrized energy E^t\widehat{E}_t given in Eq. (86). The ladder is initialized by drawing independent samples from the prior and integrating the learned probability flow ODE to each tkt_k with 100 RK4 steps. One T-REX sweep consists of two HMC trajectories per chain (trajectory length 2.0 integrated with 18 leapfrog steps), followed by one round of swap proposals that alternate between even and odd pairs of neighboring chains as in Sec. II A. In total, we run 2000 sweeps after 500 warmup sweeps. For comparison, we run 97 independent HMC chains on the exact target action, one per T-REX chain so that the cost per sweep matches, using the same trajectory settings. Figure 13 and the ⟨M⟩\langle M\rangle in Table I show a single one of these chains, while the observables in App. § 5.4 2 average over all 97.

Figure 13. Magnetization MM of the target configuration (t=1t=1) against sweeps for the broken-phase ϕ4\phi^4 target on a 48×4848 \times48 lattice. T-REX sampling using the symmetrized learned energy is compared to an HMC chain directly sampling the target action. Traces show the first 1000 sweeps; histograms show the distribution of MM values over all 2000 sweeps used in each case. HMC remains in one mode, whereas T-REX tunnels repeatedly and reproduces the two magnetization peaks of the broken phase.

We characterize the sampled configurations by their magnetization M=∑xϕ(x)/L2M=\sum_x\phi(x)/L^2. The distribution of MM for our parameters is bimodal with peaks around ±0.56\pm0.56. The Z2\mathbb{Z}_2 symmetry of the theory guarantees ⟨M⟩=0\langle M\rangle=0 analytically. While Z2\mathbb{Z}_2-invariant observables such as ⟨M2⟩\langle M^2\rangle can still be estimated correctly with samples frozen in one sector, Z2\mathbb{Z}_2-sensitive observables such as ⟨M⟩\langle M\rangle directly

Sampler⟨M⟩\langle M\rangleτ\tau (sweeps)Min. acc.
HMC−0.560(8)-0.560(8)——
T-REX (uniform)0.07(10)0.07(10)31(4)31(4)0.590.59
T-REX (optimal)0.15(8)0.15(8)22(2)22(2)0.850.85

Table 1. Observables and sampling metrics for the ϕ4\phi^4 target on a 48×4848 \times48 lattice. The refresh time τ\tau is the one-way trip time across the ladder divided by the number of chains, in sweeps. The magnetization ⟨M⟩\langle M\rangle for HMC indicates that the chain is frozen in the negative sector, so its smaller error does not reflect this bias.

test whether the two sectors are equally sampled. In Table I, we present measurements of ⟨M⟩\langle M\rangle and other sampling metrics for the methods investigated in this section. Further observables are included in App. § 5.4 2.

Furthermore, we examine the impact of using an optimal schedule for T-REX chains. To construct the optimal ladder, we follow the two-round procedure of Ref. [101]. In the first round, we perform T-REX on the uniform ladder described above and record the swap acceptance rate aka_k of each pair (tk,tk+1)(t_k,t_{k+1}). The rejection rates rk=1−akr_k=1-a_k provide an estimate of the distance between neighboring chains. A cumulative estimate up to chain kk is given by D(tk)≡∑j<krjD(t_k)\equiv\sum_{j<k}r_j, which can be interpolated to provide a smooth estimate of the cumulative distance versus annealing time; for the uniform schedule, we measure a total cumulative rejection rate of 10.37(9)10.37(9). The new chain times tk′t'_k are then placed to achieve equal increments D(tk′)−D(tk−1′)D(t'_k)-D(t'_{k-1}), which predicts a uniform acceptance rate of 1−(D(tk′)−D(tk−1′))≈0.891 - (D(t'_k) - D(t'_{k-1})) \approx0.89. In the second run on this ladder, with the same number of chains and cost per sweep, the swap acceptance is in fact roughly constant across annealing time, maintaining an average value of 0.891(1), as shown in Figure 14. The minimum measured acceptance rate is 0.85(1), compared with 0.59(2) on the uniform ladder, and the refresh time τ\tau decreases from 31(4) to 22(2) sweeps. Configurations move along the ladder by swaps, so alleviating the bottlenecks where swaps are hardest accelerates mixing across the ladder.

Figure 14. Comparison between the uniform (black) and optimal (red) annealing schedules for T-REX on the learned energy path in the ϕ4\phi^4 theory on a 48×4848 \times48 lattice. Top: swap rejection rate rk=1−akr_k = 1-a_k between neighboring chains kk, indexed from the prior. Bottom: annealing times tkt_k of the uniform ladder and tk′t'_k of the optimal ladder for the 97 chains. The uniform ladder places chains linearly between the prior and the target, while the optimal ladder places chains more densely near the target where swaps are more difficult, which equalizes the acceptance rate (see top panel).

Conclusion and Outlook

In this work, we present an algorithm for constructing diffusion EBMs and using them to sample lattice field theories in a systematically exact and improvable way (Algorithm 1). The main premise of this work is that annealed sampling techniques can be combined with effective training strategies from diffusion models by choosing to learn the energy EtE_t on the diffusion path. The diffusion path is automatically equipped with a vector field that transports samples along the intermediate distributions (Eq. (35)), making flow-enhanced sampling methods (SNF and T-REX) immediately applicable. In the context of lattice field theory, these annealed sampling methods make available additional scaling directions, which mitigate the generally exponential overlap problem when sampling from an imperfect model. Sampling from a diffusion EBM using stochastic normalizing flows provides a fixed sampling efficiency when scaling the number of steps n∼Λ~2n \sim\widetilde{\Lambda}^{2}, in terms of the thermodynamic path length Λ~\widetilde{\Lambda}; sampling using T-REX gives an analogous scaling when scaling the number of replica chains n+1∼Λ~n+1 \sim\widetilde{\Lambda} and skipping τ~∼Λ~\widetilde{\tau} \sim\widetilde{\Lambda} updates between saved configurations. The path length can be written in terms of relevant local metrics Var⁡[ξt]\operatorname{Var}[\xi_t] for SNF sampling or χt\chi_t for T-REX (Eq. (85)), allowing it to be estimated in either context.

Using analytical results and numerical applications to scalar field theory and the O(3) NLSM, we find that local-footprint models are sufficient to capture the energy EtE_t in practical settings. These local-footprint models remain sufficient even as the lattice spacing is reduced, significantly improving the flowed path length Λ~\widetilde{\Lambda} relative to the unflowed Λ\Lambda and leading to one to two orders of magnitude improvement in sampling efficiency relative to annealed sampling with no flow improvement. The practical sampling complexity scales similarly to the theoretical prediction Λ~∼V\widetilde{\Lambda} \sim\sqrt{V} made under assumptions of perfect independence and fixed couplings. We also identify where and how these assumptions break down—for example due to correlations between reweighting factors in SNF sampling or an anomalous scaling Λ~∼Vp+1/2\widetilde{\Lambda} \sim V^{p+1/2} with a power p≈0.15p \approx0.15 when tuning parameters along a line of constant physics. As a final practical demonstration, we apply annealed sampling for a learned diffusion EBM in a broken-phase ϕ4\phi^4 theory. While HMC sampling remains frozen in one mode, the learned T-REX sampler has a refresh time of approximately 30 sweeps, and tuning to the optimal annealing schedule gives a further reduction in refresh time by approximately 1.5×1.5\times. For other theories or diffusion schedules, it remains important to study the locality of the energy functions describing intermediate sampled distributions. Given that the diffusion path is a controlled input of the method, it could be helpful in future work to explicitly optimize for this locality such that cost-effective energy-based models can be constructed and sampled according to the annealing strategy used here.

We focus here on using a standard score-matching prescription to train our energy models to satisfy ∇Et≈∇E~t\nabla E_t \approx\nabla\widetilde{E}_t, which has the benefit of being written in terms of a simple regression loss with good training dynamics. The downside of such a loss function, however, is that the regression target has inherent noise due to stochastic estimation through either the denoising score identity in Eq. (50) or the target score identity in Eq. (51). Combining these two loss functions mitigates this noise [110], but in future work it would be interesting to investigate more sophisticated training strategies that combine regression with loss functions based on the KL divergence or the PINN loss, as has for example been proposed in Ref. [116]. Such loss functions can often be constructed to converge to zero noise as training progresses. A related issue is that diffusion models require samples from the target distribution to estimate the score-matching loss function. In this work, we avoid this challenge for difficult parameters by training at smaller volumes and transferring to evaluate at larger target volumes. Because our models E^t\hat{E}_t are constructed as sums of local functions of the field degrees of freedom, this transfer is readily available. Beyond this strategy, self-learning training strategies based on imperfect sampling distributions may be of interest [59, 60].

Overall, this work develops and refines a machine-learning approach which is complementary to existing flow-based, annealing, and diffusion model methods. Because the output is an annealing path with a good approximate flow transformation, these related methods are directly comparable. The methods may also be combined: an imperfect diffusion EBM can be complemented by a learned flow field which further reduces the local variance metrics, improving the sampling performance. Future work will focus on training efficacy and practicalities of sampling in more challenging lattice field theory targets, including lattice QCD. By studying a new combination of training and sampling strategies, this work takes a key step towards effective solutions to the critical slowing down problems in these contexts.

Acknowledgments

We thank Aida El-Khadra for invaluable support and mentorship throughout this project. We are grateful to Elia Cellini, Roberto Dionisio, Daniel Hackett, Saifuddin Syed, and Satria Widyanto for helpful discussions during the development of this work. OV is supported by the U.S. Department of Energy, Office of Science under grant Contract Number DE-SC0015655 as well as by the U.S. Department of Energy, Office of Science, “High Energy Physics Computing Traineeship for Lattice Gauge Theory” Award No. DESC0024053. GK is supported by the European Union (ERC, FoundLatt, 101212401). Views and opinions expressed are however those of the author(s) only and do not necessarily reflect those of the European Union or the European Research Council. Neither the European Union nor the granting authority can be held responsible for them.

This work has made use of the resources provided by the Edinburgh Compute and Data Facility (ECDF) [117]. Some of the experiments in this research used the DeltaAI advanced computing and data resource, which is supported by the National Science Foundation (award OAC 2320345) and the State of Illinois. DeltaAI is a joint effort of the University of Illinois Urbana-Champaign and its National Center for Supercomputing Applications. This research used resources of the National Energy Research Scientific Computing Center (NERSC), a Department of Energy User Facility using NERSC award DDR-ERCAP 0039148. Numerical experiments and data analysis were executed using PyTorch [118], NumPy [119], SciPy [120], and Sacred [121]. Figures were created with Matplotlib [122].

Variance-preserving diffusion

For random variables on Rn\mathbb{R}^n, we consider forward diffusion SDEs modeled by the Ornstein-Uhlenbeck process

dϕλ=−12gλ2ϕλ dλ+gλ dWλ,ϕ0∼pλ=0.(87)d\phi_\lambda=-\frac{1}{2}g_\lambda^2\phi_\lambda\,d\lambda+g_\lambda\,dW_\lambda,\qquad\phi_0\sim p_{\lambda=0}. \tag*{(87)}

The diffusivity gλ:[0,1]→R+g_\lambda:[0,1]\to\mathbb{R}^+ schedules the strength of the noise added during the diffusion process. Solving Eq. (87) first requires multiplying both sides of the SDE by an integrating factor μλ=exp⁡[12∫0λgs2 ds]\mu_\lambda=\exp\left[\frac{1}{2}\int_0^\lambda g_s^2\,ds\right] to obtain

d(μλϕλ)=μλ(−12gλ2ϕλ+12gλ2ϕλ)dλ+μλgλ dWλ.(88)d(\mu_\lambda\phi_\lambda)=\mu_\lambda\left(-\frac{1}{2}g_\lambda^2\phi_\lambda+\frac{1}{2}g_\lambda^2\phi_\lambda\right)d\lambda+\mu_\lambda g_\lambda\,dW_\lambda. \tag*{(88)}

This effects a change of variables that cancels the drift on the right hand side, leaving a pure martingale that can be integrated directly:

d(μλϕλ)=μλgλdWλd(\mu_\lambda\phi_\lambda)=\mu_\lambda g_\lambda dW_\lambda
⟹ μλϕλ−ϕ0=∫0λμsgs dWs.(89)\Longrightarrow\ \mu_\lambda\phi_\lambda-\phi_0=\int_0^\lambda\mu_sg_s\,dW_s. \tag*{(89)}
{#eq:A4}

By the Itô isometry, the variance of the stochastic integral on the right-hand side is

E[(∫0λμsgs dWs)2]=∫0λμs2gs2 ds(90)\mathbb{E}\left[\left(\int_0^\lambda\mu_sg_s\,dW_s\right)^2\right]=\int_0^\lambda\mu_s^2g_s^2\,ds \tag*{(90)}
=∫0λdds(μs2) ds(91)=\int_0^\lambda\frac{d}{ds}\left(\mu_s^2\right)\,ds \tag*{(91)}
=μλ2−1,(92)=\mu_\lambda^2-1, \tag*{(92)}

so that

μλϕλ−ϕ0∼N(0,μλ2−1).(93)\mu_\lambda\phi_\lambda-\phi_0\sim\mathcal{N}\left(0,\mu_\lambda^2-1\right). \tag*{(93)}

Finally, defining αλ=μλ−1\alpha_\lambda=\mu_\lambda^{-1}, σλ=1−αλ2\sigma_\lambda=\sqrt{1-\alpha_\lambda^2}, and using a simple reparameterization, we find that the closed form solution to Eq. (87) is

ϕλ=αλϕ0+σληλ,ηλ∼N(0,I).(94)\phi_\lambda=\alpha_\lambda\phi_0+\sigma_\lambda\eta_\lambda,\qquad\eta_\lambda\sim\mathcal{N}(0,\mathbb{I}). \tag*{(94)}

Notably, in addition to satisfying a “conservation-of-variance” law αλ2+σλ2=1\alpha_\lambda^2+\sigma_\lambda^2=1, the coefficients in Eq. (94) are constructed such that α0=1\alpha_0=1, σ0=0\sigma_0=0, and α1≈0\alpha_1\approx0, σ1≈1\sigma_1\approx1, thereby interpolating between target configurations ϕ0\phi_0 and samples of pure noise η\eta. Provided that the diffusion coefficient gλg_\lambda is sufficiently large, the density of ϕλ\phi_\lambda will converge exponentially closely to that of the standard normal random variable as λ→1\lambda\to1.

Target score identity on S2^2

In this section, we generalize the Lie group target score identity provided in Ref. [110] to the case of the unit sphere S2S^2. Here, we denote elements of the 2-sphere as x⃗,y⃗∈S2\vec{x}, \vec{y} \in S^2 to abstractly represent unit vectors embedded in R3\mathbb{R}^3, such as the spin configurations of the O(3) NLSM. We first introduce the exact control variate

C(y⃗,x⃗)=Rx⃗→y⃗[∇x⃗log⁡Kλ(y⃗∣x⃗)−∇x⃗S(x⃗)]+div⁡x⃗Rx⃗→y⃗.(95)C(\vec{y},\vec{x}) = R_{\vec{x}\to\vec{y}}[\nabla_{\vec{x}}\log K_\lambda(\vec{y}|\vec{x})-\nabla_{\vec{x}}S(\vec{x})] + \operatorname{div}_{\vec{x}}R_{\vec{x}\to\vec{y}}. \tag*{(95)}

In terms of the conditional distribution

p(x⃗∣y⃗)∝e−S(x⃗)Kλ(y⃗∣x⃗),(96)p(\vec{x}|\vec{y}) \propto e^{-S(\vec{x})}K_\lambda(\vec{y}|\vec{x}), \tag*{(96)}

this control variate is a total derivative,

Ex⃗∣y⃗[C(y⃗,x⃗)]=∫dμ(x⃗)div⁡x⃗[p(x⃗∣y⃗)Rx⃗→y⃗]=0.(97)\mathbb{E}_{\vec{x}|\vec{y}}[C(\vec{y},\vec{x})] = \int d\mu(\vec{x})\operatorname{div}_{\vec{x}}[p(\vec{x}|\vec{y})R_{\vec{x}\to\vec{y}}] = 0. \tag*{(97)}

The tangent-space map Rx⃗→y⃗R_{\vec{x}\to\vec{y}} sends the tangent space at x⃗\vec{x} to the tangent space at y⃗\vec{y}. A useful choice is the divergence-free map

Rx⃗→y⃗[v⃗]=y⃗×(v⃗×x⃗).(98)R_{\vec{x}\to\vec{y}}[\vec{v}] = \vec{y}\times(\vec{v}\times\vec{x}). \tag*{(98)}

Under this choice, the total target score identity becomes

\begin{aligned} T_\lambda(\vec{y},\vec{x}) &= \nabla_{\vec{y}}\log K_\lambda(\vec{y}|\vec{x}) + C(\vec{y},\vec{x}) \\ &= \cancel{\nabla_{\vec{y}\log K_\lambda(\vec{y}|\vec{x})} + R_{\vec{x}\to\vec{y}}[\cancel{\nabla_{\vec{x}}\log K_\lambda(\vec{y}|\vec{x})} - \nabla_{\vec{x}}S(\vec{x})] \\ &= -\vec{y}\times(\nabla_{\vec{x}}S(\vec{x})\times\vec{x}). \end{aligned}} \tag*{(99)}\end{aligned}

The cancellation in the second-to-last equation comes from the rotational invariance of the S2S^2 heat kernel and symmetry with respect to its two arguments, which leads to

Rx⃗→y⃗[∇x⃗log⁡Kλ(y⃗∣x⃗)]=−∇y⃗log⁡Kλ(y⃗∣x⃗).(100)R_{\vec{x}\to\vec{y}}[\nabla_{\vec{x}}\log K_\lambda(\vec{y}|\vec{x})] = -\nabla_{\vec{y}}\log K_\lambda(\vec{y}|\vec{x}). \tag*{(100)}

For applications to the O(3) lattice field theory, the same tangent space identity can be extended to O(3) fields ϕ⃗λ\vec{\phi}_\lambda and ϕ⃗0\vec{\phi}_0 by taking the action S(⋅)S(\cdot) to act on the full configuration and evaluating Eq. (99) independently over all sites.

Further metrics

In Figure 15, we plot representative examples of the scaling behavior of the ESS with the number of SNF annealing steps nn. For every LL, we observe that the ESS rises monotonically with the number of annealing steps, indicating that our approach enables systematic refinement of sample quality post-training. In approaching the quasi-static limit, the variance of the log-reweighting factors monotonically shrinks as n→∞n \to\infty.

Figure 15. Scaling of the effective sample size with the number of annealing steps nn for the free scalar field theory.

To further explore the better mixing behavior in the ϕ4\phi^4 application presented in § 5 E, we measure the average magnetization MM across all chains during T-REX evaluation. The result is plotted in Figure 16, in which we observe significantly higher magnetization of samples near the target chain and almost no magnetization over

Figure 16. Magnetization MM for the 48 × 48 ϕ4\phi^4 configurations on chains k=40k = 40–9696 of the 97-chain optimal ladder. The first 400 of 2000 T-REX sweeps are shown.

roughly the first half of the chains. This matches the expectation that the learned annealing path defined by the diffusion schedule crosses from the broken phase to the symmetric phase as more noise is added (i.e., moving from the top chain towards the bottom in the figure). We also observe an apparent defect of the learned model, given by the region of decreased magnetization roughly in chains 80–90, which indicates that sampling efficiency could be further improved by more complex model parameterizations or more training. Regardless, the plot explains the ability of this T-REX sampler to overcome the freezing problem effectively: individual samples propagate rapidly from the noise chain in the symmetric phase to the target chain in the broken phase.

Observables

Free scalar observables

For the free scalar field theory, we measure the average value of the squared field ⟨ϕ2⟩\langle\phi^2\rangle. The analytical value of this quantity is

⟨ϕ2⟩=1V∑k1ω(k)2,(101)\langle\phi^2\rangle= \frac{1}{V}\sum_k\frac{1}{\omega(k)^2}, \tag*{(101)}

which we compare against measurements from SNF, REX, and T-REX in Table II. Results are consistent with the exact values, with all deviations at most 2.6σ2.6\sigma.

LLExactSNFREXT-REX
160.72470.742(27)0.740(12)0.720(8)
320.83570.789(18)0.822(15)0.817(13)
640.94620.969(67)1.091(74)0.958(46)

Table II. Measurements of ⟨ϕ2⟩\langle\phi^2\rangle in the free scalar theory (m=2/Lm = 2/L) from SNF (reweighted, n=4000n = 4000), REX, and T-REX, compared with exact values for each LL. Errors are bootstrap estimates (blocks of 100 sweeps for REX/T-REX).

ϕ4\phi^4 observables

In Sec. V E, we applied T-REX sampling to the ϕ4\phi^4 theory and measured the average magnetization ⟨M⟩\langle M\rangle in Table I to demonstrate improved mixing. In this section, we include additional ϕ4\phi^4 observables as a further check of our method, comparing measurements to those obtained on a reference HMC ensemble and a baseline REX calculation. Specifically, we compute three observables: the absolute magnetization

⟨∣M∣⟩=1V⟨∣∑xϕ(x)∣⟩,(102)\langle|M|\rangle= \frac{1}{V}\left\langle\left|\sum_x \phi(x)\right|\right\rangle, \tag*{(102)}

the magnetic susceptibility

χ=⟨M2⟩,(103)\chi= \langle M^2\rangle, \tag*{(103)}

and the Binder cumulant,

U4=1−⟨M4⟩3⟨M2⟩2.(104)U_4 = 1 - \frac{\langle M^4\rangle}{3\langle M^2\rangle^2}. \tag*{(104)}

Measurements across HMC, REX, and T-REX (uniform and optimal schedules) are collected in Table III. All replica exchange results were obtained using the local-footprint energy model trained at 16×1616 \times16, transferred to 48×4848 \times48, and symmetrized according to Eq. (86).

Sampler⟨∣M∣⟩\langle|M|\rangleχ\chiU4U_4
HMC0.5537(28)0.3133(22)0.6468(19)
REX (uniform)0.5513(84)0.3113(79)0.6444(42)
T-REX (uniform)0.5527(52)0.3130(49)0.6458(24)
T-REX (optimal)0.5471(47)0.3091(45)0.6410(33)

Table III. Observables for the ϕ4\phi^4 theory on a 48×4848 \times48 lattice from REX and T-REX with the symmetrized learned energies, compared with a standard HMC simulation. Uncertainties are obtained by bootstrap resampling over the 97 independent chains (HMC) or resampling over blocks of 100 sweeps (REX, T-REX).

We observe good agreement across all models for the three observables. The Binder cumulant U4U_4 is close to its expected value (2/3)(2/3) for two sharp peaks in MM, confirming that the ϕ4\phi^4 target is deep in the broken phase. Notably, HMC fails to tunnel and REX never transports configurations across the full ladder, but the observables still agree with the T-REX measurements. This is because all three observables are Z2\mathbb{Z}_2-invariant, and can therefore be estimated correctly even if configurations are frozen in one of the two sectors in the broken phase.

O(3) observables

For the O(3) NLSM, we compare measurements of four observables obtained using the methods we presented in this work against those from a reference code using a cluster algorithm [123, 124]. The first is the nearest-neighbor spin correlation ⟨ϕ⃗(x)⋅ϕ⃗(x+μ^)⟩\langle\vec{\phi}(x) \cdot\vec{\phi}(x+\hat{\mu}) \rangle, averaged over lattice sites xx and spacetime directions μ\mu. We also compute the zero-momentum projected two-point correlation function

G(r)=1V∑x,yy1=x1+r⟨ϕ⃗(x)⋅ϕ⃗(y)⟩.(105)G(r)=\frac{1}{V}\sum_{\substack{x,y\\ y_1=x_1+r}}\langle\vec{\phi}(x)\cdot\vec{\phi}(y)\rangle. \tag*{(105)}

From its Fourier transform G~(k)=∑rG(r)eikr\widetilde{G}(k)=\sum_r G(r)e^{ikr}, the second-moment correlation length is defined as

ξ=12sin⁡(π/L)G~(0)G~(2π/L)−1.(106)\xi=\frac{1}{2\sin(\pi/L)}\sqrt{\frac{\widetilde{G}(0)}{\widetilde{G}(2\pi/L)}-1}. \tag*{(106)}

Finally, we compare the distributions of the lattice-averaged first spin component,

M1=1V∑xϕ1(x),(107)M_1=\frac{1}{V}\sum_x\phi^1(x), \tag*{(107)}

which is symmetric about zero in the target theory.

Results for the first two observables are collected in Table IV. SNF estimates are reweighted using the importance weights of the generated samples, while T-REX estimates are averages over the target chain. Both the nearest-neighbor correlation and the correlation length agree with the cluster reference within 2σ2\sigma for every method and lattice size.

(β,L)(\beta, L)Method⟨ϕ⃗(x)⋅ϕ⃗(x+μ^)⟩\langle\vec{\phi}(x) \cdot\vec{\phi}(x+\hat{\mu})\rangleξ\xi
(1.4, 16)cluster0.56815(19)5.825(14)
(1.4, 16)SNF (n=1000n = 1000)0.5693(17)5.82(16)
(1.4, 16)T-REX (n=50n = 50)0.5677(14)5.62(11)
(1.5, 32)cluster0.60318(9)10.120(25)
(1.5, 32)SNF (n=1000n = 1000)0.6017(9)10.58(32)
(1.5, 32)T-REX (n=50n = 50)0.6025(7)9.70(33)
(1.6, 64)cluster0.63602(4)17.99(5)
(1.6, 64)SNF (n=500n = 500)0.6363(7)16.2(1.1)
(1.6, 64)T-REX (n=50n = 50)0.6362(8)16.9(7)

Table IV. Observables for the O(3) model compared with a cluster-algorithm reference (10510^5 configurations). Shown are the nearest-neighbor spin correlation and the second-moment correlation length ξ\xi. Errors are bootstrap estimates. At (1.6,64)(1.6, 64), the T-REX averages use only the last 200 MCMC steps to avoid the slow thermalization of the correlation function.

The full correlation functions and the M1M_1 distribution are shown in Figure 17. T-REX reproduces the cluster-algorithm G(r)G(r) within errors at all separations on both the 32×3232\times32 and 64×6464\times64 lattices, and the M1M_1 distributions from both methods agree with the reference at 32×3232\times32.

Figure 17. Comparison of O(3) observables with the cluster-algorithm reference (black dashed lines). Left: projected two-point correlation function G(r)G(r). T-REX results (n=50n = 50) are shown at all separations as a line with a ±1σ\pm1\sigma band; reweighted SNF results (n=1000n = 1000 for L=16,32L = 16, 32 and n=500n = 500 for L=64L = 64) are shown as points at every L/8L/8 separation. Right: distribution of the average first spin component M1M_1 at (1.5,32)(1.5, 32) from T-REX with n=100n = 100 and SNF with n=1000n = 1000. Errors are block-bootstrap estimates.

References

  1. [1]K. G. Wilson, Confinement of Quarks, Phys. Rev. D 10, 2445 (1974).DOI
  2. [2]Y. Aoki et al. (Flavour Lattice Averaging Group (FLAG)), FLAG review 2024, Phys. Rev. D 113, 014508 (2026), arXiv:2411.04268 [hep-lat].arxiv.org/abs/2411.04268
  3. [3]M. Constantinou and K. Cichy, Parton distribution functions from lattice QCD, Preprint (2026), arXiv:2608.00251 [hep-lat].arxiv.org/abs/2608.00251
  4. [4]P. Hagler, Hadron structure from lattice quantum chromodynamics, Phys. Rept. 490, 49 (2010), arXiv:0912.5483 [hep-lat].DOI
  5. [5]C. Alexandrou, Hadron Structure and Form Factors, PoS LATTICE2010, 001 (2010), arXiv:1011.3660 [hep-lat].arxiv.org/abs/1011.3660
  6. [6]G. Endrődi and G. Markó, QCD phase diagram and equation of state in background electric fields, Phys. Rev. D 109, 034506 (2024), arXiv:2309.07058.arxiv.org/abs/2309.07058
  7. [7]S. Borsányi and P. Parotto, The QCD phase diagram, in Encyclopedia of Particle Physics (First Edition) (Elsevier, Oxford, 2026) first edition ed., pp. 385–421.
  8. [8]R. Alberti et al., The anomalous magnetic moment of the muon in the Standard Model: an update, Phys. Rept. 1143, 1 (2025), arXiv:2505.21476 [hep-ph].
  9. [9]U. Wolff, Critical slowing down, Nucl. Phys. B Proc. Suppl. 17, 93 (1990).
  10. [10]K. Cranmer, G. Kanwar, S. Racanier̀e, D. J. Rezende, and P. E. Shanahan, Advances in machine-learning-based sampling motivated by lattice quantum chromodynamics, Nature Rev. Phys. 5, 526 (2023), arXiv:2309.01156 [hep-lat].DOI
  11. [11]G. Kanwar, Flow-based sampling for lattice field theories, in 40th International Symposium on Lattice Field Theory (2024) arXiv:2401.01297 [hep-lat].arxiv.org/abs/2401.01297
  12. [12]U. Wenger, Machine learning for four-dimensional SU(3) lattice gauge theories, in 4th International Symposium on Lattice Field Theory (2026) arXiv:2604.12416 [hep-lat].arxiv.org/abs/2604.12416
  13. [13]E. G. Tabak and E. Vanden-Eijnden, Density estimation by dual ascent of the log-likelihood, Commun. Math. Sci. 8, 217 (2010).
  14. [14]E. G. Tabak and C. V. Turner, A family of nonparametric density estimation algorithms, Communications on Pure and Applied Mathematics 66, 145 (2013).DOI
  15. [15]D. J. Rezende and S. Mohamed, Variational inference with normalizing flows, in 32nd International Conference on Machine Learning (ICML 2015) (JMLR.org, Lille, France, 2015) pp. 1530–1538, arXiv:1505.05770 [stat.ML].arxiv.org/abs/1505.05770
  16. [16]G. Papamakarios, E. Nalisnick, D. J. Rezende, S. Mohamed, and B. Lakshminarayanan, Normalizing flows for probabilistic modeling and inference, J. Mach. Learn. Res. 22, 2617 (2021), arXiv:1912.02762 [stat.ML].arxiv.org/abs/1912.02762
  17. [17]M. Luscher, Trivializing maps, the Wilson flow and the HMC algorithm, Commun. Math. Phys. 293, 899 (2010), arXiv:0907.5491 [hep-lat].DOI
  18. [18]H. Wu, J. Köhler, and F. Noé, Stochastic normalizing flows, in Advances in Neural Information Processing Systems, Vol. 33 (Curran Associates, Inc., 2020) pp. 5935–5944, arXiv:2002.06707 [stat.ML].arxiv.org/abs/2002.06707
  19. [19]C. Jarzynski, Equilibrium free-energy differences from nonequilibrium measurements: A master-equation approach, Phys. Rev. E 56, 5018 (1997), arXiv:cond-mat/9707325.DOI
  20. [20]R. M. Neal, Annealed importance sampling, Statistics and Computing 11, 125 (1998), arXiv:physics/9803008 [21] M. Caselle, G. Costagliola, A. Nada, M. Panero, and A. Toniato, Jarzynski’s theorem for lattice gauge theory, Phys. Rev. D 94, 034503 (2016), arXiv:1604.05544 [hep-lat].
  21. [22]M. Caselle, E. Cellini, A. Nada, and M. Panero, Stochastic normalizing flows as non-equilibrium transformations, JHEP 2022 (07), 015, arXiv:2201.08862 [hep-lat].
  22. [23]J. Sohl-Dickstein, E. Weiss, N. Maheswaranathan, and S. Ganguli, Deep unsupervised learning using nonequilibrium thermodynamics, in 32nd International Conference on Machine Learning (ICML 2015), Proceedings of Machine Learning Research, Vol. 37 (PMLR, Lille, France, 2015) pp. 2256–2265, arXiv:1503.03585 [cs.LG].
  23. [24]Y. Song and S. Ermon, Generative modeling by estimating gradients of the data distribution, in Conference on Neural Information Processing Systems (NeurIPS 2019) (Vancouver, Canada, 2019) pp. 11895–11907, arXiv:1907.05600 [stat.ML].arxiv.org/abs/1907.05600
  24. [25]J. Ho, A. Jain, and P. Abbeel, Denoising diffusion probabilistic models, in Conference on Neural Information Processing Systems (NeurIPS 2020) (Virtual-only Conference, 2020) pp. 6840–6851, arXiv:2006.11239.arxiv.org/abs/2006.11239
  25. [26]Y. Song, J. Sohl-Dickstein, D. P. Kingma, A. Kumar, S. Ermon, and B. Poole, Score-Based Generative Modeling through Stochastic Differential Equations, in International Conference on Learning Representations (ICLR 2021) (Vienna, Austria, 2021) arXiv:2011.13456 [stat.ML].
  26. [27]S. Bacchio, P. Kessel, S. Schaefer, and L. Vaitl, Learning trivializing gradient flows for lattice gauge theories, Phys. Rev. D 107, L051504 (2023), arXiv:2212.08469 [hep-lat].
  27. [28]M. S. Albergo, G. Kanwar, and P. E. Shanahan, Flow-based generative models for Markov chain Monte Carlo in lattice field theory, Phys. Rev. D 100, 034515 (2019), arXiv:1904.10272 [hep-lat].
  28. [29]D. C. Hackett, C.-C. Hsieh, S. Pontula, M. S. Albergo, D. Boyda, J.-W. Chen, K.-F. Chen, K. Cranmer, G. Kanwar, and P. E. Shanahan, Flow-based sampling for multimodal and extended-mode distributions in lattice field theory, Preprint (2021), arXiv:2107.00734 [hep-lat].
  29. [30]P. de Haan, C. Rainone, M. C. N. Cheng, and R. Bondesan, Scaling Up Machine Learning For Quantum Field Theory with Equivariant Continuous Flows, Preprint (2021), arXiv:2110.02673 [cs.LG].
  30. [31]K. A. Nicoli, C. J. Anders, L. Funcke, T. Hartung, K. Jansen, P. Kessel, S. Nakajima, and P. Stornati, Estimation of Thermodynamic Observables in Lattice Field Theories with Deep Generative Models, Phys. Rev. Lett. 126, 032001 (2021), arXiv:2007.07115 [hep-lat].
  31. [32]A. Singha, D. Chakrabarti, and V. Arora, Conditional normalizing flow for Markov chain Monte Carlo sampling in the critical region of lattice field theory, Phys. Rev. D 107, 014512 (2023), arXiv:2207.00980 [hep-lat].
  32. [33]J. Komijani and M. K. Marinkovic, Generative models for scalar field theories: how to deal with poor scaling?, PoS LATTICE2022, 019 (2023), arXiv:2301.01504 [hep-lat].
  33. [34]M. Gerdes, P. de Haan, C. Rainone, R. Bondesan, and M. C. N. Cheng, Learning lattice quantum field theories with equivariant continuous flows, SciPost Phys. 15, 238 (2023), arXiv:2207.00283 [hep-lat].
  34. [35]D. Albandea, L. Del Debbio, P. Hernández, R. Kenway, J. Marsh Rossney, and A. Ramos, Learning trivializing flows, Eur. Phys. J. C 83, 676 (2023), arXiv:2302.08408 [hep-lat].arxiv.org/abs/2302.08408
  35. [36]D. Albandea, L. Del Debbio, P. Hernández, R. Kenway, J. M. Rossney, and A. Ramos, Learning Trivializing Flows in a ϕ⁴ theory from coarser lattices, PoS LATTICE2023, 013 (2024), arXiv:2310.03381 [hep-lat].
  36. [37]B. Máté and F. Fleuret, Multi-lattice sampling of quantum field theories via neural operator-based flows, Mach. Learn. Sci. Tech. 5, 045053 (2024), arXiv:2401.00828 [cs.LG].
  37. [38]V. Kanaujia, M. S. Scheurer, and V. Arora, AdvNF: Reducing mode collapse in conditional normalising flows using adversarial learning, SciPost Phys. 16, 132 (2024), arXiv:2401.15948.
  38. [39]V. Kanaujia and V. Arora, ScoreNF: Score-Based Normalizing Flows for Sampling Unnormalized Distributions, Preprint 10.1109/ICASSP55912.2026.11463153 (2025), arXiv:2510.21330 [cs.LG].
  39. [40]F. Ihssen, R. Kapusniak, and J. M. Pawlowski, Generative sampling with physics-informed kernels, Preprint (2025), arXiv:2510.26678 [hep-lat].arxiv.org/abs/2510.26678
  40. [41]A. Singha, J. Kauffmann, E. Cellini, K. Jansen, and S. Nakajima, Scalable Generative Sampling and Multi-level Estimation for Lattice Field Theories Near Criticality, Preprint (2026), arXiv:2604.10209 [hep-lat].
  41. [42]A. Hasenfratz, E. T. Neil, L. Parato, and N. Schwartz, Renormalization-guided inverse blocking for lattice field generation: construction and validation, Preprint (2026), arXiv:2608.28580 [hep-lat].
  42. [43]A. Hasenfratz, E. T. Neil, L. Parato, and N. Schwartz, Renormalization-guided cascade upscaling for lattice field generation, Preprint (2026), arXiv:2608.28581 [hep-lat].arxiv.org/abs/2608.28581
  43. [44]G. Kanwar, M. S. Albergo, D. Boyda, K. Cranmer, D. C. Hackett, S. Racanière, D. J. Rezende, and P. E. Shanahan, Equivariant flow-based sampling for lattice gauge theory, Phys. Rev. Lett. 125, 121601 (2020), arXiv:2003.06413 [hep-lat].DOI
  44. [45]D. Boyda, G. Kanwar, S. Racanière, D. J. Rezende, M. S. Albergo, K. Cranmer, D. C. Hackett, and P. E. Shanahan, Sampling using SU(N) gauge equivariant flows, Phys. Rev. D 103, 074504 (2021), arXiv:2008.05456 [hep-lat].DOI
  45. [46]A. Singha, D. Chakrabarti, and V. Arora, Sampling U(1) gauge theory using a retrainable conditional flow-based model, Phys. Rev. D 108, 074518 (2023), arXiv:2306.00581 [hep-lat].
  46. [47]M. S. Albergo, D. Boyda, K. Cranmer, D. C. Hackett, G. Kanwar, S. Racanière, D. J. Rezende, F. Romero-López, P. E. Shanahan, and J. M. Urban, Flow-based sampling in the lattice Schwinger model at criticality, Phys. Rev. D 106, 014514 (2022), arXiv:2202.11712 [hep-lat].DOI
  47. [48]R. Abbott et al., Sampling QCD field configurations with gauge-equivariant flow models, PoS LATTICE2022, 036 (2023), arXiv:2208.08332 [hep-lat].
  48. [49]R. Abbott et al., Aspects of scaling and scalability for flow-based sampling of lattice QCD, Eur. Phys. J. A 59, 257 (2023), arXiv:2211.07541 [hep-lat].
  49. [50]R. Abbott, A. Botey, D. Boyda, D. C. Hackett, G. Kanwar, S. Racanière, D. J. Rezende, F. Romero-López, P. E. Shanahan, and J. M. Urban, Applications of flow models to the generation of correlated lattice QCD ensembles, Phys. Rev. D 109, 094514 (2024), arXiv:2401.10874 [hep-lat].
  50. [51]M. S. Albergo and E. Vanden-Eijnden, NETS: A Non-Equilibrium Transport Sampler, Preprint (2024), arXiv:2410.02711 [cs.LG].arxiv.org/abs/2410.02711
  51. [52]A. Bulgarelli, E. Cellini, and A. Nada, Scaling of stochastic normalizing flows in SU(3) lattice gauge theory, Phys. Rev. D 111, 074517 (2025), arXiv:2412.00200 [hep-lat].DOI
  52. [53]C. Bonanno, A. Bulgarelli, E. Cellini, A. Nada, D. Panfalone, D. Vaddacchino, and L. Verzichelli, Scaling flow-based approaches for topology sampling in SU(3) gauge theory, JHEP 2026 (04), 051, arXiv:2510.25704 [hep-lat].DOI
  53. [54]C. Bonanno, A. Bulgarelli, E. Cellini, A. Nada, D. Panfalone, D. Vaddacchino, and L. Verzichelli, Ergodic topology sampling toward the continuum with Stochastic Normalizing Flows, Preprint (2026), arXiv:2610.20747 [hep-lat].arxiv.org/abs/2610.20747
  54. [55]L. Wang, G. Aarts, and K. Zhou, Diffusion models as stochastic quantization in lattice field theory, JHEP 2024 (05), 060, arXiv:2309.17082 [hep-lat].DOI
  55. [56]O. Vega, J. Komijani, A. El-Khadra, and M. Marinkovic, Group-equivariant diffusion models for lattice field theory, JHEP 2026 (07), 213, arXiv:2510.26081 [hep-lat].DOI
  56. [57]Y.-y. Tan, G. Aarts, D. E. Habibi, B. Lucini, and L. Wang, Diffusion Models for Sampling Near Criticality in Lattice Field Theories, Preprint (2026), arXiv:2607.08505 [hep-lat].arxiv.org/abs/2607.08505
  57. [58]L. Wang, Stochastic quantization as optimal control, Preprint (2026), arXiv:2607.21436 [hep-lat].arxiv.org/abs/2607.21436
  58. [59]A. Tomiya, Lattice Configuration Generation with a Self-Learning Diffusion Model, Preprint (2026), arXiv:2607.12587 [hep-lat].arxiv.org/abs/2607.12587
  59. [60]D. Grinwald, A. Singha, K. Kahouli, K. Jansen, and S. Nakajima, Data free training of diffusion models for lattice field theories, Preprint (2026), arXiv:2610.18863 [hep-lat].arxiv.org/abs/2610.18863
  60. [61]A. Lou, M. Xu, and S. Ermon, Scaling Riemannian Diffusion Models, Preprint (2023), arXiv:2310.20030 [cs.LG].arxiv.org/abs/2310.20030
  61. [62]Q. Zhu, G. Aarts, W. Wang, K. Zhou, and L. Wang, Diffusion models for lattice gauge field simulations, in Postponed: Machine Learning and the Physical Sciences: Workshop at NeurIPS 2024 (2024) arXiv:2410.19602 [hep-lat].arxiv.org/abs/2410.19602
  62. [63]Q. Zhu, G. Aarts, W. Wang, K. Zhou, and L. Wang, Physics-conditioned diffusion models for lattice gauge theory, JHEP 2026 (03), 111, arXiv:2502.05504 [hep-lat].arxiv.org/abs/2502.05504
  63. [64]G. Aarts, D. E. Habibi, A. Ipp, D. I. Müller, T. R. Ranner, L. Wang, W. Wang, and Q. Zhu, Generalizable Equivariant Diffusion Models for Non-Abelian Lattice Gauge Theory, Preprint (2026), arXiv:2601.19552 [hep-lat].arxiv.org/abs/2601.19552
  64. [65]J. Komijani, M. K. Marinkovic, and L. Turgut, Diffusion model for SU(N) gauge theories, Preprint (2026), arXiv:2605.06134 [hep-lat].arxiv.org/abs/2605.06134
  65. [66]J. Komijani, Sampling SU(N) gauge theory on a 2D lattice from independent plaquettes via holonomies and corner reweighting, Preprint (2026), arXiv:2610.09147 [hep-lat].arxiv.org/abs/2610.09147
  66. [67]O. Vega and A. El-Khadra, X. Sampling the Schwinger Model with Gauge-Equivariant Diffusion, in Submitted to PAI 2026 (2026) arXiv:2606.27481 [hep-lat].DOI
  67. [68]A. Tomiya, Continuous Hasenbusch transport towards gauge diffusion with fermions, Preprint (2026), arXiv:2609.15959 [hep-lat].arxiv.org/abs/2609.15959
  68. [69]S. Kullback and R. A. Leibler, On Information and Sufficiency, The Annals of Mathematical Statistics 22, 79 (1951).DOI
  69. [70]K. A. Nicoli, C. J. Anders, L. Funcke, T. Hartung, K. Jansen, P. Kessel, S. Nakajima, and P. Stornati, Machine Learning of Thermodynamic Observables in the Presence of Mode Collapse, PoS LATTICE2021, 338 (2022), arXiv:2111.11303 [hep-lat].DOI
  70. [71]K. A. Nicoli, C. J. Anders, T. Hartung, K. Jansen, P. Kessel, and S. Nakajima, Detecting and mitigating mode-collapse for generative sampling of lattice field theories, Phys. Rev. D 108, 114501 (2023), arXiv:2302.14082 [hep-lat].arxiv.org/abs/2302.14082
  71. [72]K. A. Nicoli, S. Nakajima, N. Strodthoff, W. Samek, K.-R. Müller, and P. Kessel, Asymptotically unbiased estimation of physical observables with neural samplers, Phys. Rev. E 101, 023304 (2020), arXiv:1910.13496 [cond-mat].DOI
  72. [73]F. Vargas, S. Padhy, D. Blessing, and N. Nüsken, Transport meets variational inference: Controlled monte carlo diffusions, in The Twelfth International Conference on Learning Representations (2024) arXiv:2307.01050.arxiv.org/abs/2307.01050
  73. [74]A. Nichol, P. Dhariwal, A. Ramesh, P. Shyam, P. Mishkin, B. McGrew, I. Sutskever, and M. Chen, GLIDE: Towards photorealistic image generation and editing with text-guided diffusion models, in Proceedings of the 38th International Conference on Machine Learning (ICML 2021) (PMLR, 2021) pp. 16784–16799, arXiv:2112.10741 [cs.CV].arxiv.org/abs/2112.10741
  74. [75]C. Saharia, W. Chan, S. Saxena, L. Li, J. Wang, E. Denton, S. K. Ghasemipour, B. K. Ayan, S. S. Mahdavi, R. Gontijo-Lopes, T. Salimans, J. Ho, D. J. Fleet, and M. Norouzi, Photorealistic text-to-image diffusion models with deep language understanding, in Proceedings of the 36th International Conference on Neural Information Processing Systems (NeurIPS 2022), NIPS ’22 (Curran Associates, Inc., Red Hook, NY, USA, 2022) pp. 2643–2658, arXiv:2205.11487 [cs.CV].arxiv.org/abs/2205.11487
  75. [76]R. Rombach, A. Blattmann, D. Lorenz, P. Esser, and B. Ommer, High-resolution image synthesis with latent diffusion models, in 2022 IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR) (IEEE, New Orleans, U.S.A., 2022) pp. 10674–10685, arXiv:2112.10752 [cs.CV].arxiv.org/abs/2112.10752
  76. [77]A. Ramesh, P. Dhariwal, A. Nichol, C. Chu, and M. Chen, Hierarchical Text-Conditional Image Generation with CLIP Latents, Preprint (2022), arXiv:2204.06125 [cs.CV].arxiv.org/abs/2204.06125
  77. [78]F. Zhang, L. I. Midgley, and J. M. Hernández-Lobato, Efficient and unbiased sampling from boltzmann distributions via variance-tuned diffusion models, Preprint (2025), arXiv:2505.21005 [cs.LG].arxiv.org/abs/2505.21005
  78. [79]S. Chen, M. Qian, G. Aarts, B. Lucini, and K. Zhou, Stochastic Path Sampler For Lattice Field Theory, Preprint (2026), arXiv:2606.13790 [hep-lat].arxiv.org/abs/2606.13790
  79. [80]A. Phillips, H.-D. Dau, M. J. Hutchinson, V. D. Bortoli, G. Deligiannidis, and A. Doucet, Particle denoising diffusion sampler, Preprint (2024), arXiv:2402.06320 [stat.ML].
  80. [81]P. Del Moral, A. Doucet, and A. Jasra, Sequential monte carlo samplers, Journal of the Royal Statistical Society Series B: Statistical Methodology 68, 411 (2006).
  81. [82]Z. Ou, C. Pani, and Y. Li, Inference-time scaling of discrete diffusion models via importance weighting and optimal proposal design, Preprint (2026), arXiv:2505.22524 [cs.LG].arxiv.org/abs/2505.22524
  82. [83]L. Wu, Y. Han, C. Andersson Naesseth, and J. Cunningham, Reverse diffusion sequential monte carlo samplers, Advances in Neural Information Processing Systems 38, 69445 (2026).arxiv.org/abs/2508.05926
  83. [84]B. Maté, F. Fleuret, and T. Bereau, Neural thermodynamic integration: Free energies from energy-based diffusion models, The Journal of Physical Chemistry Letters 15, 11395 (2024), arXiv:2406.020313 [cond-mat].
  84. [85]B. Máté, F. Fleuret, and T. Bereau, Solvation free energies from neural thermodynamic integration, The Journal of Chemical Physics 162, 124107 (2025), arXiv:2410.15815 [cond-mat].DOI
  85. [86]S. Lee and C. Jarzynski, Estimating free energy differences with virtually escorted trajectories, Preprint (2026), arXiv:2606.30451 [cond-mat].arxiv.org/abs/2606.30451
  86. [87]D. Sexty, Accurate Sampling from Diffusion Models, Preprint (2026), arXiv:2609.29902 [hep-lat].arxiv.org/abs/2609.29902
  87. [88]M. F. Hutchinson, A stochastic estimator of the trace of the influence matrix for laplacian smoothing splines, Commun. Statist. Simulat. Comput. 18, 1059 (1989).
  88. [89]J. Skilling, The eigenvalues of mega-dimensional matrices, in Maximum Entropy and Bayesian Methods, Fundamental Theories of Physics, Vol. 36 (Springer Netherlands, Dordrecht, 1989) pp. 455–466.DOI
  89. [90]X. Peng and A. Gao, Flow perturbation to accelerate boltzmann sampling, Nature Communications 16, 6604 (2025).DOI
  90. [91]X. Peng and A. Gao, Flow perturbation++: Multi-step unbiased jacobian estimation for high-dimensional boltzmann sampling, Preprint (2026), arXiv:2601.21177 [cs.LG].arxiv.org/abs/2601.21177
  91. [92]R. H. Swendsen and J.-S. Wang, Replica monte carlo simulation of spin-glasses, Phys. Rev. Lett. 57, 2607 (1986).pubmed.ncbi.nlm.nih.gov/10033814
  92. [93]D. J. Earl and M. W. Deem, Parallel tempering: Theory, applications, and new perspectives, Physical Chemistry Chemical Physics 7, 3910 (2005), arXiv:physics/0508111.DOI
  93. [94]M. Invernizzi, A. Krämer, C. Clementi, and F. Noé, Skipping the replica exchange ladder with normalizing flows, The Journal of Physical Chemistry Letters 13, 11643 (2022), arXiv:2210.14104.DOI
  94. [95]R. Abbott, D. Boyda, D. C. Hackett, G. Kanwar, F. Romero-López, P. E. Shanahan, J. M. Urban, and M. S. Albergo, Practical applications of machine-learned flows on gauge fields, PoS LATTICE2023, 011 (2024), arXiv:2404.11674 [hep-lat].arxiv.org/abs/2404.11674
  95. [96]S. Syed, A. Bouchard-Côté, K. Chern, and A. Doucet, Optimized annealed sequential monte carlo samplers, Journal of the Royal Statistical Society Series B: Statistical Methodology , qkag082 (2026), arXiv:2408.12057 [stat.CO].arxiv.org/abs/2408.12057
  96. [97]L. Zhang, P. Potaptchik, J. He, Y. Du, A. Doucet, F. Vargas, H.-D. Dau, and S. Syed, Accelerated parallel tempering via neural transports, in International Conference on Learning Representations, Vol. 2026 (2026) pp. 90874–90907.arxiv.org/abs/2502.10328
  97. [98]T. Okabe, M. Kawata, Y. Okamoto, and M. Mikami, Replica-exchange monte carlo method for the isobaric-isothermal ensemble, Chemical physics letters 335, 435 (2001).DOI
  98. [99]H. G. Katzgraber, S. Trebst, D. A. Huse, and M. Troyer, Feedback-optimized parallel tempering monte carlo, Journal of Statistical Mechanics: Theory and Experiment 2006, P03018–P03018 (2006).
  99. [100]M. Lingenheil, R. Denschlag, G. Mathias, and P. Tavan, Efficiency of exchange schemes in replica exchange, Chemical Physics Letters 478, 80 (2009).DOI
  100. [101]S. Syed, A. Bouchard-Côté, G. Deligiannidis, and A. Doucet, Non-reversible parallel tempering: A scalable highly parallel mcmc scheme, Journal of the Royal Statistical Society Series B: Statistical Methodology 84, 321–350 (2021).DOI
  101. [102]G. E. Crooks, Measuring thermodynamic length, Phys. Rev. Lett. 99, 100602 (2007), arXiv:0706.0559.DOI
  102. [103]E. H. Feng and G. E. Crooks, Far-from-equilibrium measurements of thermodynamic length, Phys. Rev. E 79, 012104 (2009), arXiv:0807.0621.DOI
  103. [104]Y. W. Teh, M. Welling, S. Osindero, and G. E. Hinton, Energy-based models for sparse overcomplete representations, J. Mach. Learn. Res. 4, 1235–1260 (2003).
  104. [105]Y. Du and I. Mordatch, Implicit generation and generalization in energy-based models, Preprint (2020), arXiv:1903.08689 [cs.LG].arxiv.org/abs/1903.08689
  105. [106]T. Salimans and J. Ho, Should EBMs model the energy or the score?, in Energy Based Models Workshop - ICLR 2021 (2021).
  106. [107]T. Karras, M. Aittala, S. Laine, and T. Aila, Elucidating the design space of diffusion-based generative models, in Conference on Neural Information Processing Systems (NeurIPS 2022) (New Orleans, U.S.A., 2022) pp. 26565–26577, arXiv:2206.00364.arxiv.org/abs/2206.00364
  107. [108]S. Elfwing, E. Uchibe, and K. Doya, Sigmoid-weighted linear units for neural network function approximation in reinforcement learning, Neural Networks 107, 3 (2018), special issue on deep reinforcement learning, arXiv:1702.03118.arxiv.org/abs/1702.03118
  108. [109]O. Ronneberger, P. Fischer, and T. Brox, U-Net: Convolutional networks for biomedical image segmentation, Lect. Notes Comput. Sci. 9351, 234 (2015), arXiv:1505.04597 [cs.CV].arxiv.org/abs/1505.04597
  109. [110]V. D. Bortoli, M. Hutchinson, P. Wirnsberger, and A. Doucet, Target score matching, Preprint (2024), arXiv:2402.08667 [cs.LG].arxiv.org/abs/2402.08667
  110. [111]S. Duane, A. D. Kennedy, B. J. Pendleton, and D. Roweth, Hybrid Monte Carlo, Phys. Lett. B 195, 216 (1987).DOI
  111. [112]S. Gupta, Hybrid Monte Carlo simulations of a two-dimensional gauge theory, Phys. Lett. B 278, 317 (1992).
  112. [113]A. D. Kennedy and K. M. Bitar, An Exact local hybrid Monte Carlo algorithm for gauge theories, Nucl. Phys. B Proc. Suppl. 34, 786 (1994), arXiv:hep-lat/9311017.DOI
  113. [114]D. P. Kingma and J. Ba, Adam: A method for stochastic optimization, in International Conference on Learning Representations (ICLR 2015) (San Diego, U.S.A., 2015) arXiv:1412.6980.arxiv.org/abs/1412.6980
  114. [115]E. P. Hsu, Stochastic analysis on manifolds, 38 (American Mathematical Soc., 2002).DOI
  115. [116]Z. Shi, L. Yu, T. Xie, and C. Zhang, Diffusion-pinn sampler, Preprint (2024), arXiv:2410.15336 [stat.ML].arxiv.org/abs/2410.15336
  116. [117]Edinburgh compute and data facility, http://www.ecdf.ed.ac.uk/ (2026).
  117. [118]A. Paszke, S. Gross, F. Massa, A. Ler er, J. Bradbury, G. Chanan, T. Killeen, Z. Lin, N. Gimelshein, L. Antiga, A. Desmaison, A. K ̈opf, E. Yang, Z. DeVito, M. Raison, A. Tejani, S. Chilamkurthy, B. Steiner, L. Fang, J. Bai, and S. Chintala, Pytorch: an imperative style, high-performance deep learning library, in Proceedings of the 33rd International Conference on Neural Information Processing Systems (Curran Associates Inc., Red Hook, NY, USA, 2019) pp. 8024–8035.arxiv.org/abs/1912.01703
  118. [119]C. R. Harris et al., Array programming with NumPy, Nature 585, 357 (2020), arXiv:2006.10256 [cs.MS].DOI
  119. [120]P. Virtanen et al., SciPy 1.0–Fundamental Algorithms for Scientific Computing in Python, Nature Meth. 17, 261 (2020), arXiv:1907.10121 [cs.MS].DOI
  120. [121]K. Greff, A. Klein, M. Chovanec, F. Hutter, and J. Schmidhuber, The sacred infrastructure for computational research, SciPy 2017 10.25080/shinma-7f4c6e7-008 (2017).
  121. [122]J. D. Hunter, Matplotlib: A 2D Graphics Environment, Comput. Sci. Eng. 9, 90 (2007).DOI
  122. [123]R. H. Swendsen and J.-S. Wang, Nonuniversal critical dynamics in Monte Carlo simulations, Phys. Rev. Lett. 58, 86 (1987).pubmed.ncbi.nlm.nih.gov/10034599
  123. [124]U. Wolff, Collective Monte Carlo Updating for Spin Systems, Phys. Rev. Lett. 62, 361 (1989).pubmed.ncbi.nlm.nih.gov/10040213

Paper details

vlnc:W_dwbuzse7
Version
v1 · latest
Published
Fresh — added to the Hub within the last 30 days
Added
License
CC BY 4.0
Usage

views · 0

downloads · 0

A view counts once per browser per day, a download each time the PDF is requested.

  • Physics and Astronomy

Not recorded for this paper

View statement
Looking for related papers…
Contents