Reducing Autocorrelation Times in Lattice Simulations with Generative Adversarial Networks

Short autocorrelation times are essential for a reliable error assessment in Monte Carlo simulations of lattice systems. In many interesting scenarios, the decay of autocorrelations in the Markov chain is prohibitively slow. Generative samplers can provide statistically independent field configurations, thereby potentially ameliorating these issues. In this work, the applicability of neural samplers to this problem is investigated. Specifically, we work with a generative adversarial network (GAN). We propose to address difficulties regarding its statistical exactness through the implementation of an overrelaxation step, by searching the latent space of the trained generator network. This procedure can be incorporated into a standard Monte Carlo algorithm, which then permits a sensible assessment of ergodicity and balance based on consistency checks. Numerical results for real, scalar $\phi^4$-theory in two dimensions are presented. We achieve a significant reduction of autocorrelations while accurately reproducing the correct statistics. We discuss possible improvements to the approach as well as potential solutions to persisting issues.


I. INTRODUCTION
Minimizing the statistical error is essential for applications of lattice simulations. A reliable assessment of this error requires sufficiently short autocorrelation times in the Markov chain. This becomes a problem in models affected by critical slowing down, which is a severe hindrance for the extrapolation of lattice calculations to the continuum. This issue has inspired a decades-long search for ever more efficient sampling techniques. Simulations of this kind have been and continue to be vital for our understanding of fundamental interactions from first principles.
More recently, promising new approaches based on generative machine learning methods are being explored. An interesting candidate for this purpose is the generative adversarial network (GAN) [1], which has lately received much attention in the machine learning community. Its potential for lattice simulations has been demonstrated for the two-dimensional Ising model [2] and complex scalar φ 4 -theory at non-zero chemical potential [3]. By construction, the samples are generated independently. Hence, in principle, there are no autocorrelations if they are sequentially arranged in a Markov chain. This makes GANs highly attractive in the quest for more efficient simulation algorithms. Other approaches studied in this context are the restricted Boltzmann machine [4,5], flow-based generative models [6,7], autoregressive networks [9][10][11] and the self-learning Monte Carlo method [12][13][14][15][16]. Machine learning methods in general are also increasingly used for a variety of other tasks in high energy physics and condensed matter theory , see also [41] for an introduction and [42] for a recent review.
However, simply replacing a Monte Carlo algorithm with a GAN is problematic from a conceptual point of view. The learned distribution typically shows nonnegligible deviations from the desired target. This casts some doubt on the reliability of such an approach. More-over, even if the approximation by the network exhibits high precision, one cannot simply assume that sampling from it is sufficiently ergodic. Implementing these key properties in a conclusive manner is essential for accurate and reliable lattice computations.
In this paper, we propose the implementation of an overrelaxation step using a GAN, in combination with a traditional hybrid Monte Carlo (HMC) algorithm. This approach effectively breaks the Markov chain for observables unrelated to the action, thereby leading to a reduction in the associated autocorrelation times. We put forward self-consistency checks and numerical arguments to assess whether the sampling is both sufficiently ergodic and statistically exact, and thus correctly captures the dynamics of the theory. Conditions for asymptotic exactness as well as potential efficiency gains are discussed extensively.
The approach is demonstrated in the context of real, scalar φ 4 -theory in two dimensions. First, we show that a simple 'vanilla' GAN can reproduce observables in the disordered phase of the theory with high accuracy from a comparatively small number of training samples. We then demonstrate that by introducing the GAN overrelaxation step, a significant reduction of the autocorrelation time of the magnetization can be achieved (Figure 8). We argue that such an approach could greatly improve the computational efficiency of traditional sampling techniques and our results motivate further research into the matter.
The paper is organized as follows. In Section II we briefly review φ 4 -theory on the lattice. Section III recalls relevant aspects of the Metropolis-Hastings algorithm as well as the overrelaxation method. Section IV serves to introduce GANs and illustrate their potential for improved sampling algorithms. Our approach is developed in Section V. Numerical results are presented in Section VI. We summarize our findings and sketch strategies for future research in Section VII.

