WorksPhysics and Astronomy
Uncertainty-aware molecular dynamics from Bayesian active learning for Phase Transformations and Thermal Transport in SiC
Abstract
Machine learning interatomic force fields are promising for combining high computational efficiency and accuracy in modeling quantum interactions and simulating atomistic dynamics. Active learning methods have been recently developed to train force fields efficiently and automatically. Among them, Bayesian active learning utilizes principled uncertainty quantification to make data acquisition decisions. In this work, we present a general Bayesian active learning workflow, where the force field is constructed from a sparse Gaussian process regression model based on atomic cluster expansion descriptors. To circumvent the high computational cost of the sparse Gaussian process uncertainty calculation, we formulate a high-performance approximate mapping of the uncertainty and demonstrate a speedup of several orders of magnitude. We demonstrate the autonomous active learning workflow by training a Bayesian force field model for silicon carbide (SiC) polymorphs in only a few days of computer time and show that pressure-induced phase transformations are accurately captured. The resulting model exhibits close agreement with both ab initio calculations and experimental measurements, and outperforms existing empirical models on vibrational and thermal properties. The active learning workflow readily generalizes to a wide range of material systems and accelerates their computational understanding.
Introduction
Machine learning interatomic force fields have recently emerged as powerful tools in modeling interatomic interactions. They are capable of reaching near-quantum accuracy while being orders of magnitude faster than ab initio methods[1, 2, 3, 4, 5, 6, 7, 8, 9].
Recently, efficient active learning schemes have been demonstrated for high-efficiency data collection, where molecular dynamics (MD) is driven by the machine learning force field, and only configurations satisfying certain acquisition criteria[6, 10, 11, 12, 13, 14, 15] are computed with accurate but expensive DFT calculations and added to the training set. Among them, the FLARE[6] framework utilizes principled Gaussian process (GP) uncertainties to construct a Bayesian force field (BFF), a force field equipped with internal uncertainty quantification from Bayesian inference, enabling a fully autonomous active learning workflow.
The cost of prediction of conventional GP models scales linearly with the training set size, making it computationally expensive for large data sets. The sparse Gaussian process (SGP) approach selects a set of representative atomic environments from the entire training set to build an approximate model, which can scale to a larger training data set, but still suffers from the linear scaling of the inference cost with respect to the sparse set size. To address this issue, it was noticed that for the particular structure of the squared exponential 2+3-body kernel, it is possible to map the mean prediction of a trained model onto an equivalent low-dimensional parametric model[6] [16, 17] without any loss of accuracy. It was subsequently shown that the evaluation of the variance can also be mapped onto a low-dimensional model, achieving a dramatically accelerated uncertainty-aware BFF18. While the 2-body and 3-body descriptions used in the previous work[6] [18] approach the computational speed of classical empirical potentials, they are limited in accuracy. To systematically increase the descriptive power of that approach, it is possible to extend the formalism to include higher body order interactions. However, inclusion of e.g. 4-body interactions requires summing contributions of all quadruplets of atoms in each neighborhood, which adds significant computational expense. Therefore, in a more recent work19 we used the atomic cluster expansion20 to construct local structure descriptors that scale linearly with the number of neighbors, enabling efficient inclusion of higher body order correlations. An inner product kernel is then constructed based on the rotationally invariant ACE descriptors, forming a basis for a sparse Gaussian Process (GP) regression model for energies, forces and stresses.
Crucially, it was shown in general that in the case of inner-product kernels with high dimensional many-body descriptors, the prediction of the mean can also be mapped exactly onto a constant-cost model via reorganization of the summation in the SGP mean calculation19. This allows for efficient evaluation of the model forces, energies and stresses, but does not address the cost of evaluating uncertainties. In this work, we present a method to map the variance of SGP models with inner product kernels. This advance enables large-scale uncertainty aware MD and overcome the linear scaling issue of SGPs. Building on this approach, we achieve a significant acceleration of the Bayesian active learning (BAL) workflow and integrate it with Large-scale Atomic/Molecular Massively Parallel Simulator (LAMMPS)21. Bayesian force fields are implemented within the LAMMPS MD engine, such that both forces and uncertainties for each atomic configuration are quantified at computational cost independent of the training set size.
As a demonstration of the accelerated autonomous workflow, we train an uncertainty-aware many-body BFF for silicon carbide (SiC) on its several polymorphs and phases. SiC is a wide-gap semiconductor with diverse applications ranging from efficient power electronics to nuclear physics and astronomy. With the discovery of a large number of extrasolar planets22, the compositions and processes under extreme conditions have led to a wide range of studies. In particular, SiC has been identified from the adsorption spectroscopy of carbon-rich extrasolar planets23,24, which has motivated numerous experimental and computational studies of its high temperature high pressure behavior. The phase transition of SiC from the zinc blende (3C) to the rock salt (RS) phase is observed at high pressure in experiments25–31 and ab initio calculations32–39. Empirical potentials such as Tersoff40,41, Vashishta42,43, MEAM44, and Gao-Weber45 have been developed and applied in large-scale simulations for different purposes. However, empirical analytical potentials are limited in descriptive complexity, and hence accuracy, and require intensive human effort to select training configurations and to train. Machine learning approaches have allowed for highly over-parameterized or non-parametric models to be trained on a wide range of structures and phases[7] [46, 47, 48, 49, 50]. Recently, neural network potentials were trained for SiC to study dielectric spectra51 and thermal transport properties52, but they do not capture high-pressure phase transitions.
In the present work, we deploy the accelerated autonomous BAL workflow to the high-pressure phase transition of SiC, and demonstrate that the transition process can be captured by the uncertainty quantification of the BFF. Then the BFF is used to perform large-scale MD simulations, and compute vibrational and thermal transport properties of different phases. The FLARE BFF shows good agreement with ab-initio calculations53 and experimental measurements, and significantly outperforms available empirical potentials in terms of accuracy, while retaining comparable computational efficiency.
Results
Accelerated Bayesian Active Learning Workflow
Directly using ab initio MD to generate a sufficiently diverse training set for machine learning force fields is expensive and time consuming, and may still miss higher-energy configurations important for rare transformation phenomena. Here, we develop an active learning workflow, where MD is instead driven by the much faster surrogate FLARE many-body BFF. During the MD simulation, the model uses its internal uncertainty quantification, deciding to call DFT only when the model encounters atomic configurations with uncertainty above a chosen threshold. Within this framework, a much smaller number of DFT calls are needed, which greatly reduces the training time and increases the efficiency of phase space exploration.
In this work, we extend the formalism of efficient lossless mapping to include uncertainty of ACE-based many-body SGP models. Specifically, we implement mapped SGP variance to enable efficient uncertainty quantification and achieve large-scale MD simulations by interfacing the Bayesian active learning algorithm with LAMMPS. The mappings of the forces and uncertainty overcome the scaling with the training set size of the computational cost of SGP regression, resulting in a significant acceleration of the training process in comparison with using the full SGP19.
We illustrate our active learning workflow in Figure 1a. Starting from a SGP model with a small initial training set, we map both prediction mean and variance into quadratic models to obtain an efficient BFF (details are discussed in Methods). With the mapped SGP force field, MD simulation runs in LAMMPS with uncertainty associated with the local energy assigned to each atom in a configuration at each time step. The MD simulation is interrupted once there are atoms whose uncertainties are above the threshold. Then DFT is used to compute energy, forces and stress for the high-uncertainty configurations. The training set is augmented with the newly acquired DFT data, the SGP model is retrained and mapped, and the MD simulation continues with the updated model.

