Manuscript Offprint
arXiv:2609.02948FrOGS: Discrete Neural Sampler for Independent Alloy Configurations Across Chemical Conditions
Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.
Abstract
Predicting the thermodynamic properties of an alloy requires sampling its configurations across many chemical conditions and recovering free energies on a common absolute scale. Markov chain Monte Carlo (MCMC) is the standard tool, but it requires separate simulations at different conditions, and auxiliary free-energy methods such as thermodynamic integration are used to place results on a common absolute scale. Modern discrete neural samplers typically use reverse KL divergence as the objective and can be mode-seeking or biased. We present Free energy Offering Generative Sampler (FrOGS), a hybrid discrete neural sampler that couples an autoregressive model to a continuous-time Markov chain (CTMC) to be trained jointly under a single shared loss. FrOGS draws i.i.d. configurations, returns an unbiased estimate of the partition function, and gives consistent estimates of thermodynamic observables. We train a single model across a wide range of chemical conditions to produce estimates on a common absolute free-energy scale. FrOGS matches exact finite-size results on the 2D Ising model and reference phase diagrams for AgPd and CuAu, without mode collapse. We additionally compare to SEGAL, a published autoregressive baseline, and find that only FrOGS recovers the stability range of the CuAu phase.
1 Introduction
Sampling the different ways constituent atoms can occupy sites in an alloy according to their energetics is a core task in computational materials science, enabling the prediction of thermodynamic behavior and material properties. The established framework for predicting the properties of an alloy consists of two steps: (1) fitting a computationally inexpensive cluster expansion (CE) to computationally expensive first-principles data such as density functional theory (DFT) calculations [Sanchez et al., 1984, Connolly and Williams, 1983]; (2) sampling with Markov chain Monte Carlo (MCMC) in the semi-grand canonical (SGC) ensemble on the CE to obtain thermodynamic averages. Integrating the averages over the chemical condition () [van de Walle and Asta, 2002] gives free energies and phase diagrams, where is the difference in chemical potential between two atomic species and is the temperature.
MCMC is a well-established method, yet it has known drawbacks. A Markov chain is built to sample one specific target distribution at a given (), and its updates are inherently sequential. Thus, to obtain the phase diagram across chemical conditions, one must do separate MCMC runs. The free energies are then obtained only through an auxiliary calculation that places the separate runs on a common absolute scale [van de Walle and Asta, 2002]. Additionally, near phase boundaries, MCMC may require more steps to produce reasonable configurations [Berg and Neuhaus, 1991, Wolff, 1989].
Neural samplers have been proposed to address some of the drawbacks of MCMC. However, they can miss entire modes of the target distribution without increasing its loss, a failure known as mode
Preprint.

(a)