II. SCALAR φ 4 -THEORY ON THE LATTICE
We work with real, scalar φ 4 -theory discretized on a two-dimensional Euclidean square lattice with periodic boundary conditions. We consider only isotropic, symmetric lattices spanning N sites in each dimension. The associated action in its dimensionless form is given by Here, Λ denotes the set of all lattice sites andμ the unit vector in µ-direction. κ is commonly called the Hopping parameter and λ parametrizes the coupling strength of the quartic interaction. The theory belongs to the Ising universality class. As such, in d = 2 it exhibits a phase transition associated with spontaneous breaking of the Z 2 symmetry. The order parameter is the magnetization, defined as the expectation value of the field, where V = |Λ| = N d denotes the dimensionless volume, i.e. the number of lattice sites. M assumes a non-zero value in the broken phase. In the thermodynamic limit, this phase transition is characterized by a divergence in the connected two-point susceptibility, On a finite-size lattice, one instead observes a peak, which then narrows as the volume is increased. We also consider the Binder cumulant which quantifies the curtosis of the fluctuations.

III. METROPOLIS-HASTINGS, OVERRELAXATION AND CRITICAL SLOWING DOWN
The 'gold standard' of Monte Carlo sampling methods in statistical physics is the Metropolis-Hastings algorithm [43]. It explores the configuration space through aperiodic updates ensuring ergodicity, combined with an accept/reject rule to asymptotically ensure statistical exactness in the limit of large numbers of samples. Suppose we wish to sample field configurations from the Boltzmann weight P (φ) ∝ exp(−S[φ]). A candidate φ is generated from the current configuration φ with some a priori selection probability T 0 (φ |φ). It is then accepted or rejected according to the acceptance probability One usually considers a symmetric selection probability T 0 (φ|φ ) = T 0 (φ |φ), the special case commonly being referred to as just the Metropolis algorithm. Equation (5) then simplifies to where . For a real, scalar field, this is ensured by proposing updates φ (x) distributed sym- Local updating methods based on the Metropolis-Hastings algorithm usually exhibit long autocorrelation times. Significant improvements can be achieved with the HMC method. It is based on a molecular dynamics evolution using classical Hamiltonian equations of motion, combined with an accept/reject step. This allows larger steps with reasonable acceptance rates.
A technique used to speed up the motion through configuration space is overrelaxation. It was originally designed for simulations of SU (2) and SU (3) Yang-Mills theory by exploiting symmetries of the action [44]. It is based on the fact that a candidate configuration is automatically accepted in the Metropolis step if ∆S = 0, under the condition that T 0 is symmetric. This can be achieved by performing rotations in group space that leave S unchanged. By itself, overrelaxation is therefore not ergodic, since it moves on the subspace of constant action. Ergodicity is achieved by combining it with a standard Monte Carlo algorithm.
However, neither the HMC algorithm nor the overrelaxation method solve critical slowing down. Simply put, the problem occurs whenever the correlation length ξ of a system diverges. Define the autocorrelation function of an observable X as where i is the position and t denotes the discrete time of the Markov chain, i.e. the number of steps. Typically, C X (t) decays exponentially, Here, τ exp denotes the exponential autocorrelation time, which one expects to scale as a power of the correlation length, τ exp ∼ ξ z . The dynamical critical exponent z ≥ 0 depends on the type of algorithm used. Close to a critical point, the correlation length diverges. This hampers the investigation of critical phenomena as well as extrapolations to the continuum limit. The output layer of the discriminator features a single, binary neuron whose state determines the prediction as real or fake.