Figure 1. Workflow and performance. a. Bayesian active learning (BAL) workflow with LAMMPS. It closely follows our previous work19, with the key addition that the SGP uncertainties are now mapped and therefore much cheaper, and the MD part of the training can be done within LAMMPS. b. Time profiling of the BAL workflow with a system of 72 atoms and 100,000 MD time steps. The SGP BAL workflow collected 14 frames with 72 atoms each, with 10 representative sparse environments selected per frame. The MD is greatly accelerated using mapped forces and uncertainty compared to sparse GP. “Others” includes time consumed outside of MD and DFT, e.g. adding training data to SGP and optimizing hyperparameters.
To illustrate the acceleration of active learning workflow with mapped forces and variance compared to that with the SGP model, we deploy a single active learning run of bulk 4H-SiC system and show the performance of each part of the workflow in Figure 1b. If the model is not mapped, the computational cost of MD with the SGP dominates the BAL procedure. When the mapped force field and variances are used, the computational cost is significantly reduced. The FLARE BFF achieves 0.76 ms·CPU/step/atom in LAMMPS MD, which includes uncertainty quantification, and is comparable in speed to empirical interatomic potentials such as ReaxFF54. With mapped uncertainties, the DFT calculations become the dominant part from Figure 1b, i.e. the computational time for BAL is determined by the number of DFT calls. We also note that the SGP model used for timing here has a small training set of 14 frames, and the computational cost of prediction grows linearly with sparse set size. It is worth emphasizing that after mapping, the prediction of model forces, energies, and stresses, and their variances is independent of the sparse set size. Therefore, the speedup versus the SGP model is more pronounced as more training data are collected and sparse representatives are selected.
Bayesian Force Field for SiC High Pressure Phase Transition
In this work, we demonstrate the accelerated BAL procedure by training a mapped uncertainty-aware Bayesian force field to describe the phase transition of SiC at high pressure. We set up compressive and decompressive MD simulations at temperatures of 300 K and 2000 K for on-the-fly training simultaneously, where each SGP model is initialized with an empty training set. The parameters set for the on-the-fly training workflow is in the Supplementary Table S1, and the complete training set information is in the Supplementary Table S2.
| Parameter | Value | Description |
| cutoff (Å) | 5.0 | Cutoff radius of the local environment for ACE descriptors |
| 78.2991 | Signal variance of kernel of B1 descriptors | |
| 3.5271 | Signal variance of kernel of B2 descriptors | |
| 0.1086 | Noise parameter for total energy | |
| 0.0895 | Noise parameter for forces | |
| 0.0021 | Noise parameter for stress | |
| 11 | Maximal index of radial basis function of ACE B1 descriptors | |
| 8 | Maximal index of radial basis function of ACE B2 descriptors | |
| 4 | Maximal index of spherical harmonics function of ACE B2 descriptors |
Table S1. On-the-fly Training Settings. For the details of the parameters of the kernels, we direct the reader to Ref.[3]. For the details of the parameters of the ACE descriptors, we direct the reader to Ref.[4].
| System | Pressure | Temperature | ||||||||
| 3C | 0-480 | 2000 | 0.85 | 20.94 | 1 | 64 | 110 | 7040 | 550 | 21890 |
| 2H | 0-480 | 2000 | 0.85 | 34.94 | 1 | 72 | 125 | 9000 | 625 | 27875 |
| 4H | 0-480 | 2000 | 0.85 | 36.87 | 1 | 72 | 131 | 9432 | 655 | 29213 |
| 6H | 0-480 | 2000 | 0.85 | 74.04 | 1 | 108 | 122 | 13176 | 610 | 40382 |
| 3C | 0-800 | 300 | 0.85 | 9.78 | 1 | 64 | 72 | 4608 | 360 | 14328 |
| RS | 200-0 | 2000 | 0.55 | 17.22 | 1 | 64 | 120 | 7680 | 600 | 23880 |
| Total | - | - | - | 193.79 | - | - | 680 | 50936 | 3400 | 157568 |
Table S2. Training Set Collected from Bayesian Active Learning
Table S2: Summary of on-the-fly training for the SiC system: the simulation temperature (K); the pressure (GPa) range of the simulation; the total simulation time (ns); the total wall time of the simulation (hr); the number of CPU nodes used for the training (with 32 CPUs per node); the number of atoms in the simulation ; the total number of structures added to the training set ; the total number of local environments in all training structures ; the total number of local environments added to the sparse set ; and the total number of training labels .
The compressive MD starts with the 2H, 4H, 6H, and 3C polytypes that are stable at low pressure, and the pressure is increased by 30 GPa every 50 ps. The decompressive MD starts with the RS phase at 200 GPa, and the pressure is decreased by 20 GPa every 50 ps. The training data are collected by the BAL workflow shown in Figure 1. Figure 2a shows the system volume and relative uncertainty, i.e. the ratio between the uncertainty of the current frame and the average uncertainty of the training data set (see details in Supplementary Method 155). In the compressive (decompressive) MD, when the transition happens, the volume decreases (increases) rapidly and the uncertainty spikes, since the model has never seen the transition state or the RS (3C) phase before. The post-transition high-pressure structure of the compression run has 6-fold (4-fold) coordination corresponding to the RS (3C) phase, and the transition is observed at 300 GPa (0 GPa) at room temperature. The difference of the transition pressures between the compressive and decompressive simulations is caused by nucleation-driven hysteresis. After the on-the-fly training is done, the training data from compressive and decompressive MD are combined to train a master force field for SiC, such that different phases at different pressures are covered by our force field. In Supplementary Figure 2 and Supplementary Table S355, we demonstrate the accuracy of our force field on cohesive energy and elastic constants in comparison with DFT.

