Table of Contents
Fetching ...

Scalable Multitemperature Free Energy Sampling of Classical Ising Spin States

Ping Tuo, Zezhu Zeng, Jiale Chen, Bingqing Cheng

TL;DR

This work introduces alchemicalFES, a discrete flow matching framework designed for sampling free energy surfaces in lattice systems with discrete spins. By formulating flow matching on the Ising simplex with a CNN-based vector-field model, the approach maps a uniform Dirichlet prior to Boltzmann-distributed spin configurations, enabling efficient, single-model generation across temperatures and lattice sizes. The authors demonstrate size-scalable, multitemperature FES generation for the 2D Ising model, leveraging classifier-free guidance to blend conditional and unconditional flows and achieve accurate FES and thermodynamic observables over a broad temperature range, including high-temperature and some low-temperature regimes. The method holds promise for low-cost, scalable free energy sampling in discrete systems and suggests extensions to more complex alchemical spaces in crystalline materials, with code openly available at the provided repository.

Abstract

Generative models have advanced significantly in sampling material systems with continuous variables, such as atomistic structures. However, their application to discrete variables, like atom types or spin states, remains underexplored. In this work, we introduce a discrete flow matching model, tailored for systems with discrete phase-space coordinates (e.g., the Ising model or a multicomponent system on a lattice). This approach enables a single model to sample free energy surfaces over a wide temperature range with minimal training overhead, and the model generation is scalable to larger lattice sizes than those in the training set. We demonstrate our approach on the 2D Ising model, showing efficient and reliable free energy sampling. These results highlight the potential of flow matching for low-cost, scalable free energy sampling in discrete systems and suggest promising extensions to alchemical degrees of freedom in crystalline materials. The codebase developed for this work is openly available at https://github.com/tuoping/alchemicalFES.

Scalable Multitemperature Free Energy Sampling of Classical Ising Spin States

TL;DR

This work introduces alchemicalFES, a discrete flow matching framework designed for sampling free energy surfaces in lattice systems with discrete spins. By formulating flow matching on the Ising simplex with a CNN-based vector-field model, the approach maps a uniform Dirichlet prior to Boltzmann-distributed spin configurations, enabling efficient, single-model generation across temperatures and lattice sizes. The authors demonstrate size-scalable, multitemperature FES generation for the 2D Ising model, leveraging classifier-free guidance to blend conditional and unconditional flows and achieve accurate FES and thermodynamic observables over a broad temperature range, including high-temperature and some low-temperature regimes. The method holds promise for low-cost, scalable free energy sampling in discrete systems and suggests extensions to more complex alchemical spaces in crystalline materials, with code openly available at the provided repository.

Abstract

Generative models have advanced significantly in sampling material systems with continuous variables, such as atomistic structures. However, their application to discrete variables, like atom types or spin states, remains underexplored. In this work, we introduce a discrete flow matching model, tailored for systems with discrete phase-space coordinates (e.g., the Ising model or a multicomponent system on a lattice). This approach enables a single model to sample free energy surfaces over a wide temperature range with minimal training overhead, and the model generation is scalable to larger lattice sizes than those in the training set. We demonstrate our approach on the 2D Ising model, showing efficient and reliable free energy sampling. These results highlight the potential of flow matching for low-cost, scalable free energy sampling in discrete systems and suggest promising extensions to alchemical degrees of freedom in crystalline materials. The codebase developed for this work is openly available at https://github.com/tuoping/alchemicalFES.

Paper Structure

This paper contains 37 sections, 35 equations, 11 figures, 3 algorithms.

Figures (11)

  • Figure 1: Alchemical flow matching generator. (a) Workflow of the alchemical flow matching model. The spin state of a lattice site is represented as a two-dimensional vector $\boldsymbol{x}(t) = \left( x_{(0)}(t), x_{(1)}(t) \right)$, with $\boldsymbol{x}(1) = (1,0)$ if $s=-1$ and $\boldsymbol{x}(1) = (0,1)$ if $s=1$. The initial state $\boldsymbol{x}(0)$ is sampled from a Dirichlet distribution $\text{Dir}\left(\alpha=(1,1)\right)$, providing uniform random initialization. As $t$ increases, the Dirichlet distribution sharpens toward the target states $(1,0)$ or $(0,1)$. (b) A convolutional neural network (CNN) is trained to predict the classifier $\boldsymbol{g}(t)$ that guides the probability flow. The input spin configuration $\boldsymbol{x}$ and time $t$ are separately featurized, then combined through convolutional layers. The lattice size is denoted as $\sqrt{N}\times \sqrt{N}$, and $N$ equals the number of spins in a lattice. The model output $\boldsymbol{g}(t)$ is trained against one-hot labels corresponding to the final spin states. The CNN model is functionally equivalent to a graph neural network. (c) The workflow for multitemperature flow matching by applying guidance facilitated by combining conditional and unconditional generation. The temperature-dependent parameter $\gamma(T)$ controls the temperature of the generated ensemble. (d) Expanded view of the convolutional layers showing incorporation of conditional embeddings for conditioning variables (magnetization $m$ and potential energy $E$). These condition embeddings are added to the feature representations and processed through message-passing blocks.
  • Figure 2: Free energy estimations from flow matching model (dots) for Ising lattice of different sizes, compared against the free energy surface from MCMC simulations (lines). Free energy as a function of $E/N=-\frac{1}{N} \frac{1}{2}\sum_{i=1}^N \sum_{j=1}^N J_{ij} s_is_j$ at (a) $k_BT=4.0$, (d) $k_BT=3.2$, (g) $k_BT=2.2$; free energy as a function of $m/N=\frac{1}{N}\sum_{i=1}^N s_i$ at (b) $k_BT=4.0$, (e) $k_BT=3.2$, (h) $k_BT=2.2$; pair correlation function (PCF) at (c) $k_BT=4.0$, (f) $k_BT=3.2$, (i) $k_BT=2.2$. There is a kink at $E/N\approx -1.667$ due to the finite-size effect of the Ising model. We explain this peculiar phenomenon in Supporting Section \ref{['app:finite-size-effect']}.
  • Figure 3: Conditional generation (dots) of $6 \times 6$ lattice Ising model using order parameter conditions, compared against MCMC data (lines). (a) Free energy as a function of $E/N=-\frac{1}{N}\frac{1}{2}\sum_{i=1}^N \sum_{j=1}^N J_{ij} s_is_j$; (b) free energy as a function of $m/N=\frac{1}{N}\sum_{i=1}^N s_i$; and (c) pair correlation function (PCF).
  • Figure 4: (a) Free energy estimations for $24 \times 24$ lattice Ising model at multiple temperatures obtained by the guided FM model, trained with the MCMC data of $6\times6$ lattice Ising model, are compared against the MCMC free energies (lines). The shaded region illustrates the 97.5% confidence interval of the estimated free energy. (b) Potential energy expectations at multiple temperatures predicted by the guided FM model (crosses), compared against MCMC data (lines). The vertical lines indicate the critical temperatures of phase transition for different lattice sizes, where $T_c=\frac{2}{\ln (1+\sqrt{2})}$ in the infinite lattice limit binder1981finite. $T_c\approx 2.43$ and $T_c\approx 2.85$ are estimated for $6\times 6$ and $4\times 4$ Ising lattice respectively kadanoff1966scaling, by the renormalization group theory wilson1971renormalization1wilson1971renormalization2wilson1983renormalization. (c) Pair correlation function of multiple temperatures obtained by the guided FM model, compared against the MCMC data.
  • Figure :
  • ...and 6 more figures