IV. GENERATIVE ADVERSARIAL NETWORKS
The GAN belongs to a class of unsupervised, generative machine learning methods based on deep neural networks. The characteristic feature that distinguishes it from many other architectures is the utilization of game theory principles for its training. It consists of two consecutive feedforward neural networks (see Figure 1 for a schematic), the generator G and discriminator D. They are non-linear, differentiable functions whose learnable parameters are commonly called weights. The d zdimensional input vector z of the generator is drawn from a multi-variate prior distribution P (z). The discriminator receives the generator outputs G(z) as well as samples φ from the training dataset. D is a classification network with binary output that is trained to distinguish between 'real' and 'fake' samples. Its last layer consists of a single neuron with a sigmoid activation, which allows to define a loss function in terms of the binary cross-entropy.
Choosing the labels for real and fake samples arbitrarily (but consistently) as 0 or 1, the loss per prediction with label y is defined as Training corresponds to minimizing the loss separately for D and G using opposite labels, respectively. This is achieved by evolving their weights according to a gradient flow equation in an alternating fashion. The gradient of the loss with respect to the weights is calculated using automatic differentiation, and then backpropagated through both networks by the chain rule. In intuitive terms, the optimization objective for the discriminator is to maximize its accuracy for the correct classification of φ and G(z) as real or fake. Simultaneously, the generator is trained to produce samples that cause false positive predictions of the discriminator, thereby approximating the true target distribution P (φ). The two networks play a zero-sum non-cooperative game, and the model is said to converge when they reach so-called Nash equilibrium. This entails the fundamental difference and possible advantage of this method compared to traditional Monte Carlo sampling. Since P (z) is commonly chosen to be a simple multi-variate uniform or Gaussian distribution, candidate configurations drawn from a properly equilibrated generator are by construction statistically independent. This is because the z are sampled i.i.d. and the resulting field configurations are not calculated as consecutive elements of a traditional Markov chain.
In practice however, one encounters deviations of varying severity from the true target distribution. Also, GANs may not be sufficiently ergodic in order to perform reliable calculations. This becomes apparent when one considers the extreme case of so-called mode collapse, where the generator learns to produce only one or a very small number of samples largely independent of its prior distribution. Insufficient variation among the GAN output is not punished by the discriminator and can only be checked a posteriori. A number of improved approaches to deal with such issues have since been proposed in the literature [45]. Still, one may question whether GANs can be sufficiently random for the level of rigor required in certain statistical sampling problems. Interestingly, it was shown that they can act as reliable pseudo-random number generators, outperforming several standard, noncryptographic algorithms [46].

V. ALGORITHMIC FRAMEWORK
Using GANs to accelerate lattice computations in a reliable manner requires implementing a statistical selection procedure as well as defining sensible criteria to assess the validity of such an approach. Naively, one could just try to equip the GAN with a Metropolis accept/reject step, thereby simply hoping that it is sufficiently ergodic. However, even with all statistical concerns aside, this is not feasible in practice, for the simple reason that candidate configurations are accepted either automatically if ∆S ≤ 0 or with probability exp(−∆S) if ∆S > 0. Accordingly, such an algorithm only works if changes in the action are not too large. Common Monte Carlo algorithms can usually be tuned to avoid this problem and achieve reasonable acceptance rates. For the GAN, large positive and negative values for ∆S would be common, since subsequent samples are uncorrelated. Hence, the algorithm effectively freezes at the lower end of the available action distribution after a short time. Jumping to larger values of S is in principle possible, but exponentially suppressed, leading to a vanishing acceptance rate. This thought experiment emphasizes the need for an asymptotically unbiased statistical selection procedure and convincing numerical tests thereof.

