Training-free hyperparameter optimization of neural networks for electronic structures in matter
수소연료전지 · (6) PEM(고분자전해질막)
기본 정보
- 저자
- DOI
- 10.1088/2632-2153/ac9956
- 저널
- Machine Learning Science and Technology
- 발행년도
- 2022
- 발행기관
- IOP Publishing
- 피인용수
- 10
- 라이선스
- cc-by
- 논문 유형
- –
- 언어
- –
- 원문 페이지
- https://doi.org/10.1088/2632-2153/ac9956
- 토픽
- Electron and X-Ray Spectroscopy Techniques
- OpenAlex ID
- W4304607065
평가 내용
- 관련도
- 사업분야
- 수소연료전지 · (6) PEM(고분자전해질막)
- 부 분야
- –
- R&D 측면
- –
- 확신도
- –
- 근거 용어
- –
- 판단 근거
- 임베딩 유사도 기반 평가로 '수소연료전지 > PEM(고분자전해질막)' 분야에 선정된 논문입니다.
- R&D 활용 포인트
- –
- 평가 입력
- –
초록
본문 45,621자
본문 펼치기
섹션 본문 68문단 · 43,736자
(제목 없음)
1A myriad of phenomena in materials science and chemistry rely on quantum-level simulations of the electronic structure in matter. While moving to larger length and time scales has been a pressing issue for decades, such large-scale electronic structure calculations are still challenging despite modern software approaches and advances in high-performance computing. The silver lining in this regard is the use of machine learning to accelerate electronic structure calculations -this line of research has recently gained growing attention. The grand challenge therein is finding a suitable machine-learning model during a process called hyperparameter optimization. This, however, causes a massive computational overhead in addition to that of data generation. We accelerate the construction of neural network models by roughly two orders of magnitude by circumventing excessive training during the hyperparameter optimization phase. We demonstrate our workflow for Kohn-Sham density functional theory, the most popular computational method in materials science and chemistry.
Introduction
2The electronic structure of matter can be viewed as nature's glue [1] that binds atoms together into condensed systems like molecules and solids, thereby shaping the diversity of chemical systems and materials that surround us. A wide variety of materials characteristics including structural, elastic, and response properties are determined by the electronic structure [2]. Pressing questions from industry and society such as finding better materials for photovoltaics, identifying more efficient catalysts, designing future battery technologies, and discovering materials with novel properties are linked directly to the electronic structure of matter.
3Electronic structure calculations are indispensable for complementing experimental investigations in materials science, and the need for ever more accurate and particularly efficient calculations is unbroken. Currently, the most widely used electronic structure method is Kohn-Sham density functional theory (DFT) [3,4,5] due to its balance of accuracy and computational efficiency. Under the assumption of the Born-Oppenheimer approximation [6], by employing the Kohn-Sham formalism, and the ever growing variety of exchange-correlation functionals [7], DFT enables electronic structure calculations for a large range of systems.
4However, large-scale simulations at system sizes reaching millions of atoms, typically encountered in state-of-the-art molecular dynamics simulations, remain a final frontier for DFT. While DFT methods may possess favorable scaling properties compared to other ab-initio approaches, DFT calculations can usually only be performed for hundreds and up to a few thousand atoms. This applies especially to dynamical settings [8] or to systems exposed to high temperatures [9]. Larger calculations can only be accomplished in special cases with enormous computational cost and time [10], thereby rendering large-scale investigations infeasible. The traditional pathway to circumventing these technical restrictions relies on algorithmic advances in software which leads to computationally more efficient calculations. Alternatively, approximate models such as average atom models [11,12,13] are applied for otherwise unattainable calculations. While they have a smaller computational overhead, they sacrifice accuracy.
5However, a drastically different option is to combine the power of machine learning (ML) with DFT data. This emergent field of research is growing fast [14,15,16,17,18]. It currently focuses on extracting application-specific information from DFT data sets [19,20,21] and constructing interatomic potentials [22,23,24] for molecular dynamics simulations based on Gaussian process regression [25], ridge regression [26], or neural networks (NNs) [27].
6Here, we however focus on using ML to directly tackle the electronic structure problem in terms of the Kohn-Sham equations [4]. Pioneering efforts include kernel ridge-regression [28,29,30] and deep NN [30] models for predicting the electronic density. Based on these efforts, NN models for predicting the local density of states (LDOS) have recently been developed [31,32]. These models are more general than those based solely on the electronic density. They replace traditional DFT calculations by enabling direct access to both the electronic structure and related observables, such as the total energy.
7Despite these pioneering efforts [29], a general-purpose workflow for automated ML applications which can tackle electronic structures has yet to come. The principle challenge is to overcome the massive computational overhead due to hyperparameter optimization, which is a general problem for ML methodologies [33]. Determining suitable hyperparameters for a NN surrogate model governs model accuracy and generalizability, as is illustrated in Fig. 1 for different hyperparameter optimization techniques discussed in this manuscript. It constitutes a challenging task, even if the underlying electronic structure of the system is well understood (e.g. metals at room temperature, which are investigated in this work).
8A large amount of compute time must be dedicated to relatively long and inaccessible training and optimization processes, in which high-fidelity data sets have to be constructed, suitable hyperparameters have to be identified, and models have to be constructed. The major bottleneck in this process is not due to the computational overhead of data generation, as efficient DFT codes and automation frameworks [36,37,38] exist. While DFT calculations may require large amounts of computational power, they can be completed in a reasonable amount of wall-time by means of efficient parallelization and independent individual calculations. Instead, the principal Training curves for three different model architectures and optimization parameters determined by three different hyperparameter optimization techniques. The loss in term of the physically motivated band energy on both the training (dashed) and test set (solid line) per epoch is shown. The grey curves correspond to direct search, the baseline for our manuscript as given in Ref. [32], the blue curves to the Optuna [34] library and the red curves to the NASWOT method [35]. Drastic differences can be observed, with NASWOT and Optuna outperforming the direct search approach in overall accuracy. Further, the Optuna model shows the best generalizability, as quantified by the smallest difference in test vs. training loss.
9time constraint for the creation of surrogate ML models lies in the hyperparameter optimization, which requires the repeated training of potentially suitable NNs, as illustrated in Fig. 2. The computational cost of NN training quickly becomes excessive, especially when considering a wide range of hyperparameters. While the training costs may be amortized by subsequent accelerated dynamical simulations, they render ML surrogate models prohibitive for many applications.
10In this paper, we tackle this problem by providing a highly efficient and automated hyperparameter optimization workflow for generating ML surrogate models of electronic structures. It speeds up this process by two orders of magnitude (see Fig. 2) and comprises two central components -a training-free score and a descriptor surrogate metric. We adapt the recently developed technique on neural architecture search without training (NASWOT) [35] as a training-free score for electronic structures which does not require any NN training up until an optimal set of hyperparameters has been identified. It correlates well with the accuracy of a NN, as we demonstrate in a comprehensive comparison with state-of-the-art hyperparameter optimization techniques (see Fig. 3). Furthermore, we also introduce the average cosine similarity distance (ACSD) as a highly efficient descriptor surrogate metric for finding optimal descriptors for particle-mesh data (see Fig. 7 and Fig. 8). Constructing surrogate models in the traditional fashion (red) is contrasted with our accelerated workflow (green). Here, h denotes CPU/GPU hours for serial execution or walltime for parallel execution. Timings are estimated with justifications given in the Supplementary Note 3. The pictograms show from left to right: a contour plot of the electronic density of an aluminum cell for z = 0, with atoms close to the plane projected onto it in red; the descriptor calculation around a grid point (green dot) incorporating information of adjacent grid-points (grey) and atoms (red) within a certain radius (orange circles), which has to be optimized (light orange dots); different candidate networks; tuning of network weights; comparison of actual and predicted outputs (here, density of states).
11We hence provide the basis for automated ML [39] workflows for modeling electronic structures. The resulting software framework, MALA [40], enables researchers to construct DFT surrogate models without extensive knowledge in ML or access to leadership-class computational infrastructure. We thus pave the way towards accessible and large-scale electronic structure calculations driven by ML.
Density Functional Theory
12Density functional theory (DFT), which we exclusively use in the Born-Oppenheimer approximation [6], is based upon the Hohenberg-Kohn theorems [3] and the Kohn-Sham formalism [4]. In the context of this work, we work within finite-temperature DFT [5], i.e., τ > 0 K. Within DFT, a system consisting of N e electrons and N i ions is treated. The ionic positions R. For ease of notation, we drop the parametric dependence on R and energetic contributions due to ion-ion interactions in the following. Also note that here and below we adopt Hartree atomic units, i.e., = e = m e = a 0 = 1. The central quantity in DFT is the electronic density n, which is defined via the Kohn-Sham wave functions φ j as
13with f τ being the Fermi-Dirac distribution function and j running over all Kohn-Sham wave functions included in a particular DFT calculation. Their number has to be adjusted according to τ , as large temperatures lead to thermal excitations. The Kohn-Sham wave functions constitute a non-interacting auxiliary system restricted to reproduce the interacting electronic density and are governed by one-particle Schrödinger-like equations, often referred to as Kohn-Sham equations
14Here, v τ S (r) refers to the Kohn-Sham potential, which is determined self-consistently and incorporates the interaction with ions as well as a mean-field description of electron-electron interaction, while τ j are the energy eigenvalues of φ j (r). DFT calculations are performed in an iterative fashion, seeking to identify an electronic density which minimizes the total (free) energy
15with the kinetic energy T S and entropy S S of the non-interacting system, the electrostatic interaction terms of the electronic density with itself E H and with the ions E ei . All energetic contributions not included in these terms are absorbed into the exchange-correlation functional E τ XC , thus keeping the framework formally exact. Practical calculations are enabled by appropriate approximations for E τ XC , such as the LDA-PW91 [41] or the PBE functional [42] for τ = 0 K; the development of functionals for τ > 0 K is an area of active research [43,44,45]. In the DFT surrogate models we construct, the central role of the density is replaced by the local density of states d( , r) (LDOS), defined via
16For practical calculations, δ( − τ j ) has to be approximated numerically, and the way this approximation is performed is one of the hyperparameters of the DFT surrogate workflow. The advantage of using the LDOS is that it gives direct access to the total free energy of a system, as both the electronic density, as well as the electronic density of states can be given in terms of the LDOS as
17and Eq. (3) can be expressed in terms of n and D. More precisely, D can be used to calculate the electronic entropy and band energy E b and with these the total free energy is determined
Neural network based surrogate models
18Drawing on Eq. (7, one can construct surrogate models for DFT simulations by finding a suitable way to approximate the LDOS, which at each point in (simulated) space r is a vector in the dimension. For this task, we employ a NN. NNs, which we will refer to as M , are powerful regression models consisting of layers of so called neurons or perceptrons [46]. Each neuron performs a linear operation using weights W and biases b on provided inputs x and thereafter applies a non-linear activation function σ, yielding intermediate outputs y as
19which serve as input for subsequent neurons. In connecting multiple layers containing an arbitrary number of neurons, in principle any function can be approximated, as long as the NN is tuned on an appropriate amount of data in a process called training [47,48]. Such a training process is usually performed using gradient methods in an iterative fashion, based on back-propagation [49]. For the training of a NN, the available data is divided into a training data set (to calculate the gradients), a validation data set (to monitor NN accuracy during training), and a test data set (unseen during training and used to verify performance after training is completed). Each pass of the entire training data set through the network is labelled an epoch. NN performance is highly dependent on the correct choice of hyperparameters λ that characterize both architecture and training policy for a NN, such as the number and width of individual layers. We use feed-forward NNs, in which each neuron of a layer is connected to all neurons of subsequent layers. NNs were constructed using the PyTorch library [50] and trained on a single GPU. We use NNs to build a per-grid-point model, and map a vector at each point in space to a corresponding LDOS vector. To this end we employ Spectral Neighborhood Analysis Potential (SNAP) [51,52,53,54] descriptors B(r, j) that are calculated as functionals of R and encode local information around a grid-point. At each point r, a feed-forward NN M [λ] then performs a mapping of the typẽ
20that depends on a set of hyperparameters λ. Thereafter the LDOS is post-processed to compute the desired output quantities, like energies, forces, etc. analytically. Within this work, all NNs have been trained with an algorithm consistent with Ref. [32]. For all networks, early-stopping was employed, i.e. training was halted once improvement of validation accuracy starts to stagnate. How long such stagnation has to be present for the algorithm to stop is one of the hyperparameters we tune with the algorithm outlined below. More information on technical details of network training can be found in Supplementary Note 1.
Hyperparameter optimization
21Hyperparameter optimization aims to find a set of hyperparameters λ, such as the number or width of layers in an NN that minimizes a loss term L. Generally, this is an optimization problem where we need to minimize the loss
22where Y is the function we seek to model andỸ is its prediction based on input data X. Solving this complex optimization problem is a formidable task and forms a computational bottleneck in all ML applications [33]. For applications in the realm of electronic structures, we choose
23where d denotes the LDOS, N the total number of atomic snapshots, andd is calculated via Eq. (9).
24Multiple loss metrics are conceivable in Eq. (11). Since we are not interested in the LDOS itself, L is chosen to be the mean absolute error (MAE) of some quantity calculated via the LDOS. This quantity is chosen to be the total free energy A, and the loss metric becomes
25where d i is the reference LDOS obtained from DFT for an atomic configuration labelled by the index i, while the NN aims to reproduce d i using the SNAP descriptors B i . During hyperparameter optimization, A is usually replaced by the band energy E b due to better computational accessibility, and Eq. (12) is evaluated only at the very end.
26Hyperparameter optimization is usually performed by choosing a candidate model sampled from the entirety of potential hyperparameters and then optimizing this model, which constitutes a trial. Various hyperparameter optimization techniques differ in the way they propose candidate models and refine potential hyperparameter guesses based on the information provided. Within this work, we investigate several state-of-the-art methods, namely (i) Direct search approach [55,56], as performed in Ref. [32], (ii) Tree-structured Parzen Estimator (TPE) [57] as implemented in the software library Optuna The direct search approach serves as a baseline that we have used in prior work. Therein, one optimizes one hyperparameter at a time while holding the others fixed and training multiple candidate networks per hyperparameter, thus progressively generating more suitable models. In a similar fashion, the TPE algorithm implemented in Optuna improves model performance progressively by constructing a model to determine the relationship between the hyperparameter values and the performance observed in trials. To increase robustness, we perform each trial multiple times and report an averaged result to Optuna, so as not to trap the algorithm in local minima due to unfavorable network initializations. Optuna can be coupled to a pruner, i.e. a metric that discards unpromising trials. As we demonstrate below, NASWOT can be employed in such a fashion.
27NASWOT and OAT are in principle exhaustive and sample the entire search space presented. In the case of OAT this is done via constructing orthogonal arrays, a concept often employed in experimental design. The orthogonal arrays yield a compact list of potential hyperparameter combinations, that in principle covers the search space at drastically reduced computational cost. After measuring the performance of all trials in such a list, a range analysis is performed to extract the optimal set of hyperparameters from it. One important limitation of this approach is that orthogonal arrays do not exist for any arbitrary number of (hyper)parameters [59], thus one has to either restrict or artificially inflate the search space.
28NASWOT achieves a full sampling of the search space by measuring the performance of individual candidate NNs without training the NN at all, thus allowing for a large number of trials to be performed. One can simply test all possible combinations of hyperparameters. The NASWOT method relies on the correlation between the input and output of a NN. Here, this correlation is quantified in terms of a Jacobian J which is defined as the derivative of the predicted LDOS w.r.t. the SNAP descriptors. It assigns a score to a given NN upon initialization defined as
29Here, N batch denotes the size of a subset of the training data passed through the NN via Eq. (9), σ J,i the eigenvalues of the correlation matrix obtained from the Jacobian, and k a small parameter which ensures numerical stability. We then calculate the NASWOT mean score across five network initializations in terms of Eq. (13) as
30where S T NASWOT denotes the mean and σ S T NASWOT the standard deviation across the T individual scores. This is done to increase robustness of S T NASWOT w.r.t. network initialization. S NASWOT then serves as a metric to determine how well an untrained NN can distinguish between given data points. The underlying assumption is that a network performing well at this task upon initialization will also yield a high accuracy after training. Assuming S NASWOT is sufficiently correlated with the prediction accuracy of a NN after training, Eq. (14) provides a computationally inexpensive means for performing hyperparameter optimization. It replaces the usual loss metric, such as in Eq. (12), which is computationally heavy, because it needs to be computed after training. It is to note that while the loss in our framework needs to be minimized, the NASWOT score needs to be maximized.
31However, NASWOT can only optimize the architecture of a NN. All hyperparameters related to model optimization cannot be treated by NASWOT, as no model is optimized. We therefore test NASWOT in two settings -one we deemed fixed (i.e. optimization parameters are set to fixed values) and one called optimized, where after having determined the optimal network architecture via NASWOT, optimization related hyperparameters are identified via a reduced Optuna study. Tab. 1 gives an overview over the hyperparameter optimization techniques discussed here.
Data and code availability
32All machine-learning experiments and post-processing analysis have been carried out with the MALA code, version 1.1.0. Training data and benchmark models for aluminum experiments can be found in Ref. [60] and for beryllium experiments in Ref. [61]. Code used to conduct hyperparameter optimization as well as the relevant models can be found in Ref. [62].
Results
33Based on Eq. (11), we have carried out large-scale hyperparameter optimizations in order to identify the most suitable techniques for automated DFT surrogate model generation. Our results below are divided into two categories -(1) those for optimizing hyperparameters determining the NN architecture and (2) methods for choosing the most suitable descriptors. The former technique can be applied to any ML workflow which deals with a mapping of vector quantities, while the latter highlights how Table 1.
34Overview over different hyperparameter techniques employed throughout this work, the hyperparameters they are capable of optimizing, stopping criteria, and parallelization capabilities.
Method
35Optimized Hyperparameters Parallelization Direct search Architecture and Optimization.
36Upper limit for parallelization is number of potential values per hyperparameter. Optuna (Tree-Structured Parzen Estimator (TPE) Architecture and Optimization.
37Parallelization in principle unlimited, in practice too many parallel instances lead to more uninformed trials and slow convergence. Optuna coupled to a NASWOT-based pruner As above.
38As above.
39Orthogonal array tuning (OAT)
40Architecture and Optimization.
41Upper limit for the parallelization is the number of rows in the orthogonal array. NASWOT (fixed)
42Architecture.
43Upper limit for the parallelization is the number of trials.
NASWOT (optimized)
44Architecture and Optimization.
45Architecture: as NAS-WOT (fixed); Optimization: as Optuna.
46physical insight can be used to accelerate modeling specifically in the materials science domain.
Training-free hyperparameter optimization score
47We compare the NASWOT mean score with state-of-the-art hyperparameter optimization methods and highlight its utility as a superior alternative to conventional hyperparameter optimization schemes that are based training. These optimizations share the common goal of identifying a NN architecture and training routine with a minimal prediction error in the shortest amount of time. Ideally, the accuracy of a NN should be independent of the NN initialization, while the inference time should be minimal. In our assessment of hyperparameter optimization techniques, we consider a simulation cell containing 256 aluminum atoms at room temperature (298 K) and ambient mass density (2.699 g/cc) [60]. This system represents the complexity of learning electronic structure data while still being computationally tractable for extended studies [32].
48To better quantify the accuracy of each hyperparameter optimization method, we train the model identified as optimal five times, each time using a different Figure 3. The training-free score, which we implemented as the NASWOT mean score (red), provides a speed up by two orders of magnitude compared to stateof-the-art hyperparameter optimization methods. We report the mean absolute errors (MAE) across 10 atomic configurations vs. the computational demand. Markers indicate the average MAE and antennas the standard deviation over these MAE. The reported optimal NN architectures are obtained by completing five training cycles within each hyperparameter optimization method. The same methodology is employed in the subsequent figures.
49network initialization. Then, for each initialization, inference was performed across 10 atomic configurations that had previously been used in Ref. [32]. Using these prediction results, the MAE was calculated according to Eq. (12). In doing so, we get five MAEs, one for each network initialization per hyperparameter optimization method. We use this information to assess both accuracy and robustness of the listed hyperparameter optimization techniques. Details on the hyperparameter ranges used in these experiments are provided in Table 1 of Supplementary Note 1. Our central result is illustrated in Fig. 3. It shows the MAE vs. total compute time for a NN identified by the considered hyperparameter optimization techniques, while also quantifying the robustness of the NN by showing the spread for the MAE across different network initializations as antennas for the data points. It demonstrates that our training-free score implemented as the NASWOT mean score (red) provides a speed-up of two orders of magnitude while maintaining high accuracy comparable to the other methods. The average accuracy of the NASWOT NN is better then obtained from the direct search (black) and OAT (orange). Only the Optuna-based methods outperform it slightly, but at the price of a massive computational cost. Generally, it is quite evident that for the most part, increasing computational time yields more accurate NNs, and, as quantified by the standard deviation over the inference accuracy, more robust training routines. However, the pure Optuna approach (blue) identifies an NN with excellent inference and training performance at a cost almost two orders of magnitude higher then a direct search. The NASWOT mean score yields a NN with relatively large variances with respect to NN initializations. These are explained by the fact that NASWOT itself has no means to adjust parameters such as the learning rate. Therefore a fixed choice is required. Performing a small Optuna study afterwards (brown) drastically reduces this variance, while at the same time introducing an additional computational overhead. The length of such an Optuna study varies depending on demands for accuracy and availability of computational resources. Chiefly, a huge reduction in compute is enabled by our training-free score if a larger variance between network initializations can be tolerated. Even more accurate NNs become attainable with subsequent and slightly larger Optuna studies.
50Naturally, one is often not directly interested in the total core hours, which measure both time and resources, but rather in the total time-to-result. To this end, Fig. 4 assesses speed-ups due to parallelization of the hyperparameter studies. While this improves the performance across all hyperparameter optimization techniques, no drastic changes in their order can be observed. OAT has a more favorable scaling behavior then the direct search algorithm leading to a smaller runtime. Using Optuna to optimize training hyperparameters of the NASWOT NN yields the most accurate network in runtime of two days. Yet the principal result remains the same as in Fig. 3: NASWOT outperforms the other hyperparameter techniques again by two orders of magnitude. The central result displayed both in Fig. 3 and Fig. 4 is the first step towards automated ML surrogate model generation for electronic structures.
51The NASWOT method relies on the correlation between the training-free score calculated upon initialization of an NN and the performance of said NN after training. Thus, the performance of NASWOT as shown in Fig. 3 and Fig. 4 itself is not sufficient to assess whether it is a reliable tool for automated surrogate model generation. Care has to be taken to ensure that such results are actually representative of a useful underlying correlation and not caused by, e.g., an imprecise problem statement. To this end, the correlation between the NASWOT mean score and the NN performance is analyzed in Fig. 5. The data basis for this figure is the Optuna study itself. Therefore training related hyperparameters can vary between different trial NNs. In doing so, it is ensured that the performance score assigned through this analysis is actually representative of suitable NN candidates. In order to save computation time, only the band energy rather than the total free energy was calculated for each candidate NN. The resulting comparison still provides the necessary insight, as it was shown in Ref. [32] that errors in the total free energy are dominated by errors in the band energy. It can be seen both visually and from the calculated Kendall τ coefficient [63] of −0.318 that the quantities shown in Fig. 5 are negatively correlated, meaning that large NASWOT scores relate to small NN errors, as is the expectation. While NASWOT and Optuna do not agree in their choice for the optimal NN architecture, the overall difference is not drastic; the optimal Optuna NN is still within the 20 best NNs according to the NASWOT score, while the NASWOT result yields a reasonable accuracy in the band energy. Based on these results, the NASWOT mean score is a suitable metric for identifying a NN capable of learning the LDOS to the desired accuracy.
52Furthermore, the two clusters of points in Fig. 5 suggest that NASWOT can be used to optimize hyperparameter studies which are based on Optuna. A pruner can be constructed, that discards all candidate NNs below a certain threshold score. When treating new materials, such a threshold will be unknown beforehand and has to be estimated during runtime from preceding trials. Yet for first tests this simple implementation suffices. As shown in Fig. 4, the resulting hyperparameter optimization technique labelled as Optuna with NASWOT pruner (green) provides high accuracy and little uncertainty while coming at a significantly . The training-free score (red) also provides a speed-up by two orders of magnitude when the time to solution is considered. Reported MAE (across 10 atomic configurations) vs. computational demand for different hyperparameter optimization techniques discussed above, with maximum expected speed-ups; actual speed-ups may differ slightly. Note that there are upper limits for parallelization. If too many GPUs are used for the Optuna parallelization, trials will be too independent, leading to slower convergence. The upper limit for OAT is the number of trials, since these are completely independent of each other. However, only a serial version of OAT was implemented for now. For the direct search, one GPU can be assigned per choice. For NASWOT there is no principal upper limit, but the same number of eight GPUs as in the Optuna study was chosen.
53lower computational cost than the direct use of Optuna. However, one has to keep in mind that for unknown systems, additional computation time has to be included to accommodate for the incremental construction of the pruning threshold. Thus, such an approach is only a viable alternative to the NASWOT algorithm if computation time is not scarce, but yet not as abundant as necessary for a full Optuna study. Naturally, other pruning algorithms could be used to perform a similar task. OAT has been found to give an intermediate performance compared to the aforementioned methods. OAT is in principal highly parallel, giving it the best performance after NASWOT (provided enough GPUs are available), while at the same time outperforming a traditional direct search in terms of accuracy. A final, important aspect of hyperparameter optimization is the identification of an efficient NN architecture. For initial studies, the size of a NN might not be crucial. But if surrogate models are to replace DFT calculations in dynamical simulations, then a minimal NN architecture resulting in minimal inference times would be desirable. To this end, Fig. 6 shows how the NNs identified by the different hyperparameter optimization methods differ greatly. The direct search favors a large NN, while the NASWOT mean score favors a small, single layer NNs. Optuna provides a middle ground, with a shallow NN, as does OAT. We deduce from Fig. 3 that the Optuna NN is close to the globally optimal NN architecture. The NASWOT mean score captures this optimum to a sufficient degree, while providing a massive reduction in computation time which is further illustrated in Supplementary Note 1. Overall, all of the NNs identified by the considered methods are smaller than those predicted by the direct search algorithm, resulting in drastically decreased inference times. As can be seen in Fig. 3, these smaller networks also yield higher accuracy. One explanation for this is a more favorable optimization landscape, or problems with over-fitting for large models.
Descriptor surrogate metric
54While the aforementioned hyperparameter optimization is important to any conceivable ML problem that aims to map a vector quantity to another vector, there are, however, hyperparameters that are inherent to identifying suitable descriptors. In our grid-based approach to learning the electronic structure, we rely on descriptors that encode the local atomic environment around a point in the simulation cell. Since there is no clear physical relation between the NN prediction accuracy and the hyperparameters characterizing the way such a local environment is captured,
Input Hidden 1 Hidden 2 Hidden 3 Hidden 4 Output
55Layer data preprocessing itself requires a hyperparameter optimization. This requires the repeated training of a NN using a wide range of descriptors. The NASWOT mean score cannot be employed here, as it is not the network architecture we seek to optimize. We therefore introduce a descriptor surrogate metric called ACSD which is based on similarity measures. It facilitates identifying the optimal choice of descriptors for particle-mesh data. Similar to NASWOT, it is highly efficient and achieves a speed-up of two orders of magnitude compared to conventional NN training, because it enables a training-free optimization.
56In our workflow, we employ the SNAP descriptors [51,52,53,54] to capture local atomic environments. However, local descriptors may be based on other established fingerprinting schemes for atomic configurations, such as SOAP [64], the Coulomb matrix [65], BoB [66], FCHL [67], or ACE [68,69]. Assuming that we investigate cells consisting only of one chemical species, SNAP descriptors are calculated via the local atomic density around a grid-point
57after placing said grid-point at the origin. In Eq. (15), r k with r k = |r k | is the position of atom k and R cut is the cutoff radius which determines the length scale of the atomic environment considered by the SNAP descriptor. This local atomic density is represented in terms of four-dimensional hyperspherical coordinates. The number of terms in this expansion is denoted by j with a dimensionality governed by J max ; the higher J max , the more components per grid-point are taken into account.
58Our proposed surrogate metric is based on analyzing a similarity measure between the output and input vectors of the NN, namely the SNAP vectors which are the input and the LDOS vectors which are the output. Given two points on the real space grid of a simulation cell r 1 and r 2 , we compute the cosine similarity S C for either two LDOS vectors d( , r) and two SNAP vectors B(j, r) as
59with X 1 = d( , r 1 ), X 2 = d( , r 2 ) or X 1 = B(j, r 1 ), X 2 = B(j, r 2 ). We then compute a 2D point cloud The optimal choice of descriptors is determined by the hyperparameters R cut and J max . We need to consider two limiting cases: (i) when S i C (B) S i C (d), even drastically dissimilar descriptors might yield the same LDOS, and modeling becomes trivial from a ML perspective. This case applies when R cut is small. However, this in turn means physically less informed descriptors and therefore lower prediction accuracy, because the length scale of the atomic environment is small. If we instead choose R cut to be large, the descriptors will be physically well informed. But we risk approaching (ii) S i C (B) S i C (d), which makes our problem difficult to model in terms of ML. For a fixed choice of R cut , the number of expansion coefficients governed by J max determines which of these limiting cases is approached. As we aim for optimal performance w.r.t. both accuracy and data footprint, we argue that finding a combination of maximum R cut and minimum J max for which
60To judge whether such a combination has been found, we introduce the ACSD. It is defined as the average difference
61between all points within the 2D point cloud S i C (B), S i C (d) and S i C (B), S i C (B) , where N sim denotes the number of sample points. The ACSD thus measures the average over the distribution of similarities that deviate from the S i C (B) = S i C (d) line. Eq. (17) can be evaluated rapidly in contrast to lengthy NN training required for a traditional hyperparameter search. To investigate the accuracy of the ACSD, we consider 20 snapshots of 128 beryllium atoms at room temperature (298 K) and ambient mass density (1.896 g/cc) [61].
62To assess the utility of the ACSD as a rapid and reliable descriptor surrogate metric, we compare the predicted ACSD with actual MAE of the total energy inferred from the NN. To that end we consider the hyperparameters R cut = 4.676Å and J max = 5 which were identified as accurate in Ref. [32]. We then vary both hyperparameters, one at a time with the other held fixed. The reference result was calculated for all these hyperparameter combinations. This involved generating SNAP descriptors, training the NNs, and predicting the total free energy based on these NNs. The central results of this assessment are shown in Fig. 7 for a fixed number of components J max and varying cutoff radius R cut , and vice versa in Fig. 8.
63It is evident in Fig. 7 that the NN prediction (green) becomes more accurate with increasing R cut , up until a minimum at 4.676Å (achieving the desired accuracy of below 3 meV/atom), after which a slight decrease in both average accuracy and spread is observed. This behavior is reproduced, almost exactly, by the ACSD surrogate metric (red). These results follow the intuitive expectation: a small R cut means that individual SNAP descriptors carry less information about the atomic environment, making it harder for a NN to actually predict the electronic structure from the data provided. On the other hand, very large values of R cut lead to SNAP descriptors that incorporate information from almost the entire simulation cell. These tend to be similar to one another, even though the actual electronic structure at a particular grid point differs, complicating training. Consequently, we expect the optimal R cut in between these extremes, which is correctly identified by the ACSD. Furthermore, Fig. 7 confirms the prior assertion that ML modeling becomes increasingly more challenging as R cut increases, as is evident from the increasing spread in the network prediction errors.
64The computational speed-up of this method is drastic. The conventional method of finding optimal descriptors is a computationally heavy task, because it requires multiple NN model optimizations. Contrarily, the evaluation of the ACSD surrogate metric can be done in a matter of minutes on a single CPU. This results in a speed-up of around two orders of magnitude, while qualitatively yielding the same results. The assessment for a fixed cutoff radius R cut and varying J max yields a similar trend which is illustrated in Fig. 8. As long as J max is chosen sufficiently large, there is little effect on the accuracy of the NN (green), and above J max = 2 all networks achieve the desired accuracy. This trend is not fully reflected by the ACSD surrogate metric (red). However, this can be explained due to the nature of this numerical experiment. An increase in components leads to additional components being added that are generally small in value. These in turn cause slightly larger deviations for almost identical SNAP vectors, but do not carry meaningful information for the NN. This leads to almost unnoticeable differences in NN accuracies. However, minimal J max values leading to reasonable accuracy is indeed reflected by the ACSD surrogate metric. Based only on the surrogate metric, one would choose the first data point for which the ACSD encounters a minimum, in this case J max = 3. The NN accuracy of this data set is comparable to that for higher J max at reduced computational cost, thus demonstrating the utility of our ACSD surrogate metric.
Discussion and Outlook
65We tackle the complex optimization problem inherent to any NN surrogate model construction in the context of electronic structures. This constitutes a major computational bottleneck in addition to data generation. We provide a highly efficient and automated hyperparameter optimization workflow for generating ML surrogate models of electronic structures. It speeds up this process by two orders of magnitude (see Fig. 2), as we demonstrate in terms of a comprehensive comparison with state-ofthe-art techniques. Our workflow consists of two advances -a training-free score for rapid hyperparameter optimization of NNs and a descriptor surrogate metric enabling an efficient search for suitable descriptors of particle-mesh data.
66We have first assessed the accuracy and efficiency of our workflow against multiple hyperparameter optimization techniques such as the direct search, OAT, and the standard Optuna library. We achieve large gains in computational efficiency in hyperparameter optimization by adapting the NASWOT method [35] as a NASWOT mean score into our workflow. This method does not require any NN training up until an optimal set of hyperparameters has been identified. With our NASWOT mean score we are able to calculate a surrogate model in a few hours, whereas the stateof-the-art methods take days. In addition, if higher accuracy is needed, we showed that combining Optuna with the NASWOT mean score outperforms traditional search approaches. We also found that our hyperparameter optimization workflow impacts model performance. NN architectures identified as optimal by the NASWOT mean score algorithm are equally robust as the direct search, but yield smaller NNs with optimal inference performance.
67Furthermore, we have developed the ACSD descriptor surrogate metric to find hyperparameters for the calculation of suitable particle-mesh descriptors without having to train any NN models. Likewise, our algorithm speeds up the state of the art by two orders of magnitude. First research into applying our models at larger temperatures suggest that the ACSD successfully recovers the expected physicys, i.e. favoring smaller cutoff radii (reflecting the larger disorder in the system).
68By incorporating these two developments, we have devised a highly efficient ML surrogate modelling workflow shown in Fig. 2. All steps in this workflow can easily be automated with the algorithms considered here. These tools will enable a breadth of future applications in which large parts of the data processing for DFT surrogate models can be automated or executed with minimal user input. Our final workflow reduces the time required to construct surrogate models by two orders of magnitude. It thus provides a pathway to employing DFT surrogate models in largescale investigations of materials under a variety of conditions. objective technical results and analysis. Any subjective views or opinions that might be expressed in the paper do not necessarily represent the views of the U.S. Department of Energy or the United States Government. This work was partially supported by the Center of Advanced Systems Understanding (CASUS) which is financed by Germany's Federal Ministry of Education and Research (BMBF) and by the Saxon state government out of the State budget approved by the Saxon State Parliament.
참고문헌 65건
- Spectral neighbor analysis method for automated generation of quantum-accurate interatomic potentials Journal of Computational Physics · Elsevier BV · 2014 10.1016/j.jcp.2014.12.018
- Machine Learning Predictions of Molecular Properties: Accurate Many-Body Potentials and Nonlocality in Chemical Space The Journal of Physical Chemistry Letters · American Chemical Society · 2015 10.1021/acs.jpclett.5b00831
- Exchange-correlation energy for the three-dimensional homogeneous electron gas at arbitrary temperature Physical Review B · American Physical Society · 2013 10.1103/physrevb.88.081102
- Accurate Homogeneous Electron Gas Exchange-Correlation Free Energy for Local Spin-Density Calculations Physical Review Letters · American Physical Society · 2014 10.1103/physrevlett.112.076403
- Big Data Meets Quantum Chemistry Approximations: The Δ-Machine Learning Approach Journal of Chemical Theory and Computation · American Chemical Society · 2015 10.1021/acs.jctc.5b00099
- Generalized Gradient Approximation Made Simple Physical Review Letters · American Physical Society · 1996 10.1103/physrevlett.77.3865
- A NEW MEASURE OF RANK CORRELATION Biometrika · Oxford University Press · 1938 10.1093/biomet/30.1-2.81
- Approximation capabilities of multilayer feedforward networks Neural Networks · Elsevier BV · 1991 10.1016/0893-6080(91)90009-t
- Neural network interatomic potential for the phase change material GeTe Physical Review B · American Physical Society · 2012 10.1103/physrevb.85.174103
- Direct search methods: then and now Journal of Computational and Applied Mathematics · Elsevier BV · 2000 10.1016/s0377-0427(00)00423-4
- A Density-Functional Theory-Based Neural Network Potential for Water Clusters Including van der Waals Corrections The Journal of Physical Chemistry A · American Chemical Society · 2013 10.1021/jp401225b
- Finding Density Functionals with Machine Learning Physical Review Letters · American Physical Society · 2012 10.1103/physrevlett.108.253002
- Ground State of the Electron Gas by a Stochastic Method Physical Review Letters · American Physical Society · 1980 10.1103/physrevlett.45.566
- On representing chemical environments Physical Review B · American Physical Society · 2013 10.1103/physrevb.87.184115
- Inhomogeneous Electron Gas Physical Review · American Institute of Physics · 1964 10.1103/physrev.136.b864
- How to represent crystal structures for machine learning: Towards fast prediction of electronic properties Physical Review B · American Physical Society · 2014 10.1103/physrevb.89.205118
- Thermal Properties of the Inhomogeneous Electron Gas Physical Review · American Institute of Physics · 1965 10.1103/physrev.137.a1441
- Gaussian Approximation Potentials: The Accuracy of Quantum Mechanics, without the Electrons Physical Review Letters · American Physical Society · 2010 10.1103/physrevlett.104.136403
- Fast and Accurate Modeling of Molecular Atomization Energies with Machine Learning Physical Review Letters · American Physical Society · 2012 10.1103/physrevlett.108.058301
- Multilayer feedforward networks are universal approximators Neural Networks · Elsevier BV · 1989 10.1016/0893-6080(89)90020-8
- Zur Quantentheorie der Molekeln Annalen der Physik · Wiley · 1927 10.1002/andp.19273892002
- `` Direct Search'' Solution of Numerical and Statistical Problems Journal of the ACM · Association for Computing Machinery · 1961 10.1145/321062.321069
- Beyond Manual Tuning of Hyperparameters KI - Künstliche Intelligenz · Springer Science+Business Media · 2015 10.1007/s13218-015-0381-0
- Self-Consistent Equations Including Exchange and Correlation Effects Physical Review · American Institute of Physics · 1965 10.1103/physrev.140.a1133
- Bypassing the Kohn-Sham equations with machine learning Nature Communications · Nature Portfolio · 2017 10.1038/s41467-017-00839-3
- ANI-1: an extensible neural network potential with DFT accuracy at force field computational cost Chemical Science · Royal Society of Chemistry · 2017 10.1039/c6sc05720a
- Machine learning based interatomic potential for amorphous carbon Physical review. B./Physical review. B · American Physical Society · 2017 10.1103/physrevb.95.094203
- To address surface reaction network complexity using scaling relations machine learning and DFT calculations Nature Communications · Nature Portfolio · 2017 10.1038/ncomms14621
- The atomic simulation environment—a Python library for working with atoms Journal of Physics Condensed Matter · IOP Publishing · 2017 10.1088/1361-648x/aa680e
- <i>Ab initio</i> Exchange-Correlation Free Energy of the Uniform Electron Gas at Warm Dense Matter Conditions Physical Review Letters · American Physical Society · 2017 10.1103/physrevlett.119.135001
- Predicting the Thermodynamic Stability of Solids Combining Density Functional Theory and Machine Learning Chemistry of Materials · American Chemical Society · 2017 10.1021/acs.chemmater.7b00156
- Improving the Performance of Long-Range-Corrected Exchange-Correlation Functional with an Embedded Neural Network The Journal of Physical Chemistry A · American Chemical Society · 2017 10.1021/acs.jpca.7b07045
- Extending the accuracy of the SNAP interatomic potential form The Journal of Chemical Physics · American Institute of Physics · 2018 10.1063/1.5017641
- Machine learning in materials design and discovery: Examples from the present and suggestions for the future Physical Review Materials · American Physical Society · 2018 10.1103/physrevmaterials.2.120301
- Atomic cluster expansion for accurate and transferable interatomic potentials Physical review. B./Physical review. B · American Physical Society · 2019 10.1103/physrevb.99.014104
- Data-driven material models for atomistic simulation Physical review. B./Physical review. B · American Physical Society · 2019 10.1103/physrevb.99.184305
- Solving the electronic structure problem with machine learning npj Computational Materials · Nature Portfolio · 2019 10.1038/s41524-019-0162-7
- Machine learning and the physical sciences Reviews of Modern Physics · American Physical Society · 2019 10.1103/revmodphys.91.045002
- Optuna: A Next-generation Hyperparameter Optimization Framework arXiv (Cornell University) · Cornell University · 2019 10.48550/arxiv.1907.10902
- A note on the minimum size of an orthogonal array Communication in Statistics- Theory and Methods · Taylor & Francis · 2016 10.1080/03610926.2015.1071391
- Recent advances and applications of machine learning in solid-state materials science npj Computational Materials · Nature Portfolio · 2019 10.1038/s41524-019-0221-0
- Machine learning in materials science InfoMat · Wiley · 2019 10.1002/inf2.12028
- Machine Learning the Physical Nonlocal Exchange–Correlation Functional of Density-Functional Theory The Journal of Physical Chemistry Letters · American Chemical Society · 2019 10.1021/acs.jpclett.9b02422
- Deep Neural Network Hyperparameter Optimization with Orthogonal Array Tuning Communications in computer and information science · Springer Science+Business Media · 2019 10.1007/978-3-030-36808-1_31
- Large scale and linear scaling DFT with the CONQUEST code The Journal of Chemical Physics · American Institute of Physics · 2020 10.1063/5.0005074
- Practical Approach to Large-Scale Electronic Structure Calculations in Electrolyte Solutions via Continuum-Embedded Linear-Scaling Density Functional Theory The Journal of Physical Chemistry C · American Chemical Society · 2020 10.1021/acs.jpcc.0c00762
- AiiDA 1.0, a scalable computational infrastructure for automated reproducible workflows and data provenance Scientific Data · Nature Portfolio · 2020 10.1038/s41597-020-00638-4
- Automated Machine Learning: The New Wave of Machine Learning 2020 10.1109/icimia48430.2020.9074859
- Explicit Multielement Extension of the Spectral Neighbor Analysis Potential for Chemically Complex Systems The Journal of Physical Chemistry A · American Chemical Society · 2020 10.1021/acs.jpca.0c02450
- Workflows in AiiDA: Engineering a high-throughput, event-based engine for robust and modular computational workflows Computational Materials Science · Elsevier BV · 2020 10.1016/j.commatsci.2020.110086
- Liquid-liquid Phase Transitions in Silicon Physical Review Letters · American Physical Society · 2020 10.1103/physrevlett.125.075702
- AiiDA 1.0, a scalable computational infrastructure for automated reproducible workflows and data provenance Scientific Data · Nature Portfolio · 2020 10.1038/s41597-020-00638-4
- Accelerating finite-temperature Kohn-Sham density functional theory with deep neural networks Physical review. B./Physical review. B · American Physical Society · 2021 10.1103/physrevb.104.035120
- Bypassing the Kohn-Sham equations with machine learning Nature Communications · Nature Portfolio · 2017 10.1038/s41467-017-00839-3
- Quantum Deep Field: Data-Driven Wave Function, Electron Density Generation, and Atomization Energy Prediction and Extrapolation with Machine Learning Physical Review Letters · American Physical Society · 2020 10.1103/physrevlett.125.206401
- Extending the accuracy of the SNAP interatomic potential form The Journal of Chemical Physics · American Institute of Physics · 2018 10.1063/1.5017641
- Reconciling ionization energies and band gaps of warm dense matter derived with <i>ab initio</i> simulations and average atom models Physical Review Research · American Physical Society · 2021 10.1103/physrevresearch.3.023026
- Performant implementation of the atomic cluster expansion (PACE) and application to copper and silicon npj Computational Materials · Nature Portfolio · 2021 10.1038/s41524-021-00559-9
- LDOS/SNAP data for MALA: Aluminium at 298K and 933K 2021 10.14278/rodare.1107
- Pushing the frontiers of density functionals by solving the fractional electron problem Science · American Association for the Advancement of Science · 2021 10.1126/science.abj6511
- On the liquid–liquid phase transition of dense hydrogen Nature · Nature Portfolio · 2021 10.1038/s41586-021-04078-x
- PyTorch: An Imperative Style, High-Performance Deep Learning Library arXiv (Cornell University) · Cornell University · 2019 10.48550/arxiv.1912.01703
- Scripts and networks for "Electronic Structure Machine Learning Surrogates without Training" CDI B2Share · 2022 10.23728/b2share.436e1e79daa54436a7703340431b4e19
- MALA Zenodo (CERN European Organization for Nuclear Research) · European Organization for Nuclear Research · 2025 105281zenodo5557254
- LDOS/SNAP data for MALA: Beryllium at 298K RODARE · 2022 1014278rodare1834