Abstract
Predicting response of materials to external stimuli is a primary objective of computational materials science. However, current methods are limited to small-scale simulations due to the unfavorable scaling of computational costs. Here, we implement an equivariant machine-learning framework where response properties stem from exact differential relationships between a generalized potential function and applied external fields. Focusing on responses to electric fields, the method predicts electric enthalpy, forces, polarization, Born charges, and polarizability within a unified model enforcing the full set of exact physical constraints, symmetries and conservation laws. Through application to α−SiO2, we demonstrate that our approach can be used for predicting vibrational and dielectric properties of materials, and for conducting large-scale dynamics under arbitrary electric fields at unprecedented accuracy and scale. We apply our method to ferroelectric BaTiO3 and capture the temperature dependence, frequency dependence, and time evolution of the ferroelectric hysteresis, revealing the underlying intrinsic mechanisms of nucleation and growth that govern ferroelectric domain switching.
Similar content being viewed by others
Introduction
The goal of computational materials science is to accurately predict experimentally measurable properties of real materials from first principles. Linear, nonlinear, and coupled responses to external stimuli define the functional properties of a wide class of materials including dielectrics, ferroelectrics, multiferroics, and piezoelectrics. Developing computational methods to calculate materials response to external stimuli has been a long-standing goal of first-principles electronic structure methods based on density functional theory (DFT). Perturbative or finite difference DFT approaches to response1,2 are limited to very small systems, due to the unfavorable scaling of computational costs. In recent years, machine-learning (ML) force fields have closed the gap between the accuracy of DFT calculations and the efficiency required for large-scale calculations, such as molecular dynamics (MD) simulations, determination of elastic constants, and phonon spectra. The accuracy of ML force fields has been significantly enhanced by incorporating exact O(3) symmetry group equivariance, starting with the NequIP model and subsequent approaches3,4,5,6,7 to learn the potential energy as a function of atomic coordinates. In this context, there is a need for a ML framework for generalized potentials, which can depend in a nonlinear and coupled way on a number of parameters such as state variables or external fields.
Among various types of perturbations, responses of materials to external electric fields are some of the most important. Vibrational and dielectric responses of crystalline, disordered and liquid materials can be determined from the dynamics of polarization and polarizability8,9. Performance of ferroelectric devices, such as non-volatile memories, sensors, and actuators, is governed by hysteresis, polarization switching, and domain wall motion10,11, whose microscopic mechanisms are not yet fully understood due to the limitations of both first-principle computations and experimental measurements. Quantitatively accurate simulations that can reveal the microscopic mechanisms of switching dynamics must simultaneously account for the presence of external electric fields and handle the complexity and large scales to capture the influence of defects and surfaces on the nucleation and growth of ferroelectric domains.
Driven by the need of understanding the dielectric and ferroelectric properties of materials from first principles12, the modern theory of polarization12,13,14 and electric enthalpy functionals15,16 have been introduced. However, the significant computational cost of DFT limits the ability to simulate realistic materials and devices. To address this limitation, ML approaches have been proposed to predict polarization17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32 and other response properties, such as Born charges26,28,29,31,32, polarizability26,30,31,33,34, dielectric constants19,22,26,27,29,35,36, infrared spectra20,24,25,26,27,29,30,32,37, Raman spectra20,31,34,37,38, and surface-sensitive spectroscopy37, with applications to molecules17,18,20,21,25,30,31,33, liquid water19,24,26,27,29,30,34,37, and solids22,28,37. Most of these ML methods are formulated in a disjoint manner, with a conventional ML model trained to evolve atomic positions and a separate ML model trained to predict dielectric properties. However, this does not guarantee the enforcement of physical symmetries and conservation laws involving electric enthalpy, polarization, and Born charges. Approaches in which dielectric properties are determined together with energy and forces within a single model17,20,25,30,31 have not been formulated for extended systems, where periodic boundaries and the multivalued nature of polarization pose difficulties32. The challenge of training on multivalued polarization data for extended systems was bypassed by training only on atomic forces for various electric fields to construct the potential energy surface, with polarization subsequently derived by differentiating the electric enthalpy with respect to the electric field30. However, this approach may limit the accuracy of polarization predictions, as the model must implicitly capture these derivatives without direct training. In addition, gathering DFT data across multiple electric fields for extended systems is computationally very expensive. Therefore, developing a model that can be trained directly on multivalued polarization data, as well as on energy, forces, Born charges, and polarizability, is crucial.
In this work, we introduce a unified differential framework for learning the generalized potential energy and the response functions to external stimuli within a single ML model. This is achieved by determining the response functions as derivatives of the generalized potential energy with respect to atomic coordinates and perturbation parameters. Because our method is based on exact differential relations between the generalized potential energy and the observable response quantities, it enforces both physical symmetries and conservation laws involving physical quantities, which cannot be achieved when using separate ML models for each response function. We illustrate this approach in the case of an applied electric field. Specifically, we learn the electric enthalpy as a function of atomic positions and electric field, and derive polarization by differentiating the electric enthalpy with respect to the electric field, the Born charges by differentiating the polarization with respect to the atomic positions, and the polarizability by differentiating the polarization with respect to the electric field. This formalism guarantees momentum conservation, the acoustic sum rule for Born charges, the polarization being a conservative vector field, and the electric enthalpy conservation in ML molecular dynamics (MLMD) and in cyclic adiabatic evolutions involving changes of the electric field. Our architecture augments the inputs with parameters describing the system perturbation, such that model differentiation with respect to these parameters allows the model to train on additional physical quantities. This approach differs from that of physically informed neural networks39, in which the loss function incorporates additional regularization terms pertaining to differential expressions involving only the output of the model. We validate our method by calculating infrared spectrum, frequency-dependent dielectric constant and screening effects in α−SiO2, finding excellent agreement with results from density-functional perturbation theory and with experiment. We further demonstrate the capability of our approach to perform MLMD in the presence of an electric field and apply our method to study the temperature-dependent ferroelectric properties of tetragonal BaTiO3. Specifically, we calculate the ferroelectric hysteresis at various temperatures and frequencies, narrowing the gap between theoretical predictions and experimental results. In addition, we investigate the underlying dipole dynamics, providing real-time description of nucleation and evolution mechanisms of ferroelectric domains. In this way, our work paves the way to efficient and accurate large-scale studies of dielectric and ferroelectric properties of crystalline, disordered and liquid materials, far beyond the reach of standard quantum mechanical methods in time and length scales.
Results
Machine-learning framework for response
We focus on learning the generalized potential energy U of a system that depends on atomic coordinates and on a set of parameters, which include external fields. Following a Taylor expansion expression [see Eq. (1) in Methods], we introduce a framework for learning the generalized potential energy and response functions within a single unified ML model. This is based on the idea that differentiating the generalized potential energy with respect to its variables automatically yields response properties for each atomic configuration. The training of the model is achieved by minimizing a loss function with contributions pertaining to each response property. This framework is related to the concept of Sobolev training40, where each loss term consists of differences between training label and corresponding gradient of the energy. In the context of response theory, we achieve generality and ability to train the model to describe a system’s response to variation of any parameter, with other parameters held at arbitrary constant values. This framework is versatile and applicable to various ML methods, encompassing both invariant and equivariant neural networks3,4, along with kernel-based methods41. As response properties may exhibit nonlinear and coupled dependencies on more than one field, we employ neural networks for capturing intricate dependencies of the generalized potential energy on its inputs through back-propagation of the gradients. The translation invariance of the generalized potential energy combined with the exact derivative relations for response functions enforce exact physical symmetries and conservation laws, including momentum conservation, the electric enthalpy conservation during dynamics, and conservation laws involving the response functions. While the discussion in this work deals only with the microscopic generalized potential energy, we note that we have concurrently formulated a general differentiable formalism for learning temperature-dependent free energy models in the context of dimensionality reduction, such as molecular coarse graining42.
As a concrete example of this approach, we consider the generalized potential energy of a system subject to an electric field, namely the electric enthalpy15,16. We implement this model in Allegro4, which offers the accuracy and data efficiency advantages of an equivariant neural network combined with state-of-the-art scalability due to strict locality. As illustrated in Fig. 1a, we include the electric field among the inputs of the model together with the atomic positions. Assuming the linear response regime, we focus on training the models on electric enthalpies, forces, polarizations, and Born charges at zero electric field. This allows the implementation to be a simple modification of the conventional Allegro ML force field architecture. For a given set of uncorrelated atomic configurations, the training data is generated by performing DFT calculations both in the absence and in the presence of a small electric field along each of the three Cartesian directions. Then, finite-difference approximations are used to determine Born charges and polarizabilities (see Fig. 1b). For training and validation, we use labels calculated in the limit of zero electric field. This approach is computationally advantageous compared to previous methods30,31, which require training data for electric enthalpy and forces across multiple electric field values. Once a model is trained, the model outputs the electric enthalpy and derives therefrom forces, polarization, Born charges, and polarizability by taking first and second derivatives of the output electric enthalpy with respect to atomic positions and electric field, in the limit of a zero electric field. Then, large-scale structural relaxations and MLMD in the presence of an electric field can be performed with LAMMPS43 through a dedicated interface that we developed. Our interface accounts for the analytic inclusion of the contributions to energy, forces, and polarization due to the presence of an electric field within the linear response approximation (see Eqs. (2), (7), and (8) Methods). In this way, arbitrary electric fields can be specified for production MLMD. Further details on the theory, neural network architecture, and simulations under external electric fields are given in Methods.
a Schematics outlining our neural network formulation that simultaneously learns to predict electric enthalpy U, forces Fi, polarization P, Born charges \({{{\bf{Z}}}}_{i}^{*}\), and polarizability α given in input the atomic positions ri and the electric field E. The force constant Kij is shown for completeness, but is not used for demonstrating our approach in this work. Here, i and j denote atom indices. b Workflow for generating DFT data through calculations with finite electric fields for a given set of frames. The DFT data used for training and validation of the ML model are calculated in the limit of zero electric field, and are circled for ease of reference.
Our framework offers several physical advantages. First, it is physically elegant as it predicts electric enthalpy and response quantities within a single unified model through exact physical relations. Second, physical symmetries are enforced by construction. In this regard, electric enthalpy and polarization are invariant under translations, as they depend only on interatomic displacements within our ML model. Third, the physical symmetries and the exact constraints satisfied by our ML model enforce conservation laws. In particular, the momentum is conserved since the electric enthalpy is translation invariant and forces are calculated as gradients of the electric enthalpy with respect to atomic positions. Similarly, the acoustic sum rule for Born charges is satisfied, since polarization is translation invariant and Born charges are determined as gradients of polarization with respect to atomic positions. This reflects the charge neutrality of the system. Furthermore, the electric enthalpy is conserved in MLMD, since forces are calculated as gradients of the electric enthalpy with respect to atomic positions. Finally, polarization is guaranteed to be a conservative vector field, as it is calculated as gradient of the electric enthalpy with respect to the electric field. This implies the conservation of electric enthalpy in any cyclic adiabatic evolution involving changes in the electric field, which is relevant for studying response to oscillating fields. A more detailed discussion on physical symmetries and conservation laws, together with an extensive comparison with previous literature is provided in Methods.
Vibrational and dielectric properties
We begin by demonstrating our ML framework for investigating the vibrational and dielectric properties of α−SiO2. We train an ML model for α−SiO2 using 200 frames of 72 atoms extracted from MD simulations employing a classical potential. The distributions of DFT data and the parity plots showing the accuracy of the model are provided in Supplementary Figs. S1 and S2 in the SI, respectively. Then, we construct a 24696-atom supercell and perform MLMD for 200 ps in the absence of electric field after an equilibration of 10 ps in the NVE ensemble. From the polarization dynamics [see Eq. (16)], we determine the infrared spectrum of α−SiO2, which we show in Fig. 2a. We report the main infrared vibrational frequencies in Table 1. Next, by analyzing the dynamics of polarization and polarizability [see equations (17)-(19)], we determine the frequency-dependent dielectric constant, which we illustrate in Fig. 2b, c. For comparison, we calculate these quantities using density functional perturbation theory (DFPT)1,2 following the approach in ref. 44,45. As shown in Fig. 2a–c and in Table 1, we find excellent agreement between the MLMD and DFPT, thereby validating of our method. For further validation, we include in Fig. 2a–c the experimental results of infrared activity and optical response of α−SiO2 from ref. 46. The main infrared peaks predicted from MLMD and DFPT deviate from the experimental value by a small redshift (see Table 1). This redshift is due to the use of the PBE functional, which tends to overestimate lattice bonds and consequently underestimate phonon frequencies47,48,49. Discrepancies between MLMD and DFPT results might be due to anharmonic effects, which are not accounted for in DFPT.
a Infrared spectrum of α−SiO2 at 300 K as a function of frequency ω obtained with MLMD and with DFPT. The amplitudes of the main infrared peak obtained in the two cases are matched as a guide to the eye. b Real part and (c) imaginary part of the frequency-dependent dielectric constant of α−SiO2 at 300 K as a function of frequency ω obtained with MLMD and with DFPT. Here, ε = (εxx + εyy + εzz)/3. In (a–c) a Gaussian broadening of 20 cm−1 is used. In (b, c), we include the experimental data for crystalline α−SiO2 from Ref. 46, determined with an ordinary ray with electric field perpendicular to the optic axis. In (a) the experimental infrared activity is determined as proportional to ωIm[ε], where Im[ε] is taken from Ref. 46. d Diagonal elements of the dielectric tensor of α−SiO2, parallel (ε∥) and perpendicular (ε⊥) to the optic axis (z). The dielectric constants are obtained through structural relaxations in the presence of an electric field of 3.6 MV ⋅ cm−1 along the parallel (z) or perpendicular (x,y) directions with our ML model and with DFT, starting from a pristine bulk structure. The intermediate states are shown to demonstrate that convergence in LAMMPS is achieved with only a few relaxation steps.
Next, we show that our formulation describes electronic and ionic screening effects in the presence of an electric field. Specifically, we focus on the determination of the static dielectric constant, which results from the difference between the polarization calculated in the presence of a small electric field for the structure relaxed with the electric field, and the polarization calculated in the absence of the electric field for the pristine bulk structure [see equation (20)]. This requires the ML model to accurately capture electric field contributions to electric enthalpy, polarization and forces [see Eqs. (2), (7) and (8)], which is challenging as these contributions can be small and comparable to the accuracy of the model. We hence perform a structural relaxation under a finite electric field starting from a pristine bulk structure of α−SiO2 using our ML model. As illustrated in Fig. 2d, we find high-frequency and static dielectric constants essentially coincide with the respective DFT values. This demonstrates that our method successfully captures the electric-field contributions to the electronic structure, thereby further corroborating the validity of our formulation for performing dynamics under finite electric fields. Details on data generation and expressions used for infrared spectrum and dielectric constants are provided in Methods.
Training the ML model on Born charges is relevant to ensure accuracy and data efficiency when investigating the electric response of materials, both in the absence and in the presence of an electric field. As shown in Supplementary Fig. S3 in the SI for α−SiO2, not training on Born charges might affect the accuracy of vibrational and dielectric response at low frequencies, especially in a low-data regime. In addition, simulations in the presence of the electric field with a model not trained on Born charges would require training on energy and forces at multiple values of the electric field for each frame, which significantly raises the computational cost of training for extended system. Thus, the ability to train directly on Born charges is a key advantage of our method over previous approaches30,31.
Ferroelectric hysteresis and dipole dynamics
The computational study of ferroelectric properties from first principles, and especially dynamics of domain switching, is challenging due to the high computational cost involved. For instance, the analysis of the ferroelectric hysteresis requires performing multiple relaxations of sufficiently large structures under applied electric fields. In particular, determining the intrinsic coercive field upon which the polarization switches sign requires progressively smaller changes in the electric field close to the transition, which becomes prohibitive for large systems to capture with DFT. In addition, performing such a task at finite temperature requires conducting MD simulations under electric fields, which is again intractable with DFT. Empirical bond-valence potential simulations combined with simple analytical models were used to study ferroelectric domain wall motion10,11. Simulations with ML force fields with ad-hoc Born charges have also been performed50,51. However, such uncontrolled approximations in these effort have unpredictable accuracy, especially when quantifying switching dynamics in realistic devices. To address the computational challenges of large-scale simulations of ferroelectric phenomena, coarse-grained models52 and second-principles approaches53 have been developed. In this regard, our method provides both rigorous and scalable first-principles-based comprehensive description of ferroelectric dynamics, with explicit accurate learning of polarization and Born charges obtained from ab-initio calculations based on the modern theory of polarization. This is achieved by constructing a differential response theory model architecture based on state-of-the-art equivariant neural networks, offering a significant speedup in computation while maintaining quantum mechanical accuracy.
We apply our method to study dynamic ferroelectric properties of BaTiO3 perovskite. We consider the tetragonal phase, which is stable at room temperature, and train a ML model for BaTiO3 using 75 frames of 135 atoms each extracted from active learning dynamics. The lattice parameters of these frames are optimized with DFT for a pristine bulk system. In Supplementary Figs. S1 and S2 in the SI, we report the distributions of DFT data and the parity plots showing the accuracy of the model. Then, we calculate the ferroelectric hysteresis for the 135-atom supercell at zero temperature and illustrate the results in Fig. 3a. Each point of the hysteresis is obtained by performing a structural relaxation under an electric field along z, which is varied following a sinusoidal behavior with a frequency of 5 GHz [see Eq. (9)]. To validate our result, we examine the hysteresis for the 135-atom supercell through DFT calculations with finite electric fields. In the MLMD simulation, the Berry phase is found to remain in a single branch for which polarization of a centro-symmetric structure vanishes. This is because polarization is differentially related to Born charges within that choice of Berry phase [see Eq. (10)], and due to the smoothness of a neural network’s outputs with respect to its inputs. At variance, in the DFT calculations the values of polarization may and do belong to different but physically equivalent Berry phase branches, and we fold them to the Berry phase for which polarization for a centro-symmetric structure vanishes. As illustrated in Fig. 3a, we find a remarkable agreement between the ML and DFT ferroelectric hysteresis, which validates our ML model for BaTiO3.
a Ferroelectric hysteresis of polarization density Pz/Ω as a function of an applied electric field along z in BaTiO3, as obtained using DFT-optimized lattice parameters (LDFT). This includes results for the 135-atom supercell at 0 K, obtained through structural relaxations with our ML model or DFT, and results for the 1080-atom supercell at finite temperatures, calculated through MLMD with our ML model. For the hysteresis at 300 K, time signatures ti are indicated and used to visualize dipoles in Fig. 4. b Ferroelectric hysteresis at different temperatures, obtained using a 3645-atom supercell with experimental lattice parameters (Lexpt). The experimental value of spontaneous polarization from Ref. 54 is reported. c Intrinsic coercive electric field \({E}_{z}^{\,{\mbox{c}}\,}\) as a function of temperature, obtained using a 3645-atom supercell with experimental lattice parameters. The absolute values of the positive (up → dw) and negative (dw → up) coercive fields, along with their mean, are shown. The standard deviation of coercive field values is given as a shaded region around the average value. d Intrinsic coercive field as a function of the electric field frequency, obtained using a 3645-atom supercell with experimental lattice parameters. The grey dotted line denotes the log-linear extrapolation of the coercive field with respect to the frequency, indicating an exponential relationship between the coercive field and the frequency. The experimental coercive field values were measured for a sample with a thickness of 250 nm and are taken from Ref. 59. In (a–d) each hysteresis curve at finite temperature is averaged over 10 trajectories, and N denotes the number of atoms. In (a–c) the frequency of the electric field is set to 5 GHz, corresponding to a period of 200 ps.
Next, we assess the temperature effects on the ferroelectric response of BaTiO3 by performing MLMD in the NVT ensemble in the presence of a sinusoidally varying electric field with a frequency of 5 GHz. We use a 1080-atom supercell and include in Fig. 3a the hysteresis curves obtained at various temperatures. We find that the intrinsic coercive field decreases with increasing temperature, consistent with the activated nucleation mechanism of hysteresis. In contrast, the spontaneous polarization is only marginally affected by temperature. Additionally, the hysteresis loops at both zero and finite temperatures exhibit symmetry with respect to the sign of the electric field. This reflects the correct description of the polarization as a conservative vector field, a key consequence of the differential learning approach.
We note that the spontaneous polarization obtained in Fig. 3a using DFT-optimized lattice parameters overestimates the experimental value of 26 μC ⋅ cm−254. Using instead a 3645-atom supercell of BaTiO3 with experimental lattice parameters, we determine the temperature-dependent ferroelectric hysteresis with the same ML model, and find a spontaneous polarization in good agreement with experiment. In Supplementary Fig. S5 in the SI, we performed several tests to establish the ability of our method in extrapolating the physics to larger systems and to supercells with different lattice parameters. In particular, we verified that our model, trained on 135-atom structures with DFT lattice parameters, yields results in excellent agreement with DFT-calculated polarization data for 320-atom structures with experimental lattice parameters. In addition, we verified that a 3645-atom supercell with experimental lattice parameters yields converged hysteresis results, as shown in Supplementary Fig. S4 in the SI. Next, we keep the electric field frequency at 5 GHz, as in Fig. 3a, and determine the ferroelectric hysteresis at various temperatures using supercells with experimental lattice parameters. As shown in Fig. 3b, the spontaneous polarization density at 300 K is in good agreement with experiment. Additionally, we obtain coercive fields in a much closer agreement to the experimental values54,55,56,57,58, which can be related to a lower switching barrier. In Fig. 3c, we study the temperature dependence of the coercive field in more detail for temperatures where the tetragonal phase is stable, and find that the coercive field decreases linearly as the temperature increases, which is consistent with experimental observations.
In experiments, the coercive field is typically measured using electric fields with frequencies lower than that used in Fig. 3a-c, resulting in reported coercive fields that are lower than those shown in Fig. 354,55,56,57,58,59. In Fig. 3d, we report the frequency-dependent coercive fields measured for a sample of 250 nm thickness from Ref. 59. The decrease in the coercive field as the frequency decreases is consistent with the fact that the system has more time to nucleate a local polarization reversal at a given electric field strength. To further narrow the gap between the calculated and the experimental coercive fields, we investigate the effect of the frequency of the applied electric field on the ferroelectric hysteresis. We consider the 3645-atom supercell with experimental lattice parameters and perform MLMD at 300 K under a sinusoidal electric field, varying the frequency from 50 GHz to 5 MHz. As shown in Fig. 3d, we find that the coercive field decreases with decreasing frequency. By extrapolating our calculated coercive fields to low frequencies, we find a discrepancy of approximately one order of magnitude compared to experimental values. The remaining discrepancies with experimental values might be due to the uncontrolled approximations in the PBE DFT functional and/or the presence of defects or boundaries, which can sensibly affect the switching mechanism60. We remark that the task of determining frequency-dependent hysteresis is computationally very challenging. Thus, this application highlights the robust computational capabilities of our model, as further demonstrated by the excellent scaling performance of our method for systems of up to 1 million atoms, as illustrated in Supplementary Fig. S6 in the SI.
It is of interest to investigate the dynamics of ferroelectric dipoles in MD under an electric field, as these can reveal physical insight on ferroelectric domain formation and motion. In particular, we study the ferroelectric switching during the hysteresis in BaTiO3. As illustrated in Fig. 4a, starting from an initial configuration with up polarization, the gradual decrease of the electric field along z induces the nucleation of a down polarized unit cell. The down-polarized region then propagates along the z direction, thereby creating one-dimensional domain line. The expansion along z is favored over the other Cartesian directions as diagonal Born charges \({Z}_{zz}^{*}\) are greater than the off-diagonal ones. Next, neighboring one-dimensional domain lines flip their polarization, until the entire system is down-polarized. In this process, expansion along x and y are equally probable, due to their equivalence in tetragonal BaTiO3. The growth of the switched region is ensured following the formation of a critical nucleus10. The larger the down-polarized region is, the faster its expansion becomes, as its surface in the xy plane encompasses more neighboring domain lines. This entire process for a supercell of 14.6 nm3 happens in about 3 ps, which we visualize through time signatures that are shown in Fig. 3a. In Fig. 4b, we illustrate the corresponding dynamics of the polar angles formed by the dipole with the z axis throughout the polarization switching. In Fig. 4c, we provide a sketch of the underlying intrinsic mechanism of nucleation and grown governing the ferroelectric domain switching.
a Dipoles Pz summed over planes in tetragonal BaTiO3 during the hysteresis transition from up to down polarization in the presence of a sinusoidal electric field in the z direction at 300 K. Dipoles are assigned for each 5-atom unit cell [see Eq. (10)] and are located at the coordinates of Ti atoms. Close to the transition point (t1), the dipoles are oriented in the up direction and are fluctuating due to temperature. While gradually decreasing the electric field, a single unit cell switches its polarization from up to down (t2). This is followed by an expansion of this down-polarized region along z (t3), forming a one-dimensional domain line. Next, neighboring one-dimensional domain lines flip their polarization either along x or y (t4), until the entire system is down polarized (t5). A supercell of 1080 atoms with DFT-optimized lattice parameters is used. The time signatures ti are also shown in Fig. 3a. b Histograms of the polar angle θ of the dipoles relative to the z axis during the hysteresis transition from up to down polarization. c Intrinsic mechanism of polarization switching: (i) nucleation of a polarization-flipped unit cell, (ii) expansion to a one-dimensional domain line, (iii) formation of neighboring one-dimensional domain lines along either the x or y direction, and (iv) domain expansion through the entire system.
Discussion
We introduced a framework for learning the generalized potential energy and related response quantities to external fields within a unified ML model. This has several advantages. First, the response properties, obtained by differentiating the generalized potential energy with respect to the inputs of the model, by construction obey physical symmetries and conservation laws. Our approach ensures momentum conservation, the acoustic sum rule for Born charges, the polarization being a conservative vector field, and the electric enthalpy conservation in machine-learning molecular dynamics and in cyclic adiabatic evolutions involving changes of the electric field. Second, the differential Sobolev training approach allows for a richer set of training targets to be used in learning the generalized potential energy as a function of atomic coordinates and arbitrary parameters. We deploy our method to enable simulating molecular dynamics of extended systems under the influence of applied electric fields. To this aim, we develop and implement a unified equivariant neural network model that learns the electric enthalpy and predict therefrom polarization, Born charges, and polarizability in addition to forces and stress. The model is based on an equivariant local description of the atomic environments, which offers advantages in accuracy, data efficiency, and scalability. We applied our model to determine the vibrational and dielectric properties of α−SiO2, finding excellent agreement with reference DFT, DFPT and experimental results. This demonstrates that our formulation can be used to perform large-scale simulations under finite electric fields. Next, we used our method to calculate temperature-dependent and frequency-dependent ferroelectric properties of BaTiO3, narrowing the gap with experimental results. By analyzing the dipole dynamics during the hysteresis, we reveal the intrinsic mechanisms of domain nucleation and motion using large-scale molecular dynamics under applied electric fields at first-principles accuracy. We found that polarization switching starts from a nucleation of dipole reversal in a single 5-atom unit cell, followed by expansion to a one-dimensional domain line. Next, neighboring one-dimensional domain lines form along the x and y directions, until the entire supercell switches its polarization in just a few picoseconds.
The notable advance of our formulation is the ability to predict with first-principles accuracy the response properties of extended systems of much larger size than is possible with electronic structure methods, while also ensuring excellent convergence of sampling time correlations over long simulations duration. In addition, we provide an elegant solution for training on polarization values explicitly taking into account their multi-valued nature, and predict ferroelectric hysteresis in extended systems with first-principles accuracy up to the million-atom scale. This opens possibilities to study dielectric, spectral, and ferroelectric properties of previously intractable complex systems with defects and disorder. We remark that our model is based on a local representation of the atomic environments and, therefore, long-range dipole-dipole interactions are not guaranteed to be fully captured. While this remains to be investigated quantitatively, we note that such long-range interactions are typically mitigated by screening effects in extended homogeneous systems such as those considered in this work. Furthermore, in the interest of further narrowing the gap between the first-principles results with experimental data, it may be important to explicitly account for the effects of defects and interfaces through the ML model, in addition to the temperature and frequency effects investigated in this work. Indeed, given that hysteresis is driven by irreversible domain nucleation and growth processes, our ideal crystal geometry does not represent the pre-existing ferroelectric domains or defects that are present in experimental samples, which might affect the initiation of the polarization switching and make the experimental coercive electric field significantly smaller than the intrinsic one that we obtain. Additionally, strain variations and surface effects in thin-film samples may significantly influence the magnitude of the observed coercive field. The investigation of such effects, which would certainly be intractable with standard quantum mechanical methods, is feasible within our method and is left for future studies. At the same time, our approach reveals the microscopic physical mechanisms of intrinsic polarization switching in ideal single crystals, which are very difficult to replicate in experimental samples.
In the context of ferroelectric dynamics, our approach enables first-principles real-time simulations of ferroelectric switching, where polarization and Born charges are treated within the modern theory of polarization, going beyond previous models based on empirical parameters10,11 or uncontrolled approximations for Born charges50,51. This formulation enables accurate modeling of complex structures, such as vacancies, polarons, and polarization vortices in heterogeneous geometries, for which simple models are not applicable. In particular, our method can be used to study phase transitions driven by the electric field, such as in semiconductors with complex polymorphs or in ferroelectric materials. By training the model on datasets composed of uncorrelated frames from multiple phases, we can expect it to predict phase diagrams of such complex materials involving both temperature and electric field. Moreover, our model can be used to capture anharmonicity and disorder in ferroelectrics, which is feasible only through ML approaches61. In this regard, our model does not require the knowledge of a reference structure with zero polarization as it fixes the Berry phase for each component of polarization. We note, however, that for this reason this model is not be capable of describing physically observable polarization transitions between branches. These situations can occur due to subtle electronic structure effects in topological phase transitions, transitions between Berry phase branches due to interlayer motion in sliding 2D ferroelectric heterostructures62, and in the presence of very high electric fields. For instance, our model is not applicable to model the Thouless pump63,64,65,66, where quantized charge transport in units of e can occur along an adiabatic ring path with no band gap closing, a phenomenon due to the change of Berry phase branch. In addition, our method can be applied for modeling an entire nanoscale ferroelectric device or nanoparticle, which would offer tremendous advantages for technological advancements. Having an efficient and accurate computational framework for studying the switching mechanism and the dynamic evolution of dipoles is crucial for understanding ferroelectric behavior at a fundamental level, especially for practical applications such as memory devices and sensors. Indeed, the experimental understanding of polarization switching might be influenced by various factors, including the presence of defects, which can unpredictably affect the nucleation and growth of ferroelectric domains. Further investigation is particularly relevant for wurzite67 and nitride ferroelectrics68, where the intrinsic mechanisms of ferroelectric switching are poorly understood.
Overall, our work offers a promising direction in using machine learning techniques to accelerate the investigation of dielectric, vibrational and ferroelectric properties of complex materials, including crystalline, disordered, and liquid systems. Finally, ideas introduced in this work generalize readily to differentiable strategies for efficient learning of a wide variety of generalized potentials, such as the free energy and grand canonical potential, and to higher order responses, such as piezoelectric and magnetostrictive coefficients. Broadly, our work paves the way to materials design and understanding through machine learning methods for modeling responses under external fields while satisfying exact physical symmetries and conservation laws.
Method
Theory
Our goal is to learn the generalized potential energy U of a system that depends on atomic coordinates riν and on a set of parameters Λμ, where i is the atom index, and ν and μ are Cartesian indexes. We start by expanding U in a Taylor series, namely
where we employ the summation convention. The parameters Λμ can include lattice vectors, volume, electric field, magnetic field, electrostatic or chemical potential. The corresponding conjugate properties ∂U/∂Λμ include stress, pressure, polarization, magnetization, electronic charge or particle number.
In the case of a uniform electric field E, the electric enthalpy functional is defined as15,16
where U 0 is the energy in the absence of an electric field, and P the polarization. The polarization is related to the electric enthalpy through the following differential relation,
In the modern theory of polarization, P is a multivalued quantity defined modulo the quantum of polarization ΔP = eR, where R is a lattice vector. In the limit of a weak electric field, the derivatives of the polarization with respect to the atomic displacements define the Born charges,
Born charges obey the acoustic sum rule, namely \({\sum }_{i} \; {Z}_{i\mu \nu }^{*}=0\)69. This reflects the translation invariance of polarization and the charge neutrality of the system. The derivative of the polarization with respect to the electric field defines the polarizability,
Neural network architecture
We use the differential relations in equations (3)-(5) to implement the learning approach for polarization, Born charges and polarizability in addition to electric enthalpy, forces, and stress within a unified framework. This is implemented in the Allegro code4 as follows. First, we include the electric field as an input of the network along with the atomic positions. In particular, the spherical harmonics embedding for the electric field and interatomic displacements are concatenated and treated on the same footing as geometric vector quantities within the neural network architecture4. Thanks to the modularity of the Allegro code, this incorporation is achieved without significant modifications of its core architecture. Then, we determine the polarization by differentiating the output of the model, i.e. the electric enthalpy, with respect to the electric field at its zero value. This procedure is analogous to how the atomic forces are obtained as derivatives of the electric enthalpy with respect to the atomic positions (see Fig. 1a). Then, following equations (4) and (5), we derive Born charges and polarizability by differentiating the polarization with respect to atomic positions and electric field, respectively. Since Born charges are per-atom quantities, they provide a large amount of information for learning the polarization, thus increasing data efficiency.
Polarization, Born charges and polarizability are learned along with the electric enthalpy, atomic forces, and stress by adding the following extra contribution to the conventional force field loss function:
where λP, λZ, and λα are the loss weights, N is the number of atoms, \(\hat{U}\) the predicted electric enthalpy, and ΔP the quantum of polarization. In equation (6), the loss contributions of extensive quantities, namely polarization and polarizability, are normalized by the number of atoms. Moreover, the loss contribution related to the polarization is computed with the minimum-image convention to account for the multivalued nature of polarization in the Berry phase theory. This overcomes issues related to training on polarization values belonging to multiple branches of the Berry phase32, and avoids the use of pre-training strategies based on folding polarization values within the same Berry phase branch22. In addition, we remark that the training on polarization values is not affected by the choice of the origin of the simulation cell. Indeed, the DFT labels of polarization are independent of the origin due to the charge neutrality of the system12, and our ML model is translation invariant since its representation is based on interatomic displacements rather than atomic positions. Furthermore, our model can be trained without the need to identify a centrosymmetric structure where polarization vanishes, making it easy to use. Our ML models for α−SiO2 and BaTiO3 were exhaustively tested over various hyperparameters, including cutoff radius, maximum order of spherical harmonics, loss coefficients, number of tensor features, and network architecture. We find that generally a maximum order of spherical harmonics of 3 or greater improves the model, especially for simpler network architectures. Complete computational details are provided in the Supplementary Information (SI).
We note that the multivalued nature of polarization in DFT poses extra challenges, as one needs to consistently fold polarization values from different Berry phase branches into a single branch. In contrast, our ML model predicts polarization values that vary smoothly as a function of the electric field. This is because our model is based on neural networks, which are suited for modeling continuous functions, ensuring that, for each Cartesian component of polarization, only one Berry phase branch is captured in the prediction. Additionally, the learning of polarization is primarily driven by the learning of Born charges, which are related to polarization through a derivative relation and for which effects due to the Berry phase branch vanish. As a result, the Berry phase obtained with our model is constrained to be that for which polarization of a centro-symmetric structure vanishes.
Our method presents several additional practical advantages. First, it is based on equivariant local representations of the atomic environment, eliminating the need for message passing present in other graph neural network models. This is crucial for performing large-scale MPI-parallelized MD simulations, as the receptive field of message-passing neural networks can grow excessively, constraining parallel computation and the scale of MD simulations4. In particular, our model showcases exceptional scaling performance for systems with up to a million atoms, enabling a speed up in computational cost of at least 5 orders of magnitude compared to regular ab-initio MD, as shown in Supplementary Fig. S6 in the SI. Second, the model predicts a scalar, i.e. the electric enthalpy, and derives therefrom all response quantities for inference and training through automatic differentiation. Predicting a scalar requires a minimal number of tensorial paths and is thus more efficient than predicting vectorial or tensorial properties directly. In addition, directly outputting polarization or Born charges, as is done in many previous works, fails to enforce conservation laws and physical sum rules. Third, the O(3) symmetry group equivariance of our model yields high accuracy, data efficiency and scalability70,71,72. Equivariance of the model is a useful benefit but not a necessary architectural element, as it would be in the case of direct prediction of vector and tensor quantities. However, equivariance is particularly valuable when learning polarization and Born charges, which require as training data computationally expensive DFT calculations in the presence of electric fields. Furthermore, MLMD can be conducted at arbitrary electric field using the model trained to predict correct linear response under zero electric field conditions, eliminating the necessity for training separate models at different electric field magnitudes. This offers advantages in terms of computational cost and memory. Finally, our formalism can be implemented also on ML architectures based on kernel representations, such as Gaussian process regression frameworks41. In this context, it has been shown that electric response properties can be learned using kernel-based methods17,20,30. However, kernel-based methods require deriving analytical expressions for response functions using manually derived formulas. This limits the flexibility of kernel-based methods in incorporating higher-order response functions and in generalizing to different forms of perturbation. In contrast, our method is based on neural networks, which offer greater flexibility and ease of generalization by leveraging automatic differentiation, thus eliminating the need to manually derive formulas for each response quantity.
Simulations with external electric field
In the case of a constant electric field, the electric enthalpy is obtained as in equation (2). The forces are calculated as
where \({{{\bf{F}}}}_{i}^{0}\) is the force on atom i in the absence of the electric field. The polarization is given by
where P0 is the polarization in the absence of the electric field. In Eqs. (7) and (8), Fi and P obtained in the presence of an electric field are calculated using quantities determined in the limit of zero electric field, namely F0, P0, \({{{\bf{Z}}}}_{i}^{*}\) and α. This stems from the linearity of the electric enthalpy functional with respect to small electric fields in the modern theory of polarization. The inclusion of the electric-field contributions in equations (2), (7), and (8) is implemented in our LAMMPS interface, which works with for both time-dependent and space-dependent electric fields. This extends the versatility of MD simulations under electric fields, with hysteresis being one example, compared to current DFT codes that primarily support ab-initio MD under a constant electric field within the modern theory of polarization. In particular, to calculate the ferroelectric hysteresis of BaTiO3, we use the following electric field along z
In Fig. 3a, where supercells with DFT-optimized lattice parameters are used, we set \({E}_{\max }=36\,{{\rm{MV}}}\cdot {{{\rm{cm}}}}^{-1}\). For MLMD, τ = 20,000 for the structural relaxation at T = 0 K, and τ = 200 ps for MLMD at a finite temperature. In Fig. 3b–d, where supercells with experimental lattice parameters are used, we use \({E}_{\max }=1.5\,{{\rm{MV}}}\cdot {{{\rm{cm}}}}^{-1}\), with the exception of the hysteresis at T = 100 K in Fig. 3b where \({E}_{\max }=2.0\,{{\rm{MV}}}\cdot {{{\rm{cm}}}}^{-1}\), and the hysteresis at 500 GHz in Fig. 3d where \({E}_{\max }=4.0\,{{\rm{MV}}}\cdot {{{\rm{cm}}}}^{-1}\). We use a time step of 2 fs for all simulations, except for the hysteresis at frequencies of 50 GHz and 500 GHz in Fig. 3d for which we use smaller time steps of 0.2 fs and 0.02 fs, respectively, to minimize oscillations in the spontaneous polarization. Finite temperature MLMD simulations were equilibrated at their initial temperature and applied electric field for 10 ps before applying the time-dependent field.
For analyzing the polarization dynamics of BaTiO3, as Born charges are essentially constant throughout the MD, we assign a dipole for each unit cell u using the formula
where \(\Delta {{{\bf{r}}}}_{{{\rm{O}}}-{{\rm{Ti}}}}^{(u)}\) and \(\Delta {{{\bf{r}}}}_{{{\rm{Ba}}}-{{\rm{Ti}}}}^{(u)}\) denote the coordinates of O and Ba atoms relative to the Ti atom in the unit cell u, respectively, and \({{{\bf{Z}}}}_{{{\rm{O}}}}^{*}\) and \({{{\bf{Z}}}}_{{{\rm{Ba}}}}^{*}\) are the respective Born charge tensors. In Eq. (10), we consider local dipoles of 5-atom unit cells with one Ti atom at the center, eight Ba atoms at the corners, and six O atoms at the center of all faces.
Physical symmetries and conservation laws
We demonstrate that in our model physical symmetries and conservation laws stem from the enforcement of the translation invariance of the generalized potential energy combined with the exact derivative relations between physical quantities [equations (3)-(5)]. In our model, the generalized potential energy is translation invariant as it depends on interatomic displacements4. Then, calculating forces as gradient of the generalized potential energy ensures momentum conservation. Indeed, the translation invariance of the generalized potential energy can be expressed as
where c is an arbitrary displacement vector, and where we used the chain rule to differentiate with respect to atomic positions. Forces summing up to zero ensure momentum conservation. In addition, in our model, polarization is translation invariant as it is calculated as a gradient of the generalized potential energy with respect to the electric field. This ensures the charge neutrality condition for Born charges. Indeed, following the same reasoning as in equation (11), the translation invariance of polarization can be expressed as
which corresponds to the acoustic sum rule for Born charges. Next, the determination of forces as gradients of the generalized potential energy with respect to atomic positions guarantees the electric enthalpy conservation in MLMD. Indeed,
where K is the kinetic energy. Finally, any cyclic adiabatic evolution involving changes in the electric field yields zero electric work due to the conservative nature of polarization, namely:
where we used the fact that in our model polarization is determined as gradient of the electric enthalpy with respect to the electric field. The enforcement of equation (14) implies that the ferroelectric hysteresis loop is exactly symmetric with respect to reversing the direction of the electric field, as obtained in Fig. 3a, b.
Several works17,20,30,31 calculate dipole moments of isolated molecules as gradients of the energy with respect to the electric field, which enters in the input representation of model, conceptually similarly to our work. At variance, our approach applies to both molecular and extended systems by ensuring that the electric field enters as an input to the model to predict the electric enthalpy (or other generalized potentials), and the training is carried out over electric enthalpy, forces and dielectric response properties such as polarization, Born charges and polarizability. Enforcement of the acoustic sum rule for Born charges is enforced in several prior works where Born charges are calculated as derivatives of polarization with respect to atomic displacement26,27,28,30,31,32. In Refs. 26,28, where MLMD under electric fields are conducted, the electric enthalpy is conserved due to the fact that forces are calculated as gradient of the electric enthalpy. However, the methods in Refs. 26,27,28,32 require the use of two separate models for determining the force field and the dielectric properties, and therefore incur the corresponding computational overhead. At variance, in our work, polarization and Born charges are predicted together with energy and forces within a unified model that preserves the conservative nature of polarization, the acoustic sum rule, and the electric enthalpy conservation. These properties are either not enforced or not considered in other previous works18,19,21,22,23,24,25,29,33,34,35,37,38.
Training data generation
First, we collect a set of uncorrelated frames. For α−SiO2, this is achieved through classical MD simulations using the Vashishta potential73 in the NVT ensemble. These simulations are performed at both 300 K and 600 K, each for 100 ps. We take 100 uncorrelated snapshots from each MD at intervals of 1 ps, yielding a total of 200 frames. For BaTiO3, we collect a total of 75 frames using active learning dynamics using the FLARE code41, with temperature ranging from 300 K–400 K. In particular, 60 frames are collected through active learning MD starting from a pristine structure, and additional 15 frames are collected through active learning MD starting from a domain wall structure. Next, for each frame, we perform DFT calculations to determine energy, forces, and polarization in the absence of electric field. To calculate Born charges and polarizability, we perform DFT calculations in the presence of small uniform electric fields, and use finite differences involving forces and polarization, respectively. In particular, the Born charges are calculated through the following expression
which derives from combining equation (3) and the definition of atomic forces Fiν = −∂U/∂riν. The polarizability is determined as in equation (5). The DFT calculations are performed using a plane-wave density functional approach as implemented in the QUANTUM ESPRESSO suite74. A small electric field of 0.36 MV ⋅ cm−1 is used, in order to ensure the linear regime of polarization with respect to electric field. Additional computational details are provided in the SI.
Vibrational and dielectric properties from MD
We discuss the determination of vibrational and dielectric properties from MLMD. The infrared spectrum and the frequency-dependent dielectric constant can be determined from a MD simulation in the absence of the electric field at a given temperature8,9. In particular, the infrared absorption spectrum is calculated as75
where ω is the frequency, t the time, P0 the polarization in the absence of an electric field, and \(\left\langle {{{\bf{P}}}}^{0}(t)\cdot {{{\bf{P}}}}^{0}(0)\right\rangle\) the average of the autocorrelation function of polarization. The polarizability can be used to determine the high-frequency dielectric constant through the following expression
where Ω is the volume, and \(\left\langle {\alpha }_{\mu \nu }\right\rangle\) the average polarizability. The static dielectric constant can then be determined by adding an ionic contribution related to the polarization during the MD through the fluctuation-dissipation theorem, namely
where kB is the Boltzmann constant, T the temperature, and \(\,{\mbox{cov}}\,({P}_{\mu }^{0},{P}_{\nu }^{0})\) the covariance of \({P}_{\mu }^{0}\) and \({P}_{\nu }^{0}\). Then, one can determine the frequency-dependent dielectric constant using the autocorrelation function of polarization as follows:
In Fig. 2d, the dielectric constant is calculated as
where Pμ(R, E) is the polarization obtained in the presence of an electric field E for a given structure R, and Pμ(R0, 0) is the polarization obtained in the absence of the field for the initial structure R0. The structure R0 is found by performing DFT relaxations in the absence of the electric field. In Fig. 2d, the structure R is obtained relaxing the system in the presence of the field E along z. Equations (17)-(20) are written in atomic units. In eV units, 4π is replaced with 1/ϵ0, where ϵ0 is the vacuum permittivity.
Data availability
The data generated in this study is available at the https://github.com/mir-group/allegro-pol/GitHub repository.
Code availability
The code used in this study is available at the https://github.com/mir-group/allegro-pol/GitHub repository.
References
Baroni, S., de Gironcoli, S., Dal Corso, A. & Giannozzi, P. Phonons and related crystal properties from density-functional perturbation theory. Rev. Mod. Phys. 73, 515–562 (2001).
Gonze, X. & Lee, C. Dynamical matrices, born effective charges, dielectric permittivity tensors, and interatomic force constants from density-functional perturbation theory. Phys. Rev. B 55, 10355–10368 (1997).
Batzner, S. et al. E(3)-equivariant graph neural networks for data-efficient and accurate interatomic potentials. Nat. Commun. 13, 2453 (2022).
Musaelian, A. et al. Learning local equivariant representations for large-scale atomistic dynamics. Nat. Commun. 14, 579 (2023).
Batatia, I. et al. The design space of E(3)-equivariant atom-centered interatomic potentials. arXiv https://arxiv.org/abs/2205.06643 (2022).
Nigam, J., Willatt, M. J. & Ceriotti, M. Equivariant representations for molecular hamiltonians and N-center atomic-scale properties. J. Chem. Phys. 156, 014115 (2022).
Geiger, M. & Smidt, T. e3nn: Euclidean neural networks. arXiv https://arxiv.org/abs/2207.09453 (2022).
Neumann, M. Dipole moment fluctuation formulas in computer simulations of polar systems. Mol. Phys. 50, 841–858 (1983).
Neumann, M. & Steinhauser, O. On the calculation of the frequency-dependent dielectric constant in computer simulations. Chem. Phys. Lett. 102, 508–513 (1983).
Shin, Y.-H., Grinberg, I., Chen, I.-W. & Rappe, A. M. Nucleation and growth mechanism of ferroelectric domain-wall motion. Nature 449, 881–884 (2007).
Liu, S., Grinberg, I. & Rappe, A. M. Intrinsic ferroelectric switching from first principles. Nature 534, 360–363 (2016).
Resta, R. Macroscopic polarization in crystalline dielectrics: the geometric phase approach. Rev. Mod. Phys. 66, 899–915 (1994).
King-Smith, R. D. & Vanderbilt, D. Theory of polarization of crystalline solids. Phys. Rev. B 47, 1651–1654 (1993).
Spaldin, N. A. A beginner’s guide to the modern theory of polarization. J. Solid State Chem. 195, 2–10 (2012).
Nunes, R. W. & Gonze, X. Berry-phase treatment of the homogeneous electric field perturbation in insulators. Phys. Rev. B 63, 155107 (2001).
Umari, P. & Pasquarello, A. Ab initio molecular dynamics in a finite homogeneous electric field. Phys. Rev. Lett. 89, 157602 (2002).
Christensen, A. S., Faber, F. A. & von Lilienfeld, O. A. Operators in quantum machine learning: Response properties in chemical space. J. Chem. Phys. 150, 064105 (2019).
Veit, M. et al. Predicting molecular dipole moments by combining atomic partial charges and atomic dipoles. J. Chem. Phys. 153, 024113 (2020).
Krishnamoorthy, A. et al. Dielectric constant of liquid water determined with neural network quantum molecular dynamics. Phys. Rev. Lett. 126, 216403 (2021).
Gastegger, M., Schütt, K. T. & Müller, K.-R. Machine learning of solvent effects on molecular spectra and reactions. Chem. Sci. 12, 11473–11483 (2021).
Staacke, C. G. et al. Kernel charge equilibration: efficient and accurate prediction of molecular dipole moments with a machine-learning enhanced electron density model. Mach. Learn. Sci. Technol. 3, 015032 (2022).
Gigli, L. et al. Thermodynamics and dielectric response of BaTiO3 by data-driven modeling. npj Comput. Mater. 8, 209 (2022).
Schütt, K., Unke, O. & Gastegger, M. Equivariant message passing for the prediction of tensorial properties and molecular spectra. Int. Conf. Mach. Learn. 139, 9377–9388 (2021).
Schienbein, P. Spectroscopy from machine learning by accurately representing the atomic polar tensor. J. Chem. Theory Comput. 19, 705–712 (2023).
Shao, X., Paetow, L., Tuckerman, M. E. & Pavanello, M. Machine learning electronic structure methods based on the one-electron reduced density matrix. Nat. Commun. 14, 6281 (2023).
Zhang, L. et al. A deep potential model with long-range electrostatic interactions. J. Chem. Phys. 156, 124107 (2022).
Joll, K., Schienbein, P., Rosso, K. M. & Blumberger, J. Machine learning the electric field response of condensed phase systems using perturbed neural network potentials. Nat. Commun. 15, 8192 (2024).
Shimizu, K., Otsuka, R., Hara, M., Minamitani, E. & Watanabe, S. Prediction of Born effective charges using neural network to study ion migration under electric fields: applications to crystalline and amorphous Li3PO4. Sci. Technol. Adv. 3, 2253135 (2023).
Choudhary, K. et al. High-throughput density functional perturbation theory and machine learning predictions of infrared, piezoelectric, and dielectric responses. npj Comput. Mater. 6, 64 (2020).
Zhang, Y. & Jiang, B. Universal machine learning for the response of atomistic systems to external fields. Nat. Commun. 14, 6424 (2023).
Fang, S., Geiger, M., Checkelsky, J. G. & Smidt, T. Phonon predictions with E(3)-equivariant graph neural networks. arXiv https://doi.org/10.48550/arXiv.2403.11347 (2024).
Schmiedmayer, B. & Kresse, G. Derivative learning of tensorial quantities–predicting finite temperature infrared spectra from first principles. arXiv https://arxiv.org/abs/2404.19674 (2024).
Wilkins, D. M. et al. Accurate molecular polarizabilities with coupled cluster theory and machine learning. Proc. Natl. Acad. Sci. USA 116, 3401–3406 (2019).
Sommers, G. M., Calegari Andrade, M. F., Zhang, L., Wang, H. & Car, R. Raman spectrum and polarizability of liquid water from deep neural networks. Phys. Chem. Chem. Phys. 22, 10592–10602 (2020).
Takahashi, A., Kumagai, Y., Miyamoto, J., Mochizuki, Y. & Oba, F. Machine learning models for predicting the dielectric constants of oxides based on high-throughput first-principles calculations. Phys. Rev. Mater. 4, 103801 (2020).
Riebesell, J., Surta, T. W., Goodall, R., Gaultois, M. & Lee, A. A. Pushing the Pareto front of band gap and permittivity: ML-guided search for dielectric materials. arXiv https://arxiv.org/abs/2401.05848 (2024).
Kapil, V., Kovács, D. P., Csányi, G. & Michaelides, A. First-principles spectroscopy of aqueous interfaces using machine-learned electronic and quantum nuclear effects. Faraday Discuss. 249, 50–68 (2024).
Berger, E. & Komsa, H.-P. Polarizability models for simulations of finite temperature Raman spectra from machine learning molecular dynamics. Phys. Rev. Mater. 8, 043802 (2024).
Raissi, M., Perdikaris, P. & Karniadakis, G. E. Physics informed deep learning (Part I): Data-driven solutions of nonlinear partial differential equations. arXiv https://arxiv.org/abs/1711.10561 (2017).
Czarnecki, W. M., Osindero, S., Jaderberg, M., Świrszcz, G. & Pascanu, R. Sobolev training for neural networks. arXiv. https://arxiv.org/abs/1706.04859 (2017).
Vandermause, J. et al. On-the-fly active learning of interpretable Bayesian force fields for atomistic rare events. npj Comput. Mater. 6, 20 (2020).
Duschatko, B. R. et al. Thermodynamically informed multimodal learning of high-dimensional free energy models in molecular coarse graining. arXiv https://arxiv.org/abs/2405.19386 (2024).
Thompson, A. P. et al. LAMMPS - a flexible simulation tool for particle-based materials modeling at the atomic, meso, and continuum scales. Comput. Phys. Commun. 271, 108171 (2022).
Pasquarello, A. & Car, R. Dynamical charge tensors and infrared spectrum of amorphous SiO2. Phys. Rev. Lett. 79, 1766–1769 (1997).
Giacomazzi, L., Umari, P. & Pasquarello, A. Medium-range structure of vitreous SiO2 obtained through first-principles investigation of vibrational spectra. Phys. Rev. B 79, 064202 (2009).
Palik, E. D. Handbook Of Optical Constants Of Solids, Vol. 2000 (Academic Press, 1998).
Dal Corso, A., Pasquarello, A., Baldereschi, A. & Car, R. Generalized-gradient approximations to density-functional theory: A comparative study for atoms and solids. Phys. Rev. B 53, 1180–1185 (1996).
Favot, F. & Dal Corso, A. Phonon dispersions: performance of the generalized gradient approximation. Phys. Rev. B 60, 11427–11431 (1999).
Giacomazzi, L. et al. Infrared spectra in amorphous alumina: a combined ab initio and experimental study. Phys. Rev. Mater. 7, 045604 (2023).
Akbarian, D. et al. Understanding the influence of defects and surface chemistry on ferroelectric switching: a ReaxFF investigation of BaTiO3. Phys. Chem. Chem. Phys. 21, 18240–18249 (2019).
Deguchi, G. et al. Asymmetric domain nucleation from dislocation core in barium titanate: molecular dynamics simulation using machine-learning potential through active learning. Phys. Status Solidi 18, 2300292 (2023).
Xie, P., Car, R. & E, W. Ab initio generalized Langevin equation. Proc. Natl. Acad. Sci. USA 121, e2308668121 (2024).
Zatterin, E. et al. Assessing the ubiquity of Bloch domain walls in ferroelectric lead titanate superlattices. Phys. Rev. X 14, 041052 (2024).
Wieder, H. H. Electrical behavior of barium titanatge single crystals at low temperatures. Phys. Rev. 99, 1161–1165 (1955).
Jo, J. Y., Kim, Y. S., Noh, T. W., Yoon, J.-G. & Song, T. K. Coercive fields in ultrathin BaTiO3 capacitors. Appl. Phys. Lett. 89, 232909 (2006).
Wongdamnern, N., Ngamjarurojana, A., Laosiritaworn, Y., Ananta, S. & Yimnirun, R. Dynamic ferroelectric hysteresis scaling of BaTiO3 single crystals. J. Appl. Phys. 105, 044109 (2009).
Wongdamnern, N. et al. Hysteresis scaling relations in polycrystalline BaTiO3 bulk ceramics. Mater. Chem. Phys. 124, 281–286 (2010).
Zhang, Q., Xia, X., Wang, J. & Su, Y. Effects of epitaxial strain, film thickness and electric-field frequency on the ferroelectric behavior of BaTiO3 nano films. Int. J. Solids Struct. 144-145, 32–45 (2018).
Jiang, Y. et al. Enabling ultra-low-voltage switching in BaTiO3. Nat. Mater. 21, 779–785 (2022).
Yazawa, K. et al. Anomalously abrupt switching of wurtzite-structured ferroelectrics: simultaneous non-linear nucleation and growth model. Mater. Horiz. 10, 2936–2944 (2023).
Xie, P., Chen, Y. & Car, R. et al. Thermal disorder and phonon softening in the ferroelectric phase transition of lead titanate. arXiv https://arxiv.org/abs/2410.06414 (2024).
Li, L. & Wu, M. Binary compound bilayer and multilayer with vertical polarizations: two-dimensional ferroelectrics, multiferroics, and nanogenerators. ACS Nano 11, 6382–6388 (2017).
Niu, Q. & Thouless, D. J. Quantised adiabatic charge transport in the presence of substrate disorder and many-body interaction. J. Phys. A 17, 2453 (1984).
Vanderbilt, D. & King-Smith, R. D. Electric polarization as a bulk quantity and its relation to surface charge. Phys. Rev. B 48, 4442–4455 (1993).
Jiang, L., Levchenko, S. V. & Rappe, A. M. Rigorous definition of oxidation states of ions in solids. Phys. Rev. Lett. 108, 166403 (2012).
Grasselli, F. & Baroni, S. Topological quantization and gauge invariance of charge transport in liquid insulators. Nat. Phys. 15, 967–972 (2019).
Yazawa, K. et al. Polarity effects on wake-up behavior of Al0.94B0.06N ferroelectrics. J. Am. Ceram. Soc. 107, 1523–1532 (2024).
Drury, D., Yazawa, K., Zakutayev, A., Hanrahan, B. & Brennecka, G. High-temperature ferroelectric behavior of Al0.7SSc0.3N. Micromachines 13, 887 (2022).
Pick, R. M., Cohen, M. H. & Martin, R. M. Microscopic theory of force constants in the adiabatic approximation. Phys. Rev. B 1, 910–920 (1970).
Loose, T. D., Sahrmann, P. G., Qu, T. S. & Voth, G. A. Coarse-graining with equivariant neural networks: A path toward accurate and data-efficient models. J. Phys. Chem. B 127, 10564–10572 (2023).
Fu, X. et al. Forces are not enough: Benchmark and critical evaluation for machine learning force fields with molecular simulations. arXiv https://doi.org/10.48550/arXiv.2210.07237 (2023).
Maxson, T. & Szilvasi, T. Transferable water potentials using equivariant neural networks. arXiv https://doi.org/10.48550/arXiv.2402.16204 (2024).
Broughton, J. Q., Meli, C. A., Vashishta, P. & Kalia, R. K. Direct atomistic simulation of quartz crystal oscillators: bulk properties and nanoscale devices. Phys. Rev. B 56, 611–618 (1997).
Giannozzi, P. et al. QUANTUM ESPRESSO: a modular and open-source software project for quantum simulations of materials. J. Phys. Condens. Matter 21, 395502 (2009).
Marsalek, O. & Markland, T. E. Quantum dynamics and spectroscopy of ab initio liquid water: the interplay of nuclear and electronic quantum effects. J. Phys. Chem. Lett. 8, 1545–1551 (2017).
Gervais, F. & Piriou, B. Temperature dependence of transverse and longitudinal optic modes in the α and β phases of quartz. Phys. Rev. B 11, 3944–3950 (1975).
Acknowledgements
We thank L. Giacomazzi for insight on DFPT calculations, and N. Rivano, Z. Goodwin, B. Duschatko, S. Kavanagh, T. Smidt, and R. Resta for useful discussions. This work was supported primarily by the NSF through the Harvard University Materials Research Science and Engineering Center Grant No. DMR-2011754, US Department of Energy, Office of Basic Energy Sciences Award No. DE-SC0022199 as well as by the Camille and Henry Dreyfus Foundation Grant No. ML-22-075, the Department of Navy award N00014-20-1-2418 issued by the Office of Naval Research and Robert Bosch LLC. Computational resources were provided by the Harvard University FAS Division of Science Research Computing Group. S.F. was supported by the Swiss National Science Foundation through the Postdoc mobility fellowship under grant number P500PT_214445. C.J.O. was supported by the National Science Foundation Graduate Research Fellowship Program under Grant No. (DGE1745303). A.J. was supported by Aker Scholarship. Computational resources were provided by the FAS Division of Science Research Computing Group at Harvard University. Additional resources include the National Energy Research Scientific Computing Center (NERSC), a DOE Office of Science User Facility supported by the Office of Science of the U.S. Department of Energy under Contract No. DE-AC02-05CH11231 using NERSC award BES-ERCAP0024206. This research used resources of the Oak Ridge Leadership Computing Facility at the Oak Ridge National Laboratory, which is supported by the Office of Science of the U.S. Department of Energy under Contract No. DE-AC05-00OR22725.
Author information
Authors and Affiliations
Contributions
S.F., A.C., C.W.T., A.M., and B.K. jointly conceived the architecture of the ML model. S.F. did the DFT and DFPT calculations, contributed to the implementation of the ML architecture, trained the ML models, conceived the applications, designed the simulations, analyzed the results, prepared the figures, and wrote the initial version of the manuscript. A.J. implemented the LAMMPS interface, and designed and ran MD and hysteresis simulations in LAMMPS. C.W.T. contributed to the implementation of the ML architecture, and to the analysis of the results. M.L.D. contributed to the MD and hysteresis simulations in LAMMPS. A.M. prepared the implementation of the ML architecture. C.J.O. contributed to the optimization of the ML models. B.K. supervised and guided the project from conception to analysis of results. All authors contributed to the manuscript.
Corresponding authors
Ethics declarations
Competing interests
The authors declare no competing interests.
Peer review
Peer review information
Nature Communications thanks the anonymous, reviewer(s) for their contribution to the peer review of this work. A peer review file is available.
Additional information
Publisher’s note Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.
Supplementary information
Rights and permissions
Open Access This article is licensed under a Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License, which permits any non-commercial use, sharing, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons licence, and indicate if you modified the licensed material. You do not have permission under this licence to share adapted material derived from this article or parts of it. The images or other third party material in this article are included in the article’s Creative Commons licence, unless indicated otherwise in a credit line to the material. If material is not included in the article’s Creative Commons licence and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder. To view a copy of this licence, visit http://creativecommons.org/licenses/by-nc-nd/4.0/.
About this article
Cite this article
Falletta, S., Cepellotti, A., Johansson, A. et al. Unified differentiable learning of electric response. Nat Commun 16, 4031 (2025). https://doi.org/10.1038/s41467-025-59304-1
Received:
Accepted:
Published:
DOI: https://doi.org/10.1038/s41467-025-59304-1