A. Overrelaxation with GANs
In order to avoid the aforementioned issues, we propose to implement the GAN as an overrelaxation step, which can then be integrated into any action-based importance sampling algorithm. In this manner, autocorrelations can be reduced substantially while still asymptotically approaching the correct distribution of the theory. Our method of selecting suitable candidate configurations is based on [47], where GANs are proposed as an ansatz to the more general task of solving inverse problems.
Our approach is implemented with the following procedure (see Figure 3 for a sketch): • Take a number of HMC steps n H to obtain a configuration φ. In this work, only accepted samples are counted by n H to facilitate a consistent number of HMC trajectories between GAN overrelaxation steps in the Markov chain.
• Pre-sampling: Sample from the GAN until a config- and S[G(z)] are close, which accelerates the gradient flow step, but also such that a suitable G(z) can be generated in a reasonable amount of time.
• Gradient flow: Perform a gradient descent evolution of the associated latent variable z using ∆S 2 as loss function, i.e.
by employing a standard discretized gradient flow equation, As mentioned in the last section, gradient flow is also commonly applied to learn the optimal weights of a network. In this context, the finite step size is called learning rate, and gradients are usually obtained by automatic differentiation. For this work, we use the Adam algorithm [48], a particular variant of stochastic gradient descent.
In this manner, S[φ] and S[G(z )] can be matched arbitrarily well, down to the available floating point precision. The action values can then be considered effectively equal for all intents and purposes. In principle, this evolution can be performed for any randomly drawn z without the need for repeated sampling until a configuration with |∆S| < ∆S thresh is found. The additional pre-sampling step simply ensures that the distance in the latent space between the initial value for z and the target z is already small a priori, which speeds up the evolution and avoids the risk of getting stuck in a local minimum of the loss landscape. The specific choice of ∆S thresh , as well as the sampling batch size should be determined through a hyperparameter optimization in order to maximize the efficiency.