Figure 2. Phase transition simulation with FLARE BFF and enthalpy calculations. a. A 5 ps segment of the whole training trajectory where the 3C-RS phase transition is captured during the compressive (decompressive) on-the-fly active learning, the volume decreases (increases), and the model uncertainty spikes in the transition state. The uncertainty threshold is shown as the blue dashed line. DFT is called, and new training data is added to the model when the relative uncertainty exceeds the threshold. b. Enthalpy difference predictions from DFT (PBE, PBEsol)34, FLARE BFF and existing empirical potentials40,42,44,54,56 at pressures from 0 to 150 GPa. The crossing with the dotted zero line gives the transition pressure predicted by enthalpy.
| Polytype | Method | ||||||||
| 3C | EXP | , , | , , | , , , | |||||
| 3C | DFT | 384.3 | 384.3 | 127.9 | 127.9 | 239.9 | 239.9 | 213.6 | 195.4 |
| 3C | FLARE BFF | 373.1 | 373.1 | 128.0 | 128.0 | 230.3 | 230.3 | 209.7 | 187.2 |
| 3C | Tersoff | 426 | 426 | 109.9 | 109.9 | 252.7 | 252.7 | 215.3 | 214.8 |
| 3C | MEAM | 402.2 | 402.2 | 115.6 | 115.6 | 215.1 | 215.1 | 211.1 | 186.4 |
| 2H | EXP | ||||||||
| 2H | DFT | 494.3 | 533.5 | 102.1 | 50.7 | 151.3 | 196.1 | 214.3 | 187.6 |
| 2H | FLARE BFF | 482.8 | 527.2 | 101.0 | 52.7 | 158.1 | 190.9 | 211.7 | 187.2 |
| 2H | Tersoff | 502.2 | 541.6 | 84.4 | 42.3 | 188.8 | 208.9 | 209.3 | 215.9 |
| 2H | MEAM | 467.4 | 497.9 | 98.2 | 67.7 | 167.2 | 184.6 | 211.1 | 189.1 |
| 4H | EXP | ||||||||
| 4H | DFT | 487.8 | 533.4 | 105 | 51.9 | 157.9 | 191.4 | 214 | 188.1 |
| 4H | FLARE BFF | 476.0 | 514.9 | 104.8 | 55.0 | 158.4 | 185.6 | 210.7 | 184.0 |
| 4H | Tersoff | 506.6 | 547.7 | 86.6 | 44.9 | 189.1 | 210 | 212.7 | 216.9 |
| 4H | MEAM | 467.2 | 497.9 | 98.4 | 67.7 | 167.2 | 184.4 | 211.1 | 189.1 |
| 6H | EXP | ||||||||
| 6H | DFT | 485.2 | 534.1 | 106 | 52.3 | 160.1 | 189.6 | 213 | 188.2 |
| 6H | FLARE BFF | 472.2 | 515.3 | 106.1 | 55.3 | 158.4 | 183.1 | 210.3 | 182.8 |
| 6H | Tersoff | 507.2 | 548.6 | 87 | 45.3 | 189.1 | 210.1 | 213.1 | 217 |
| 6H | MEAM | 467.2 | 497.9 | 98.4 | 67.7 | 167.2 | 184.4 | 211.1 | 189 |
Table S3. Elastic tensor (), bulk modulus () and shear modulus () from experiments (EXP), DFT[10], FLARE BFF and empirical potentials (Tersoff, MEAM).
Using the mapped master force field, the phase transition pressure (at zero temperature) can be obtained from the enthalpy of the different phases. At low pressure, the RS phase has higher enthalpy than 3C. With the pressure increased above 65 GPa, the enthalpy of RS phase becomes lower than 3C. As shown in Figure 2, empirical potentials such as ReaxFF54, MEAM44, Tersoff40 and EDIP56 produce qualitatively incorrect enthalpy curves, likely because they are trained only at low pressures. The Vashishta potential is the only one trained on the high pressure 3C-RS phase transition42 and presents a consistent scaling of enthalpy with pressures qualitatively, but it significantly overestimates the transition pressure at 90 GPa compared to DFT. FLARE BFF achieves a good agreement with the ab initio (DFT-PBE) enthalpy predictions, with both methods yielding 65 GPa. We note that our PBE value is consistent with previous first-principles calculations such as 66.6 (LDA)32. and 58(PBEsol)34.
Next we run a large-scale MD simulation with 1000 atoms for 500 ps at the temperature of 300 K. The NPT ensemble is used, and the pressure is increased by 30 GPa every 50 ps. At 300 GPa, the phase transition is observed from 4-fold coordination to 6-fold, as shown in Figure 3b. The final 6-fold coordinated structure has radial distribution function as shown in Figure 3c. The highest C-C, C-Si, Si-Si peaks match the perfect RS structure, confirming that the final structure is in the rock salt phase.