(b)
Figure 1: (a) FrOGS model architecture. FrOGS couples the continuous-time Markov chain (CTMC) transport (blue), which is based on the LEAPS algorithm, to an autoregressive network (purple) to flexibly model the prior. The cells with a red circle on the upper right side mark the neural-network-parametrized parts of the framework. (b) Architecture of the rate matrix network for the CTMC transport. The encoder and decoder blocks are described in the main text (§4.3).
collapse. This is a known consequence of training using the reverse KL divergence [Minka, 2005, Soletskyi et al., 2025]. To address these limitations, we introduce the Free energy Offering Generative Sampler (FrOGS), which builds upon the Locally Equivariant discrete Annealed Proactive Sampler (LEAPS) framework [Holderrieth et al., 2025].
In §2, we review previous work on neural sampling and complementary MCMC approaches. In §3, we review background on the LEAPS framework and present our model in §4. In §5, we confirm that FrOGS reproduces the exact finite-size thermodynamics of the 2D Ising model and reconstructs the phase diagrams of AgPd and CuAu. We additionally compare to a prior autoregressive model [Damewood et al., 2022] and find that FrOGS more accurately reconstructs the phase diagrams for AgPd and CuAu.
Our main contributions are:
- One trained sampler for the entire region. A single trained FrOGS model samples microstates across chemical conditions on a common absolute scale. Feature-wise
Linear Modulation (FiLM) conditioning on , which provably preserves local equivariance, enables a single model to generate samples at each chemical condition.
-
Hybrid architecture. FrOGS takes a novel approach of coupling an autoregressive network as a prior to the neural CTMC transport via a shared loss. The prior absorbs the discontinuity at a first-order boundary, enabling the representation of multiple phases with one model, as discussed in §4.1. The downstream CTMC part is the learned generalization of annealed importance sampling [Neal, 2001, Holderrieth et al., 2025], thereby refining the proposal the prior makes.
-
Effective sampling in the multimodal regime without mode collapse. By comparing the free energy at fixed composition (§A.4), we recover the miscibility gap of AgPd and the regions of all three ordered phases of CuAu, attesting to the accuracy of the free-energy prediction even near the phase boundaries.
-
Extending the LEAPS framework. We generalize the LEAPS framework to be applicable to real chemical systems. A locally equivariant multi-scale head lets the network capture long-range interactions, and the reparametrization of the rate matrix avoids the numerically unstable density ratio computation at low temperatures.
An alternative approach keeps Monte Carlo sampling but reshapes its dynamics to overcome the barriers that slow plain MCMC near phase transitions. Metadynamics [Laio and Parrinello, 2002] adds a history-dependent bias alongside a collective variable (a low-dimensional summary of the configuration) so that the system is pushed out of minima it has already visited. Its “well-tempered” variant [Barducci et al., 2008] adds a smaller bias as the bias accumulates in a region of the phase diagram, so that the total bias converges. The recovered profile of metadynamics is a projection onto the collective variable, so states that the collective variable cannot distinguish can be lumped into a single basin [Bussi and Laio, 2020]. Du et al. [2026a] extends well-tempered metadynamics into discrete neural samplers, flattening the landscape during training, but each model is trained at a fixed thermodynamic condition and recovers a free-energy profile up to an additive constant.
Flat-histogram methods [Berg and Neuhaus, 1991, Wang and Landau, 2001] take a related approach, directly estimating the density of states in order to obtain a uniform distribution of composition and energy. This delivers the free energy globally on an absolute scale, but the histogram uniformity is imposed only on the marginal of composition and energy. Atomic configurations can share the same composition and energy, so this method does not balance sampling across these other degrees of freedom [Neuhaus and Hager, 2003, Dayal et al., 2004]. Furthermore, the method does not natively provide independent configurations as the algorithm only uses macroscopic variables.
A separate line of work learns the transport itself, rather than extending MCMC-based methods. Neural networks are trained to move probability mass from a tractable prior to a complex target. Vaikuntanathan and Jarzynski [2008] first showed that augmenting annealing dynamics [Neal, 2001] with a transport field can suppress the variance, while noting that the field cannot in general be obtained analytically. With the rise of machine learning, learned samplers emerged to approximate the solutions to the transport field. Normalizing flows learn transport maps toward Boltzmann targets for equilibrium sampling and free-energy estimation [Noé et al., 2019, Albergo et al., 2019, Wirsnberger et al., 2020]. Closer to our setting, annealed transport samplers keep the annealing path and interleave a learned flow at each step with a sequential Monte Carlo sampler, inheriting its asymptotic unbiasedness [Arbel et al., 2021, Matthews et al., 2022]; the flows are nonetheless trained by a per-transition KL objective, so mode coverage is supplied by the resampling and MCMC steps. A separate line casts sampling as stochastic optimal control of a diffusion model, learning the control for generating the target [Zhang and Chen, 2022, Vargas et al., 2023, Richter and Berner, 2024]. NETS [Albergo and Vanden-Eijnden, 2025] keeps the prescribed annealing path but learns a single continuous-time drift trained to minimize the variance of the weights. LEAPS [Holderrieth et al., 2025] carries this construction to discrete state spaces, which we apply to lattice alloys.
3 Background
We build on LEAPS [Holderrieth et al., 2025], introduced in §2 within the context of learned transport. Let denote a configuration on a lattice of sites, where is the species occupying site (§A.1). In the framework, a CTMC with learnable parameters evolves a configuration under a rate matrix , transporting mass along the annealing path from a tractable prior (with ) to the target , the Boltzmann distribution at a chemical condition . is the normalization constant at each , also known as the partition function. The rate matrix is restricted to single-site moves: is the rate of the move that replaces the species at site by . Additionally, LEAPS employs importance sampling: at each , each of the samples is reweighted by a log-weight . The ESS (effective sample size) is defined with the log-weights as
which equals 1 when all weights are equal (perfect transport) and approaches 1/M when one sample dominates. It is useful because approximates the number of independent draws from that would give an estimator of the same variance as the M weighted ones [Kong et al., 1994]. We provide further detail of this framework in appendix A.2.
LEAPS offers two main benefits: (a) a direct unbiased estimate of with the equation
and (b) a consistent estimate of any observable through reweighting the samples, as
LEAPS, however, faces challenges when directly applied to the alloy sampling task. Firstly, as Du et al. [2026b] point out, the LEAPS family is not conditionable in its bare form; in fact, the LEAPS model in the original paper was trained and evaluated just at the critical temperature [Holderrieth et al., 2025]. Secondly, LEAPS starting from a uniform prior fails to transport efficiently across first-order phase boundaries, as shown in the next section. Finally, LEAPS has only been applied to 2D systems on a square grid. The alloy systems we aim to model are 3D, exchange-symmetry-broken, and non-simple-cubic (e.g. fcc). We extend the framework to overcome the stated limitations.
4 Method
4.1 Learned prior
We first outline how the learned prior allows FrOGS to sample across first-order phase boundaries. As shown in §3, the LEAPS estimator is unbiased for any rate matrix . Thus, when sampling fails at a first-order phase boundary, it is a result of the variance of the log-weights .
Consider the case where the target is ordered but is disordered. The annealing path crosses a first-order phase transition at some . Let the set of disordered configurations be and ordered configurations , and let . In a first-order phase transition near , the probability mass will jump from approximately 0 to approximately 1 over a narrow range of . As LEAPS only updates one site at a time, the transport must pass through energetically unstable configurations between and . As these configurations are unstable, will be exponentially suppressed. Consequently, the transported distribution does not match near , resulting in high variance of the log-weights. The resulting heavy-tailed weights cause the ESS to collapse, as seen in Eq. (1).
We observe the ESS collapse in the ordered-disordered system of CuAu with the uniform prior, and we confirm this is not the result of mode collapse (§A.10). To resolve this issue, we replace the fixed prior by a conditioned autoregressive network that places mass in the target basin for each , so the local transport does not have to carry the probability mass across first-order boundaries.
We use a PixelCNN-style [van den Oord et al., 2016] causal-masked autoregressive 3D-convolutional network (Fig. 8) re-indexed onto the fcc lattice (§A.9). Because the equations (2) and (3) hold regardless of the prior setting, we can use any prior as long as is tractable. The tractability is necessary for calculating the target with Eq. (2). Since it is autoregressive, is satisfied.
4.2 Coupling and conditioning the autoregressive and transport networks
The learned prior allows us to jointly train the prior and the transport networks, so that one coupled model can generate samples in the entire region. We show in §A.10 that the performance degrades substantially after removing the trained prior (initializing from a uniform distribution as is done in LEAPS), and after removing the transport (training the prior only with ).
The autoregressive and transport networks are coupled by a shared loss when training. A single backward pass through the objective therefore returns gradients for both networks at once (§A.5). Importantly, the advantage of FrOGS is that its loss function is not mode-seeking since the training objective for the autoregressive prior is a generalized form of VarGrad [Richter et al., 2020] (§A.6).
Both the transport network and the prior network are conditioned on through FiLM [Perez et al., 2018]. We explain our detailed setup in §A.8. FiLM is a general-purpose conditioning method, originally demonstrated on conditioning an image classifier on natural language for visual reasoning. It is per-channel and spatially uniform, so it cannot leak information about future sites. Moreover, it lets the transport network remain locally equivariant, as we show in detail in §A.7.
4.3 Extending the transport network
We extend the LEAPS framework in two novel directions. LEAPS models , the learned rate matrix, as
for computational efficiency. Eq. (5) is referred to as the local equivariance property. The motivation behind this parametrization can be found in §A.2 or the LEAPS paper [Holderrieth et al., 2025, §8].
As in LEAPS, we fulfill the local equivariance condition by factoring the probability flux as
into a token projector and a locally invariant head whose output at site does not depend on the current token . Swapping leaves untouched and only flips the sign of the projector difference, satisfying Eq. (5).
First, we introduce a U-net-style locally equivariant architecture (Fig. 1) for that consists of a pyramid of encoders and decoders. Encoder blocks follow the locally equivariant convolutional network construction of LEAPS, with FiLM inserted after each convolution. Decoder (refine) blocks are identical to encoder blocks except at the input: instead of a single lattice-derived feature, they take the concatenation of the upsampled coarse feature and the encoder feature through the skip connection, mixed back to 16 channels by a convolution before the first FiLM.
This architecture allows for a larger receptive field than stacking locally equivariant convolution layers and shows better performance at an equal scale (§A.11). This is an example of a more scalable locally equivariant architecture that the original LEAPS paper anticipated [Holderrieth et al., 2025, §12]. We prove that it is locally equivariant in §A.7.
Second, we reparametrize the rate matrix for the alloy systems. The objective of LEAPS requires the computation of the ratio between neighboring configurations (i.e. differing by one site), which is then multiplied by before entering the loss function. The challenge is that a large energy difference (e.g. for alloy systems at low temperatures) between the neighboring configurations () makes this ratio diverge.
We address this issue by the below reparametrization with the equilibrium Metropolis acceptance factor .
After substituting Eq. (7) into the loss function of LEAPS and using the elementary identity together with the detailed balance relation, the corrector becomes a bounded, single-pass expression in which the density ratio does not appear (full derivation in §A.3).
This reparametrization is not a restriction. Since is a -independent rescaling of each move, the reparametrized rates (7) span the same family of CTMCs as , so the universal-representation property [Holderrieth et al., 2025, Prop. 8.1] is preserved.
5 Experiments
We report the results of our sampler in the main text for the 2D Ising model, 125-site AgPd, and 128-site CuAu systems, matching the largest cells reported by the discrete neural samplers we benchmark against [Damewood et al., 2022, Du et al., 2026b], and compare it with the previous works in detail in §5.4.
All of the reported results below are from a FrOGS model trained for 200k steps for each chemical system. We injected 10 local MCMC steps per time step during training, which is a feature of the LEAPS algorithm, to ensure better coverage. We select this number based on the hyperparameter sweeps (§A.11). We did not inject MCMC steps at each step in during evaluation to verify the power of our sampler alone. We construct the phase diagram using the method outlined in §A.4.
For AgPd and CuAu, we sample from the SGC ensemble (§A.1) under the cluster expansion parameters from Damewood et al. [2022]. We train on the same CE data from Damewood et al. [2022] and Du et al. [2026b] in order to fairly compare our phase diagrams.
We remark that the thermodynamics under a particular CE can be considerably different from the real phase diagram. As an example, for CuAu, the CE reproduces the L1/L1/L1 orderings but shifts their transition temperatures (e.g. CuAu above 700 K versus 663 K experimentally [Okamoto et al., 1987]). All results below should therefore be read as the thermodynamics of the given CE. Our code and data will be made available with the extended version of this work.
5.1 Ising Model
In Fig. 2, we plot the statistics of the two-dimensional Ising model with periodic boundary conditions with 5000 samples at each condition from FrOGS with unreparametrized rates of Eq. (4) trained in and for and , respectively. The free energies of the 2D Ising model are known exactly at finite size [Kaufman, 1949], allowing us to compare our model to true values. The thermodynamic results from FrOGS samples match the Kaufman ground truth with high accuracy (Fig. 2). Sampling with both the prior and the learned transport (orange in the figure) tracks the references much closer than the output of the autoregressive part with CTMC transport turned off during evaluation (, blue), showcasing the ability of the learned transport.
In the appendix (§A.12), we present the system result alongside and , following Du et al. [2026b], and show FrOGS matches the Kaufman/Wolff reference at every scale.
5.2 AgPd
AgPd, under our CE, has a single miscibility gap up to 600K (Fig. 3a), meaning the solid solution separates into Ag-rich and Pd-rich phases up to that temperature. This is a different type of challenge from CuAu, where the phase boundary is between ordered and disordered phases.