B. Statistical Properties and Consistency Checks
After the evolution is complete, G(z ) is proposed as the new candidate configuration φ . Under rather mild assumptions, we expect the GAN's selection probability T 0 (φ |φ) to be symmetric, as required for the simplification of Equation (5) to (6). We now provide a heuristic argument for this statement, but also emphasize that this essential property should always be verified by additional numerical tests, which we detail below.
Since every field configuration φ corresponds to a point z(φ) in the latent space 1 , the selection probability is a priori just that of the latent variables, T 0 (z(φ )|z(φ)). However, z(φ ) does not explicitly depend on z(φ), and the latter is also not accessible in general. Instead, it only depends on the value of S[φ], i.e. z(φ ) follows the conditional distribution P (z|S[G(z)] = S[φ]). Hence, to fulfill the symmetry requirement, we only need to verify that the distribution of latent variables at a fixed value of the action is also Gaussian like the full prior P (z). Random variables drawn from such a multi-variate normal distribution can of course be sampled i.i.d. from uniformly distributed pseudo-random numbers using the Box-Muller transform. In this case, the associated selection probability is in fact independent and exactly 1, T 0 (z |z) ≡ T 0 (z ) = 1. It is precisely at this point that the Markov chain is broken and autocorrelations are eliminated for observables unrelated to S.
The important observation here is that, in principle, any z can be chosen as the starting point for the gradient 1 The existence of points in the latent space for every possible field configuration is used here as a formal argument, although it may not always be possible to actually identify the z corresponding to a specific φ. However, this is neither necessary nor desired and does not pose a problem in practice. Much like in a standard Monte Carlo simulation, for a successive update of φ it is effectively impossible that it happens to revert to its previous value φ, since all variables and randomized update proposals are real numbers with floating point precision.
evolution according to Equation (11). However, as mentioned above, the argument rests on the assumption that ensembles of latent variables constrained to the hypersurfaces of the respective constant actions are also normally distributed in the latent space. In intuitive terms, we need to check that the gradient flow evolution that pushes z onto the hypersurface does not significantly change its distribution P (z). This can be investigated numerically by estimating average distances between the initial values of z and z and comparing raw moments of their distributions. The changes φ (x) − φ(x) for individual field variables should then be symmetric on average, which can also be checked straightforwardly. Since the action remains unchanged by the whole procedure, the total acceptance probability is therefore also exactly 1, and the sample is accepted automatically. Hence, under these conditions, we conclude that the proposed method exhibits the same statistical properties as traditional overrelaxation.
We now discuss the question of ergodicity. To this end, we first note the following: for a real scalar field φ on a ddimensional lattice, the available configuration space is in principle R N d . If we use a multi-variate Gaussian as the prior distribution P (z), then correspondingly the available latent space is R dz . If d z < N d , this latent space has measure zero in the target space and the question arises whether sampling from such an object can even be ergodic. However, simply choosing a large enough d z is by no means an easy solution guaranteeing ergodicity, especially when issues like mode collapse are considered. Then again, no algorithm is ergodic in a strict sense due to the eventual periodicity of the underlying pseudorandom number generators, regardless of how extremely long their periods may be. It is clear that in order to conduct reliable calculations, the question one needs to consider is not whether an algorithm is truly ergodic, but sufficiently ergodic. While mathematically it is certainly possible to construct bijective mappings between R dz and R N d for any d z , N d ∈ N, these mappings are not necessarily structure-preserving in any sense. Considering finite numerical precision, the number of different latent variables that can possibly be stored in memory, using a specified number of bits, is in fact smaller than the number of possible field configurations if d z < N d . While this may seem problematic from a conceptual point of view, in practice it is irrelevant, since both numbers are astronomically large compared to the actual number of samples commonly needed to accurately determine expectation values of observables. However, this further highlights the importance of consistency checks to ensure that the theory is correctly captured by the network and the number of d.o.f. in the latent space is sufficient.
Based on the discussion above, one can expect that GANs with very small d z fail to approximate the target distribution. Above a certain threshold value one should then observe a plateau where the performance stabilizes and becomes independent of d z . This indicates that the size of the latent space has become sufficient for the GAN to capture the theory's dynamics to a satisfying degree. It is therefore sensible to train and compare several GANs with different input dimensions. One should check the network's ability to reach the whole range of potential action states from its prior distribution. To this end, it has to be verified that it is possible to generate matching samples φ for every field configuration φ provided by a Monte Carlo method such that ∆S = 0. This proof-ofwork is a necessary criterion as well as a strong indicator that the algorithm can be sufficiently ergodic, since it shows that all potential values of the action are in principle accessible through the GAN's latent space. A first test can simply be performed on a dataset of independent configurations that have not been used for training. If the GAN has experienced mode collapse or has not captured the dynamics of the theory well enough, the overrelaxation step will not work for the majority of samples. Since in our algorithm the space of action values is traced out by the ergodic HMC updates, successfully running the simulation with this method is by itself a strong argument for sufficient ergodicity.
This concludes the discussion of the proposed algorithmic framework. The key improvement brought on by our method is that it can effectively break the Markov chain for observables unrelated to the action, while preserving essential statistical properties. This leads to a maximal decorrelation with each GAN overrelaxation step. By introducing our statistical selection procedure, it is also not necessary for the network to approximate the target distribution to an exceedingly high precision. Another important advantage is the applicability to a much wider variety of models as compared to conventional overrelaxation, since our algorithm does not depend on specific symmetries of the action. In fact, for scalar φ 4theory, which exhibits only Z 2 reflection symmetry, no such method currently exists.

A. Training Details
To put our algorithm to the test, we first trained a GAN on field configurations from scalar φ 4 -theory on a 32 × 32 lattice as defined in Section II, using 1000 samples generated in the symmetric phase at κ = 0.21 and λ = 0.022. In order to provide an estimate of the position in the phase diagram corresponding to this specific choice of couplings, we note that the transition occurs at roughly κ ≈ 0.27 (with fixed λ = 0.022) [49]. We employed one hidden layer of size 512 for both the generator and the discriminator (see Figure 2 for a schematic). The generator's last layer has no activation function, thereby allowing values G(z) ∈ R N d . The discriminator's output neuron features a sigmoid activation, allowing to train for binary classification using the cross-entropy loss (Equation (9)). For all other layers we used the ReLU activation. The time required for the training was generally negligible, being of the order of at most a few minutes until equilibration, in contrast to several days of continuous sampling on the same hardware to compute the autocorrelation times discussed below.
The distributions of M and S computed with configurations sampled independently from the GAN are compared to the HMC baseline in Figure 4. They already match well for M , and several observables of the theory are reproduced by the GAN to a higher precision than could be inferred from just the training data. Table I illustrates this for the magnetization M , the two-point susceptibility χ 2 and the Binder cumulant U L . However, the distribution of S is considerably broader, indicating that the GAN has not managed to fully capture the dynamics. This difference is ironed out by our statistical selection procedure, as we will discuss next.