Figure 3. Large-scale simulation of phase transition and analysis. a. Large-scale MD with 1000 atoms for the 3C-RS phase transition after the training of FLARE BFF is finished. The transition is observed at 300 GPa at room temperature in MD. b. The radial distribution function of the final structure after transition in the MD, compared with the perfect RS crystal lattice, indicating the final configuration is in the RS phase. c. The fraction of simple cubic (RS) and cubic diamond (3C, zinc-blende) atomic environments from the phase boundary evolution at different pressures.
As in the smaller training simulations, the nucleation-controlled hysteresis caused the transition pressure (300 GPa) to be much higher than in experimental measurements (50-150 GPa)25,26,28. To eliminate the nucleation barrier, we start our simulation with a configuration where the 3C and RS phases coexist, separated by a phase boundary, and evolve differently as a function of pressures. It is worth noting that such large scale two-phase simulations are enabled by the efficient force field and would not be possible to perform with DFT. To recognize simple cubic (RS) and cubic diamond (3C, zinc-blende) environments, we use polyhedral template matching57 in OVITO58. The time evolution of the fractions of simple cubic and cubic diamond atomic environments is shown in Figure 3c. The phase boundary evolves quickly within 10 fs. When pressure is greater than 160 GPa, the phase boundary evolves to RS phase, while below 155 GPa it evolves to 3C phase, which indicates the phase transition pressure is located between 155-160 GPa at the temperature of 300 K.
A number of experiments have measured the density-pressure relations of zinc blende (3C) and rock salt at room temperature25–29. As shown in Figure 4, the equation of state shows two parallel density-pressure curves, where the one with lower density is associated with the zinc-blende phase, and the other one with the rock salt phase. The pressures and corresponding densities at room temperature are extracted from the MD trajectories, and the equation of state is plotted to compare with the experimental measurements. FLARE BFF accurately agrees with the experimental measurements for both phases. For the transition state, there are not many experimental data points available, and the measurements can be affected by the quality of the sample, but the FLARE BFF still shows good agreement with the measured data points.

Figure 4. The density-pressure relation from experimental measurements25–29 and MD simulations from FLARE BFF. Zinc blende and rock salt phases correspond to two different lines of equation of state. Our FLARE BFF shows close agreement with experiments.
Vibrational and Thermal Transport Properties
To validate that the FLARE BFF gives accurate predictions of thermal properties, we investigate the phonon dispersions and thermal conductivities of the different polytypes and phases of SiC. The phonon dispersions are computed using Phonopy59. As shown in Figure 5, FLARE BFF produces phonon dispersions in close agreement with both DFT and experiments60–63 for both the low pressure polytypes and the high pressure rock salt phase at 200 GPa. While in the optical branches the FLARE BFF prediction shows minor discrepancies with DFT at the highest frequencies, the phonon density of states (DOS) presents good agreement. In particular, FLARE BFF captures the peak at 23 THz corresponding to a number of degenerate optical branches. In Supplementary Figure S3, we show that the optical branches can be improved by increasing the cutoff of BFF. Existing empirical potentials are much less accurate than FLARE BFF by comparing the phonon DOS in Figure 5. We note that the SiC crystals are polarized by atomic displacements and the generated macroscopic field induces an LO-TO splitting near point. The contribution from the polarization should be included through non-analytical correction (NAC)59,64, and the first principle calculation with NAC is discussed in Ref.65. However, since FLARE BFF model does not contain charges and polarization, the NAC term is not considered. Thus, our comparison is made between the FLARE BFF and DFT without NAC. The lack of NAC accounts for the disagreement in the high frequencies of the optical bands of 2H DFT phonon (Figure 5) with experimental measurements near point.