Figure 2: Ising model statistics at (i.e. ), with error bars via bootstrapping. (a) free energy per site () vs. , compared to Kaufman exact values. (b) Energy per site () vs. , compared to Kaufman exact values. (c) log plot of ESS vs. . (d) Heat capacity per site () vs. . The reference is the numerical derivative of the Kaufman exact energy at this temperature spacing. (e) Correlation values vs. lattice spacings, compared to the standard Wolff sampling algorithm [Wolff, 1989]. (f) Weighted and unweighted (raw) sample mass at one of the two states, across different temperatures. The black line is 0.5 as the reference.
Table 1: /dof test against the flat expectation over the degenerate ordering variants of each phase. Samples pass the gate if their composition is within 2 sites of the phase’s ideal stoichiometry and their long-range order parameter is at least half its value in the perfectly ordered configuration. A sweep point counts only if at least 50 samples pass. “unweighted” is the statistic on the bare sample counts; “weighted” applies the importance weights and replaces the sample size with the effective size . We report the median over every gated point of the sweep (361/190/32 points, respectively) in the table.
| vs 1/g | (g = 4) | (g = 6) | (g = 4) |
|---|---|---|---|
| FrOGS unweighted | 6.9 | 24.7 | 2.4 |
| FrOGS weighted | 0.80 | 0.92 | 0.85 |
| perfect balance (null median) | 0.79 | 0.87 | 0.79 |
We reproduce the miscibility gap of a 125-site (5 × 5 × 5) AgPd model with high accuracy. We sweep the (Δμ, T) space, drawing 5000 samples at each point, with 0.01eV and 25K resolution in the [-0.4eV, 0.4eV] and [200K, 900K] range for Δμ and T, respectively, matching Damewood et al. [2022]. The sampling is efficient with ESS ≥ 0.1 in 98.38% of the (Δμ, T) grid (Fig. 4a) with the median value of 0.903. The shape of the binodals agreeing with the metadynamics reference verifies the accuracy of the free energies predicted by our sampler.
5.3 CuAu
We present the phase diagram of a 128-site (4 × 4 × 8) CuAu model drawn with samples generated by the FrOGS model. We sweep the (Δμ, T) space, drawing 5000 samples at each point, with 0.01eV and 25K resolution in the [-0.2eV, 0.15eV] and [200K, 1200K] range for Δμ and T, respectively, matching Damewood et al. [2022] as we did for AgPd. The model reliably detects all three ordered phases Cu₃Au, CuAu, and CuAu₃, and the phase boundary shapes agree with the reference (Fig. 3b).
FrOGS distributes samples over all of the degenerate modes of each ordered phase. There is no mode collapse. A /dof test against the flat 1/g expectation shows that the raw samples deviate

(a) AgPd, FrOGS

(b) CuAu, FrOGS

(c) AgPd, SEGAL

(d) CuAu, SEGAL
Figure 3: Phase diagrams of 125-site AgPd and 128-site CuAu. Top row: constructed with FrOGS. Bottom row: constructed with SEGAL, the autoregressive model of Damewood et al. [2022]. All four plots share the same phase diagram constructor ( A.4). The metadynamics reference data is from Damewood et al. [2022].
from uniform, while the importance-weighted counts are close to uniform (Table 1), demonstrating samples are spread correctly across configurations. The importance weights are therefore correcting an imbalance among configurations of the same energy, using information about the full configuration. A near-perfectly trained model will yield similar values to the last row for the raw counts as well, so the gap between the top two rows shows how much the estimator is supplying here.
The ESS figure (Fig. 4b) elucidates the accuracy of the phase diagram drawn with FrOGS. High ESS means the variance of the importance weights (A) is low, so the samples contribute more evenly to the estimation of the partition function (2). With ESS 0.1 in 98.58% of the grid with the median value of 0.907, the phase diagram constructor can reliably estimate the free energy.
5.4 Comparison with previous work
We benchmark our work against two previous samplers, Damewood et al. [2022] and Du et al. [2026b]. We rerun our phase diagram constructor ( A.4) with the released checkpoint by Damewood et al. [2022]. Du et al. [2026b] does not have public code as of August 2026, so we compare our phase diagram to the figures they report in the paper.
First, we observe that only FrOGS reliably captures the stability range of the phase. We observe this by comparing Fig. 3b against Fig. 3d and Du et al. [2026b, Fig. 4g]. We also do

(a) AgPd