B. Statistical Tests
Following our arguments of Section V, we initially verified the GAN's ability to reproduce every desired action value from field configurations which were not part of the training dataset. Here, we used ∆S thresh = 1 for the pre-sampling step and a learning rate of = 10 −5 for the gradient flow. In the subsequent simulation runs, the GAN was always able to produce samples with matching actions, suggesting that the algorithm can indeed be sufficiently ergodic. In order to verify that the change of P (z) under the gradient flow Equation (11) is negligible, we estimated the squared distance (z −z ) 2 and also compared the first four raw moments of P (z) and P (z ). To this end, we collected 10 5 latent vectors respectively from before and after the gradient flow evolution. The squared difference was estimated to be (1.048 ± 0.003) × 10 −11 . The small result indicates that suitable z do always exist in the neighborhood of z. The first four raw moments of both distributions are observed to be equivalent within the given error bounds, and in fact both the moments and errors were found to be equivalent for several orders of magnitude below the significant digits. Figure 5 shows a sample from the HMC simulation and three corresponding example proposals generated with our overrelaxation method. In Figure 6 we plot a distribution of the differences between individual field variables φ (x) − φ(x) before and after the overrelaxation for a total of 1000 independent steps. By fitting a Gaussian to the histogram, we verified that the distribution is symmetric and its mean consistent with zero. Altogether, these numerical tests conclusively demonstrate the validity of the given statistical arguments, suggesting   that the selection probability T 0 (φ |φ) is indeed symmetric. Furthermore, we tested and compared a variety of different latent space dimensions d z , starting at N 2 and successively going to smaller values by powers of 2. The performances were consistent until significant deviations were observed starting at d z = 32, and the GAN failed to converge entirely for d z = 8 and below. This behavior corresponds to the aforementioned plateau above a threshold value and further supports the previous discussion of ergodicity in Section V. For the results that follow, we chose d z = 256.

C. Efficiency Gain and Computational Cost
The distributions of M and S obtained with our modified sampling algorithm, as well as the aforementioned observables, are consistent with results from the pure HMC simulation, see Figure 7. In particular, the difference between the action distributions that was seen in Figure 4 has disappeared completely, which indicates that the algorithm correctly reproduces the dynamics of the theory. We can estimate the efficiency gain by comparing the behavior of the associated autocorrelation functions C |M | (t), shown in Figure 8 for n H = 1, 2, 3. We observe a substantial reduction of autocorrelations by our method compared to the HMC baseline, to the extent that C |M | (t) is almost zero at t = n H + 1, i.e. after every GAN overrelaxation step. The small residual autocorrelation observed for t ≥ n H +1 stems solely from the acceptance rate of the intermediate HMC steps and is exactly zero when only accepted samples are taken into account for the computation of C |M | (t).
We now determine for each Markov chain the corresponding integrated autocorrelation time, defined as It is generally expected to scale as τ X,int ∼ (ξ X ) z , where ξ X is now the correlation length for the observable X and z again denotes the dynamical critical exponent, which depends on the algorithm. We use 10 6 consecutive measurements of |M | to calculate each C |M | (t) and truncate the sum for τ |M |,int at T = 100. For the HMC baseline, we obtain τ |M |,int ≈ 2.29. Using our modified algorithm, the results for n H = 1, 2, 3 are determined as τ |M |,int ≈ 0.75, 0.96, 1.16, respectively. This clearly demonstrates that our proposed method could significantly improve the dynamical critical exponents of established sampling algorithms.
In order to facilitate a rough comparison of the computational cost, both the HMC update and the GAN overrelaxation step were implemented using the same framework, the deep learning library PyTorch [50]. All steps of the simulation except for the recording and monitoring functionality are performed on an Nvidia GeForce GTX 1070. The average time for the computation of one (ac- cepted) HMC trajectory was measured to be 42 ms. For the GAN overrelaxation, the average time depends on the aforementioned hyperparameters. In the sampling step, we need to consider the behavior with respect to the batch size and ∆S thresh . Larger batches require more time, but are more likely to contain suitable samples for small values of ∆S thresh and are preferred in this region, since repeatedly sampling smaller batches is less efficient. On the contrary, if ∆S thresh is fixed at a larger value, it is increasingly likely for any given sample to satisfy the criterion, and small batch sizes are sufficient. Figure 9 shows the average time for three different batch sizes as a function of ∆S thresh . Plateaus can be observed at larger and consistent scaling properties at smaller values. In contrast to the time required for sampling, the gradient flow step is completed faster for smaller ∆S thresh and takes longer at large values, as shown in Figure 9. Hence, one needs to find a trade-off value where neither of the two steps takes a prohibitively long time. The gradient flow also generally depends on the discrete step size or learning rate , but different choices of this parameter were in our case found to have only a weak effect on the overall time. The optimal order of magnitude for the hyperparameters was determined to be ∆S thresh = 10 −2 with a batch size of 10 3 and a learning rate of = 10 −6 . With these values, the sampling and gradient flow step require on average 53 ms and 64 ms, respectively, yielding a combined time of 117 ms. Some modifications which could further improve the performance are discussed in Section VII.

