Abstract
Generative Neural Samplers (GNS) offer a fast alternative to traditional Monte Carlo methods for simulating physical systems but are typically prone to systematic bias. This paper introduces a framework that eliminates this bias by integrating deep generative models with Importance Sampling and Markov Chain Monte Carlo (MCMC) techniques. By treating neural networks as high-quality proposal engines, the authors enable the exact calculation of physical properties—including free energy and entropy—with rigorous error estimates. Validated on the 2D Ising model, the proposed Neural Importance Sampling (NIS) and Neural MCMC (NMCMC) methods demonstrate both bias removal and significant gains in sampling efficiency.
Introduction
In statistical physics, calculating the expectation values of observables like energy or magnetization is a central task. Traditional Markov Chain Monte Carlo (MCMC) methods often suffer from "critical slowing down" and struggle with "global" properties such as free energy. While Generative Neural Samplers (GNS) can produce samples rapidly, they are almost always biased because the network's learned distribution $q(s)$ rarely matches the true Boltzmann distribution $p(s)$ exactly. This paper addresses the lack of standard methods for calculating reliable error bars and removing systematic bias in neural estimates.
Methodology
The authors propose a framework utilizing Generative Neural Samplers with Exact Probability (GNSEP), such as Variational Autoregressive Networks (VANs), which allow for the exact calculation of the probability $q(s)$ for any sample $s$. Two primary correction methods are introduced:
- Neural Importance Sampling (NIS): Samples are drawn from the neural network and weighted by the ratio $p(s)/q(s)$. This reweighting mathematically cancels the network's bias.
- Neural MCMC (NMCMC): The network acts as a proposal engine for a Metropolis-Hastings step. Because the network can propose global configuration changes, it avoids the local traps common in standard MCMC.
A key contribution is the derivation of a novel variance estimator that allows for the calculation of statistical uncertainty even for observables depending on the partition function, such as entropy and free energy.
Key Results
The framework was evaluated using the 2D Ising model on lattice sizes up to 24x24, comparing results against exact analytical solutions (the Onsager solution) and the high-precision Wolff MCMC algorithm.
Bias Removal
Raw neural samplers (VAN) show significant deviations from the ground truth, particularly as the lattice size increases. However, once NIS or NMCMC corrections are applied, the estimates for internal energy ($U$), magnetization ($|M|$), free energy ($F$), and entropy ($S$) match the exact solutions within one standard deviation.
Efficiency and Convergence
The NMCMC method significantly reduces the integrated autocorrelation time, producing samples that are more independent than those from local-flip algorithms. NMCMC reduced the autocorrelation time for internal energy by a factor of approximately 5x compared to the standard Metropolis algorithm. As shown in the training dynamics below, the efficiency improves dramatically as the model learns.
Discussion and Limitations
The proposed framework demonstrates that a "perfect" neural network is not required to obtain exact physical results; as long as the network's support covers the relevant configuration space, NIS and NMCMC can correct the remaining errors. This approach unlocks the direct calculation of free energy and entropy, which previously required cumbersome chaining methods.
Despite these successes, challenges remain. Training deep networks for large lattices involves significant up-front computational costs (e.g., 75 hours for a 24x24 lattice). Additionally, the "support problem" (mode collapse) can prevent importance sampling from correcting errors if the network fails to sample critical regions of the configuration space entirely. Future work may extend these techniques to continuous systems, such as lattice field theories, using Normalizing Flows.
Summary updated