Neuroevolution potential

The neuroevolution potential (NEP) approach was proposed in [Fan2021] (NEP1) and later improved in [Fan2022a] (NEP2) and [Fan2022b] (NEP3). Currently, GPUMD supports NEP3 and NEP4 (to be published). Both versions have comparable accuracy for single-component systems. For multi-component systems, NEP4 usually has higher accuracy, if all the other hyperparameters are the same.

GPUMD not only allows one to carry out simulations using NEP models via the gpumd executable but even the construction of such models via the nep executable.

The neural network model

NEP uses a simple feedforward neural network (NN) to represent the site energy of atom i as a function of a descriptor vector with Ndes components,

Ui(q)=Ui({qνi}ν=1Ndes).

There is a single hidden layer with Nneu neurons in the NN and we have

Ui=μ=1Nneuwμ(1)tanh(ν=1Ndeswμν(0)qνibμ(0))b(1),

where tanh(x) is the activation function in the hidden layer, w(0) is the connection weight matrix from the input layer (descriptor vector) to the hidden layer, w(1) is the connection weight vector from the hidden layer to the output node, which is the energy Ui, b(0) is the bias vector in the hidden layer, and b(1) is the bias for node Ui.

The descriptor

The descriptor for atom i consists of a number of radial and angular components as described below.

The radial descriptor components are defined as

qni=jign(rij)

with

0nnmaxR,

where the summation runs over all the neighbors of atom i within a certain cutoff distance. There are thus nmaxR+1 radial descriptor components.

For the angular descriptor components, we consider 3-body to 5-body ones. The formulation is similar but not identical to the atomic cluster expansion (ACE) approach [Drautz2019]. For 3-body ones, we define (0nnmaxA, 1llmax3b)

qnli=m=ll(1)mAnlmiAnl(m)i,

where

Anlmi=jign(rij)Ylm(θij,ϕij),

and Ylm(θij,ϕij) are the spherical harmonics as a function of the polar angle θij and the azimuthal angle ϕij. For expressions of the 4-body and 5-body descriptor components, we refer to [Fan2022b].

The radial functions gn(rij) appear in both the radial and the angular descriptor components. In the radial descriptor components,

gn(rij)=k=0NbasRcnkijfk(rij),

with

fk(rij)=12[Tk(2(rij/rcR1)21)+1]fc(rij),

and

fc(rij)={12[1+cos(πrijrcR)],rijrcR;0,rij>rcR.

In the angular descriptor components, gn(rij) have similar forms but with NbasR changed to NbasA and with rcR changed to rcA.

Model dimensions

Number of …

Count

atom types

Ntyp

radial descriptor components

nmaxR+1

3-body angular descriptor components

(nmaxA+1)lmax3b

4-body angular descriptor components

(nmaxA+1) or zero (if not used)

5-body angular descriptor components

(nmaxA+1) or zero (if not used)

descriptor components

Ndes is the sum of the above numbers of descriptor components

trainable parameters cnkij in the descriptor

Ntyp2[(nmaxR+1)(NbasR+1)+(nmaxA+1)(NbasA+1)]

trainable NN parameters

Nnn=(Ndes+2)Nneu+1 (NEP3)

Nnn=(Ndes+2)NneuNtyp+1 (NEP4)

The total number of trainable parameters is the sum of the number of trainable descriptor parameters and the number of NN parameters Nnn.

Optimization procedure

The name of the NEP model is owed to the use of the separable natural evolution strategy (SNES) that is used for the optimization of the parameters [Schaul2011]. The interested reader is referred to [Schaul2011] and [Fan2021] for details.

The key quantity in the optimization procedure is the loss (or objective) function, which is being minimized. It is defined as a weighted sum over the loss terms associated with energies, forces and virials as well as the L1 and L2 norms of the parameter vector.

L(z)=λe(1Nstrn=1Nstr(UNEP(n,z)Utar(n))2)1/2+λf(13Ni=1N(FiNEP(z)Fitar)2)1/2+λv(16Nstrn=1Nstrμν(WμνNEP(n,z)Wμνtar(n))2)1/2+λ11Nparn=1Npar|zn|+λ2(1Nparn=1Nparzn2)1/2.

Here, Nstr is the number of structures in the training data set (if using a full batch) or the number of structures in a mini-batch (see the batch keyword in the nep.in input file) and N is the total number of atoms in these structures. UNEP(n,z) and WμνNEP(n,z) are the per-atom energy and virial tensor predicted by the NEP model with parameters z for the nth structure, and FiNEP(z) is the predicted force for the ith atom. Utar(n), Wμνtar(n), and Fitar are the corresponding target values. That is, the loss terms for energies, forces, and virials are defined as the respective RMSE values between the NEP predictions and the target values. The last two terms represent L1 and L2 regularization terms of the parameter vector. The weights λe, λf, λv, λ1, and λ2 are tunable hyper-parameters (see the eponymous keywords in the nep.in input file). When calculating the loss function, we use eV/atom for energies and virials and eV/Å for force components.