NeuMC -- a package for neural sampling for lattice field theories
Piotr Bialas, Piotr Korcyl, Tomasz Stebel, Dawid Zapolski
TL;DR
NeuMC provides a PyTorch-based framework for constructing and training flow-based neural samplers tailored to 2D lattice field theories, addressing sampling inefficiencies in MCMC. It combines neural Markov chain Monte Carlo and neural importance sampling with a modular normalizing-flow core built from coupling layers, masking, and circle-compatible transformations, enabling actions such as phi4, XY, and U(1) gauge theories, including gauge-equivariant implementations. The package supports multiple gradient estimators (reparameterization, REINFORCE, path gradient) and both reverse and forward KL training, emphasizing symmetry-preserving architectures and extensibility for future non-abelian and higher-dimensional theories. An end-to-end Schwinger-model example demonstrates how to assemble actions, gauges, masks, and estimators into a working training loop. Overall, NeuMC aims to accelerate exploration of flow-based samplers and to serve as a flexible platform for extending neural sampling to more complex lattice field theories.
Abstract
We present the \texttt{NeuMC} software package, based on \pytorch, aimed at facilitating the research on neural samplers in lattice field theories. Neural samplers based on normalizing flows are becoming increasingly popular in the context of Monte-Carlo simulations as they can effectively approximate target probability distributions, possibly alleviating some shortcomings of the Markov chain Monte-Carlo methods. Our package provides tools to create such samplers for two-dimensional field theories.