Figure 5. Phonon dispersions and phonon density of states of different polytypes from experimental measurements60–63, FLARE BFF and DFT calculations. Lower right: Thermal conductivity of 3C-SiC at 0 GPa and RS phase at 200 GPa with temperatures from 100 to 1000 K, from DFT and FLARE BFF calculations, and the experimental measurements69–72 are for 3C-SiC.

Figure S3. Supplementary Figure 3: Phonon Dispersion from Models with Different Cutoffs. Figure S3.
Having confirmed the accuracy of the 2nd order force constants by the phonon dispersion calculations, we then compute the thermal conductivity within the Boltzmann transport equation (BTE) formalism. The 2nd and 3rd order force constants are computed using the Phono3py66 code, and then used in the Phoebe67 transport code to evaluate thermal conductivity with the iterative BTE solver68. In Supplementary Figure S455, we verify that the exclusion of the non-analytic correction does not have a significant effect on the thermal conductivity values. Figure 5 presents the thermal conductivities of the zinc blende phase at 0 GPa and the rock salt phase at 200 GPa as a function of temperature. The FLARE BFF results are in good agreement with the DFT-derived thermal conductivity for both zinc blende and rock salt phases. The thermal conductivity of zinc blende phase computed from DFT and FLARE BFF is also in good agreement with experimental measurements69–72.

