cond-mat.dis-nnOct 16, 2026

Sampling the XY model with an attention-based neural network

Authors: Piotr Białas, Christian D. Morales, Tomasz Stebel, Dawid Zapolski

Organizations: Institute of Applied Computer Science, Jagiellonian University, ul. Łojasiewicza 11, 30-348 Kraków, Poland · V. N. Karazin Kharkiv National University, 6 Nezalezhnosti Ave, Kharkiv 61022, Ukraine · Institute of Theoretical Physics, Jagiellonian University, ul. Łojasiewicza 11, 30-348 Kraków, Poland · Doctoral School of Exact and Natural Sciences, Jagiellonian University, ul. Łojasiewicza 11, 30-348 Kraków, Poland

Abstract

We present a transformer-based variational autoregressive network for sampling lattice systems with continuous degrees of freedom and apply it to the two-dimensional XY model near the Berezinskii-Kosterlitz-Thouless transition. The architecture is combined with physics-informed ingredients: locality-informed attention and approximate probabilities. The resulting sampler significantly outperforms existing neural samplers. We train the model on lattices up to 96×9696\times96, verify with a mode-dropping estimator that no parts of the configuration space are missed, and reproduce the energy, magnetization and helicity modulus obtained with the traditional Markov Chain Monte Carlo algorithm.

Explore similar work

CardsList
  1. Sampling two-dimensional spin systems with transformers

    Apr 30, 2026Piotr Białas, Piotr Korcyl, Tomasz Stebel +2TransformerIsing Model

  2. Scaling Autoregressive Models for Lattice Thermodynamics

    Mar 16, 2026Xiaochen Du, Juno Nam, Sulin Liu +1Autoregressive ModelingComputational Materials Science

  3. Diffusion-warm sampling of the XY model enables fast thermalization at scale

    Jun 29, 2026Sehmimul Hoque, Roger Melko, Pooya RonaghMarkov Chain Monte CarloDiffusion Sampling