Crystal Property Prediction Method and Device Based on Periodicity-Aware Attention Mechanism
Through the crystal properties prediction method of the layered attention mechanism, the problem of insufficient prediction accuracy caused by failure to fully consider the crystal periodicity in the prior art is solved, and a higher prediction accuracy of crystal properties is achieved.
Patent Information
- Application Number
- CN202310864957.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-07-14
- Publication Date
- 2025-07-11
- Estimated Expiration
- 2043-07-14
AI Technical Summary
The existing deep learning-based crystal properties prediction methods fail to fully consider the periodicity of the crystal, resulting in insufficient prediction accuracy.
A layered attention mechanism is adopted to ensure periodic constraints and improve the accuracy of crystal properties prediction through atomic embedding, single-cell attention and crystal attention mechanisms.
By considering the periodicity of the crystal, the accuracy of crystal properties prediction is improved and the periodic constraints of the crystal are met.
Smart Images

Figure CN116825239B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of crystal materials, and particularly relates to a method and device for predicting crystal properties based on a periodicity-aware attention mechanism. Background Art
[0002] The discovery of new materials is crucial for promoting social development. Crystals constitute a wide variety of materials, from solar panels in daily life to cutting-edge fields such as superconductors. The crystal structure can be accurately described by a basis and a Bravais lattice. The basis represents the arrangement of atoms in the crystal unit cell, and the Bravais lattice represents its periodicity. Theories in physics and computational materials science suggest that the properties of materials can be calculated through simulations based on their structures. However, traditional first-principles methods, such as density functional theory (DFT) and molecular dynamics (MD), are computationally intensive and time-consuming.
[0003] In recent years, deep learning-based methods have been proposed to predict the properties of crystal materials and have achieved satisfactory performance. For example, a method for predicting and classifying crystal properties based on an attention mechanism and a crystal graph convolutional neural network disclosed in the patent application with publication number CN113327652A. However, these methods do not fully consider the key component of crystals, i.e., periodicity. Another example is a method for training a crystal property prediction model disclosed in the patent application with publication number CN 115346616A, which predicts crystal properties based on atomic potential energy and also does not consider the periodicity of crystals. Summary of the Invention
[0004] In view of the above, the object of the present invention is to provide a method and device for predicting crystal properties based on a periodicity-aware attention mechanism, which uses a hierarchical attention mechanism to enforce the periodicity constraint of the crystal structure and improves the accuracy of crystal property prediction on the basis of fully considering the periodicity of the crystal structure.
[0005] To achieve the above object of the invention, a method for predicting crystal properties based on a periodicity-aware attention mechanism provided by an embodiment includes the following steps:
[0006] The crystal includes first atomic coordinates, atomic numbers, and lattice vectors, and is characterized by including the following steps:
[0007] Atom embedding: Embedding the atomic number into a multi-dimensional vector to obtain a first atomic vector;
[0008] Cell attention: After expanding the first atomic vector and the first atomic coordinates, the second atomic vector and the second atomic coordinates are obtained. The second atomic vector and the second atomic coordinates are input into the first fusion layer to obtain the first fusion vector. The first fusion vector is input into the first attention layer to obtain the first attention vector, and the first attention vector is output to the Set2Set layer to obtain the first cell representation vector;
[0009] Crystal attention: After expanding the first cell representation vector and the first cell coordinates, the second cell representation vector and the second cell coordinates are obtained. The second cell representation vector and the second cell coordinates are input into the second fusion layer to obtain the second fusion vector. The second fusion vector is input into the second attention layer to obtain the second attention vector, and the crystal representation vector is obtained from the second attention vector;
[0010] Crystal property prediction: Crystal property prediction is performed based on the crystal representation vector.
[0011] Preferably, in the atomic embedding step, the atomic number is embedded by using a first neural network. The atomic number is input into the first neural network and is embedded by the first neural network to obtain the first atomic vector.
[0012] Preferably, the first atomic coordinates are expanded to obtain the second atomic coordinates. The specific process is as follows:
[0013] P e ={P0, P1, …, P i}
[0014]
[0015] where P0 represents the first atomic coordinates, and P e represents the expanded second atomic coordinates, are the three lattice vectors respectively, is the i-th vector in U t , and P i represents the expanded atomic coordinates;
[0016] The first atomic vector is expanded to obtain the second atomic vector. The specific process is as follows:
[0017] A e ={A, A, …, A}
[0018] where A represents the first atomic vector, and A e represents the expanded second atomic vector, that is, A is replicated multiple times and arranged to obtain A e .
[0019] Preferably, the first fusion layer fuses the second atomic vector and the second atomic coordinates in the following way to obtain the first fusion vector:
[0020] First, calculate a set of relative coordinates centered on each atom as follows:
[0021]
[0022] Among them, P 0,i is the i-th atomic coordinate in the first atomic coordinates, and P e represents the second atomic coordinate, represents a set of relative coordinates calculated centered on the i-th atom;
[0023] Then, perform a fusion calculation based on the second atomic vector, specifically as follows:
[0024]
[0025] Among them, is the i-th first fusion vector, and W α is the first-dimensional parameter matrix used to transform the dimension of the atomic coordinates to be the same as that of the first fusion vector, and A e represents the second atomic vector.
[0026] Preferably, in the first attention layer, fuse the first fusion vectors of each atom and its neighboring atoms again to obtain the first attention vector of each atom, specifically:
[0027] First, transform the first fusion vector of the i-th atom from a d1-dimensional vector into a two-dimensional tensor with a shape of (d2, d1 / d2), and multiply it with W Q , W K and W V respectively to obtain the first attention parameter matrices {Q, K, V}, where W Q , W K and W V all have a shape of (d2, d1 / d2, d1 / d2);
[0028] Then, calculate the attention fusion data of the j-th atom in the i-th group where the i-th atom is located based on the following formula
[0029]
[0030]
[0031] Among them, q j represents the j-th component of the first attention parameter matrix Q, represents the dimension of the vector q j , K T is the transpose of the first attention parameter matrix K, and softmax(·) is the activation function, and scoresj denotes the activation score, Norm(·) denotes layer normalization, and scores j,m denotes the m-th component in scores j , and v m is the m-th component in the first attention parameter matrix V denotes the first fusion vector of the j-th atom calculated centered on the i-th atom, i.e., the first fusion vector and the j-th component in it
[0032] According to the attention fusion data obtain the first attention vector of the i-th group, and extract the first attention vector of the central atom from the first attention vector of the i-th group
[0033] Then, reshape the first attention vector from a two-dimensional tensor of shape (d2, d1 / d2) into a single d1-dimensional vector
[0034] Preferably, expand the first unit cell coordinates to obtain the second unit cell coordinates. The specific process is as follows
[0035]
[0036] where p b,0 = 0, 0, 0, represents the first unit cell coordinates are the three lattice vectors respectively is the i-th vector in U t and p b,i represents the i-th component of the expanded second unit cell coordinates. The second unit cell coordinates P b are as follows
[0037] P b = {p b,0 , p b,1 , …, p b,i}
[0038] Expand the first unit cell representation vector to obtain the second unit cell representation vector. The specific process is as follows
[0039] B = {b0, b1, …, b i}
[0040] where b i = b represents the first unit cell representation vector, and B represents the expanded second unit cell representation vector
[0041] Preferably, the second fusion layer fuses the second unit cell representation vector and the second unit cell coordinates in the following way to obtain the second fusion vector
[0042] B agg = B + W β × P b
[0043] Wherein, B agg represents the second fusion vector, W β is the second-dimensional parameter matrix for transforming the dimension of the unit cell coordinates to be the same as that of the second fusion vector. B represents the second unit cell representation vector, and P b represents the second unit cell coordinates.
[0044] Preferably, in the second attention layer, the second fusion vectors of each unit cell and its other unit cells are fused again to obtain the second attention vector of each unit cell. Specifically:
[0045] The second fusion vector of the unit cell is transformed from a vector of dimension d1 to a two-dimensional tensor of shape (d2, d1 / d2) by reshape, and is multiplied by W' Q , W' K and W' V respectively to obtain the second attention parameter matrices {Q′, K′, V′}, where the shapes of W' Q , W' K and W' V are all (d2, d1 / d2, d1 / d2). Based on the second attention parameter matrices, the second fusion vectors of the i-th unit cell and its other unit cells are subjected to attention fusion to obtain the second attention vector of the i-th unit cell, and then the second attention vector is transformed from a two-dimensional tensor of shape (d2, d1 / d2) to a single d1-dimensional vector by reshape.
[0046] Preferably, in the crystal property prediction step, a second neural network is used to predict the crystal properties. The crystal representation vector is input into the second neural network, and the crystal properties are obtained through the output of the second neural network.
[0047] To achieve the above-mentioned invention object, an apparatus for predicting crystal properties based on a periodic perception attention mechanism provided by an embodiment includes a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the steps of the above-mentioned method for predicting crystal properties based on a periodic perception attention mechanism are implemented.
[0048] To implement the above-mentioned invention object, an embodiment also provides an apparatus for predicting crystal properties based on a periodic perception attention mechanism, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the steps of the above-mentioned method for predicting crystal properties based on a periodic perception attention mechanism are implemented.
[0049] Compared with the prior art, the beneficial effects of the present invention at least include:
[0050] Regarding the important characteristics of crystal periodicity, the use of unit cell attention and crystal attention mechanisms makes the surrounding environments of atoms or unit cells at periodic distances the same, thereby satisfying the periodic constraints of the crystal in calculations. Furthermore, the accuracy of crystal property prediction is improved. BRIEF DESCRIPTION OF THE DRAWINGS
[0051] In order to more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the following will briefly introduce the accompanying drawings required for use in the description of the embodiments or the prior art. Obviously, the accompanying drawings in the following description are only some embodiments of the present invention. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative efforts.
[0052] Figure 1 is a flowchart of the crystal property prediction method based on the periodicity-aware attention mechanism provided by the embodiment;
[0053] Figure 2 is a schematic structural diagram of the second neural network provided by the embodiment. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0054] To make the objectives, technical solutions, and advantages of the present invention more clearly understood, the following further details the present invention with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and do not limit the protection scope of the present invention.
[0055] Figure 1 is a flowchart of the crystal property prediction method based on the periodicity-aware attention mechanism provided by the embodiment. As Figure 1 shown, the crystal property prediction method based on the periodicity-aware attention mechanism provided by the embodiment includes the following steps:
[0056] Step 1, atomic embedding: Embed the atomic number into a multi-dimensional vector to obtain the first atomic vector.
[0057] Each crystal is characterized by the first atomic coordinates, atomic numbers, and lattice vectors. During atomic embedding, the first neural network is used to embed the atomic number set. The atomic number set is input into the first neural network, and after being embedded by the first neural network, a first atomic vector with a dimension of 64 is obtained.
[0058] Step 2, unit cell attention: After expanding the first atomic vector and the first atomic coordinates, the second atomic vector and the second atomic coordinates are obtained. The second atomic vector and the second atomic coordinates are input into the first fusion layer to obtain the first fusion vector. The first fusion vector is input into the first attention layer to obtain the first attention vector. The first attention vector is output to the Set2Set layer to obtain the first unit cell representation vector.
[0059] In the embodiment, the process of expanding the first atomic coordinates to obtain the second atomic coordinates is as follows:
[0060] P e ={P0, P1, …, P i}
[0061]
[0062] where P0 represents the first atomic coordinates, and P e represents the expanded second atomic coordinates. are three lattice vectors respectively. is the i-th vector in U t , and P i represents the expanded atomic coordinates. Specifically, i takes the value of 26, that is, the second atomic coordinates P e ={P0, P1, …, P 26}.
[0063] The process of expanding the first atomic vector to obtain the second atomic vector is as follows:
[0064] A e ={A, A, …, A}
[0065] where A represents the first atomic vector, and A e represents the expanded second atomic vector, that is, A is obtained by replicating A multiple times and arranging them. e Specifically, 27 copies are replicated.
[0066] In the embodiment, the first fusion layer fuses the second atomic vector and the second atomic coordinates in the following way to obtain the first fusion vector:
[0067] Calculate a set of relative coordinates centered on each atom, and perform a fusion calculation based on each set of relative coordinates and the second atomic vector. It is expressed by the formula:
[0068]
[0069]
[0070] where P 0,i is the i-th atomic coordinate in the first atomic coordinates, and Pe Represents the second atomic coordinate, Represents a set of relative coordinates calculated with the i-th atom as the center, Is the i-th first fusion vector, W α Is the first-dimensional parameter matrix, used to transform the dimension of the atomic coordinate to be the same as that of the first fusion vector, A e Represents the second atomic vector.
[0071] In the embodiment, in the first attention layer, the first fusion vectors of each atom and its neighboring atoms are fused again to obtain the first attention vector of each atom, specifically:
[0072] First, the first fusion vector of the i-th atom is transformed from a d1-dimensional vector into a two-dimensional tensor with a shape of (d2, d1 / d2), and is multiplied by W Q , W K And W V To obtain the first attention parameter matrices {Q, K, V}, where W Q , W K And W V All have a shape of (d2, d1 / d2, d1 / d2);
[0073] Then, based on the following formula, calculate the attention fusion data of the j-th atom in the i-th group where the i-th atom is located
[0074]
[0075]
[0076] Among them, q j Represents the j-th component of the first attention parameter matrix Q, Represents the vector q j 's dimension, K T Is the transpose of the first attention parameter matrix K, softmax(·) is the activation function, scores j Represents the activation score, Norm(·) represents layer normalization, scores j,m Represents scores j The m-th component in, v m Is the m-th component in the first attention parameter matrix V, Represents the first fusion vector of the j-th atom calculated with the i-th atom as the center, that is, the j-th component in the first fusion vector ;
[0077] According to the attention fusion data Obtain the first attention vector of the $i$-th group, and extract the first attention vector of the central atom from the first attention vector of the $i$-th group;
[0078] Then, through reshape, the first attention vector is changed from a two-dimensional tensor with a shape of ($d_2$, $d_1 / d_2$) to a single $d_1$-dimensional vector.
[0079] In the embodiment, after obtaining the first attention vector, the Set2Set layer is used to calculate the first attention vector to obtain the first unit cell representation vector, and this first unit cell representation vector is used as the input of the crystal attention.
[0080] Step 3, crystal attention: After expanding the first unit cell representation vector and the first unit cell coordinates, obtain the second unit cell representation vector and the second unit cell coordinates. Input the second unit cell representation vector and the second unit cell coordinates into the second fusion layer to obtain the second fusion vector. Input the second fusion vector into the second attention layer to obtain the second attention vector, and obtain the crystal representation vector from the second attention vector.
[0081] In the embodiment, expanding the first unit cell coordinates to obtain the second unit cell coordinates, the specific process is:
[0082]
[0083] Among them, $p$ b,0 = 0, 0, 0 represents the first unit cell coordinates, $p$ b,i represents the $i$-th component of the second unit cell coordinates obtained by expansion, and the second unit cell coordinates $P$ b are:
[0084] $P$ b = {$p$ b,0 , $p$ b,1 , …, $p$ b,i}
[0085] Specifically, $i$ takes the value of 26, that is, the second unit cell coordinates $P$ b = {$p$ b,0 , $p$ b,1 , …, $p$ b,26}.
[0086] Expanding the first unit cell representation vector to obtain the second unit cell representation vector, the specific process is:
[0087] $B$ = {$b_0$, $b_1$, …, $b$ i}
[0088] Among them, $b$ i = $b$ represents the first unit cell representation vector, $B$ represents the second unit cell representation vector obtained by expansion. Specifically, $i$ takes the value of 26, that is, $B$ = {$b_0$, $b_1$, …, $b$ 26}.
[0089] In the embodiment, the second fusion layer fuses the second unit cell representation vector and the second unit cell coordinates in the following manner to obtain a second fusion vector:
[0090] B agg = B + W β × P b
[0091] where B agg represents the second fusion vector, W β is a second-dimensional parameter matrix used to transform the dimension of the unit cell coordinates to be the same as the dimension of the second fusion vector, B represents the second unit cell representation vector, and P b represents the second unit cell coordinates.
[0092] In the embodiment, in the second attention layer, the second fusion vectors of each unit cell and its other unit cells are fused again to obtain the second attention vector of each unit cell, specifically:
[0093] The second fusion vector of the unit cell is transformed from a vector of dimension d1 to a two-dimensional tensor of shape (d2, d1 / d2) through reshape, and is multiplied by W' Q , W' K and W' V respectively to obtain a second attention parameter matrix {Q′, K′, V′}, where the shapes of W' Q , W' K and W' V are all (d2, d1 / d2, d1 / d2). Based on the second attention parameter matrix, the second fusion vectors of the i-th unit cell and its other unit cells are subjected to attention fusion to obtain the second attention vector of the i-th unit cell, and then the second attention vector is transformed from a two-dimensional tensor of shape (d2, d1 / d2) to a single vector of dimension d1 through reshape.
[0094] Step 4, crystal property prediction: Predict the crystal properties based on the crystal representation vector.
[0095] In the embodiment, a second neural network as shown in Figure 2 is used to predict the crystal properties. The crystal representation vector is input into the second neural network, and the crystal properties are obtained through the output of the second neural network.
[0096] For the crystal property prediction based on the periodic perception attention mechanism provided in the above embodiment, the atomic number is specifically embedded into a high-dimensional vector, and through the extended fusion and attention mechanism in the unit cell attention, it is ensured that the surrounding environments of atoms with periodic distances are the same, and through the extended fusion in the crystal attention mechanism, it is ensured that the surrounding environments of unit cells with periodic distances are the same, so as to satisfy the periodic constraints of the crystal in the calculation. This method and device improve the accuracy of crystal properties.
[0097] Based on the same inventive concept, the embodiment also provides a crystal property prediction device based on a periodic perception attention mechanism, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the above-mentioned crystal property prediction method based on the periodic perception attention mechanism is implemented, including the following steps:
[0098] Step 1, atomic embedding: Embed the atomic number into a multi-dimensional vector to obtain a first atomic vector;
[0099] Step 2, unit cell attention: After expanding the first atomic vector and the first atomic coordinates, obtain a second atomic vector and second atomic coordinates. Input the second atomic vector and the second atomic coordinates into a first fusion layer to obtain a first fusion vector. Input the first fusion vector into a first attention layer to obtain a first attention vector. Output the first attention vector to the Set2Set layer to obtain a first unit cell representation vector;
[0100] Step 3, crystal attention: After expanding the first unit cell representation vector and the first unit cell coordinates, obtain a second unit cell representation vector and second unit cell coordinates. Input the second unit cell representation vector and the second unit cell coordinates into a second fusion layer to obtain a second fusion vector. Input the second fusion vector into a second attention layer to obtain a second attention vector. Obtain a crystal representation vector from the second attention vector;
[0101] Step 4, crystal property prediction: Perform crystal property prediction based on the crystal representation vector.
[0102] In practical applications, the memory can be a volatile memory in the proximal end, such as RAM, or a non-volatile memory, such as ROM, FLASH, floppy disk, mechanical hard disk, etc., or it can also be a remote storage cloud. The processor can be a central processing unit (CPU), a microprocessor (MPU), a digital signal processor (DSP), or a field programmable gate array (FPGA), that is, the steps of the crystal property prediction method based on the periodic perception attention mechanism can be implemented through these processors.
[0103] The above-mentioned specific embodiments have detailed the technical solutions and beneficial effects of the present invention. It should be understood that the above is only the most preferred embodiment of the present invention and is not used to limit the present invention. Any modifications, supplements, equivalent replacements, etc. made within the principle scope of the present invention shall be included within the protection scope of the present invention.
Claims
1. A method for predicting crystal properties based on a periodic perception attention mechanism, wherein the crystal includes first atomic coordinates, atomic numbers, and lattice vectors, characterized in that, It includes the following steps: Atom embedding: Embedding the atomic number into a multi-dimensional vector to obtain the first atomic vector; Unit cell attention: After expanding the first atomic vector and the first atomic coordinates, obtaining the second atomic vector and the second atomic coordinates, inputting the second atomic vector and the second atomic coordinates into the first fusion layer to obtain the first fusion vector, inputting the first fusion vector into the first attention layer to obtain the first attention vector. In the first attention layer, fusing the first fusion vectors of each atom and its neighboring atoms again to obtain the first attention vector of each atom, and outputting the first attention vector to the Set2Set layer to obtain the first unit cell representation vector; Crystal attention: After expanding the first unit cell representation vector and the first unit cell coordinates, obtaining the second unit cell representation vector and the second unit cell coordinates, inputting the second unit cell representation vector and the second unit cell coordinates into the second fusion layer to obtain the second fusion vector, inputting the second fusion vector into the second attention layer to obtain the second attention vector. In the second attention layer, fusing the second fusion vectors of each unit cell and other unit cells again to obtain the second attention vector of each unit cell, and obtaining the crystal representation vector from the second attention vector; Crystal property prediction: Predicting the crystal properties based on the crystal representation vector.
2. The crystal property prediction method based on a periodicity-aware attention mechanism according to claim 1, wherein In the atom embedding step, a first neural network is used to embed the atomic number. The atomic number is input into the first neural network and is embedded by the first neural network to obtain the first atomic vector.
3. The crystal property prediction method based on the periodic perception attention mechanism according to claim 1, wherein Expanding the first atomic coordinates to obtain the second atomic coordinates. The specific process is as follows: P e = {P0, P1, …, P i} Among them, P0 represents the first atomic coordinate, P e represents the second atomic coordinate obtained by expansion, are three lattice vectors respectively, is the i-th vector in U t , and P i represents the expanded atomic coordinate; Expanding the first atomic vector to obtain the second atomic vector. The specific process is as follows: A e = {A, A, …, A} Among them, A represents the first atomic vector, A e represents the second atomic vector obtained by expansion, that is, A is obtained by copying A multiple times and arranging them e .
4. The crystal property prediction method based on the periodic perception attention mechanism according to claim 1, characterized in that The first fusion layer fuses the second atomic vector and the second atomic coordinates in the following way to obtain the first fusion vector: First, calculate a set of relative coordinates centered on each atom as follows: where P 0,i is the i-th atomic coordinate in the first atomic coordinates, and P e represents the second atomic coordinate, representing a set of relative coordinates calculated with the i-th atom as the center; Then, perform a fusion calculation based on the second atomic vector, specifically as follows: Among them, is the i-th first fusion vector, and W α is the first-dimensional parameter matrix, which is used to transform the dimension of the atomic coordinates to be the same as that of the first fusion vector. A e represents the second atomic vector.
5. The crystal property prediction method based on a periodic perception attention mechanism according to claim 4, wherein, In the first attention layer, fusing the first fusion vectors of each atom and its neighboring atoms again to obtain the first attention vector of each atom, specifically as follows: First, transform the first fusion vector of the i-th atom from a d1-dimensional vector into a two-dimensional tensor of shape (d2, d1 / d2), and multiply it with W Q , W K , and W V respectively to obtain the first attention parameter matrices {Q, K, V}, where the shapes of W Q , W K , and W V are all (d2, d1 / d2, d1 / d2); Then, calculate the attention fusion data of the j-th atom in the i-th group where the i-th atom is located based on the following formula where q j represents the j-th component of the first attention parameter matrix Q, represents the dimension of the vector q j K T is the transpose of the first attention parameter matrix K, softmax(·) is the activation function, and scores j represents the activation scores, Norm(·) represents layer normalization, and scores j,m represents scores j the m-th component in m v is the m-th component of the first attention parameter matrix V, represents the first fusion vector of the j-th atom calculated centered at the i-th atom, i.e., the j-th component in the first fusion vector According to the attention fusion data Obtain the first attention vector of the i-th group, and extract the first attention vector of the central atom from the first attention vector of the i-th group; Then, through reshape, the first attention vector is changed from a two-dimensional tensor with a shape of (d2, d1 / d2) to a single d1-dimensional vector.
6. The crystal property prediction method based on the periodic perception attention mechanism according to claim 1, characterized in that, Expanding the first unit cell coordinates to obtain the second unit cell coordinates. The specific process is as follows: where p b,0 =(0, 0, 0) represents the coordinates of the first unit cell, are the three lattice vectors respectively, is the i-th vector in U t , and p b,i represents the i-th component of the extended second unit cell coordinates. The second unit cell coordinates P b are as follows: P b = {p b,0 , p b,1 , …, p b,i} Expanding the first unit cell representation vector to obtain the second unit cell representation vector. The specific process is as follows: B = {b0, b1, …, b i} Among them, b i = b represents the first unit cell characterization vector, and B represents the second unit cell characterization vector obtained by extension.
7. The crystal property prediction method based on the periodic perception attention mechanism according to claim 1, wherein The second fusion layer fuses the second unit cell representation vector and the second unit cell coordinates in the following way to obtain the second fusion vector: B agg = B + W β × P b Among them, B agg represents the second fusion vector, W β is the second-dimensional parameter matrix, which is used to transform the dimension of the unit cell coordinates to be the same as that of the second fusion vector. B represents the second unit cell representation vector, and P b represents the second unit cell coordinates.
8. The crystal property prediction method based on a periodicity-aware attention mechanism according to claim 1, wherein In the second attention layer, fusing the second fusion vectors of each unit cell and other unit cells again to obtain the second attention vector of each unit cell, specifically as follows: The second fusion vector of the single cell is transformed from a vector of dimension d1 to a two-dimensional tensor of shape (d2, d1 / d2) by reshape, and is multiplied by W’ Q , W’ K and W’ V respectively to obtain the second attention parameter matrices {Q′, K′, V′}, where the shapes of W’ Q , W’ K and W’ V are all (d2, d1 / d2, d1 / d2). The second fusion vectors of the i-th single cell and other single cells are subjected to attention fusion based on the second attention parameter matrices to obtain the second attention vector of the i-th single cell, and then the second attention vector is transformed from a two-dimensional tensor of shape (d2, d1 / d2) to a single vector of dimension d1 by reshape.
9. The crystal property prediction method based on the periodic perception attention mechanism according to claim 1, characterized in that In the crystal property prediction step, a second neural network is used to predict the crystal properties. The crystal representation vector is input into the second neural network, and the crystal properties are output after passing through the second neural network.
10. A crystal property prediction device based on a periodic perception attention mechanism, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the steps of the crystal property prediction method based on the periodic perception attention mechanism according to any one of claims 1-9.
Citation Information
Patent Citations
Crystal property prediction model training method and device and computer equipment
CN115346616A
Crystal property prediction and classification method based on attention mechanism and crystal graph volume neural network
CN113327652A
Superconducting material prediction method and device based on pre-trained deep neural network
CN115238575A