Figure S4. Thermal conductivity without and with NAC [15] at different temperatures.
For the high-pressure rock salt phase, the thermal conductivity has not been previously computed or measured to the best of our knowledge. Therefore, our calculation provides a prediction that awaits experimental verification in the future.
Discussion
In this work we develop a BFF that maps both the mean predictions and uncertainties of SGP models for many-body interatomic force fields. The mapping procedure overcomes the linear scaling issue of SGPs and results in near-quantum accuracy, while retaining computational cost comparable to empirical interatomic potentials such as ReaxFF. The efficient uncertainty-aware BFF model forms the basis for the construction of an accelerated autonomous BAL workflow that is coupled with the LAMMPS MD engine and enables large-scale parallel MD simulations. The key improvement with respect to previous methods is the ability of the many-body model to efficiently calculate forces and uncertainties at comparable computational cost.
As a demonstration of the ability of this method to capture and learn subtle interactions driving phase transformations on-the-fly, we use the BAL workflow to train a BFF for SiC on several common polytypes and phases. The zinc-blende to rock-salt transition is captured in both the active learning and the large-scale simulation, facilitated by the model uncertainty. FLARE BFF is shown to have good agreement with DFT for the enthalpy prediction in a wide range of pressure values. The BFF model is readily employed to perform a large-scale MD of the phase boundary evolution, which allows for reliable identification of the transition pressure at room temperature to be located at 155-160 GPa. The density-pressure relation predicted by FLARE BFF agrees very well with experimental measurements. We also find close agreement for phonon dispersions and thermal conductivities of several SiC phases, as compared with DFT calculations and experiments, outperforming existing empirical potentials.
The high-performance implementation of BFFs, combining accuracy with autonomous uncertainty-driven active learning, opens numerous possibilities to explicitly study dynamics and microscopic mechanisms of phase transformations and non-equilibrium properties such as thermal and ionic transport. The presented unified approach can be extended to a wide range of complex systems and phenomena, where interatomic interactions are difficult to capture with classical approaches while time- and length-scales are out of reach of first-principles computational methods. Uncertainty quantification in MD simulations allows for systematic monitoring of the model confidence and detection of rare and unanticipated phenomena, such as reactions or nucleation of phases. Such events are statistically unlikely to occur in smaller simulations and become increasingly likely and relevant as the simulation sizes increase, as may be needed to study complex and heterogeneous materials systems.
Methods
In this section, we use bold letters such as and to denote a vector or a matrix, and use indices such as and to denote the components of the vector and matrix respectively. In addition, we use to represent all the collected configurations with all atomic environments (the “full” data set), and use for a subset atomic environments selected from those configurations (the “sparse” data set).
Gaussian Process Regression
The local atomic environment of an atom consists of all the neighbor atoms within a cutoff radius, and is associated with a label that can be the force on atom or a local energy . The local energy labels are usually not available in practice, but total energies, stresses and atomic forces are. A kernel function quantifies the similarity between two atomic environments, which is also the covariance between local energies. Gaussian process regression (GP) assumes a Gaussian joint distribution of all the training data and test data . The posterior distribution for test data is also Gaussian with the mean and variance
Here, is the local energy of , is the kernel vector describing covariances between the test data and all the training data, with element , is the kernel between test data and itself, is the kernel matrix with element , is a diagonal matrix describing noise, and is the vector of all training labels.
Since the full GP evaluates the kernel between all configurations in the whole training set, it becomes computationally inefficient for large data sets. A sparse approximation is needed such that the computational cost can be reduced while keeping the information as complete as possible. Following our recent work19 we consider the mean prediction from Deterministic Training Conditional (DTC) Approximation73, and the variance on local energies
where the is the kernel vector between the test data and the sparse training set , is the kernel matrix between the sparse subset and the complete training set , and is the kernel matrix between and itself. The energy, forces and stress tensor of a test configuration are given by the mean prediction, and their corresponding uncertainties are given by the square root of the predictive variance.
ACE Descriptors with Inner Product Kernel
In the FLARE SGP formalism19 we use the atomic cluster expansion20 (ACE) descriptors to represent the features of a local environment. The total energy is constructed from atomic clusters, represented by the expansion coefficients of an atomic density function using spherical harmonics. We refer the readers to Ref.19,20 for more details. To build up the SGP model for interatomic Bayesian force field, or BFF, we use the inner product kernel defined as
where and are ACE descriptors of environments and , is the signal variance which is optimized by maximizing the log likelihood of SGP, and is the power of the inner product kernel which is selected a priori. We also normalize the kernel by the L2 norm of the descriptors. For simplicity of notations and without loss of generality, we ignore the normalization and only showcase the kernel without derivative associated with energy.
With inner product kernels, a highly efficient but lossless approximation is available via reorganization of the summation in the mathematical expression19. Defining and , the mean prediction of test data (Eq. (3)) from sparse training set can be written as19
The tensor can be computed from the training data descriptors. Thus, we can store the tensor, and during the prediction we directly evaluate Eq. (6) without the need to sum over all training data .
Crucially, the variance Eq. (4) has the similar reorganization as the mean prediction of Eq. (6)
where is a tensor that can be calculated and stored once the training data is collected, and used in inference without explicit summation over training data .
The reorganization indicates that the SGP regression with inner product kernel essentially gives a polynomial model of the descriptors. Denote as the descriptor dimension. The reorganized mean prediction has both the size and the computational cost as . While the reorganized variance prediction has both the size and the computational cost as . By the reorganization, both the mean and variance predictions become independent of the training set and get rid of the linear scaling with respect to training size. Here, we choose for the mean prediction, because 1) it is shown19 that has a significant improvement of likelihood compared to , while the improvement of is marginal; and 2) higher order requires a much larger memory for tensor, and the evaluation of Eq. (6) is much costlier than .
From Eq. (8) we see that the variance has twice the polynomial degree of that for the mean prediction. For example, when , the mean prediction is a quadratic model while the variance is a quartic model of descriptors. For computational efficiency, in this work we use for variance prediction. is not the exact variance of our mean prediction , but an approximation using the same hyperparameters as . It has a strong correlation with the exact variance as shown in Supplementary Figure 155. Especially, the correlation coefficients between and higher powers are close to 1.0, the perfect linear relation, even with a training size of 200 frames. This indicates that uncertainty quantification with is able to recognize discrepancies between different configurations as well as . Specifically, atomic environments with higher uncertainties will also be assigned higher uncertainties than others. It is then justified that can be used as a strongly correlated but much cheaper approximation of .
To summarize, we use and for mean and variance predictions respectively, where both are quadratic models with respect to the descriptors. During the on-the-fly active learning, every time the training set is updated by the new DFT data, the and matrices are computed from training data descriptors and stored as coefficient files. In LAMMPS MD, the quadratic models are evaluated to make predictions for energy, forces, stress and uncertainty of the configurations.
Data Availability
The scripts and data are available in Zenodo: https://doi.org/10.5281/zenodo.5797177.
Code Availability
The code for FLARE Bayesian force field and Bayesian active learning is available at https://github.com/mir-group/flare.
Acknowledgement
We thank Lixin Sun, Thomas Eckl, Matous Mrovec, Thomas Hammerschmidt and Ralf Drautz for helpful discussions on the construction of the force field and properties of SiC. We thank Jenny Coulter and Andrea Cepellotti for the helpful instructions on thermal conductivity calculation using Phono3py and Phoebe. We thank Jenny Hoffman, Sushmita Bhattacharya and Kristina Jacobsson for constructive suggestions on the manuscript. YX was supported from the US Department of Energy (DOE), Office of Science, Office of Basic Energy Sciences (BES) under Award No. DE-SC0020128. JV was supported by the National Science Foundation award number 2003725. AJ was supported by the Aker scholarship. BK was supported by the National Science Foundation through the Harvard University Materials Research Science and Engineering Center under award number DMR-2011754 and Robert Bosch LLC. Computational resources were provided by the FAS Division of Science Research Computing Group at Harvard University.
Author Contributions
J.V., Y.X. and A.J. developed the FLARE code, the corresponding LAMMPS pair styles and compute commands. Y.X. implemented the on-the-fly training workflow coupled with LAMMPS. Y.X. performed the on-the-fly training and MD simulation of SiC. S.R. performed DFT calculations of SiC polymorphs. Y.X. computed the thermal conductivity of SiC with the contribution of N.H.P.. B.K. conceived the application and supervised the work. Y.X. and B.K. wrote the manuscript. All authors contributed to manuscript preparation.
Competing Interests
The authors declare no competing financial or non-financial interests.
SUPPLEMENTARY METHODS
Select Uncertainty Threshold by Training Set Uncertainty
In the active learning, the Bayesian force field predicts uncertainty to quantify the confidence of the model of the current frame. Then the uncertainty is compared to an acquisition threshold. If the uncertainty is higher than the threshold then a DFT call is made to compute the “ground truth” energy (), forces () and stress () of the current configuration. The uncertainties of total potential energy, forces and stress are computed from the square root of the variance of the full GP:
which depend on the signal variance of the kernel function and the noise parameters . Therefore, choosing an absolute (constant) threshold throughout the active learning ignores the dependence and may determine a frame as “familiar/unfamiliar” inaccurately. In Ref.[1, 2], a multiple of is used as the threshold, such that the threshold changes while the noise parameter is optimized to a different value. In Ref.[3], a simple form of the raw uncertainty of sparse GP is used
where the normalization by the signal variance make independent of the signal variance and noise. Then an absolute (constant) threshold can be used in this special case.
In this work, we introduce a more general way to determine the threshold. Particularly, we compute the average uncertainty of all the training data, and then use a multiple of as a threshold. In the active learning of SiC, we call the DFT when . The relative uncertainty plotted in the Figure 2a in main text is .
SUPPLEMENTARY TABLES
We note that since each on-the-fly training only uses a single CPU node with 32 cores, in practice we run these on-the-fly training simulations simultaneously on a cluster. The “System” in the table specifies the initial polytype/phase of the simulation. The simulations starting with 3C/2H/4H/6H are compressive with increasing pressures. The simulation starting with RS is decompressive with decreasing pressures. The pressure range in the table also specifies the compression/decompression. For example, “0-480” means a compressive simulation from 0 to 480 GPa, and “200-0” means a decompressive simulation from 200 to 0 GPa.
Elasticity
Ref. [5] Ref. [6] Ref. [7] Ref. [8] Ref. [9] (Unit: GPa)
We note that since FLARE BFF is trained on DFT data but not the experiments, we expect it to give predictions closer to DFT than experiments, while as shown in Table S3, we still find good match for the four polytypes between FLARE BFF and experimental results.
| Model | Parameters | Speed (potential) | Speed (variance) | Force MAE |
| 2+3 body | 2-body: Å, ; 3-body: Å, | 0.20525 | 136.5 | |
| ACE-based | Å, , | 0.21123 | 68.4 |
Table S4. Performance Comparison. Table S4: Performance test with MGP potentials of SiC. Speed unit: ms CPU/(atom timestep). Force MAE unit: meV/Å.
2+3 body based mapped GP is an approximation, whose accuracy depends on the grid resolution of the spline interpolation, and the ranks from PCA (for variance). ACE based mapped GP is exact, which only differs from the original Sparse GP model by floating point errors. To reduce computational cost, we chose to use the potential and variance, where the variance is a good approximation of the variance, as shown in the Supplementary Information Figure S1.