(b) CuAu
Figure 4: ESS plots generated with FrOGS for 125-site AgPd and 128-site CuAu.
a sensitivity analysis in §A.13 to show that the comparison of Fig. 3b to Fig. 3d holds across different phase diagram construction thresholds and different initialization seeds for FrOGS. Since the formation energy of is only slightly favored compared to the mix [Damewood et al., 2022, Fig. 3a], the phase is thermodynamically unstable above 400K, according to metadynamics. The phase diagram drawn with the FrOGS samples agreeing with the metadynamics result for demonstrates the accuracy of our framework.
Furthermore, FrOGS tracks the shape of the phase boundary curves more closely to the metadynamics reference than Damewood et al. [2022] (Fig. 3), and FrOGS better agrees with the reference on the heat capacity of the Ising model than Du et al. [2026b, Fig. 3d]. Higher ESS values across different chemical conditions (Fig. 4b) lead FrOGS to predict the phase boundary curves more accurately.
6 Conclusion
To our knowledge, FrOGS is the first discrete neural sampler conditioned on that combines an autoregressive network with a learned CTMC transport. It provides i.i.d. configurations and unbiased estimates of the partition function, placing free energies at every condition on a common absolute scale without an external reference. To confirm the validity of FrOGS, we first compare its prediction of the thermodynamic variables of the 2D Ising model to established references. We then benchmark FrOGS on generating phase diagrams of two well-established chemical systems, AgPd and CuAu, and show that it more faithfully reconstructs these phase diagrams than previous autoregressive approaches. The next natural step would be to apply our framework to challenges in materials science such as the simulation of multicomponent () alloys.
Conventional MCMC requires thermodynamic integration that gives each phase its own chain, started from an ordering identified beforehand, since the phase-boundary crossing time grows exponentially in the interfacial area [Berg and Neuhaus, 1991]. The microstates must be reached without crossing a boundary [van de Walle and Asta, 2002, Frenkel and Ladd, 1984], which is hard to guarantee as K grows. FrOGS instead generates i.i.d. samples from the CE alone, and the free energy is directly computable at any chemical condition.
FrOGS starts from a random prior with a randomly initialized CNN and is optimized from there. A cold start suffices at this scale, which is encouraging; for larger cells, a physically motivated prior (e.g. a mean-field construction) is a natural next step. FrOGS spends 4.5 GPU-hours to train and 31 GPU-hours to sweep the CuAu grid at 75 s per condition for samples. This compares to a few core-hours for an anchored Metropolis calculation on the same system ( A.14), but this is a cost with an ordering per phase supplied beforehand. Moreover, the training cost of FrOGS is paid once, and the sweep cost is paid only at the conditions requested, which in multicomponent alloy design is a sparse set of points in a high-dimensional simplex. In that regime Wang–Landau requires a -dimensional density of states converged everywhere, and metadynamics must fill a -dimensional collective variable space, whose cost grows exponentially with [Bussi and Laio, 2020]. Finally, because we can compute the gradients of the free energy with the same samples via standard thermodynamic identities, FrOGS opens the way to gradient-based inverse design.
Acknowledgments and Disclosure of Funding
We thank Peter Holderrieth, Jason Ogbebor, Daniel Xiao, and Ameya Daigavane for helpful discussions regarding our methodology.
K.M. and T.E.S. were supported by the Air Force Office of Scientific Research under Award No. FA9550-24-1-0067. K.M. would like to acknowledge support from the Kwanjeong Educational Foundation. E.H. was supported by the U.S. Department of Energy, Office of Science, Office of Advanced Scientific Computing Research, Department of Energy Computational Science Graduate Fellowship under Award Number DE-SC0024386. This research used resources of the MIT Office of Research Computing and Data.
This report was prepared as an account of work sponsored by an agency of the United States Government. Neither the United States Government nor any agency thereof, nor any of their employees, makes any warranty, express or implied, or assumes any legal liability or responsibility for the accuracy, completeness, or usefulness of any information, apparatus, product, or process disclosed, or represents that its use would not infringe privately owned rights. Reference herein to any specific commercial product, process, or service by trade name, trademark, manufacturer, or otherwise does not necessarily constitute or imply its endorsement, recommendation, or favoring by the United States Government or any agency thereof. The views and opinions of authors expressed herein do not necessarily state or reflect those of the United States Government or any agency thereof.
References
M. S. Albergo and E. Vanden-Eijnden. NETS: A non-equilibrium transport sampler. In Proceedings of the 42nd International Conference on Machine Learning (ICML), volume 267 of Proceedings of Machine Learning Research, pages 1026–1055. PMLR, 2025.
M. S. Albergo, G. Kanwar, and P. E. Shanahan. Flow-based generative models for Markov chain Monte Carlo in lattice field theory. Phys. Rev. D, 100(3):034515, 2019. doi: 10.1103/PhysRevD.100.034515.
M. Arbel, A. G. D. G. Matthews, and A. Doucet. Annealed flow transport Monte Carlo. In Proceedings of the 38th International Conference on Machine Learning (ICML), volume 139 of Proceedings of Machine Learning Research, pages 318–330. PMLR, 2021.
A. Barducci, G. Bussi, and M. Parrinello. Well-tempered metadynamics: A smoothly converging and tunable free-energy method. Phys. Rev. Lett., 100(2):020603, 2008. doi: 10.1103/PhysRevLett.100.020603.
B. A. Berg and T. Neuhaus. Multicanonical algorithms for first order phase transitions. Physics Letters B, 267(2):249–253, 1991. doi: 10.1016/0370-2693(91)91256-U.
R. T. Birge. The calculation of errors by the method of least squares. Phys. Rev., 40:207–227, 1932. doi: 10.1103/PhysRev.40.207.
G. Bussi and A. Laio. Using metadynamics to explore complex free-energy landscapes. Nature Reviews Physics, 2(4):200–212, 2020. doi: 10.1038/s42254-020-0153-0.
J. W. D. Connolly and A. R. Williams. Density-functional theory applied to phase transformations in transition-metal alloys. Phys. Rev. B, 27(8):5169–5172, 1983. doi: 10.1103/PhysRevB.27.5169.
J. Damewood, D. Schwalbe-Koda, and R. Gómez-Bombarelli. Sampling lattices in semi-grand canonical ensemble with autoregressive machine learning. npj Computational Materials, 8(1):61, 2022. doi: 10.1038/s41524-022-00736-4.
P. Dayal, S. Trebst, S. Wessel, D. Würtz, M. Troyer, S. Sabhapandit, and S. N. Coppersmith. Performance limitations of flat-histogram methods. Phys. Rev. Lett., 92(9):097201, 2004. doi: 10.1103/PhysRevLett.92.097201.
X. Du, J. Nam, J. Choi, W. Guo, S. Edamadaka, J. Sha, E. Pan, Y. Chen, M. Tao, and R. Gómez-Bombarelli. MetaDNS: Enhancing exploration in discrete neural samplers via well-tempered metadynamics. In Proceedings of the 43rd International Conference on Machine Learning, Proceedings of Machine Learning Research. PMLR, 2026a.
X. Du, J. Nam, S. Liu, and R. Gómez-Bombarelli. Scaling autoregressive models for lattice thermodynamics. arXiv:2603.14695 [cond-mat.stat-mech], 2026b.
D. Frenkel and A. J. C. Ladd. New Monte Carlo method to compute the free energy of arbitrary solids. Application to the fcc and hcp phases of hard spheres. J. Chem. Phys., 81(7):3188–3193, 1984. doi: 10.1063/1.448024.
P. Holderrieth, M. S. Albergo, and T. Jaakkola. LEAPS: A discrete neural sampler via locally equivariant networks. In Proceedings of the 42nd International Conference on Machine Learning, volume 267 of Proceedings of Machine Learning Research, pages 23397–23416. PMLR, 2025.
B. Kaufman. Crystal statistics. II. partition function evaluated by spinor analysis. Phys. Rev., 76(8):1232–1243, Oct. 1949. doi: 10.1103/PhysRev.76.1232.
A. Kong, J. S. Liu, and W. H. Wong. Sequential imputations and Bayesian missing data problems. Journal of the American Statistical Association, 89(425):278–288, 1994.
A. Laio and M. Parrinello. Escaping free-energy minima. Proceedings of the National Academy of Sciences, 99(20):12562–12566, 2002. doi: 10.1073/pnas.202427399.
A. G. D. G. Matthews, M. Arbel, D. Jimenez Rezende, and A. Doucet. Continual repeated annealed flow transport Monte Carlo. In Proceedings of the 39th International Conference on Machine Learning (ICML), volume 162 of Proceedings of Machine Learning Research, pages 15196–15219. PMLR, 2022.
T. Minka. Divergence measures and message passing. Technical Report MSR-TR-2005-173, Microsoft Research, 2005. URL https://tminka.github.io/papers/message-passing/minka-divergence.pdf.
S. Navas and Particle Data Group. Review of particle physics. Phys. Rev. D, 110(3):030001, 2024. doi: 10.1103/PhysRevD.110.030001.
R. M. Neal. Annealed importance sampling. Statistics and Computing, 11(2):125–139, 2001. doi: 10.1023/A:1008923215028.
T. Neuhaus and J. S. Hager. 2D crystal shapes, droplet condensation, and exponential slowing down in simulations of first-order phase transitions. Journal of Statistical Physics, 113(1–2):47–83, 2003. doi: 10.1023/A:1025718703965.
K. A. Nicoli, S. Nakajima, N. Strodthoff, W. Samek, K.-R. Müller, and P. Kessel. Asymptotically unbiased estimation of physical observables with neural samplers. Phys. Rev. E, 101(2):023304, 2020. doi: 10.1103/PhysRevE.101.023304.
F. Noé, S. Olsson, J. Köhler, and H. Wu. Boltzmann generators: Sampling equilibrium states of many-body systems with deep learning. Science, 365(6457):aeaw1147, 2019. doi: 10.1126/science.aaw1147.
N. Nüsken and L. Richter. Solving high-dimensional Hamilton–Jacobi–Bellman PDEs using neural networks: perspectives from the theory of controlled diffusions and measures on path space. Partial Differential Equations and Applications, 2(4):48, 2021. doi: 10.1007/s42985-021-00102-x.
H. Okamoto, D. J. Chakrabarti, D. E. Laughlin, and T. B. Massalski. The Au–Cu (gold-copper) system. Bulletin of Alloy Phase Diagrams, 8(5):454–474, 1987. doi: 10.1007/BF02893155.
E. Perez, F. Strub, H. de Vries, V. Dumoulin, and A. Courville. FiLM: Visual reasoning with a general conditioning layer. In Proceedings of the Thirty-Second AAAI Conference on Artificial Intelligence (AAAI), pages 3942–3951. AAAI Press, 2018. doi: 10.1609/aaai.v32i1.11671.
L. Richter and J. Berner. Improved sampling via learned diffusions. In International Conference on Learning Representations (ICLR), 2024.
L. Richter, A. Boustati, N. Nüsken, F. J. R. Ruiz, and Ö. D. Akyildiz. VarGrad: A low-variance gradient estimator for variational inference. In Advances in Neural Information Processing Systems, volume 33, pages 13481–13492, 2020.
J. M. Sanchez, F. Ducastelle, and D. Gratias. Generalized cluster description of multicomponent systems. Physica A: Statistical Mechanics and its Applications, 128(1–2):334–350, 1984. doi: 10.1016/0378-4371(84)90096-7.
R. Soletskyi, M. Gabrié, and B. Loureiro. A theoretical perspective on mode collapse in variational inference. Machine Learning: Science and Technology, 6(2):025056, 2025. doi: 10.1088/2632-2153/adde2a.
S. Vaikuntanathan and C. Jarzynski. Escorted free energy simulations: Improving convergence by reducing dissipation. Phys. Rev. Lett., 100(19):190601, 2008. doi: 10.1103/PhysRevLett.100.190601.
A. van de Walle and M. Asta. Self-driven lattice-model Monte Carlo simulations of alloy thermodynamic properties and phase diagrams. Modelling and Simulation in Materials Science and Engineering, 10(5):521–538, 2002. doi: 10.1088/0965-0393/10/5/304.
A. van den Oord, N. Kalchbrenner, and K. Kavukcuoglu. Pixel recurrent neural networks. In Proceedings of the 33rd International Conference on Machine Learning (ICML), volume 48 of Proceedings of Machine Learning Research, pages 1747–1756. PMLR, 2016.
F. Vargas, W. Grathwohl, and A. Doucet. Denoising diffusion samplers. In International Conference on Learning Representations (ICLR), 2023.
F. Wang and D. P. Landau. Efficient, multiple-range random walk algorithm to calculate the density of states. Phys. Rev. Lett., 86(10):2050–2053, 2001. doi: 10.1103/PhysRevLett.86.2050.
P. Wirnsberger, A. J. Ballard, G. Papamakarios, S. Abercrombie, S. Racanière, A. Pritzel, D. Jimenez Rezende, and C. Blundell. Targeted free energy estimation via learned mappings. J. Chem. Phys., 153(14):144112, 2020. doi: 10.1063/5.0018903.
U. Wolff. Collective Monte Carlo updating for spin systems. Phys. Rev. Lett., 62(4):361–364, 1989. doi: 10.1103/PhysRevLett.62.361.
D. Wu, L. Wang, and P. Zhang. Solving statistical mechanics using variational autoregressive networks. Phys. Rev. Lett., 122(8):080602, 2019. doi: 10.1103/PhysRevLett.122.080602.
Q. Zhang and Y. Chen. Path integral sampler: A stochastic control approach for sampling. In International Conference on Learning Representations (ICLR), 2022.
A Technical appendices and supplementary material
§A.1 Sampling from the SGC ensemble.....14
§A.2 LEAPS.....15
§A.3 Deriving the reparametrized corrector.....15
§A.4 Phase diagram construction.....17
§A.5 Joint optimization of the autoregressive network.....18
§A.6 The prior objective as the VarGrad generalized.....19
§A.7 Proof of the local equivariance of the U-net pyramid.....21
§A.8 The FiLM setup.....23
§A.9 Re-indexing the fcc lattice onto an integer grid.....24
§A.10 Ablation study of prior-only and transport-only networks.....24
§A.11 Model and training details.....24
§A.12 Multiscale 2D Ising result comparison.....26
§A.13 Sensitivity analysis of FrOGS phase count.....27
§A.14 FrOGS vs. conventional Monte Carlo.....28
A.1 Sampling from the SGC ensemble
Our goal is to sample from the semi-grand canonical ensemble. Consider a fixed lattice of sites indexed by . For a -component alloy, each site carries an occupation variable labeling the chemical species on it. A configuration is drawn from the configuration space with . The species counts and concentrations are
where is the Kronecker delta. The configurational energy is supplied by a cluster expansion fit to first-principles data,
with effective cluster interactions and cluster correlation functions . For our purposes, is simply a scalar function of the configuration that is cheap to evaluate.
In the SGC ensemble, the number of sites and the temperature are held fixed while the composition fluctuates through exchange with a reservoir set by chemical potentials . Because is constrained, only the chemical potential differences are thermodynamically meaningful. Taking species as the reference, we define for and collect them as . A thermodynamic condition is then the pair , and with the semi-grand canonical partition function is
where an additive constant common to every configuration has been absorbed into the free-energy reference. Introducing the effective Hamiltonian
the equilibrium distribution we wish to sample is the Boltzmann distribution
For a binary alloy ; we use instead of , this reduces to , with as a scalar.
The thermodynamic potential, which we refer to as the free energy, is
A general observable follows from .
The usual challenge is that is a sum over configurations and is intractable to evaluate directly. A sampler that both draws from and yields an unbiased estimate of across a range of conditions from a single trained model would be beneficial, which is what we aim to provide.
A.2 LEAPS
The following is a brief summary of the theory of LEAPS [Holderrieth et al., 2025] concerning our research.
The rate matrix ( ) transports exactly along the path iff it solves the Kolmogorov forward equation (KFE):
which an arbitrary network will not. LEAPS records the mismatch within the operator :
is the KFE mismatch minus the change in free energy, since (LHS - RHS of KFE)/ , with shorthand for the right-hand side of the KFE.
Each sample integrates this residual along its own trajectory into a log-weight
analogous to the accumulated work in the Jarzynski equality, given at perfect transport. Crucially, the discrete-state Jarzynski equality holds for any [Holderrieth et al., 2025, Thm. 5.2],
and any observable is recovered by reweighting, . This gives us the two properties FrOGS is built on: a direct estimate of and consistent observables.
Since exactly when , the transport is trained by minimizing the weight variance. LEAPS minimizes the residual of the KFE with a physics-informed neural network (PINN),
where . , the unique minimizer of , has satisfying the KFE and [Holderrieth et al., 2025, Prop. 6.1]. Here ( in our case, with and additionally as inputs) is a free-energy network, a scalar function of time that tracks the part of ; it is a training-time device and enters neither nor the free-energy readout. The reference measure is arbitrary provided its support covers the path, so states may be drawn from a replay buffer rather than fresh simulations.
The remaining obstacle is computational. Evaluating Eq. (15) requires the reverse rates at all single-site neighbors of . LEAPS solves this issue with a locally equivariant parametrization of ( ) that yields the whole sum in a single forward pass.
A.3 Deriving the reparametrized corrector
This appendix explains the algebra behind Eq. (7).
Notation. We derive everything at a fixed condition c. For a configuration , a site i and a token , write
as in the main text. since the normalizations cancel in the ratio. Two elementary facts about the swap operation are used repeatedly. Firstly, the move is undone by a swap on the same site,
Secondly, the energy difference of that reverse move is the negative of the forward one,
Throughout, , and is the Metropolis factor of Eq. (7).
We first state two short lemmas.
Lemma 1. For any , i and ,
Proof. Write . By Eq. (21), the reverse move carries energy difference , so . The claim is then , which holds for all .
Eq. (22) is the familiar statement that the Metropolis acceptance function satisfies detailed balance; we adopt it purely as an algebraic cancellation.
Lemma 2 (Reverse rate from a single pass). Under the local equivariance condition (5), the reparametrized reverse rate is
i.e. it is determined by quantities already available from the forward pass at together with the scalar .
Proof. Apply the definition (7) at with token , then use Eq. (5) in the form . Positivity of lets the factor pass through the positive part, giving .
Now we are well-equipped to prove our main result.
Proposition 1. Let be given by Eq. (7). Then the corrector (15) evaluated on is
and .
Proof. Substituting Eq. (7) into Eq. (15) and abbreviating , , , , the term of the sum indexed by reads, using Lemma 2,
By Lemma 1, , so the divergent factor disappears:
Inserting this into Eq. (15), whose sum enters with an overall minus sign, gives the claimed expression. The bound follows from .
Before the reparametrization, the two factors of a strongly downhill move are handled separately: is evaluated as a number and multiplied by a reverse flux that a well-trained network drives to zero on exactly such a move. After Proposition 1, the ratio never appears as a standalone quantity. The ratio is absorbed into , whose exponent is non-positive by construction. The same holds for the gradient, , which is bounded by .
Unbiasedness is preserved. The discrete Jarzynski equality (17) holds for any rate matrix [Holderrieth et al., 2025, Thm. 5.2], so the only thing to check is that is a rate matrix and that the weight is accumulated with the matching corrector. The former is immediate: and give , and the moves are single-site by construction. The latter is the content of Proposition 1: samples are simulated with and their log-weights (16) integrate . The pair therefore satisfies the LEAPS framework, and continues to hold exactly.
Expressiveness is preserved. Finally we make precise the claim that the reparametrization preserves representational power. Call a rate matrix one-way if for every , at most one of and is nonzero. The locally equivariant parametrization (5) produces one-way rate matrices, since forces .
Proposition 2. For every one-way rate matrix there is an antisymmetric flux satisfying the local equivariance (5) with , and vice versa. The reparametrized family therefore coincides with the family , so the universal-representation property [Holderrieth et al., 2025, Prop. 8.1] carries over.
Proof. Given , define
which is well defined because everywhere. Exchanging the roles of and swaps the two terms and hence negates , so the local equivariance (5) holds. If then one-wayness kills the second term and , and thus . If then and . The converse direction is the reparametrization (7) itself, whose output is one-way.
The reparametrization as an inductive bias. Beyond numerical safety, the reparametrization (7) changes what the network has to learn. A Metropolis-like M is already being multiplied, so the network only has to supply the deviation from such equilibrium-respecting local dynamics. Empirically, this is visible as a faster early decrease of the PINN loss with the reparametrized rate matrix.
A.4 Phase diagram construction
We describe the phase diagram constructor which yields the entire phase diagram with the samples from a single trained FrOGS model. For this process, we only need for each sample m its log-weight (16) and its composition. No information about the phases is supplied by hand a priori.
From weights to a fixed-composition free energy. The learned prior is exactly normalized ( , §4.1), so combining Eq. (2) with Eq. (3) gives for any function of the final configuration. Take to be the indicator that the configuration contains exactly atoms of species 1. Every configuration in that class carries the same factor , since multiplies only in , so it comes outside the sum:
The left-hand side is estimated without bias by the sample average . The right-hand side is the partition function at a fixed composition times a factor. Dividing by therefore gives an unbiased estimator of on the integer lattice , with :
This is a histogram with no bin-width parameter, composition being discrete by construction. In practice, the sum is accumulated with the largest factored out.
Combining information from all conditions. Because carries no -dependence, every at a given temperature yields an estimate of the same curve , each from an independent set of samples. Let be the estimate of from the -th condition. Since (29) is a sum of i.i.d. weights, the delta method gives the standard error of as
Sums are over the samples drawn at condition i that land in bin n. This is the effective sample count restricted to the bin.
Since condition places most of its samples near its own equilibrium composition , is smallest for bins near that composition and grows with distance from it; bins the condition never reaches contribute nothing. Estimates that are unbiased and independent differ only in variance, so the minimum-variance way to merge them is to weight each by its precision:
Let be the number of conditions with . Typically , and
has expectation when the are accurate. The conditions independently estimate the same , and their estimates should then scatter about it by just the amount the weights predict. This statistic thus cross-checks the accuracy of the . We scale every error bar at that temperature by with [Birge, 1932, Navas and Particle Data Group, 2024]. The median keeps insensitive to a few discrepant bins, and the one-sided maximum means the correction can only widen an error bar.
Coexistence as a common tangent. Two phases coexist when one line is tangent to at two compositions . Such a line shares with both phases its slope, which is the chemical potential , and its intercept at , which is the semi-grand potential per site (Eq. (13)). Any overall composition between and is then realized not as a homogeneous solid but as a mixture of the two phases, which is why the interval is called a two-phase region and the phase boundaries. We accept a hull edge as a tie-line only if (i) it skips at least four compositions; (ii) the measured lies at least three standard errors above it somewhere in between, or no sample at any condition ever visits those compositions (evidence of a gap); and (iii) the same gap appears at the temperature below. Thus, a two-phase region ends at the highest temperature at which its edge is still accepted.
Reading the two alloys. For AgPd, the hull has a single tie-line at every temperature, with one miscibility gap, giving the Ag-rich and Pd-rich phase boundaries together with and closing at a critical point (Fig. 3a). For CuAu several tie-lines coexist, and the construction returns the ordered phases , CuAu and at their tangent compositions (Fig. 3b). A tie-line closes where the two phases' compositions merge, which for phases near the same stoichiometry can happen before their atomic ordering is actually lost. The resulting temperatures are therefore not by themselves order-disorder transition temperatures, in the most precise sense.
A.5 Joint optimization of the autoregressive network
The annealing path is the linear interpolation
where stands for the weights of the autoregressive network. Both ingredients of the corrector (15) then carry an explicit -dependence:
To be precise, is the log of an unbiased estimator, so it carries a Jensen bias propagating to in . The leading order term of the bias stays below the reported standard error if the mean over contributing conditions exceeds .
constant in at fixed , and every single-move difference entering the Metropolis factor is
with . A single backward pass through Eq. (18) therefore returns gradients for at once.
A.6 The prior objective as the VarGrad generalized
Section 2 contrasts FrOGS with the autoregressive samplers that are trained on a reverse KL divergence, and §4.1 asserts that our prior is not mode-seeking because it is not trained on that objective. This appendix makes the assertion precise. We show that the gradient FrOGS applies to its autoregressive prior is equivalent to VarGrad [Richter et al., 2020] when the transport is switched off, and that the mechanism of the log-variance loss escaping mode-seeking behavior survives even if the transport is on. Throughout we write the unnormalized target as , so that , and denotes the weights of the autoregressive prior as in §A.5.
Given an unnormalized target and a normalized model , the log-variance loss [Richter et al., 2020, Nüsken and Richter, 2021] is
where is any distribution whose support contains those of and .
Importantly, can be independent from . The loss may therefore be evaluated on states the model itself would rarely produce, which a reverse KL cannot do because its expectation is taken under the model by definition. In fact, taking (stop-gradient) recovers the leave-one-out REINFORCE gradient of the reverse KL up to a factor, meaning VarGrad contains the reverse-KL training as a special case [Richter et al., 2020].
We now prove that FrOGS with the transport switched off is VarGrad.
Proposition 3. At a fixed condition , with the linear interpolation (33) and the autoregressive prior, set and let the reference measure be for all . Then the sample is stationary, , and its log-weight (16) is
and consequently . Moreover, if the free-energy head attains its conditional optimum at every s, then the PINN loss (18) equals the same quantity,
so the bound of Eq. (18) holds with equality at .
Proof. With , the sum in the RHS of Eq. (15) is 0, so
by Eq. (34). A sample with zero rates never moves, so . Eq. (16) integrates a constant along and returns Eq. (37):
For the second claim, the integrand of the LEAPS PINN loss (18) at time is ; minimizing this over the scalar gives the stated optimum and the residual , which is -independent and therefore remains unchanged after the average over .
Eq. (38) identifies as the term that cancels out the mean and leaves the variance behind. The estimator of Richter et al. [2020] centers by the minibatch mean, which is legitimate because every sample in the batch shares one target. A FrOGS minibatch does not since it mixes times and conditions , whose free energies differ by many across the training box. The learned supplies the per- baseline that repairs this. This is consistent with its status in §A.2 as a training-time device.
The general case. For , the object being controlled is the path-space log-variance , which is the path-measure divergence of Nüsken and Richter [2021] carried onto a discrete state space [Richter and Berner, 2024, Holderrieth et al., 2025]. Two features of the reduction nonetheless persist.
Writing for the pointwise residual of Eq. (18), the gradient splits into a term carried by the annealing path and a term carried by the Metropolis acceptance:
Derivation. Differentiating gives the first equality of Eq. (39), the reference being held fixed and carrying no , so that . By Proposition 1,
and is a function of alone. The prior therefore enters in two places.
For ,
For , differentiate away from the measure-zero kink at :
the second identity being the single-move difference of §A.5. Multiplying by and summing gives .
We now argue is secondary to . For the sigmoid parametrization of , the derivative of the per-site with respect to the head's pre-activation output is , bounded regardless of how small becomes. is a continuous function of and is also bounded. Thus, on a compact weight set , which the weights stay in after finitely many bounded updates, every factor of the summand is bounded uniformly in . Three structural factors then suppress it relative to : the indicator discards downhill moves, damps the rest, and the prefactor removes the term as , whereas carries no such prefactor and retains full weight along the path. We therefore focus on .
raises on reference states where and lowers it where . The reference is a buffer of states generated earlier, so and the buffer drifts away from the current prior under a working transport. Against a reference that covers a mode, abandoning that mode is penalized: if leaves a set empty on which has mass while still samples , then there and inflates . This means the objective is not mode-seeking.
The above argument requires overlapping with . LEAPS requires supp to cover the path for Prop. 6.1 to identify the minimizer, and the log-variance loss constrains only on supp . What we claim is that the independence of does not let mode collapse be self-reinforcing. In contrast, under a reverse KL the expectation is taken under the model, so a mode the model has already abandoned produces no gradient and cannot be recovered. Here the states supplies are set by two mechanisms independent of how well is trained: the prior is initialized near-uniform; the injected moves are Metropolis moves with respect to , mixing on the flatter landscape at small . Coverage on the systems reported here is thus something empirically verified, not guaranteed, and Table 1 is the measurement.
A.7 Proof of the local equivariance of the U-net pyramid
We prove that the U-net architecture's output at site does not depend on the token at site at a given condition , which is equivalent to the proof of the local equivariance of the full network. The argument is an induction over the lattice pyramid.
Goal. Write . The flux is in LEAPS, so the antisymmetry (5) holds if the head is locally invariant:
which is the statement that is a function of alone, being the set of lattice sites. We will prove Eq. (42).
The network. The two alloys and the Ising cell are binary, , so and the only token available at site is . Thus, and, with the linear projector (the functional form we inherit from LEAPS), the network needs to emit only the per-site scalar . The implementation produces it as
(43)
where is a learned read-out vector, is the output of the first layer (finest scale) of the U-net decoder. For general , the head is the same object and the readout emits one score per token, , from which the score of the occupied token is subtracted, realizing . In both cases Eq. (42) reduces to the claim that does not depend on .
Let and let . Level is obtained from level by a non-overlapping average pool with per-axis stride (a single integer stride is the isotropic special case; anisotropic schedules such as can be used, namely for the CuAu supercell):
Define the cell of a level- index p as the set of physical sites it aggregates,
A field f carried at level is called cell-blind if
Cell-blindness at level 0 is exactly Eq. (42), since . Now, we prove each component of our architecture is cell-blind by building up the lemmas. The lemmas will be exploited in Prop. 4 to prove that the head is locally invariant by induction.
Lemma 3. Work along a single axis. Let the original axis have length and the pooling stride be , so the pooled axis has length , and assign to each the parent . Then:
(i) (pooling partitions the axis) the sets , , are non-empty, pairwise disjoint, and cover ;
(ii) (upsampling inverts the partition) nearest-neighbor upsampling maps a length-m array a to the length-L array whose entry at n is , and
so each index receives the value of its own parent only;
(iii) (partitioning in three dimensions) the cells partition at every level and are nested as , and by (ii), the feature upsampled from level to index of level is the one carried by , the unique pooled index whose cell contains .
Proof. (i) iff . These intervals are pairwise disjoint, and each meets , since gives . Furthermore, the intervals cover , since gives .
(ii) For , we have and Eq. (47) reads . For , put , so that . Then , so writing with ,
because while forces . Thus, has as its floor.
(iii) A product of partitions is a partition, which gives the claim at a single level. Disjointness then propagates from level to level because is a union of -cells over a partition of the level- indices. Nesting and the reading of the upsample are (i) and (ii) restated.
Lemma 4 (State-dependent convolution). Let h be a cell-blind field at level . Suppose every axis of has length , and let
with an arbitrary collection of with . Then y is cell-blind.
Proof. is a function of by hypothesis, so is too. The center is excluded, and under circular indexing, s.t. only if some axis has length ( and (mod ) iff ), which the hypothesis excludes. Hence, every entering the sum is a function of on a cell disjoint from . A product and a sum of functions of is again one.
Lemma 4 requires the pyramid to have all axis lengths greater than or equal to 2 at the coarsest scale. At length 1, the leak would be invisible at initialization because the state-dependent kernels start at , but it would grow with training.
Lemma 5. Let h, be cell-blind fields at level . Then each of the following is cell-blind:
(i) for any fixed applied index-by-index (the SiLU activations, and the convolution that merges in the decoder);
(ii) the FiLM modulation ;
(iii) , the concatenation of with any scalar field that is itself cell-blind, namely the leave-one-out context .
Proof. (i) is trivial since composing a function of with a map that touches only index yields a function of the same variables. (ii) and are outputs of an MLP evaluated on the (affinely rescaled) condition alone, and they act index-by-index, so (i) applies. (iii) omits , hence omits every site of , while the retained , , are functions of on cells disjoint from . Thus, is cell-blind and (i) applies to the concatenation.
Part (iii) is important because it says that local invariance does not require locality. is a global statistic, and it works because it omits the site's own cell. This lets the head see the phase it is in (ordered vs. disordered, Ag-rich vs. Pd-rich) without seeing .
Proposition 4. Assume every axis of the coarsest level has length . Then every encoder feature , every upsampled feature, and every decoder feature is cell-blind. In particular, is cell-blind, so of Eq. (43) satisfies Eq. (42).
Proof. Fix a level and consider the encoder block acting on and . Its first layer is a center-masked circular convolution, cell-blind by Lemma 4. Each subsequent layer is a FiLM modulation (Lemma 5(ii)), an activation with optional leave-one-out concatenation (Lemma 5(i),(iii)), or a state-dependent convolution (Lemma 4). By induction over the layers, is cell-blind; this holds at every level the coarsest).
Now descend the decoder by downward induction on . Write for the decoder feature at level . For the step, assume is cell-blind. Nearest upsampling gives index the parent value (Lemma 3(ii)), a function of by hypothesis. , so . Therefore, the upsampled field is cell-blind at level . Merging it with the cell-blind encoder skip by a convolution and a FiLM (Lemma 5(i),(ii)), then refining by state-dependent convolutions over (Lemma 4), preserves cell-blindness. Hence, is cell-blind, so is cell-blind, proving Eq. (42).
Numerical verification. The equivariance is numerically cross-checked. For binary spins, we first check the sign relation at every site. For both the trained AgPd ( , isotropic pooling, two levels) and CuAu ( , one-level anisotropic and then one-level isotropic pooling) transport networks, and over every site of the cell, the residual sits at the float32 round-off floor, tracking with . A control that keeps the trained weights but only removes the center mask violates it by , six orders of magnitude larger. This confirms that the mask enforces the identity. Moreover, flipping leaves the readout unchanged to . Finally, holding fixed and sweeping over the whole training box leaves the relative residual flat at , as Lemma 5(ii) predicts that FiLM conditioning cannot break the local equivariance at any .
A.8 The FiLM setup
We first rescale per axis to a normalized by , where is the training box (e.g. and K for AgPd). The two conditioning axes differ by three orders of magnitude, so without the normalization the temperature channel would

