Crystal property prediction method based on graph neural network
By introducing edge convolution operators and related self-attention mechanisms into the graph neural network architecture, a crystal property prediction model is constructed, which solves the problem that the existing technology is difficult to grasp the long-range information between atoms, and achieves high-precision crystal property prediction.
Patent Information
- Application Number
- CN202510041458.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-10
- Publication Date
- 2025-04-18
- Estimated Expiration
- 2045-01-10
AI Technical Summary
When using graph neural networks to predict crystal properties, it is difficult to effectively grasp the long-range information between atoms, resulting in low prediction accuracy of crystal properties.
By introducing edge convolution operators and related self-attention mechanisms into the graph neural network architecture, a crystal property prediction model is constructed, which enhances the extraction ability of atomic local and non-local information and improves the accuracy of atomic embedding.
High-precision prediction of crystal properties is achieved, improving the accuracy of atomic embedding and the accuracy of crystal properties prediction.
Smart Images

Figure CN119851807A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of materials science, and in particular to a method for predicting crystal properties based on graph neural networks. Background Art
[0002] In recent years, ab initio calculations based on density functional theory (DFT) methods have become an important part of scientific research in physics, chemistry, materials science, etc. However, a key problem of DFT is its high computational complexity, which hinders its application in the study of crystal systems containing thousands of atoms.
[0003] To address this challenge, machine learning methods have been introduced. Machine learning methods can predict crystal properties at a low computational cost by learning patterns and regularities from large amounts of data. According to existing research, machine learning methods are changing processes related to the discovery and design of materials and molecules at an astonishing rate through direct statistical learning and analysis of large data sets. However, the effectiveness of machine learning methods applied to materials science depends heavily on the rational representation of materials and molecules. Specifically, this representation must be encoded as a vector of fixed length to be compatible with machine learning algorithms, and the variability of crystal structure size makes this requirement more complicated.
[0004] Compared with traditional machine learning methods, deep learning technology has shown significant advantages in predicting the properties of crystals. Traditional methods often rely on features designed manually by experts, which require complex preprocessing and rational representation of the data, while deep learning methods can directly process raw data without tedious feature engineering. Through its layered neural network structure, the deep learning model can automatically learn complex and abstract features in the data, thereby effectively capturing the key properties of materials and molecules. After the crystal graph convolutional neural network known to the inventors, the use of graph neural network models to predict crystal properties has attracted widespread attention. However, in the process of improving the method based on the graph convolutional neural network, it is generally difficult to grasp the long-range information between atoms, and thus it is impossible to achieve high-precision prediction of crystal properties. Summary of the invention
[0005] The purpose of this application is to provide a crystal property prediction method based on graph neural network, which can grasp the long-range information between atoms and thus achieve high-precision prediction of crystal properties.
[0006] To achieve the above objectives, this application provides the following solutions:
[0007] The present application provides a method for predicting crystal properties based on a graph neural network, including:
[0008] The atoms of the crystal to be predicted are taken as nodes, and the atomic bonds are taken as edges, and the nodes and the edges are encoded to obtain node feature vectors and edge feature vectors to form a crystal graph; each node includes the atom type and the position coordinates of the atom; each edge includes the bond type and the bond strength;
[0009] Based on the graph neural network architecture, the edge convolution operator and the related self-attention mechanism are introduced to construct a crystal property prediction model; along the data processing direction, the graph neural network architecture includes a convolution layer, an attention layer, a pooling layer, and a fully connected layer in sequence;
[0010] The crystal graph is input into the crystal property prediction model to obtain a crystal property prediction result.
[0011] Optionally, based on the graph neural network architecture, an edge convolution operator and a related self-attention mechanism are introduced to construct a crystal property prediction model, including:
[0012] Based on the graph neural network architecture, the edge convolution operator and related self-attention mechanism are introduced to build an initial crystal property prediction model;
[0013] Acquire a sample training set and a sample test set; the sample training set and the sample test set both include sample pairs formed by a crystal image and a calibrated crystal property corresponding to the crystal image;
[0014] Using the sample training set to train the initial crystal property prediction model to obtain a trained initial crystal property prediction model;
[0015] The trained initial crystal property prediction model is tested using the sample test set until an output error of the trained initial crystal property prediction model meets a set threshold, thereby obtaining a trained initial crystal property prediction model;
[0016] The trained initial crystal property prediction model is used as the crystal property prediction model.
[0017] Optionally, based on the graph neural network architecture, an edge convolution operator and related self-attention mechanism are introduced to construct an initial crystal property prediction model, including:
[0018] The edge convolution operator is used as a new convolution form to replace the convolution form of the convolution layer in the graph neural network architecture to obtain a new convolution layer;
[0019] Introducing the related self-attention mechanism into the graph neural network architecture to obtain a new attention layer;
[0020] Based on the new convolutional layer and the new attention layer, the initial crystal property prediction model is obtained by combining the pooling layer and the fully connected layer.
[0021] Optionally, inputting the crystal graph into the crystal property prediction model to obtain a crystal property prediction result comprises:
[0022] The crystal graph is input into a new convolutional layer of the crystal property prediction model to obtain convolutional layer output features; the convolutional layer output features are represented by a query matrix, a key matrix and a value matrix; the query matrix, the key matrix and the value matrix are all obtained through a new convolutional layer transformation;
[0023] Determine attention weights based on the query matrix and the key matrix to obtain an attention weight matrix;
[0024] Normalizing the attention weights in the attention weight matrix to obtain a final attention weight matrix;
[0025] Using the relevant self-attention mechanism to obtain a relevant self-attention feature matrix based on the final attention weight matrix and the value matrix;
[0026] Obtaining a relevant self-attention layer output feature matrix based on the relevant self-attention feature matrix and the convolutional layer output features;
[0027] The pooling layer is used to perform a pooling operation on the feature matrix output by the self-attention layer to obtain the overall feature vector of the crystal;
[0028] The overall feature vector of the crystal is processed using a fully connected layer to obtain the crystal property prediction result.
[0029] Optionally, the attention weight matrix is expressed as:
[0030]
[0031] In the formula, is the attention weight matrix, Softmax is the activation function, Q is the query matrix, T is the transpose of the matrix, and d a is the second dimension of the key matrix, and K is the key matrix.
[0032] Optionally, the attention weights in the attention weight matrix are normalized to obtain a final attention weight matrix, including:
[0033] The attention weight is normalized to obtain the final attention weight; wherein the final attention weight is expressed as:
[0034]
[0035] The final attention weight matrix is obtained based on the final attention weight; wherein the final attention weight matrix is expressed as:
[0036] A=[αi,j ];
[0037] Where A is the final attention weight matrix, α i,j is the final attention weight, is the attention weight, is the average of the i-th row of the attention weight matrix.
[0038] Optionally, the relevant self-attention feature matrix is expressed as:
[0039] F csa =A·V;
[0040] In the formula, F csa is the relevant self-attention feature matrix, A is the final attention weight matrix, and V is the value matrix of the new convolutional layer output.
[0041] Optionally, the self-attention layer output feature is expressed as:
[0042] F out =LBR(F csa -F in )+F in ;
[0043] In the formula, F out is the output feature matrix of the new attention layer, F in is the feature matrix of the new attention layer, F csa is the related self-attention feature matrix, and LBR represents a network containing linear, batch normalization, and ReLU layers.
[0044] Optionally, a LeakyReLU activation function is used as the activation function of the new convolutional layer.
[0045] Optionally, the node feature vector updated by the new convolutional layer is expressed as:
[0046]
[0047] In the formula, is the updated feature vector of node i, is the constructed crystal graph, is the new weight parameter, is the feature vector of node j, is the feature vector of node i, || represents the connector, and LeakyReLU is the activation function.
[0048] According to the specific embodiments provided in this application, this application has the following technical effects:
[0049] The present application provides a crystal property prediction method based on graph neural network. By introducing edge convolution operators and related self-attention mechanisms on the basis of graph neural network architecture, a crystal property prediction model is constructed. It can not only effectively enhance the ability to extract local and non-local information of atoms, but also improve the accuracy of atomic embedding, thereby improving the accuracy of crystal property prediction. BRIEF DESCRIPTION OF THE DRAWINGS
[0050] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0051] Figure 1 A schematic diagram of a flow chart of a method for predicting crystal properties based on a graph neural network provided in one embodiment of the present application;
[0052] Figure 2 A schematic diagram of an implementation flow of a method for predicting crystal properties based on a graph neural network provided in one embodiment of the present application;
[0053] Figure 3 A schematic diagram of a crystal map construction process provided by another embodiment of the present application;
[0054] Figure 4 A schematic diagram of a convolutional layer structure provided in one embodiment of the present application;
[0055] Figure 5 A schematic diagram of the attention layer structure provided in one embodiment of the present application;
[0056] Figure 6 A schematic diagram of a process for predicting crystal properties based on a graph neural network provided in an embodiment of the present application;
[0057] Figure 7 A schematic diagram of the structure of a computer device provided in one embodiment of the present application. DETAILED DESCRIPTION
[0058] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0059] In order to make the above-mentioned objects, features and advantages of the present application more obvious and easy to understand, the present application is further described in detail below in conjunction with the accompanying drawings and specific implementation methods.
[0060] In an exemplary embodiment, the present application provides a method for predicting crystal properties based on a graph neural network. The method is executed by a computer device, specifically, it can be executed by a computer device such as a terminal or a server alone, or it can be executed by a terminal and a server together. In the embodiment of the present application, the method is applied to a server as an example for explanation. Figure 1 As shown, the method includes:
[0061] Step 100: The atoms of the crystal to be predicted are taken as nodes, the atomic bonds are taken as edges, and the nodes and edges are encoded to obtain node feature vectors and edge feature vectors to form a crystal graph. Each node includes the atomic type and the atomic position coordinates. Each edge includes the bond type and bond strength.
[0062] Step 101: Based on the graph neural network architecture, the edge convolution operator and the related self-attention mechanism are introduced to construct a crystal property prediction model. In the data processing direction, the graph neural network architecture includes a convolution layer, an attention layer, a pooling layer, and a fully connected layer.
[0063] Step 102: Input the crystal image into the crystal property prediction model to obtain the crystal property prediction result.
[0064] In another exemplary embodiment of the present application, the crystal structure has periodicity and symmetry, which is essentially similar to the way nodes and edges of a graph are connected. Based on this, in step 100, combined with graph theory, the crystal is abstracted into a crystal graph, in which nodes and edges represent atoms in the crystal structure and the bonds between them, respectively. In the crystal graph, the nodes represent individual atoms in the crystal. Each node has specific characteristics, such as the type of atom and position coordinates. Each edge also has specific characteristics, including the type and strength of the bond. Therefore, from a mathematical point of view, the crystal structure can be modeled as follows Figure 3 The undirected multigraph shown Unlike ordinary molecular graphs, due to the periodicity of crystal graphs, multiple edges are allowed between node pairs. In crystal graphs, nodes and edges are encoded to generate feature vectors v representing nodes. i and the eigenvector representing the edge That is, the edge between nodes i and j.
[0065] In another exemplary embodiment of the present application, the implementation process of step 101 may include:
[0066] Step 1: Based on the graph neural network architecture, the edge convolution operator and related self-attention mechanism are introduced to build the initial crystal property prediction model.
[0067] (1) The edge convolution operator is used as a new convolution form to replace the convolution form of the convolution layer in the graph neural network architecture to obtain a new convolution layer.
[0068] (2) Introduce the relevant self-attention mechanism into the graph neural network architecture to obtain a new attention layer.
[0069] (3) Based on the new convolutional layer and the new attention layer, the pooling layer and the fully connected layer are combined to obtain the initial crystal property prediction model.
[0070] Step 2: Obtain a sample training set and a sample test set. The sample training set and the sample test set both include sample pairs formed by a crystal image and a calibrated crystal property corresponding to the crystal image.
[0071] Step 3: Use the sample training set to train the initial crystal property prediction model to obtain a trained initial crystal property prediction model.
[0072] Step 4: Use a sample test set to test the trained initial crystal property prediction model until the output error of the trained initial crystal property prediction model meets a set threshold, thereby obtaining a trained initial crystal property prediction model.
[0073] Among them, during the training process, the predicted crystal property values are obtained After that, the density functional theory value y is calculated. i The mean absolute error MAE, correlation coefficient ρ and determination coefficient R 2 The calculation formulas for the three are:
[0074]
[0075] Where M is the number of predicted crystal properties, is the mean of the M predicted density functional theory values, is the mean of the predicted M crystal property values.
[0076] By judging the mean absolute error MAE, correlation coefficient ρ and determination coefficient R 2 The size of the trained crystal property prediction model (hereinafter referred to as the model or EdgeConv-GANN) is used to determine the quality of the trained crystal property prediction model, and then the network parameters are updated through backpropagation until the model converges.
[0077] For example, in actual application, the architecture of the crystal property prediction model mainly consists of convolutional layers, attention layers, and fully connected layers. It contains three convolutional layers, each followed by batch normalization and LeakyReLU activation function. These three convolutional layers gradually increase the atomic feature dimension from 32 to 64, 128, and 512 dimensions, and then enter the attention layer. After the attention layer, the atomic feature dimension increases to 1536 dimensions. The last part of the EdgeConv-GANN architecture consists of three fully connected layers, each of which is followed by batch normalization except the last fully connected layer. The dimensions of these three fully connected layers are: the first layer maps from 1536 dimensions to 1024 dimensions, the second layer reduces it from 1024 dimensions to 512 dimensions, and the last layer maps the 512-dimensional features to the final output channel. All weights and other learnable parameters in the entire EdgeConv-GANN architecture are iteratively updated using mini-batch stochastic gradient descent and Adam optimizer, and the loss function is determined by the mean square error between the predicted properties and the reference data calculated by DFT. In order to allow the model to fully learn and tune its parameters for optimal performance, 200 training epochs were performed in each case. All training tasks in this work were performed using PyTorch.
[0078] This application uses the Adam optimizer to train the detector, and the basic learning rate, batch, training number ratio, verification number ratio, and test number ratio steps are set to 0.01, 64, 0.8, 0.1, and 0.1, respectively, and the number of training rounds is 200.
[0079] Step 5: Use the trained initial crystal property prediction model as the crystal property prediction model. After the training is completed, save the best weight information, and then directly use the weight to predict the properties of the input crystal structure in the test phase to obtain the predicted value of the crystal property. Based on this, in the actual application process, the entire implementation process can be referred to Figure 2 The process shown.
[0080] Based on the above description, the crystal property prediction model finally constructed is as follows Figure 6 As shown, it may include Figure 4 The new convolutional layer shown in Figure 5 Based on this, in step 102, the crystal graph is input into the crystal property prediction model, and the process of obtaining the crystal property prediction result includes:
[0081] Step 1: The crystal graph is input into the new convolutional layer of the crystal property prediction model to obtain the convolutional layer output features. The convolutional layer output features are represented by query matrix, key matrix and value matrix. The query matrix, key matrix and value matrix are all obtained through the new convolutional layer transformation.
[0082] Step 2: Determine the attention weight based on the query matrix and the key matrix to obtain the attention weight matrix. The attention weight matrix is expressed as:
[0083]
[0084] In the formula, is the attention weight matrix, Softmax is the activation function, Q is the query matrix, T is the transpose of the matrix, and d a is the second dimension of the key matrix, K is the key matrix, is the attention weight.
[0085] Step 3: Normalize the attention weights in the attention weight matrix to obtain the final attention weight matrix. For example:
[0086] The attention weight is normalized to obtain the final attention weight. The final attention weight is expressed as:
[0087]
[0088] Based on the final attention weight, the final attention weight matrix is obtained. The final attention weight matrix is expressed as:
[0089] A=[α i,j ].
[0090] Where A is the final attention weight matrix, α i,j is the final attention weight, is the attention weight, is the average of the i-th row of the attention weight matrix.
[0091] Step 4: Use the relevant self-attention mechanism to obtain the relevant self-attention feature matrix based on the final attention weight matrix and value matrix. The relevant self-attention feature matrix is expressed as:
[0092] F csa =A·V.
[0093] In the formula, F csa is the relevant self-attention feature matrix, A is the final attention weight matrix, and V is the value matrix of the new convolutional layer output.
[0094] Step 5: Based on the relevant self-attention feature matrix and the convolutional layer output features, the relevant self-attention layer output feature matrix is obtained. The relevant self-attention layer output feature matrix is expressed as:
[0095] F out =LBR(F csa -F in )+F in.
[0096] In the formula, F out is the output feature matrix of the new attention layer, F in is the feature matrix of the new attention layer, F csa is the related self-attention feature matrix, and LBR represents a network containing linear, batch normalization, and ReLU activation functions. csa -F in ) to enhance the relevant self-attention layer is of great significance for extracting the global information of nodes in graph networks.
[0097] Step 6: Use the pooling layer to pool the output features of the self-attention layer to obtain the overall feature vector of the crystal.
[0098] Step 7: Use the fully connected layer to process the overall feature vector of the crystal to obtain the crystal property prediction result.
[0099] In another exemplary embodiment of the present application, a convolutional neural network module is constructed based on a crystal graph, usually by passing messages related to neighboring atoms and bonds to update atomic embeddings. However, known deep network models are often affected by the strongest neighbor node effect, or cannot effectively grasp the interaction strength of bonds. In order to solve this problem, the present application introduces a new form of convolution in the above step 101-the edge convolution operator, which can directly extract interaction features from all bonds adjacent to each atom. Based on this, combined with the above content, the process of executing the edge convolution operator is explained.
[0100] In this application, the edge convolution operator is applied to the atomic structure, where the updated atomic embedding is output through the channel mean aggregation strategy instead of the maximum aggregation strategy, in contrast to the known methods. In addition, instead of using the widely used ReLU activation function, the LeakyReLU activation function is used to make the crystal property prediction model more stable and robust. The LeakyReLU activation function is chosen because the ReLU function provides zero output when the input is negative, a phenomenon that may cause the weights of some neurons to no longer be updated during training because their gradients are permanently zero.
[0101] Among them, the ReLU function is expressed as: f(x)=max(0,x), f(x) is the function value, x is the independent variable, and max() is the maximum value function.
[0102] To address the limitation of the ReLU function in the negative half of the ReLU interval, the leaky value is given a non-zero slope λ, based on which the LeakyReLU activation function is expressed as:
[0103]
[0104] The introduction of the LeakyReLU activation function ensures that neurons remain active when receiving negative inputs, thereby improving the ability of the crystal property prediction model. More specifically, the process of updating the node feature vector in the first convolutional layer of the crystal property prediction model (abbreviated as EdgeConv-GANN) can be described as:
[0105]
[0106] in, represents the learnable weight parameter, t represents the current convolution layer, where t = 0. For subsequent convolution layers, considering the inherent topological characteristics of graph data and existing applications, the edge convolution operator is changed to a more efficient form, which is:
[0107]
[0108] in and θ′ m is with Different learnable weight parameters. Since multiple linear layer operations may increase the computational complexity, consider using the following formula to simplify the calculation and make it more practical:
[0109]
[0110] in, is the updated feature vector of node i, is the constructed crystal graph, is the new weight parameter, is the feature vector of node j, is the feature vector of node i, || represents a connector, and LeakyReLU is the LeakyReLU activation function. .
[0111] After R layers of convolutional layers, the feature vector of node i The node is updated based on the local environment of the atom. By using this form of convolution, the global environment of the atom can be considered.
[0112] In another exemplary embodiment of the present application, based on the content of executing the edge convolution operator given above, in this embodiment, the convolution layer output feature can be expressed as Where N is the number of atoms, d g is the feature dimension, Is a real number matrix of dimension *×*. In order to calculate the relevant self-attention, the input features are linearly transformed through the convolutional layer to obtain the query matrix Q, key matrix K and value matrix V, which are:
[0113] (Q,K,V)=F in ·(W q,W k ,W v ).
[0114] In the formula, is a learnable linear transformation matrix, considering d g May not be equal to d e In this embodiment, d e Set to d g / 4 to improve computational efficiency. The attention weights of atoms are captured by the matrix product of query and key.
[0115] In this application, the query matrix Q and the bond matrix K are used respectively to more effectively extract the relevant information between the query and the bond matrix, so as to better evaluate the atomic attention weights. These attention weights are further normalized to obtain the final attention weight matrix. The final attention weight matrix is normalized by l1-norm on the second dimension to reduce the influence of other noises and facilitate the execution of subsequent tasks, thereby obtaining the relevant self-attention feature matrix F csa Finally, we further use the input feature matrix F in And the related self-attention feature matrix F csa To generate the entire attention layer output feature matrix F out .
[0116] Further, execute the pooling operator:
[0117] After performing R layers of convolutional layers and attention layers, local and global information can be extracted. The feature vector v of each node i i R All are learned automatically, and the overall feature vector v of the crystal is generated through the pooling layer c Among them, the overall eigenvector v of the crystal c It can be expressed as a pooling function:
[0118]
[0119] Finally, the overall feature vector v of the crystal is calculated through three fully connected layers. c Processing is performed to complete predictions from atomic structure to material properties.
[0120] In another exemplary embodiment of the present application, in order to quantitatively evaluate the performance of the method provided by the present application, the present implementation is illustrated by comparing the band gap (Bandgap) in the metal organic framework (Quantum Metal-Organic Framework, QMOF) data set with different methods [Sine CM (Sine Coulomb matrix, Sine Coulomb matrix), SM-45 (Stoichiometric-45), SM-120 (Stoichiometric-120), OFM (Orbital Field Matrix, Orbital Field Matrix), SOAP (Smooth Overlap of Atomic Positions), CGCNN (Crystal Graph Convolutional Neural Network), SchNet, GATGNN (Global Attention Graph Neural Network), GANN (Graph Attention Neural Network) and EdgeConv-GANN (this application)], and the average accuracy mean of five experiments is selected in this implementation. The smaller the mean absolute error MAE is, the higher the correlation coefficient ρ and the determination coefficient R 2 The larger the value, the higher the accuracy of the model. The prediction results of Bandgap in the QMOF dataset are shown in Table 1. Based on Table 1, it can be seen that the crystal prediction method proposed in this application is superior to the comparison method in all indicators.
[0121] Table 1 Bandgap prediction results in QMOF dataset
[0122] method MAE(eV) <![CDATA[R 2 ]]> ρ SineCM 0.529(0.008) 0.643(0.012) 0.787(0.008) SM-45 0.437(0.004) 0.743(0.006) 0.842(0.004) SM-120 0.433(0.010) 0.750(0.009) 0.847(0.005) OFM 0.417(0.008) 0.763(0.010) 0.863(0.003) SOAP 0.357(0.008) 0.822(0.010) 0.910(0.003) CGCNN 0.274(0.008) 0.876(0.011) 0.932(0.005) SchNet 0.258(0.008) 0.885(0.009) 0.937(0.005) GATGNN 0.260(0.005) 0.882(0.007) 0.935(0.004) GANN 0.235(0.005) 0.900(0.008) 0.946(0.006) EdgeConv-GANN (this application) 0.224(0.006) 0.910(0.010) 0.955(0.007)
[0123] In an exemplary embodiment, a computer device is provided. The computer device may be a server or a terminal. The internal structure diagram thereof may be as follows: Figure 7As shown. The computer device includes a processor, a memory, an input / output interface (Input / Output, referred to as I / O) and a communication interface. Among them, the processor, the memory and the input / output interface are connected through a system bus, and the communication interface is connected to the system bus through the input / output interface. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store crystal property prediction data based on graph neural networks. The input / output interface of the computer device is used to exchange information between the processor and an external device. The communication interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a crystal property prediction method based on a graph neural network is implemented.
[0124] Those skilled in the art will understand that Figure 7 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components. In an exemplary embodiment, a computer device is provided, including a memory and a processor, wherein a computer program is stored in the memory, and the processor implements the steps in the above-mentioned method embodiments when executing the computer program.
[0125] In an exemplary embodiment, a computer-readable storage medium is provided, storing a computer program, and when the computer program is executed by a processor, the steps in the above method embodiments are implemented.
[0126] In an exemplary embodiment, a computer program product is provided, including a computer program, and when the computer program is executed by a processor, the steps in the above method embodiments are implemented.
[0127] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with relevant regulations.
[0128] Those of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in the present application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM may be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM).
[0129] The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. The non-relational database may include a distributed database based on blockchain, etc., but is not limited thereto. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, etc., but is not limited thereto.
[0130] The technical features of the above embodiments may be arbitrarily combined. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0131] This article uses specific examples to illustrate the principles and implementation methods of this application. The description of the above embodiments is only used to help understand the method and core ideas of this application. At the same time, for those skilled in the art, according to the ideas of this application, there will be changes in the specific implementation methods and application scope. In summary, the content of this specification should not be understood as limiting this application.
Claims
1. A method for predicting crystal properties based on graph neural network, characterized in that: The crystal property prediction method based on graph neural network includes: The atoms of the crystal to be predicted are taken as nodes, and the atomic bonds are taken as edges, and the nodes and the edges are encoded to obtain node feature vectors and edge feature vectors to form a crystal graph; each node includes the atom type and the position coordinates of the atom; each edge includes the bond type and the bond strength; Based on the graph neural network architecture, the edge convolution operator and the related self-attention mechanism are introduced to construct a crystal property prediction model; along the data processing direction, the graph neural network architecture includes a convolution layer, an attention layer, a pooling layer, and a fully connected layer in sequence; The crystal graph is input into the crystal property prediction model to obtain a crystal property prediction result.
2. The method for predicting crystal properties based on graph neural network according to claim 1, characterized in that: Based on the graph neural network architecture, the edge convolution operator and related self-attention mechanism are introduced to construct a crystal property prediction model, including: Based on the graph neural network architecture, the edge convolution operator and related self-attention mechanism are introduced to build an initial crystal property prediction model; Acquire a sample training set and a sample test set; the sample training set and the sample test set both include sample pairs formed by a crystal image and a calibrated crystal property corresponding to the crystal image; Using the sample training set to train the initial crystal property prediction model to obtain a trained initial crystal property prediction model; The trained initial crystal property prediction model is tested using the sample test set until an output error of the trained initial crystal property prediction model meets a set threshold, thereby obtaining a trained initial crystal property prediction model; The trained initial crystal property prediction model is used as the crystal property prediction model.
3. The method for predicting crystal properties based on graph neural network according to claim 2, characterized in that: Based on the graph neural network architecture, the edge convolution operator and related self-attention mechanism are introduced to build an initial crystal property prediction model, including: The edge convolution operator is used as a new convolution form to replace the convolution form of the convolution layer in the graph neural network architecture to obtain a new convolution layer; Introducing the related self-attention mechanism into the graph neural network architecture to obtain a new attention layer; Based on the new convolutional layer and the new attention layer, the initial crystal property prediction model is obtained by combining the pooling layer and the fully connected layer.
4. The method for predicting crystal properties based on graph neural network according to claim 3, characterized in that: Inputting the crystal graph into the crystal property prediction model to obtain a crystal property prediction result, including: The crystal graph is input into a new convolutional layer of the crystal property prediction model to obtain convolutional layer output features; the convolutional layer output features are represented by a query matrix, a key matrix and a value matrix; the query matrix, the key matrix and the value matrix are all obtained through a new convolutional layer transformation; Determine attention weights based on the query matrix and the key matrix to obtain an attention weight matrix; Normalizing the attention weights in the attention weight matrix to obtain a final attention weight matrix; Using the relevant self-attention mechanism to obtain a relevant self-attention feature matrix based on the final attention weight matrix and the value matrix; Obtaining a relevant self-attention layer output feature matrix based on the relevant self-attention feature matrix and the convolutional layer output features; The pooling layer is used to perform a pooling operation on the feature matrix output by the self-attention layer to obtain the overall feature vector of the crystal; The overall feature vector of the crystal is processed using a fully connected layer to obtain the crystal property prediction result.
5. The method for predicting crystal properties based on graph neural network according to claim 4, characterized in that: The attention weight matrix is expressed as: In the formula, is the attention weight matrix, Softmax is the activation function, Q is the query matrix, T is the transpose of the matrix, and d a is the second dimension of the key matrix, and K is the key matrix.
6. The method for predicting crystal properties based on graph neural network according to claim 4, characterized in that: The attention weights in the attention weight matrix are normalized to obtain a final attention weight matrix, including: The attention weight is normalized to obtain the final attention weight; wherein the final attention weight is expressed as: The final attention weight matrix is obtained based on the final attention weight; wherein the final attention weight matrix is expressed as: A=[α i,j ]; Where A is the final attention weight matrix, α i,j is the final attention weight, is the attention weight, is the average of the i-th row of the attention weight matrix.
7. The method for predicting crystal properties based on graph neural network according to claim 4, characterized in that: The relevant self-attention feature matrix is expressed as: F csa =A·V; In the formula, F csa is the relevant self-attention feature matrix, A is the final attention weight matrix, and V is the value matrix of the new convolutional layer output.
8. The method for predicting crystal properties based on graph neural network according to claim 4, characterized in that: The output feature matrix of the related self-attention layer is expressed as: F out =LBR(F csa -F in )+F in ; In the formula, F out is the output feature of the new attention layer, F in is the feature input to the new attention layer, F csa is the related self-attention feature, and LBR represents a network containing linear, batch normalization, and ReLU activation functions.
9. The method for predicting crystal properties based on graph neural network according to claim 3, characterized in that: The LeakyReLU activation function is used as the activation function of the new convolutional layer.
10. The method for predicting crystal properties based on graph neural network according to claim 9, characterized in that: The node feature vector updated by the new convolutional layer is expressed as: In the formula, is the updated feature vector of node i, is the constructed crystal graph, is the new weight parameter, is the feature vector of node j, is the feature vector of node i, || represents the connector, and LeakyReLU is the activation function.
Citation Information
Patent Citations
Crystal property prediction and classification method based on attention mechanism and crystal graph volume neural network
CN113327652A
Layout preference prediction method based on deep learning model
CN115544239A
Material property prediction method, system and equipment based on graph neural network
CN116665809A
Non-embedding image steganography method and device based on bidirectional generative adversarial network
CN117176874A
Perovskite property prediction method based on graph neural network
CN117649896A
Cited By
Atomic feature updating method based on graph convolutional layer general inter-atomic potential energy model
CN120473016A
Crystal diagram network material property prediction method based on global attention mechanism
CN120748535A
Enterprise application complex service node optimization method and system based on graph neural network
CN120892607A
Material defect property prediction method and crystal diagram neural network construction method
CN121094000A
A material defect property prediction method and a crystal map neural network construction method
CN121094000B