Figure S1. Variance comparison between different powers.
The comparison of the performance between 2+3 body based MGP force field and the ACE based MGP is shown in the Table 4. The computational cost of the mapped variance of the 2+3 body based model is dominated by the PCA decomposed 3-body variance . The computational cost of the mapped force field is , and that of the mapped variance of ACE based model is , where the is the power of the kernel. Since we use for variance and for the force field, the cost of variance is comparable to the force field .
SUPPLEMENTARY FIGURES
Supplementary Figure S1: Variance Correlations
For the computational efficiency, we map the variance with power of the normalized inner product kernel of sparse GP for prediction in LAMMPS. While the energy, forces and stress are predicted from power kernel, the variance with is an approximation of the variance from kernel. We test the correlation between the two variances for the same testing configurations with different training set sizes. As shown in Figure S1, the two variances have a high correlation above 90%, even though the values present a constant ratio. From Supplementary Method, we compare the uncertainty of testing data with the average training set uncertainty in the active learning. Therefore, the constant ratio does not make much difference as long as the approximate uncertainty preserves the order of high/low uncertainties.
Polytype Stability
We compare FLARE BFF with DFT and empirical potentials on the polytype stability and lattice constant at zero pressure. Specifically, we compute ground state energy per Si-C pair and compare the energy differences between hexagonal polytypes (, and ) with the cubic one (). While the DFT energy differences between , and are as small as meV, is significantly more unstable than the other polytypes by meV. As shown in Figure S2, empirical methods such as Tersoff[11, 12] and EDIP[14] do not distinguish the energy differences between different polytypes, and Vashishta[13] potential predicts very large differences which over-stabilizes the cubic type, while the FLARE BFF reaches around 1 meV error with DFT and gives the correct polytype stability. The lattice constants of different polytypes are also compared in Figure S2, where the discrepancy between FLARE BFF and DFT is around 0.002 Å. And all methods manage to predict the decreasing trend while the hexagonality increases.