Figure 5: Diagram explaining the re-indexing of the fcc lattice onto an integer grid. The Ising model is on a 2D square lattice, so it needs no re-indexing (left). AgPd and CuAu are both 3D fcc lattices, so the shearing transformation can pack the crystal into a dense 3D simple cubic grid.
dominate the first linear layer of the conditioning MLP at initialization. We follow the generic setup: a small MLP maps to a per-channel scale and shift , and each hidden feature map is modulated as . The MLP is zero-initialized so that , (the identity) at step 0.
A.9 Re-indexing the fcc lattice onto an integer grid
Both networks of §4 are three-dimensional convolutions, which act on a dense integer array. The sites of an fcc alloy sit on a non-orthogonal Bravais lattice, and embedding them in the conventional cubic cell leaves half of the sites empty. We instead label each site by its coordinates in the primitive basis, which turns the fcc lattice into a dense grid (Fig. 5).
Write the fcc primitive vectors in terms of the conventional lattice parameter ,
and assign to the integer triple the physical site . The map is a bijection from onto the fcc lattice. Geometrically it is a shear that tilts the angles between the primitive vectors to , so the lattice becomes simple-cubic in index space while (9) continues to be evaluated on the physical geometry to preserve the original thermodynamics.
A.10 Ablation study of prior-only and transport-only networks
Fig. 6 shows the ESS heatmaps of two ablated models, one with the transport set to identity (), and the other with the prior set to uniform following the original LEAPS setup. Both are trained under the same conditions as the full FrOGS model. Both models sample substantially less effectively than FrOGS (Fig. 4). Notably, the ESS of the uniform prior model collapses in the ordered region, indicating the model cannot set up a transport to balance weights across samples. This ablation demonstrates that both components contribute substantially.
Fig. 7 shows that the raw output is balanced across degenerate modes, but the distribution after importance weighting is collapsed to one mode. The variance in the importance weights explained in the first few paragraphs of §4.1 causes this imbalance, since only a few samples have large importance weights.
A.11 Model and training details
We first optimize the autoregressive part of our network by comparing the training-time statistics (training loss and corrected standard deviation of the importance weights) over the final 10k optimizer steps on the CuAu system, which has a long-range ordering that the autoregressive part should model (Table 2). The transport part is fixed at (the number of decoder blocks),

