Inferring phase transitions and critical exponents from limited observations with thermodynamic maps Authors: Lukas Herron, Kinjal Mondal, John S. Schneekloth, Pratyush Tiwary Published: 2024 ABSTRACT SignificancePhase transitions play a pivotal role in diverse scientific domains, from metal solidification to water boiling and biological macromolecule folding. However, quantifying these transitions, especially their temperature-dependent attributes, presents challenges due to complex and sparse data. This study introduces “thermodynamic maps” (TM), an approach merging statistical mechanics, molecular simulations, and generative AI. TM efficiently characterizes temperature-dependent attributes, even with limited data from stable phases. Demonstrating its efficacy, TM precisely infers critical exponents of the Ising model and deciphers complex behaviors in challenging RNA systems. Beyond theoretical implications, TM’s computational efficiency suggests its potential for studying multifaceted behaviors in data-scarce scientific realms, contributing to a deeper understanding of complex systems and their coordinated constituents. Phase transitions are widely observed in biological, material, and social sciences. Across these disciplines, phase transitions can be defined as the emergence of higher-level, large-scale organization from the coordinated, short-range interactions between many individual constituents. Classical examples include the ferromagnetic to paramagnetic transition, boiling of water, and conformational transitions in biomolecules like proteins and nucleic acids. Statistical mechanics, and especially the framework of energy landscapes, provides a simple and unifying way of studying phase transitions in these diverse systems (1). In this work, we are specifically interested in phase transitions in systems that stay in equilibrium throughout. For these, the Boltzmann distribution relates the probability of finding a system in a particular microscopic configuration x to its energy U(x) and the system’s inverse temperature β as[1]μ(x,β)=e−βU(x)Z(β)with[2]Z(β)=∫e−βU(x)dx.Z(β) is a normalization constant known as the partition function, whose behavior is often associated with phase transitions. Exploration of the energy landscape is guided by competition between energy and entropy, which is encapsulated by a temperature-dependent free energy F(β) which may be computed from the partition function as[3]F(β)=−β−1lnZ(β). At a glance, Eqs. 1–3 suggest that the relationship between temperature, energy, microscopic probability, and macroscopic free energy is simple and tractable. It appears as if with these equations, one has the machinery to directly calculate the free energy across temperatures. By doing so for different macroscopic phases, one could then obtain various thermodynamic attributes of phase transitions, including transition temperatures and phase diagrams. By calculating appropriate fluctuations, one could directly obtain response functions such as heat capacities. In reality, however, the situation is quite complex. Studying phase transitions and their characteristics computationally is made difficult by Eq. 2, which requires integrating over a (usually) intractably large number of dimensions. Numerous elegant theoretical and computational schemes have been proposed over the decades to solve this problem. For example, this includes methods like free energy perturbation, Markov chain Monte Carlo (MC) methods, the replica trick and others (2–7). In this study, we propose a generative AI based approach that characterizes phase transitions by effectively learning the temperature dependence of the partition function, and therefore the free energy. Our method, which we call “thermodynamic maps” (TM) incorporates score-based generative modeling into the framework of free energy perturbation within statistical mechanics (8–11). The central idea underlying TM is to map the temperature dependence of configurational ensembles of a complex system to and from the temperature dependence of a simple, idealized system. We show how such a bidirectional mapping can be obtained. This allows for efficient generation of physically realistic samples of the complex system with the correct Boltzmann weights. Within the framework of free energy perturbation, the mapping also allows for temperature-dependent free energy estimates. We demonstrate the broad applicability of TM for three complex systems where we compare against benchmarks from theory, extensive computational studies, and experiments. The first system we consider is the Ising model on a two-dimensional square lattice. With observations made at two temperatures, one deep in the paramagnetic regime and the other deep in the ferromagnetic regime, we are able to correctly infer critical behavior. We then study two different RNA systems: the GCAA tetraloop and HIV-TAR RNA (12, 13). For both of these, we infer the temperature dependence of the equilibrium distribution across temperatures using TM trained on data generated by short molecular dynamics (MD) simulations. For both RNA systems, we predict the temperature dependence of conformational ensemble and compute melting temperatures, finding agreement with computational studies and experiment. Given this demonstration of applicability, we believe that TM will be found useful for the characterization of complex phase transitions in diverse systems, especially those with multiple phases. For example, local minima within the energy landscape of biomolecular systems are often biologically and functionally relevant (14), and while they have been historically challenging to characterize computationally, we are able to study them with TM. The computational efficiency of the learning algorithm and scalability due to not requiring samples from the global equilibrium distribution make TM especially suitable for studying large-scale systems exhibiting complex behavior across long timescales. Materials and Methods Targeted Free Energy Perturbation. To motivate TM, we start with relevant background work in the longstanding problem of free energy estimation. Since pioneering work by Zwanzig and Feynman in the 1950s, many frameworks have been developed to do this efficiently (2, 5, 6, 15, 16). The guiding principle behind all such methods is that one is usually interested in differences of free energies, rather than their absolute values. Such differences can be estimated from ratios of partition functions. One relatively recent framework is that of targeted free energy perturbation (TFEP), which is especially relevant for machine learning approaches to free energy estimation (17). Estimates of free energy differences between states converge according to the overlap between the states. Avoiding a technical definition, the overlap between states A and B measures how likely it is to generate a sample from B by sampling from A. The central idea behind TFEP is to increase the overlap between states with an invertible mapping of the configuration space onto itself:[4]M:x→x′. A well-chosen M might map x∈A so that A′ is a subset of B. Under such a mapping, sampling from A and transforming the sample using Eq. 4 always generates a sample from B; it is therefore more efficient to estimate free energies under M and reweight back to the original configuration space. Reweighting is possible if M has a well-defined Jacobian JM by using the following property: if p(x) is the probability density of x∈A and q(x′) of x′∈A′, then the densities are related through the identity[5]p(x)=q(x′)|det JM(x′)|. Using Eq. 5 free energy differences computed under M can be reweighted to free energy differences in the original configuration space. Clearly using Eqs. 4 and 5 depends on specifying a map that increases the overlap between states and has a tractable Jacobian. Finding a suitable mapping is difficult due to the often complex, high-dimensional nature of the configurations; as a result, the most successful approaches to TFEP represent M with a neural network (18, 19). Likelihood-based models have been especially appealing since they meet both conditions (20–22), but have drawbacks of reduced expressivity and robustness (23). Recent lines of work have improved both aspects—for example, by pursuing more expressive black-box operations or incorporating stochasticity (24–27). In the following sections, we bypass these issues of finding a suitable mapping by exploring nonequilibrium diffusion processes as general-purpose maps. Leveraging Nonequilibrium Thermodynamics. We begin by recounting the main results of a line of work that explores using properties of stochastic processes for general inference (8, 10, 28–31). Suppose that the diffusion process is modeled as a Fokker–Planck equation cast in the form of a Liouville equation[6]∂∂tp(x,t)=−λ(t)∇·[b(x,t)p(x,t)] with[7]b(x,t)=x−∇logp(x,t), where gradients are assumed to be with respect to spatial coordinates x (31, 32). Eq. 6 is a partial differential equation (PDE) describing the evolution of a probability distribution p(x,t) toward a Gaussian distribution under the influence of the vector field b(x,t) (Eq. 7). Time is dilated by the noise schedule λ(t)—a monotonically increasing scalar-valued function that ensures the process converges sufficiently close to a Gaussian distribution at t=1. Equivalently, the process can be expressed in terms of the evolution of a particle using a stochastic differential equation (SDE) of the form[8]dx=−λ(t)xdt+2λ(t)dBt, where Bt is a standard Brownian motion and x is implicitly a function of t. In Fig. 1, we solve Eqs. 6 and 8 numerically in one spatial dimension. Fig. 1A shows the solution of Eq. 6 when p(x,0) is a mixture of Gaussians. In this case, it is possible the evaluate the PDE exactly since logp(x,t) is known for all t. The dynamics of Eq. 6 are presented in the Center panel, where an initial distribution is transported to a single Gaussian; during the process, the barriers that originally separated the states are destroyed. Similarly, the trajectories generated by the SDE begin at points on logp(x,t) (marked as stars) and end in a Gaussian distribution at t=1. The diffusion process demonstrably increases overlap by mapping all states onto a single reference state and does so for arbitrary initial conditions. However, if the diffusion process is to be a valid TFEP map it must meet the invertibility requirement in Section 1.1. Transporting a probability distribution with a diffusion process. (A) The Top panel shows the negative log-likelihood for a mixture of Gaussians. The Center panels show the dynamics of a diffusion process defined as a PDE (contours) and an SDE (solid lines). Over a time interval from 0 to 1 the diffusion process relaxes to a Gaussian distribution. (B) The same dynamics are depicted in terms of the score. In both panels, the dynamics of the diffusion process can be viewed forward or backward in time (denoted by t and τ, respectively). Indeed, Eq. 6 is invertible under the time-reversal τ≡1−t. Remarkably, it can be shown that the time-reverse of Eq. 8 also exists (33) and is an SDE of the form[9]dx=−λ(τ)x+∇xlogp(x,τ)dτ+2λ(τ)dBτ. Note that the drift term is the same as in Eqs. 6 and 7 but with the opposite sign. While particles simulated under Eq. 8 approach equilibrium, particles under the influence of Eq. 9 are driven out of equilibrium. When the variance of Bτ is zero, Eq. 9 reduces to an ordinary differential equation (ODE) with a well-defined Jacobian, implying the existence of inverse mappings Mt and Mτ. For the SDE the inverse mapping exists in a probabilistic sense since Eq. 9 samples from p(x,0). In either case, the existence of such an inverse mapping is critical to the class of models studied here. Here on, t will denote the forward-time process and τ the time-reverse process. Since the diffusion process meets the TFEP criteria, we are now faced with evaluating the forward and reverse processes using the PDE in Eq. 6 or the pair of SDEs in Eqs. 8 and 9. In either case, one must estimate either the log-likelihood—logp(x,t), or the score— ∇logp(x,t). Generative models can be broadly categorized based on which quantity they estimate: likelihood-based models solve the PDE by parameterizing the log-likelihood (20, 22, 34), while score-based models solve the SDEs by parameterizing the score (9, 10). The relationship between the likelihood and the score is depicted in Figs. 1 A and B. In this work, we focus primarily on score-based models. Score-Based Models. Score-based models (SBMs) have emerged as a robust method for generating independent samples from intractable probability distributions (10). Using the reverse diffusion in Eq. 9, SBMs transport a simple prior distribution to a potentially complex target probability density that is characterized by a collection of samples D. The model approximates the score of Eq. 8, which is used to simulate Eq. 9—having the effect of transporting samples from the prior distribution to the target. In an abuse of notation, we define the target distribution as p(x)≡p(x,t=0) and the prior distribution as q(x)≡p(x,t=1). The main advantage of defining the diffusion process with the form in Eq. 8 is that realizations of the forward diffusion at t can be generated without simulation; in ref. 10, the distribution of positions originating from x0≡x(t=0) after time t is derived from Eq. 8 as[10]x(t)∼Nx0e−∫0tλ(s)ds,I(1−e−∫0tλ(s)ds), and it can be shown that ∇xlogp(x,t) is proportional to the mean displacement vector from x0 to x(t) (35). The corresponding distribution for the reverse-time diffusion does not have a closed-form solution; to evaluate Eq. 9 one must estimate the score for all x and τ and simulate from an initial condition x(τ=0). A SBM uses a neural network to model sθ(x,t)≈∇xlogp(x,t) from displacement vectors produced by Eq. 10. The network predicts the score by minimizing the score-matching objective function:[11]argminθEx0∈DEt∈U(0,1)||sθ(x(t),t)−∇xlogp(x,t)||2. Once trained, estimates of the score predicted by the network can be used to simulate Eq. 9. If the estimates are sufficiently accurate, then the endpoints of the trajectories launched from q(x) are independent and identically distributed samples from p(x). In the next section, we provide an alternative construction wherein q(x) is viewed as the distribution arising from the dynamics of a physical system. Thermodynamic Maps. The Einstein–Smoluchowski relation states that temperature is proportional to the diffusivity of a Brownian motion (36). Accordingly, we introduce temperature to the SBM SDEs (Eqs. 8 and 9) by augmenting the positions x∈Rd with auxiliary inverse temperature-type variables β∈Rd. Together, the coordinates and temperatures form a state vector (x,β)⊤∈R2d, and the thermodynamic map is parameterized in the joint x-β-space as a SBM of the form[12]dxdβ−1=−λ(t)xβ−1dt+2λ(t)β0−11dBtand[13]dxdβ−1=−λ(τ)xβ−1+sθ(x,β−1,τ)dτ+2λ(τ)β0−11dBτ. Both x and β fluctuate during the dynamics of Eqs. 12 and 13, relaxing to N(0,β0−1) and N(0,1) respectively at t=1. The value of the auxiliary variables β at t=0 is denoted by β0 and is a constant that sets the temperature of the diffusive dynamics for each component of x by rescaling the Brownian motion. The construction ensures that the diffusion process for x relaxes to a normal distribution at temperature β0−1. A thermodynamic map (Fig. 2) maps the thermodynamics of a target system p(x,β) onto the thermodynamics of a simple prior system q(x′,β′), where in both systems each degree of freedom is coupled to separate baths defined by β. Our construction is motivated by treating the prior distribution as the equilibrium distribution arising from the dynamics of a physical system. If the prior is a Gaussian distribution then the corresponding physical system is a simple harmonic oscillator, and generating samples from p(x) at β amounts to sampling from the harmonic oscillator q(x′) at the corresponding β′ (Fig. 2). Details on training and inference are provided in SI Appendix, section A. In the generalized construction above we have assumed that each degree of freedom of x is coupled to a separate bath defined by the entries of β, but in most cases physical systems are coupled to a single bath. If samples of p(x,β) are from the global equilibrium distribution of an ensemble defined by βbath, each entry of β should be equal to βbath. However, global equilibrium distribution is often not attainable in practice (e.g., in molecular dynamics simulations). In this case, allowing each degree of freedom of x to be coupled to separate baths β allows the global equilibrium distribution to be inferred from samples gathered under a local equilibrium distribution. In SI Appendix, section G we discuss how the global equilibrium distribution can be inferred from local equilibrium samples if one assumes that β varies linearly with βbath. In Section 1.5, we demonstrate the validity of the assumption by inferring the global equilibrium distribution from short, independent molecular dynamics simulations of two RNAs. Illustration of a thermodynamic map between systems. (A) The thermodynamic map is parameterized as a score-based model transporting densities from a target distribution p(x,β) to a prior distribution q(x,β). In the schematic, data from an Ising model at two temperatures are mapped onto a simple harmonic oscillator. The generative process Mτ is parameterized from realizations of the forward process Mt. (B) Once learned, the thermodynamic map allows samples of the complex system to be generated from the simple prior system at any temperature—even those showing nontrivial behavior—by sampling the prior at the correct temperature. Critical Behavior of the Ising Model. We apply TM to the most widely studied formulation of the classical Ising model as a system of interacting spins arranged on a two-dimensional square lattice, without the presence of an external magnetic field. Arguably, this model serves as a prototypical example of a simple system with a complex phase transition. Each spin can have one of two states with value σ=+1 or σ=−1, and the spins interact with their nearest neighbors through an interaction term J and Hamiltonian given by[14]H=J∑⟨i,j⟩σiσj, where ⟨i,j⟩ denotes nearest-neighbor pairs. When J<0 the model exhibits ferromagnetic behavior in its ground state. Going forward, we set J=−1 without loss of generality. As the temperature increases, an Ising model in two or higher dimensions transitions from an ordered magnetic phase to a disordered paramagnetic phase. For our set-up of a two-dimensional Ising model on a square lattice with J=−1, this critical temperature is known to be Tc≈2.27 (37). The two phases can be distinguished from each other with the magnetization order parameter, M, defined as the absolute value of the average of the spins. Well above Tc, as T→∞, the spins are equally likely to be +1 or −1, regardless of their neighbors, resulting in a net magnetization of zero. Well below Tc, all spins in the lattice align, leading to a magnetization of 1. Power law scaling is a signature of critical behavior, and near the critical temperature the magnetization M and heat capacity C of the Ising model scale as[15]M∼|τ|βandC∼|τ|−αwhereτ=T−TcTc, and with critical exponents α=0 and β=0.125 (not to be confused with the inverse temperature variables β), which can be derived analytically in the thermodynamic limit (38). For systems that are not solvable, the critical exponents must be measured numerically, which is often done through MC sampling, wherein proposals for spin flips are generated and their acceptance or rejection is determined based on the detailed balance condition. Near the critical temperature, the presence of long-range correlations causes MC dynamics to slow down exponentially, leading to difficulty in sampling the phase transition (39). We investigate the ability of TM to infer such critical behaviors by generating configurations of an Ising model through MC sampling across temperatures and using the data from two temperatures asymmetrically spaced about Tc to train a TM (details provided in SI Appendix C). In the formalism of Eqs. 12 and 13 the lattice configurations are x0∈R32×32 and each entry of β0−1∈R32×32 is the bath temperature; a straightforward choice since MC sampling guarantees the global equilibrium distribution. Once the TM is trained, we generate configurations at each temperature by evaluating Eq. 13 with each entry of β0−1 equal to Tbath. The generated continuous-valued configurations x are then transformed into discrete spins by σ=sgn(x), and the average magnetization and heat capacity at each temperature is estimated directly from the spin configurations. Fig. 3 shows the behavior of M and C for the MC and TM-generated samples. The TM infers the correct value of Tc (τ=0) even based on limited, deliberately misleading training data and generates samples with divergences in M and C. Inferring the phase transition of the 2D Ising model from limited sampling. (A) The magnetization is plotted for samples of a 32×32 square Ising model generated through MC sampling (orange) and the thermodynamic map (blue). The thermodynamic map predicts change in magnetization at Tc when trained on samples generated at T=1.5 and T=4 (red stars). Similar results were obtained (not reported) for a symmetric choice of training data temperatures. (B) The heat capacity of samples generated from MC sampling (orange) and the thermodynamic map (blue) is plotted. The thermodynamic map infers the divergence in the heat capacity, numerically computed for the red dots, when trained on the same samples as panel A (red stars). Fig. 3A shows the behavior of the magnetization for MC and TM-generated samples across temperatures, with critical exponents measured as βMC≈0.149±0.004 and βTM≈0.178±0.012. Similarly, Fig. 3B shows a divergence in the heat capacity at TMC≈2.25 and TTM≈2.30, with critical exponents αMC≈0.338±0.050 and αTM≈0.236±0.061. For both exponents, the MC and TM exponents agree with each other, although far from the ideal value due to finite size effects. These results highlight the ability of our model to infer the nontrivial thermodynamic behavior of phase transitions without being shown samples from the transition region; the physical meaning of temperature in the prior system has been transferred to the complex system, complete with the statistics properties associated with critical behavior. The correct prediction of Tm, even with asymmetrically spaced training temperatures, indicates our model has learned the physics of the Ising model, not merely the distribution of structures at each temperature. Exploring RNA Conformational Landscapes with Thermodynamic Map-accelerated Molecular Dynamics (TM-aMD). To show the broad applicability of TM, we now study conformational transitions and melting in two different RNA (RNA) systems. Studying atomic-resolution conformational ensembles of RNAs through molecular dynamics simulations has proven crucial for understanding RNA structural dynamics, yet remains challenging due to the disordered, glassy nature of RNA energy landscapes (40, 41). Increasing evidence points toward some RNAs having glassy energy landscapes where multiple minima are separated by high barriers (42–44). The ruggedness of the landscape results in many competing degrees of freedom and no clear-cut separation of timescales within the dynamics (43–45). The most striking feature of glassy energy landscapes as they relate to polymers is the presence of conformational heterogeneity at equilibrium (43, 46); while the conformational landscape of proteins is often dominated by a single well-defined fold (energy minimum), the RNA conformational landscape may not be dominated by a single structure (47, 48). This difference is analogous to the single magnetized phase of an Ising model and the multiple phases of long-ranged spin glasses (7, 49–51). Since multiple members of the ensemble contribute substantially to the free energy and other thermodynamic observables, RNAs are best described as a weighted ensemble of conformers (48, 52). Exploring energy landscapes by biasing dynamics along a small number of slow degrees of freedom has proven successful for exploring the conformational landscape of proteins, but the lack of timescale separation and ensemble nature of the RNA conformational landscape violates fundamental assumptions of dimensionality made in biasing methods (53). On the other hand, TM have the advantage of being able to learn the conformational landscape directly in a much higher-dimensional configuration space. We train thermodynamics maps on limited information generated by bioinformatic approaches and multiensemble molecular dynamics simulations to efficiently characterize RNA conformational ensembles. Our starting point is the physics and knowledge-based potential that is central to Rosetta to generate a putative conformational ensemble (54). These structures serve as the starting point to explore a more realistic energy landscape through all-atom, explicit solvent molecular dynamics performed over a range of temperatures. Between rounds of molecular dynamics simulation, the global equilibrium distribution is inferred using TM alongside assumptions of local equilibrium (SI Appendix, section G). Initial conditions are resampled from the inferred equilibrium distribution using a geometric RNA order parameter. Here on, we refer to this protocol as thermodynamic map-accelerated Molecular Dynamics (TM-aMD). Although agreement between the input equilibrium distribution and the output from the thermodynamic map is a necessary, though not sufficient condition that the true equilibrium distribution has been attained, we leave rigorously addressing convergence to equilibrium to future work. Here, we take solace in the numerical results for the two challenging test systems, described next. GCAA Tetraloop. With a shift in perspective toward viewing RNAs as dynamic entities, there has been interest in studying the variation in dynamics between different tetraloops. Studies combining computation and experiment have demonstrated that even so-called simple tetraloops can exhibit rich dynamics (55). We study the GCAA tetraloop, a well-studied model system, enabling us to compare the equilibrium distribution generated by our model with extensive molecular dynamics simulations and experimental data (40, 56, 57). The GCAA Tetraloop is a small, highly stable, 12-nucleotide RNA sequence that adopts a hairpin structure consisting of an eight-nucleotide helix and a four-nucleotide loop (PDB: 1ZIH) (12). Consistent with an ensemble perspective, the variable arrangement of nucleotides in the loop gives rise to alternative conformations, which we investigate with TM-aMD. The thermodynamic map learns to generate RNA structures represented as G-vectors—an internal coordinate system for RNAs that effectively clusters distinct folded states (58). The principal components of G-vectors have been shown to be a convenient visualization of RNA structural diversity, which we use to guide adaptive sampling. Further information on G-vectors, along with details of TM-aMD can be found in SI Appendix, section D. Fig. 4 summarizes the result of nine iterations of our enhanced sampling procedure, with a total of 50 μs of simulation. Although we performed extensive MD simulations reaching long timescales, we still used two orders of magnitude less compute compared to our reference millisecond replica exchange simulation, even with suboptimal scheduling of TM learning with MD simulation (40). SI Appendix, Fig. S2A suggests that TM-aMD would benefit from more frequent reseeding of simulations. GCAA Tetraloop Conformational Landscape. (A) Joint distribution of the first two principal components of G-vectors for GCAA. Contours representing TM-generated samples at 310 K are overlaid on MD samples shaded by the number of base pairs, with selected regions of the conformational landscape annotated as 1-6. The 10 NMR conformers reported in the Protein Data Bank (PDB: 1ZIH) are depicted as green stars. (B) Temperature-dependent free energy profiles along the first two principal components shown in panel A. Colors indicate temperatures ranging from 310 K to 450 K at 10 K intervals. (C) Representative structures sampled from labeled minima in panel A, with a representative NMR conformer shown in translucent blue. The structures are colored from blue to red from the 5’ to 3’ end. (D) A fraction unfolded curve is obtained by reweighting the MD data in panel A with the TM conformational ensemble for each temperature in panel B, and fitting a two-state model. Uncertainties are computed from the last three iterations of TM-aMD. The cutoff for folded and unfolded states is three base pairs to match a reference REMD study (40). In Fig. 4A, we present the projection of the learned equilibrium distribution onto the first two principal components of the G-vectors. The contours represent the free energy landscape inferred by the thermodynamic map, while the shaded regions represent the distribution of structures observed in the simulation, shaded by the number of base pairs. The 10 conformers reported in the Protein Data Bank (PDB), represented as green stars, lie within the most dominant TM-predicted cluster. Fig. 4B shows the learned, temperature-dependent free energy profiles along each of the principal components in Fig. 4A. The first principal component clearly shows the reweighting of the folded and unfolded states with temperature. Fig. 4C shows the structures associated with the minima in Fig. 4A. The first three conformations are abundant at 310 K and are consistent with MD studies (40, 56) and experiment (an example NMR conformer is depicted in blue). The last three represent unfolded states that are stabilized by base stacking and are weakly present in the 310 K ensemble. The first principal component corresponds to the folding-unfolding transition, while the second captures the conformational heterogeneity of the loop region. Fig. 4D displays the melting curve of the GCAA tetraloop computed from the last three rounds of MD simulation, with the melting curve of the learned equilibrium distribution. Both curves exhibit agreement, matching the range of melting temperatures predicted from a millisecond replica exchange molecular dynamics (REMD) simulation conducted with the same force-field (40). However, both the TM-generated melting curve and the range of melting temperatures from the reference are higher than the experimental melting temperature, indicating that current force-fields do not yet accurately capture the temperature dependence of the tetraloop ensemble. HIV-TAR RNA. The HIV-TAR RNA is an extensively studied, 29 nucleotide RNA hairpin from the HIV genome that displays rich conformational diversity. The secondary structure consists of lower and upper helices separated by a three-nucleotide bulge with an apical loop closing the upper helix (PDB: 1ANR) (13). The disordered loop and bulge regions mediate interactions with proteins and small molecules (59). We investigate the conformational landscape of the HIV-TAR RNA using six iterations of TM-aMD, requiring a total of 70 μs of simulation time. We infer relative free energies between the dominant conformer observed through NMR spectroscopy and alternative conformers, which are unattainable through MD simulation alone. The conformational landscape predicted by the learned TMs, projected along the principal components of the G-vectors is shown in Fig. 5A. Structures corresponding to the NMR ensemble (green stars) are well separated from other misfolded structures within the two-dimensional projection. The temperature dependence of the free energy along each principal component is shown in Fig. 5B, where we find that the free energy barrier separating the NMR conformers from unfolded states reaches a height of 5 kcal/mol. Fig. 5C depicts representative samples from each cluster. The first cluster shows agreement with the NMR conformers, with the first reported conformer shown in translucent blue. The other clusters correspond to varied secondary structure motifs. Generally, across the conformational landscape, we find that the contribution of folded states to the conformational ensemble diminishes as temperature increases. This can be clearly shown by computing a fraction folded curve (Fig. 5D), which shows agreement between melting temperatures of the MD and TM-derived ensembles, and the experimental melting temperature (60). HIV-TAR RNA conformational landscape. (A) Joint distribution of the first two principal components of G-vectors for HIV-TAR. Contours representing TM-generated samples at 310 K are overlaid on MD samples shaded by the number of base pairs, with basins of the TM landscape labeled 1-5. The 20 reported NMR conformers in the Protein Data Bank (PDB: 1ANR) are depicted as green stars. (B) Temperature-dependent free energy profiles along the first two principal components are shown in panel A. Colors indicate temperatures ranging from 310 K to 450 K at 10 K intervals. (C) Representative structures sampled from labeled clusters in panel A, with a representative NMR conformer shown in translucent blue. The structures are colored from blue at the 5′ end to red at the 3′ end. (D) A fraction unfolded curve is obtained by reweighting the MD data in panel A with the TM conformational ensemble for each temperature in panel B, and fitting a two-state model. Uncertainties are computed from successive iterations of the TM-aMD algorithm showing agreement between MD and TM-predicted melting temperatures (SI Appendix, Fig. S2B). The cutoff for folded and unfolded states is nine base pairs, as determined by the NMR conformers. Our results support the idea that RNAs evolve over a rugged free energy landscape punctuated by many long-lived states (61). We find that the native state is indeed the most stable at physiological temperatures (310 K), but misfolded states consisting of secondary structure elements still have substantial contributions to the ensemble. Minima of the energy landscape corresponding to states 2 to 5 in Fig. 5 differ from the NMR conformers (state 1) by less than 1 kcal/mol. Overall, our findings are in agreement with theoretical studies of RNA folding pointing towards a rugged energy landscape (44, 61). Clearly, our findings are dependent on the accuracy of the simulation force field, which for RNAs have not yet reached experimental accuracy. Moreover, TM-aMD is incapable of reaching experimental folding timescales. Despite this, the fraction folded curve for HIV-TAR agrees with experimental results (60). Improved forcefields are out of reach due to the difficulty of attaining equilibrium through simulation; a potential application for TM-aMD may be accelerating convergence to equilibrium, allowing for more rapid evaluation of force-field parameters. Discussion We have demonstrated that TM are capable of inferring the nontrivial behavior of the free energy with temperature from limited data for the two-dimensional square Ising model. Additionally, we also show how TM may be integrated with molecular dynamics simulation to enhance sampling. In this section, we outline prospective, potential applications for TM. Our experiments for inferring critical behavior in the Ising model suggest a number of potential research directions that might shed light on some general principles underpinning TM. We outline three directions below. In this work, we have not explored the mechanism by which TM learn phase transitions. In Section 1.4, as the Ising lattice grows larger the ability to infer the phase transition from only two observations diminishes. Inversely, as the lattice size decreases, the phase transition is learned more consistently. These observations suggest a connection between fluctuations due to finite-size effects and robustness of the algorithm. Spin-glasses with multiple phases present a setting for exploring these connections without the additional complexity molecular dynamics brings. A second avenue worth exploring is the extent to which TM infer dramatic changes in Boltzmann weights across temperature. Here too, spin-glasses are an appealing system; some spin-glasses exhibit temperature chaos, where, in the thermodynamic limit, the weights change discontinuously with temperature (62). In the framework provided in the introduction, this behavior manifests as a phase transition (i.e., a discontinuity in Z(β)). Recently, descriptions of temperature chaos have been generalized to finite systems, where it is prevalent on a characteristic length scale that diverges as the change in temperature becomes infinitesimal (63). Another direction closely related to those outlined above is determining whether TM can capture critical behavior arising from correlation functions. The order parameters explored in this work (magnetization and heat capacity) are measured by averaging over the entire system, but critical exponents are derived from the asymptotic behavior of correlation functions that capture the microscopic details of fluctuations. To measure some critical exponents, computing correlation functions is unavoidable. In terms of applications, our results in Section 1.5 obtained by TM-aMD indicate that TM are well suited for inferring equilibrium distributions from swarms of short, independent simulations. We show that TM-aMD is capable of exploring the conformational landscape orders of magnitude faster than REMD, and inferring global equilibrium from samples gathered under local equilibrium. Still, TM-accelerated MD stands to benefit greatly from optimization. And since TMs allow for truly parallel simulations across arbitrary temperatures, TMs are poised to make efficient use of distributed computing resources (64). As pointed out in Section 1.5, we believe that our implementation of TM-aMD is hindered by the scheme used to adaptively resample initial states. The one we employ aims for agreement between the TM and MD-generated distributions. However, in practice, it is more productive to balance thermodynamic accuracy with sampling of diverse conformations. Methods such as FAST and REAP quantify this trade-off as a reward function which is to be optimized by the choice of adaptive sampling strategy (65, 66). Finally, as presented, TM are not informative of kinetics since the samples they generate are independent. In principle, one may use the height of the barrier separating states and recrossing related dynamical corrections to estimate rates (67). Still, we do not expect this approach to be useful without some form of further enhanced sampling (68). Overall, we have presented TM as an exciting way of integrating score-based generative modeling with the theoretical framework of statistical mechanics. We have demonstrated the capability of TM to learn physics by predicting the critical behavior associated with the Ising model despite limited, deliberately misleading sampling. We also use TM to accelerate Molecular Dynamics (TM-aMD) and show that TM-aMD efficiently infers the equilibrium distribution of two model RNA systems using a fraction of the computational resources required by replica exchange simulations. The TM-aMD method, combined with experimentally measured melting curves, might also prove useful for improving force fields for RNA and similar systems. Based on these results, we believe that TM are suitable for widespread use and have great potential for further theoretical development and computational optimization. Supplementary Material Appendix 01 (PDF)