Figure S2. Polytype stability and lattice constant of (hexagonality=0), (hexagonality=1/3), (hexagonality=1/2) and (hexagonality=1), predicted from DFT, FLARE BFF and empirical potentials including Tersoff[11, 12], Vashishta[13] and EDIP[14].
As shown in Figure 5 of the main text, the FLARE BFF and DFT phonon dispersions have an excellent agreement in the acoustic and transverse optical (TO) branches, but show mismatch in the longitudinal optical (LO) branches. Considering the LO-TO splitting, even though we do not include non-analytical correction, it is still likely that the polarization makes a non-trivial contribution and is not captured due to the near-sightedness of our machine learning model. Therefore, we tested how the model cutoff affects the phonon. We trained the model with cutoff from 3 to , and the phonons predicted by the models are plotted from light to dark colors. As shown in Figure S3, all models have an excellent agreement with DFT in acoustic and TO branches, even with a cutoff as short as . While in the LO branches, the models with smaller cutoffs predict significantly flatter bands than the ones with larger cutoffs. Though with the largest cutoff our FLARE BFF still does not predict the LO branches perfectly, this result shows an evidence that one source of the mismatch in the LO branches is the long-range effect. Further investigation is needed such as introducing long-range interactions to the FLARE BFF, and will be left to our future work.
Supplementary Figure S4: Non Analytic Correction on the Thermal Conductivity
We calculated the thermal conductivity from Boltzmann transport equation with the non analytical correction (NAC) term from Born effective charge, and compared it to that without NAC term at temperatures from 100 to 1000 K. Figure S4 indicates that the exclusion of the non analytical correction term underestimates the thermal conductivity, but the underestimation is not significant. Since FLARE BFF is trained on the DFT data without long-range electrostatic interactions, and the force constants are computed without NAC term, it underestimates thermal conductivity compared to the DFT with NAC as expected.
Supplementary Figure 5: Accuracy Comparison of 2+3-body and ACE-based Models
A comparison of accuracy between the GP model with 2+3 body descriptors and the one with ACE descriptors is made with the SiC bulk dataset, as shown in Figure S5.

Figure S5. Comparison of accuracy between ACE-based and 2+3 body based Gaussian process force field on the bulk SiC dataset.
Supplementary References
References
- [1]Vandermause, J. et al. On-the-fly active learning of interpretable bayesian force fields for atomistic rare events. npj Comput. Mater. 6, 1–11 (2020).
- [2]Xie, Y., Vandermause, J., Sun, L., Cepellotti, A. & Kozinsky, B. Bayesian force fields from active learning for simulation of inter-dimensional transformation of stanene. npj Comput. Mater. 7, 1–10 (2021).DOI
- [3]Vandermause, J., Xie, Y., Lim, J. S., Owen, C. J. & Kozinsky, B. Active learning of reactive bayesian force fields: Application to heterogeneous hydrogen-platinum catalysis dynamics (2021). 2106.01949.
- [4]Drautz, R. Atomic cluster expansion for accurate and transferable interatomic potentials. Phys. Rev. B 99 (2019). URL https://link.aps.org/doi/10.1103/PhysRevB.99.014104.DOI
- [5]Feldman, D. W., Parker, J. H., Choyke, W. J. & Patrick, L. Phonon Dispersion Curves by Raman Scattering in SiC, Polytypes 3C, 4H, 6H, 15R, and 21R. Phys. Rev. 173, 787–793 (1968). URL https://link.aps.org/doi/10.1103/PhysRev.173.787.DOI
- [6]Harrison, W. & Freeman, W. Electronic structure and the properties of solids: the physics of the chemical bond. Journal of Molecular Structure 71, 355 (1981). URL https://linkinghub.elsevier.com/retrieve/pii/0022286081851368.
- [7]Pestka, K. A., Maynard, J. D., Gao, D. & Carraro, C. Measurement of the Elastic Constants of a Columnar SiC Thin Film. Phys. Rev. Lett. 100 (2008). URL https://link.aps.org/doi/10.1103/PhysRevLett.100.055503.DOI
- [8]Kamitani, K. et al. The elastic constants of silicon carbide: A Brillouin-scattering study of 4h and 6h SiC single crystals. J. Appl. Phys. 82, 3152–3154 (1997). URL http://aip.scitation.org/doi/10.1063/1.366100.
- [9]Djemia, P., Roussigné, Y., Dirras, G. F. & Jackson, K. M. Elastic properties of β-SiC films by Brillouin light scattering. J. Appl. Phys. 95, 2324–2330 (2004). URL http://aip.scitation.org/doi/10.1063/1.1642281.DOI
- [10]Ramakers, S. et al. Effects of thermal, elastic, and surface properties on the stability of sic polytypes. Phys. Rev. B 106, 075201 (2022). URL https://link.aps.org/doi/10.1103/ PhysRevB. 106. 075201.
- [11]Erhart, P. & Albe, K. Analytical potential for atomistic simulations of silicon, carbon, and silicon carbide. Phys. Rev. B 71 (2005). URL https://link.aps.org/doi/10.1103/PhysRevB.71.035211.DOI
- [12]Tersoff, J. Chemical order in amorphous silicon carbide. Phys. Rev. B 49, 16349 (1994). URL https://journals.aps.org/prb/abstract/10.1103/PhysRevB.49.16349.pubmed.ncbi.nlm.nih.gov/10010784
- [13]Vashishta, P., Kalia, R. K., Nakano, A. & Rino, J. P. Interaction potential for silicon carbide: A molecular dynamics study of elastic constants and vibrational density of states for crystalline and amorphous silicon carbide. J. Appl. Phys. 101, 103515 (2007). URL http://aip.scitation.org/doi/10.1063/1.2724570.DOI
- [14]Jiang, C., Morgan, D. & Szlufarska, I. Carbon tri-interstitial defect: A model for the D II center. Phys. Rev. B 86 (2012). URL https://link.aps.org/doi/10.1103/PhysRevB.86.144118.DOI
- [15]Protik, N. H. et al. Phonon thermal transport in 2h, 4h and 6h silicon carbide from first principles. Mater. Today Phys. 1, 31–38 (2017). URL https://linkinghub.elsevier.com/retrieve/pii/S2542529317300743.arxiv.org/abs/1705.02634