VII. CONCLUSIONS AND OUTLOOK
In this work, we have investigated GANs for the purpose of reducing autocorrelations in lattice simulations by providing independent field configurations. A simple algorithm was constructed to enable a statistically consistent injection of generated samples into a Markov chain. We provide several numerical criteria to verify the validity of this approach and demonstrate that it can improve standard importance sampling algorithms.
To this end, we have implemented GANs as an overrelaxation step, which can be achieved through an evolution of the latent variables. Putting our reasoning to the test, we first confirmed that GANs can successfully capture the dynamics of two-dimensional scalar φ 4 -theory in the symmetric phase. We note here that, even though we tested our ansatz using only a simple 'vanilla' GAN, certain properties were reproduced by it to remarkably high precision without even employing a statistical selection procedure (Figure 4, Table I). Deviations from the action distribution were then eliminated completely ( Figure 7). Furthermore, a significant reduction of autocorrelations relative to the HMC baseline has been demonstrated ( Figure 8). A comparison of the integrated autocorrelation times suggests that the incorporation of generative neural samplers into lattice simulations could facilitate a considerable reduction of dynamical critical exponents, which should be investigated in more detail. We also emphasize here again that our method is compatible with any action-based importance sampling algorithm and the observed relative performance gain is expected to carry over.
The time benchmarks and hyperparameter optimization ( Figure 9) suggest that the computational cost of the method could be further reduced by rather straightforward modifications to the pre-sampling step. Most configurations are immediately discarded until one with |∆S| < ∆S thresh is found. The repeated calculation of S seems like an unnecessary bottleneck. It may therefore be useful to store an ensemble of field configurations from the GAN, together with their associated actions, before starting the simulation. The reservoir should then be repopulated periodically. This would ensure that appropriate samples are readily available for the gradient flow step and do not constantly need to be created and destroyed. With a conditional GAN [51] it may also be possible to reduce ∆S a priori by using the target value of the action as the conditional parameter in the optimization. Training a conditional GAN with samples generated at various different action parameters may also allow extrapolation to otherwise numerically inaccessible regions of the phase diagram where no training data is available in the first place.
In conclusion, the findings presented here support generative neural samplers as a method to accelerate lattice simulations. Our work provides a comprehensive example of an improved sampling algorithm and extensive numerical tests. First results regarding the reduction of autocorrelation times are promising and encourage further research into the matter.