AI and the World's Hard Problems · Physics · arXiv · 2026-10-19
Sampling the XY model with an attention-based neural network

The paper presents a transformer-based variational autoregressive network for sampling the two-dimensional XY model near its Berezinskii-Kosterlitz-Thouless transition, combined with locality-informed attention and approximate probabilities. The sampler significantly outperforms existing neural samplers, was trained on lattices up to 96×96, and was checked with a mode-dropping estimator to confirm that no parts of the configuration space are missed. It reproduces the energy, magnetization and helicity modulus obtained by traditional Markov Chain Monte Carlo.