(a) autoregressive only

(b) transport only
Figure 6: ESS plots of the ablated models.


(c)
(d)

Figure 7: Deepest-ordered-cell diagnostic for the uniform-prior CuAu ablation. (a) Location in of each phase's most-ordered grid cell (most gated samples, gating criterion explained in Table 1). (b–d) At each anchor, bars are the share of unweighted ordered samples landing in each of the degenerate ordering variants of that phase; black diamonds are the share after applying the importance weight. The bars sit close to flat (dotted line) and all variants are populated everywhere, so the raw sampler output does not collapse. On the other hand, the importance-weighted distribution is effectively single-variant at all three points.
(the number of convolutional layers in a block), and Q-net width 16. Both the train loss and the corrected importance weight standard deviation (std , defined subsequently) are logged once per optimizer step, so each entry summarizes samples. to be comparable across different . train_loss is a squared residual with a heavy right tail, so we report the median and the 99th percentile. std is the per-step spread of the corrected work and is the quantity ESS responds to.
For the optimization of the hyperparameters of the transport part of the network, we compare the training-time statistics over the final 10k optimizer steps on the 2D-Ising model with L = 20 (Table 3).

Figure 8: Architecture of the autoregressive prior. A type-A causally masked three-dimensional convolution (center excluded) followed by three type-B layers (center included) and a () head emits a conditional probability. We use zero padding, not circular, to conceal future sites.
Table 2: Training time statistics for the CuAu model over the hyperparameters of FrOGS. The bolded row is the setup we choose.
| AR width | train_loss | std[Acorr] | |||
|---|---|---|---|---|---|
| median | p99 | median | p99 | ||
| 32 | 0 | 0.45 | 3.79 | 0.99 | 3.75 |
| 32 | 10 | 0.59 | 3.61 | 0.49 | 2.36 |
| 32 | 40 | 0.57 | 3.43 | 0.41 | 1.81 |
| 16 | 200 | 1.28 | 10.49 | 0.68 | 2.56 |
| 32 | 200 | 0.58 | 4.23 | 0.38 | 1.60 |
| 64 | 200 | 0.56 | 4.51 | 0.39 | 1.75 |
The autoregressive part is fixed at width 32 and is set equal to 10. The flat + enc10 model had nonfinite loss for 75 of 10000 loss entries, which we excluded when computing the table entries.
We choose the pyramid architecture with 3 encoders plus 2 decoders () and the autoregressive model width of 32 based on these experiments. We select for training. The autoregressive network is registered as a second Adam parameter group with a slower step size ( for the transport and free-energy networks, for the prior, in every experiment reported here). We use discretization steps from to 1.
A.12 Multiscale 2D Ising result comparison
The learned sampler reproduces 2D-Ising thermodynamics at every cell size. The partition function tracks the Kaufman value to within per site across the full temperature range (Fig. 9b). The mass balance sits near 0.5 at all three sizes (Fig. 9c) due to the importance weights correcting the one-sided raw counts, and at criticality follows the same-size Wolff reference mostly within for all scales (Fig. 9d). Panel (a) should not be interpreted as a quality ranking since the effective sample size at fixed M falls with N for any sampler, the log-weight variance being extensive. Dividing that out gives and 0.016 at , which is not monotonic in L.
Table 3: Training time statistics for the 2D Ising model over the hyperparameters of the transport part of FrOGS. The bolded row is the setup we choose.
| Arm | train_loss | std[ ] | |||
|---|---|---|---|---|---|
| median | p99 | median | p99 | ||
| pyramid ( ) | 1 | 0.80 | 4.09 | 0.53 | 6.86 |
| 2 | 0.88 | 6.33 | 0.56 | 3.49 | |
| 5 | 1.60 | 9.78 | 0.75 | 5.38 | |
| flat ( ) | 2 | 1.11 | 5.79 | 0.67 | 2.87 |
| 5 | 1.38 | 7.64 | 0.71 | 7.05 | |
| 10 | 6.37 | 2.49 | 9877.04 | ||
| 20 | 2.09 | 40.04 | 0.83 | 8.51 | |

