Flow-based sampling for fermionic lattice field theories
Authors
Michael S. Albergo, Gurtej Kanwar, Sébastien Racanière, Danilo J. Rezende, Julian M. Urban, Denis Boyda, Kyle Cranmer, Daniel C. Hackett, Phiala E. Shanahan
Abstract
Algorithms based on normalizing flows are emerging as promising machine learning approaches to sampling complicated probability distributions in a way that can be made asymptotically exact. In the context of lattice field theory, proof-of-principle studies have demonstrated the effectiveness of this approach for scalar theories, gauge theories, and statistical systems. This work develops approaches that enable flow-based sampling of theories with dynamical fermions, which is necessary for the technique to be applied to lattice field theory studies of the Standard Model of particle physics and many condensed matter systems. As a practical demonstration, these methods are applied to the sampling of field configurations for a two-dimensional theory of massless staggered fermions coupled to a scalar field via a Yukawa interaction.
Concepts
The Big Picture
Mapping a vast, tangled forest by sending in a single hiker who can only take tiny steps sounds hopeless. In the densest regions, the hiker slows to a crawl, getting stuck in pockets and backtracking endlessly. This is the problem facing physicists who study the strong nuclear force using lattice field theory, which simulates quantum fields on a discrete grid of points. Their computational tools grind to a halt precisely where the physics gets most interesting.
The standard approach relies on Markov Chain Monte Carlo (MCMC) sampling: generating a sequence of snapshots of the quantum field, each slightly modified from the last, until the collection statistically represents the true physical ground state. Near phase transitions, or when zooming into finer grid resolutions, these step-by-step algorithms suffer critical slowing down. New snapshots become highly correlated with previous ones, requiring vastly more samples to get independent results. Cost explodes.
Normalizing flows offer a way out. These neural networks learn to transform simple random noise into samples from complicated target distributions, and they’ve shown real promise as an alternative to MCMC. But every demonstration so far has been restricted to bosonic fields (particles like photons and the Higgs boson, whose mathematics plays nicely with conventional tools). The other half of the particle zoo, fermions like quarks and electrons, has resisted this treatment. A collaboration spanning MIT, NYU, DeepMind, and Argonne National Laboratory changes that.
Key Insight: By combining normalizing flows with the pseudofermion method, this paper presents the first flow-based sampling framework for lattice field theories with dynamical fermions, a prerequisite for applying these methods to quantum chromodynamics and the full Standard Model.
How It Works
Unlike bosons, fermions obey the Pauli exclusion principle, forcing their field variables to be Grassmann numbers: abstract objects that anti-commute rather than commute. You can’t plug Grassmann numbers into a neural network. They don’t exist as ordinary numbers.
The standard workaround is to integrate them out. In the path integral (the quantum-mechanical sum over all possible field configurations), Grassmann variables can be handled analytically. What remains is a purely bosonic expression containing a fermion determinant, a single complex number encoding all the fermionic dynamics. Computing this determinant exactly scales as the cube of the lattice volume, which is intractable on modern QCD lattices.

The fix is the pseudofermion method. Auxiliary bosonic fields are introduced whose statistical properties exactly reproduce the fermion dynamics. This transforms the problem into sampling over a joint space of physical scalar fields and pseudofermion fields, coupled through a modified action. The flow model then learns to sample this joint distribution.
The paper lays out four sampling schemes, each decomposing the joint distribution differently:
- Joint sampling: a single flow models the full distribution simultaneously
- Bosonic marginal + conditional: one flow learns the marginalized boson distribution; a second learns fermion configurations conditioned on the bosons
- Pseudofermion refreshment: the flow handles only the pseudofermion sector, while Hamiltonian Monte Carlo (HMC) handles the bosons
- Flow-accelerated HMC: the learned model augments traditional HMC sampling
Each trades off expressiveness against computational cost differently.
The flow architectures required careful attention to symmetry. The pseudofermion action has translational symmetry: the physics is identical whether you shift every grid point by the same amount. But there’s a twist. Boundary conditions differ between bosons and fermions. Fermion fields are antiperiodic, flipping sign when wrapping around the time direction, while bosons use ordinary periodic conditions.
To handle this, the team built equivariant coupling layers, neural network building blocks engineered to respect these mixed boundary conditions automatically. The model never wastes capacity learning structure that symmetry already determines.
The demonstration targets a two-dimensional Yukawa model coupling a scalar bosonic field to a fermionic field via staggered fermions. It’s a standard testbed: complex enough to contain genuine fermionic physics, simple enough to benchmark rigorously.
Flow-based sampling produces statistically independent configurations with acceptance rates far exceeding standard HMC, and the gap widens in more challenging parameter regimes.
Why It Matters
The Standard Model is dominated by fermions. Quantum chromodynamics, the theory of the strong force, involves quarks bound by gluons into protons and neutrons. Computing proton properties from first principles, understanding the quark-gluon plasma that filled the universe microseconds after the Big Bang, hunting for new physics in precision measurements: all require lattice QCD calculations. Those calculations hit a wall at the sampling problem this paper addresses.
The same mathematics shows up outside particle physics. Strongly correlated electron systems in condensed matter (think high-temperature superconductors) share the underlying structure of fermionic lattice field theories. Sampling improvements that work for lattice QCD carry over directly.
The four sampling schemes here aren’t alternatives to HMC so much as a toolkit. The pseudofermion refreshment scheme, for instance, can drop into existing HMC workflows as a direct upgrade, reducing autocorrelations without a complete algorithmic overhaul.
The immediate frontier is scaling. The two-dimensional Yukawa demonstration is a proof of principle; next come three- and four-dimensional theories, non-Abelian gauge fields, and eventually the full QCD action. Each step brings new architectural challenges, since flow models must scale efficiently with lattice volume while preserving exact gauge and fermionic symmetries. But the proof of concept is in hand: flow-based sampling is no longer bosons-only.
Bottom Line: Normalizing flows can now generate statistically independent fermionic field configurations, as demonstrated on a 2D Yukawa model. This opens fermionic lattice field theory to machine-learning-powered sampling for the first time, with the long-term goal of breaking past critical slowing down in first-principles calculations of the strong nuclear force.
IAIFI Research Highlights
The paper builds normalizing flow samplers for lattice field theory that encode exact physical symmetries, including antiperiodic fermionic boundary conditions, through purpose-built equivariant coupling layers.
The equivariant architectures enforce mixed bosonic/fermionic symmetries in generative models, providing a template for ML-based sampling in any system with constrained anti-commuting degrees of freedom.
Flow-based sampling of dynamical fermions clears a major obstacle to applying ML-accelerated lattice methods to QCD and the full Standard Model, where fermions are not optional.
Future extensions to four-dimensional gauge theories with non-Abelian symmetries and physical quark masses will test whether these methods can compete with state-of-the-art HMC in production QCD calculations; see [arXiv:2106.05934](https://arxiv.org/abs/2106.05934) for the full paper.
Original Paper Details
Flow-based sampling for fermionic lattice field theories
2106.05934
Michael S. Albergo, Gurtej Kanwar, Sébastien Racanière, Danilo J. Rezende, Julian M. Urban, Denis Boyda, Kyle Cranmer, Daniel C. Hackett, Phiala E. Shanahan
Algorithms based on normalizing flows are emerging as promising machine learning approaches to sampling complicated probability distributions in a way that can be made asymptotically exact. In the context of lattice field theory, proof-of-principle studies have demonstrated the effectiveness of this approach for scalar theories, gauge theories, and statistical systems. This work develops approaches that enable flow-based sampling of theories with dynamical fermions, which is necessary for the technique to be applied to lattice field theory studies of the Standard Model of particle physics and many condensed matter systems. As a practical demonstration, these methods are applied to the sampling of field configurations for a two-dimensional theory of massless staggered fermions coupled to a scalar field via a Yukawa interaction.