b
C
d
Figure 9: 2D Ising at . FrOGS models with the same hyperparameters trained separately at each lattice size and evaluated on the h = 0 line. (a) ESS vs. . (b) Partition-function error per site against the exact finite- Kaufman value. (c) Importance-weighted mass on , which is compared to the 0.5 reference (dotted line). (d) Correlation function at against a Wolff reference on the same lattice (dashed). walkers per temperature and no MCMC mixed in during evaluation.
A.13 Sensitivity analysis of FrOGS phase count
We conduct a sensitivity analysis of FrOGS with the baseline discrete neural sampler SEGAL [Damewood et al., 2022], showing our model discovers the phase robustly regardless of the tie-line construction threshold of our phase diagram constructor ( A.4). The phase diagram constructor certifies a convex-hull gap of as a tie-line if it fulfills three conditions: a width of at least four lattice steps, a chord depth exceeding three standard errors (or a measured absence), and an x-overlap with a certified gap at one temperature below, anchored at the lowest temperature. Thus, the current analysis has two threshold levers of and , plus two additional rules of the measured absence and persistence (having an x-overlap with the row below).

Figure 10: Phase diagram of 128-site CuAu, drawn with FrOGS initialized with four different seeds.
We count the number of the phases of the samples generated by both FrOGS and SEGAL [Damewood et al., 2022], while sweeping across , three different persistence rules, the measured-absence route on or off, and the bin floor for the statistic of §A.4. This results in 2268 settings per sampler. We count phases as the number of compositions at which one tie-line ends and the next begins. A composition is admitted if it chains unbroken from the lowest temperature row, drifting by at most two lattice steps per row. Under this counting scheme, FrOGS resolves three ordered compounds and SEGAL two across all settings, the difference being at .
Additionally, we use four different seeds for training FrOGS models for the CuAu system and report the phase diagrams from each sampler in Fig. 10. This demonstrates that the phase diagram drawn with FrOGS agreeing with metadynamics was not a single lucky event. All four seeds resolve the three ordered compounds at and match the metadynamics phase boundaries closely.
A.14 FrOGS vs. conventional Monte Carlo
FrOGS. The CuAu model of §5.3 trains for steps in 4.5 GPU-hours on one NVIDIA A100. Sweeping over the conditions takes 75 s per condition for walkers over a 125-step CTMC on an A100, equivalent to 31 GPU-hours for the grid.
Conventional Monte Carlo. We implemented a single-site semi-grand canonical Metropolis kernel on the same cluster expansion and 128-site cell, using the standard local update in which only the cluster occurrences touching the flipped site are summed. Its agrees with our reference implementation to . It sustains attempted flips per second on one CPU core, and that rate is flat to over the whole box.
Table 4: Where each sampling framework struggles the most, and what the other does there. The table lists the eight conditions of lowest FrOGS ESS, with the Metropolis integrated autocorrelation time in passes (1 pass is 128 attempted flips) and the core-seconds needed to reach SE(x) = 10⁻³.
| Δμ [eV] | T [K] | FrOGS ESS | τ_int [passes] | core-s |
|---|---|---|---|---|
| +0.010 | 625 | 0.0003 | 1.3 | 0.02 |
| -0.010 | 625 | 0.0003 | 426.8 | 210.5 |
| +0.010 | 675 | 0.0011 | 12.3 | 1.07 |
| 0.000 | 675 | 0.0049 | 3.4 | 0.23 |
| +0.010 | 700 | 0.0064 | 4.9 | 0.82 |
| 0.000 | 625 | 0.0089 | 7.7 | 0.14 |
| -0.010 | 675 | 0.0158 | 54.6 | 24.6 |
| -0.010 | 725 | 0.0272 | 5.1 | 1.18 |
The integrated autocorrelation time is around attempted flips in the disordered region and at least attempted flips inside the low-temperature two-phase region. Charging each condition the passes it needs for a common standard error on , rows we measured at K cost 0.32 core-hours over 72 conditions, while four conditions at K cost 15 core-hours between them. If we go lower, the system cannot equilibrate. At 200 K, seven of 36 chemical potentials give chains that freeze into different basins, with differing between seeds by as much as 0.14 while each chain reports its own error bar as below , which is a small error bar on a wrong answer. Anchoring one chain per phase, as the standard protocol does, removes this and returns the grid to a few core-hours, at the price of supplying the phases in advance.
The two methods struggle in different places. At the eight conditions where the FrOGS ESS is lowest, all of them on the CuAu order-disorder line near , the chain remains ergodic: six seeds agree, and the costliest needs 210 core-seconds (Table 4). At ten conditions where the chain is non-ergodic, FrOGS holds ESS between 0.55 and 0.97, median 0.85. Neither method inherits the other's worst case.
Finally, we remark that even in the small regions where FrOGS has low ESS, the free energy is still recovered by pooling precision-weighted estimates from neighboring conditions (§A.4), so phase boundaries can be resolved.