A crystal property prediction method and model based on graph convolution and attention mechanism

By combining graph convolution and attention mechanisms, the shortcomings of existing crystal graph neural networks in multi-scale interaction and directional interaction representation are overcome, achieving high-precision crystal property prediction, applicable to property prediction of various crystal systems such as inorganic crystals and perovskites.

CN122177271APending Publication Date: 2026-06-09FUDAN UNIVERSITY

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
FUDAN UNIVERSITY
Filing Date
2026-02-26
Publication Date
2026-06-09

Smart Images

  • Figure CN122177271A_ABST
    Figure CN122177271A_ABST
Patent Text Reader

Abstract

The present application relates to the technical field of crystal material property prediction, and in particular to a crystal property prediction method and model based on graph convolution and attention mechanism, which first one-hot encodes and projects atomic key physical properties as node features, then calculates local and global potential edge features and fuses them, combines atomic geometric information to generate directional edge features through a directional message passing network, inputs the multi-source edge features and node features into a graph convolution network to complete feature iterative updating, dynamically filters the features through element-by-element gating attention mechanism, obtains a crystal-level global representation through global pooling, and inputs the crystal-level global representation into a fully connected network to output a prediction result. The model corresponds to three major modules of input, interaction and output, can accurately model atomic multi-scale interactions, explicitly represent directional interactions, dynamically adjust feature weights, has excellent prediction accuracy and generalization ability, and is suitable for property prediction of various crystal systems.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of crystal material property prediction technology, and in particular to a crystal property prediction method and model based on graph convolution and attention mechanism, which is applicable to the accurate prediction of properties such as formation energy, band gap, thermodynamic stability, and modulus of various crystal systems such as inorganic crystals and perovskites. Background Technology

[0002] Predicting the properties of crystalline materials is a core issue in materials science research and industrial applications. Traditional experimental methods are time-consuming, labor-intensive, and resource-intensive, and struggle to cover a vast array of potential crystal structures. With the development of artificial intelligence, graph neural networks (GNNs) have become the mainstream technology for crystal property prediction due to their natural adaptability to the atomic topology of crystals.

[0003] However, existing crystal graph neural network models have three major flaws: First, they only construct local crystal graphs based on distance truncation, which can only capture short-range interactions and ignore long-range physical potential energy interactions between atoms within the crystal, resulting in insufficient prediction accuracy for properties such as crystal formation energy that depend on global perception. Second, most existing models only consider two-body interactions between atom pairs and fail to effectively capture three-body or multi-body interactions between atoms, especially directional information such as bond angles, which severely limits the model's ability to represent complex local geometric structures of crystals. Third, during the flow of message updates, the interaction features from different physical sources have different importance, and the model lacks a dynamic adjustment mechanism to evaluate the importance weights of different information, and deep networks are prone to node oversmoothing.

[0004] In existing technologies, some solutions attempt to combine graph convolution and attention mechanisms to optimize prediction performance, but significant limitations remain: some fail to incorporate global situational energy features, relying solely on local features for modeling; some do not encode directional information, failing to capture complex geometric structures; and some attention mechanisms only operate at the node level or inter-layer global level, unable to achieve precise feature-dimensional filtering. These shortcomings result in existing models failing to meet practical application requirements in terms of prediction accuracy, generalization ability, and physical interpretability. Therefore, a technical solution is urgently needed that can simultaneously address long-range interaction modeling, directional interaction representation, and dynamic feature filtering. Summary of the Invention

[0005] The purpose of this invention is to overcome the problems of the prior art and provide a crystal property prediction method and model based on graph convolution and attention mechanisms. This addresses the technical problems of existing crystal graph neural networks, such as their inability to accurately model multi-scale atomic interactions, difficulty in characterizing three-body / multi-body directional interactions, and the lack of a dynamic feature weight adjustment mechanism leading to low prediction accuracy. Specifically, these problems manifest as follows: 1) Inability to accurately model multi-scale (short-range + long-range) interactions between atoms within a crystal, neglecting long-range physical potential energy effects; 2) Inability to effectively characterize the directional information of three-body / multi-body interactions between atoms, resulting in insufficient characterization ability for complex local crystal geometries; 3) Lack of a dynamic weight adjustment mechanism for features from different sources, making it difficult to distinguish feature importance, susceptible to noise features, and prone to oversmoothing in deep networks.

[0006] The above objectives are achieved through the following technical solutions: A method and model for predicting crystal properties based on graph convolution and attention mechanisms, comprising the following steps: Step (1) Atomic property encoding: The nine key physical properties of each atom in the crystal are encoded using one-hot encoding based on interval partitioning, and the resulting 93-dimensional initial feature vector is generated by splicing. The feature vector is then projected through a fully connected layer to obtain the node features of the hidden layer space of the model. ; Step (2) Construction of multi-scale potential edge features: Calculate the local Coulomb potential edge features and the global infinite potential edge features between atoms respectively, and obtain 256-dimensional local potential edge features after dimension matching. and the overall situation and its characteristics ; Step (3) Construction of directional interaction features: Combining the radial distance and bond angle information between atoms, the joint geometric representation of the atomic triples is encoded by radial basis functions and spherical Bessel functions. A 256-dimensional directional edge feature is generated through a multi-level residual nested directional message passing network. ; Step (4) Multi-source feature fusion map convolution: Convolution of local potential features Overall situation characteristics directional interaction feature vector splicing into uniform edge features The node features are then input into a 3-layer graph convolutional network, and the node features are iteratively updated through gating mechanisms and residual connections. Step (5) Element-wise gating attention mechanism processing: Map the node features output by graph convolution to Q / K / V vectors, fuse node and edge features to calculate attention weights per feature dimension, and obtain the final node features after dynamic filtering of feature channels. ;

[0007] Step (6) Global pooling and prediction: For the final node features Global average pooling is performed to obtain a crystal-level global representation G. G is then input into a fully connected network with Softplus activation, which maps the representation to the target attribute space and outputs the crystal property prediction results.

[0008] As a further optimization of this method, the nine key physical properties mentioned in step (1) include group number, period number, electronegativity, covalent radius, number of valence electrons, first ionization energy, electron affinity, region, and atomic volume.

[0009] As a further optimization of this method, the calculation process of the local Coulomb potential edge characteristics in step (2) is as follows: first calculate the Coulomb potential of the atomic pairs within the cutoff radius and simplify it to: , Then, by embedding 256 Gaussian radial basis functions with centers ranging from -4.0 to 4.0, and then performing SiLU activation and linear transformation, the local potential energy characteristics are obtained. .

[0010] As a further optimization of this method, the calculation process of the global infinite potential edge feature in step (2) is as follows: integrating the Coulomb potential London dispersion potential Pauli repulsion potential Obtaining global infinite potential energy After expansion with 64 RBF kernels centered between -4.0 and 4.0, the local potential energy features are obtained by upscaling to 256 dimensions using an MLP with linear transformation, Softplus activation, and batch normalization. ,in: , =0.801、 =0.074、 =3.0、 =0.145.

[0011] As a further optimization of this method, the implementation process of the directional message passing network in step (3) is as follows: first, the atom type and radial geometric features are fused to generate the initial side message. Then map it to a direct component. and neighbor's share The neighbor components are modulated by Hadamard product, downsampled, and then their angle information is encoded by spherical Bessel function. After weighted aggregation and upsampling, they are fused with the directly connected components. Finally, the updated directional edge features are obtained through two-level residual connections. .

[0012] As a further optimization of this method, the message passing process of the 3-layer graph convolutional network in step (4) is as follows: first, the features of the center node, the features of the neighbor nodes, and the edge features are concatenated into a comprehensive message source. Then, two parallel linear transformations are used to generate gating coefficients to adjust the information flow. Finally, neighbor node messages are aggregated and connected with the feature residuals of the original central node to complete the node feature update.

[0013] As a further optimization of this method, the specific implementation of the element-wise gating attention mechanism in step (5) is as follows: First, the node features and edge features are mapped to the attention space using a linear layer transformation to obtain the feature vector; in order to capture the complex interaction between the center node features, neighbor features, and edge features, the three are concatenated to obtain the key vector k. ij Sum vector v ij To align the dimensions with the key and value vectors, the query vector is copied and concatenated three times to obtain q. ij Attention weights are calculated per-feature dimension using the Hadamard product, then gated to a [0,1] interval using the Sigmoid function. The value vector is then filtered, and the filtered neighbor messages are aggregated and concatenated with the residuals of the original node features to obtain the final node features. .

[0014] As a further optimization of this method, the global average pooling calculation formula in step (6) is as follows: , in, The total number of atoms in the crystal. It has a crystal structure; the output formula of the fully connected network is: .

[0015] A crystal property prediction model based on graph convolution and attention mechanism includes three main modules: input module, interaction module, and output module. The input module includes an atomic property encoding unit, a multi-scale potential edge feature unit, and a directional interaction feature unit. The interaction module includes a 3-layer multi-source feature fusion graph convolutional network and an element-wise gated attention mechanism unit. The output module includes a global average pooling unit and a fully connected prediction unit. The atomic attribute encoding unit is used to one-hot encode the nine types of physical attributes of atoms and project them as node features; The multi-scale potential energy edge feature unit is used to calculate and output 256-dimensional local potential energy edge features. and the overall situation and its characteristics ; The directional interaction feature unit is used to encode the geometric information of atomic triples and output 256-dimensional directional edge features. ; The multi-source feature fusion graph convolutional network is used to aggregate multi-source edge features and node features and complete iterative updates; The element-wise gating attention mechanism unit is used to dynamically adjust the importance of feature channels and output... ; The output module is used to aggregate atomic-level features into crystal-level features and output property prediction results.

[0016] As a further optimization of this model, the directional interaction feature unit uses radial basis functions and spherical Bessel functions to jointly encode geometric information, and incorporates a multi-level residual nesting structure; both the multi-source feature fusion graph convolutional network and the element-wise gated attention mechanism unit are equipped with residual connections, and the local potential edge features... The global situational energy edge features The directional edge features All dimensions are 256.

[0017] This invention provides a crystal property prediction method and model based on graph convolution and attention mechanisms. Through multi-scale potential energy fusion, directional message passing, and element-wise gated attention mechanisms, it achieves accurate modeling of multi-scale interactions in crystals, effective characterization of complex geometric structures, and dynamic feature selection, significantly improving prediction accuracy and generalization ability. This model can accurately model atomic multi-scale interactions, explicitly characterize directional interactions, dynamically adjust feature weights, and exhibit excellent prediction accuracy and generalization ability, making it suitable for property prediction in various crystal systems. Attached Figure Description

[0018] Figure 1 This is the overall architecture diagram of a crystal property prediction model based on graph convolution and attention mechanism as described in this invention; it shows the complete architecture of the CAPNet model from the input module, interaction module to the output module, and presents the connection relationship of each module, data flow and core computing unit, which is the core overview diagram of the model; Figure 2 This is a schematic diagram of the directional message passing network in the crystal property prediction method based on graph convolution and attention mechanism described in this invention; the hierarchical structure of the directional message passing network is broken down in detail, including key steps such as node embedding, edge message preprocessing, SBF encoding, and residual connection, which is consistent with the implementation process of the directional interaction feature unit of this invention; Figure 3 This is a schematic diagram of a multi-source feature fusion graph convolutional network in a crystal property prediction method based on graph convolution and attention mechanisms as described in this invention. Figure 4 This is a schematic diagram of the element-wise gated attention mechanism in the crystal property prediction method based on graph convolution and attention mechanism described in this invention; it intuitively shows the complete chain of the element-wise gated attention mechanism, including Q / K / V mapping, edge feature fusion, Hadamard product calculation, and gated screening, which is consistent with the working principle of the element-wise gated attention mechanism unit of this invention. Detailed Implementation

[0019] The present invention will now be described in further detail with reference to the accompanying drawings and embodiments. The described embodiments are merely some, not all, of the embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0020] This scheme provides a method and model for predicting crystal properties based on graph convolution and attention mechanisms, such as... Figure 1 As shown, the model is named CAPNet and mainly consists of three modules: input module, interaction module, and output module.

[0021] 1. Input module: Construction of a crystal diagram integrating potential energy and direction information. The input module is used to convert the crystal structure into a crystal diagram, complete the atomic node feature encoding and multi-source edge feature construction, and integrate three edge features: local Coulomb potential energy, global infinite potential energy and directional message passing, to form a comprehensive edge feature that includes distance, potential energy and angle.

[0022] (1) Atomic attribute encoding Atoms are represented as nodes, and a one-hot encoding strategy based on interval partitioning is used to encode nine key physical properties of atoms (group number, period number, electronegativity, covalent radius, number of valence electrons, first ionization energy, electron affinity, region, and atomic volume). For each physical property, several numerical intervals covering the value range of common elements are predefined. If the property value of an atom falls within a specific interval, the corresponding position in the dimension vector of that property is set to 1, and the rest are set to 0.

[0023] Table 1 Attribute partitioning and dimension configuration of initial atomic feature encoding , As shown in Table 1, the encoding vectors of the nine attribute categories are concatenated to generate an initial 93-dimensional feature vector for each atom. The number of encoding categories for each attribute are as follows: group number 18, period number 9, electronegativity 10, covalent radius 10, valence electron number 12, first ionization energy 10, electron affinity 10, region 4, and atom volume 10. Finally, this original feature vector is projected onto the hidden layer space of the model through a fully connected layer to obtain the initial node features. .

[0024] (2) Local and global situation characteristics In the graph representation, interatomic potential energy is introduced as an edge feature, which is divided into short-range potential energy based on local crystal graph and global infinite potential energy based on global crystal graph. Both are processed into 256-dimensional feature vectors to achieve dimension alignment.

[0025] Local Coulomb potential edge characteristics: Considering only the Coulomb potential between atomic pairs, the expression for the Coulomb potential is: , in and They are atoms and nuclear charge number, This represents their Euclidean distance. , and These are physical constants. Because... From atomic embedding, the Coulomb potential can be deduced to simplify to: , here, It is a learnable hyperparameter. The Euclidean distance is calculated by identifying neighboring atoms within the cutoff radius of the unit cell. An embedding strategy based on Gaussian radial basis functions (GRBF) is used to transform the scalar potential energy into a high-dimensional eigenvector. The Gaussian radial basis function is represented as: , By using 256 RBF cores with a center range evenly distributed in the range of -4.0 to 4.0 The feature vectors are then characterized and nonlinearly transformed to enhance their expressive power, resulting in a 256-dimensional local edge feature representation vector. : , Global Infinite Potential Edge Characteristics: By approximating the Ewald summation by considering the Coulomb potential, London dispersion potential, and Pauli repulsion potential, long-range interactions are captured. The corresponding expressions for the three types of potential characteristics are: , The overall global situational energy characteristics are calculated as follows, where and These parameters are obtained through grid search: , The overall situational energy feature s_{infinite} is expanded using 64 RBF kernels with a center range of -4.0 to 4.0. The resulting 64-dimensional vector is then up-projected through a multilayer perceptron (MLP) to obtain a 256-dimensional output representation. The projection process includes linear transformation, Softplus activation function, and batch normalization. The specific formula implementation is as follows: .

[0026] (3) Directional interaction characteristics of many-body interactions like Figure 2 As shown, combining the distance between atoms and angle A joint geometric representation of atomic triples is constructed, and radial distance dependence and angular dependence are encoded by radial basis functions (RBF) and spherical Bessel functions (SBF), respectively. A 256-dimensional directional edge feature is generated through a directional message passing network. .

[0027] The radial basis function is defined as: , in, It is an atom and Inter-space distance, It is the cutoff distance. It is a parameter that controls the oscillation frequency, and this function provides an orthogonal basis representation for the distance-dependent part of the interaction.

[0028] The spherical Bessel function combines radial distance and angular information and is defined as: , in, It is a spherical Bessel function of the first kind. It is a spherical harmonic function. It is the nth root of the l-th order Bessel function, and SBF will represent the radial distance. and angle They are integrated into a unified two-dimensional basis representation, which effectively characterizes complex multibody geometries.

[0029] Implementation process of directional message passing network: a. Initial edge message generation: Generate atomic type and Mapped to a high-dimensional vector, and the radial basis functions after linear transformation. Concatenation, generating initial edge messages through a nonlinear transformation layer. : , in, This indicates a feature concatenation operation. For activation function, and These are learnable projection parameters.

[0030] b. Component mapping: Mapping the input edge messages Mapping to direct components and neighbor's share : , , c. Neighbor component modulation and coding: Modulating and coding neighbor components The radial basis features, after undergoing a two-layer linear transformation, are subjected to an element-wise Hadamard product operation. This is then mapped to a low-dimensional interaction space via a downsampling projection layer, and finally passed through a spherical Bessel function. The geometric configuration of the encoded atomic triple (k,j,i): , , d. Weighted aggregation: The encoded features of all neighbors k of j (excluding i) are weighted and aggregated, and the aggregated features are remapped back to the original dimensional space using an upsampling layer. , e. Residual Connection: After fusing the direct connection components with the aggregated features, the updated directional message embedding is obtained through a two-stage residual connection. : , .

[0031] 2. Interaction Module: Interaction Mechanism between Graph Convolution and Gated Attention The interaction module is the core module of the model. First, it uses a graph neural network with three layers of multi-source feature fusion to perform preliminary message aggregation and iterative updates on node features. Then, it inputs the messages into the element-wise gating attention mechanism module to adjust the importance of messages from different sources, thereby completing the feature selection and optimization.

[0032] (1) Multi-source feature fusion graph convolutional network like Figure 3 As shown, the 256-dimensional local potential energy characteristics are... Overall situation characteristics directional interaction feature vector The features are concatenated and merged into a unified 256-dimensional edge feature vector. The splicing operation is as follows: , The feature vector of the central node Neighbor node feature vectors and integrated edge feature vectors By concatenating the features, a comprehensive message source with 768 dimensions is obtained. , Indicates the first Layer convolution ( The splicing operation is as follows: , The integrated message source transmits messages through two parallel linear transformations, and a gating mechanism is used to adjust the importance of different messages: , in, It is the Sigmoid activation function, used to generate The gating coefficients between them; It represents a nonlinear activation function, enriching the expressive power of the model's feature space; and These are the trainable weight matrix and the bias vector, respectively.

[0033] Central Node The feature is achieved by aggregating all neighboring nodes. The message is updated, the aggregation operation is implemented through the mean, and the feature is added to the original center node feature through residual connection to ensure smooth feature update: , After three layers of graph convolution, the model obtains initially updated node features. .

[0034] (2) Element-wise gating attention mechanism like Figure 4 As shown, the output of graph convolution is The input is element-wise gated attention mechanism module, which calculates attention weights on each feature dimension through Hadamard product, enabling independent selection and importance adjustment of different features, and obtaining the final node output. The specific steps are as follows: Vector mapping: Q, K, V linear layer transformations are used to map node features and edge features to the attention space. The query vector is copied and concatenated four times to align with the dimensions of the key and value vectors. , , , , , , , Attention weight calculation: The importance and matching degree of each feature channel are calculated using the Hadamard product, and the feature distribution is stabilized using LayerNorm. , in, It is a vector with the same dimension d as the feature dimension, representing the attention distribution on d independent feature channels. This is a scaling factor used to prevent the gradient vanishing problem caused by excessively large dot product values.

[0035] Feature filtering and aggregation: The attention coefficients are transformed into gated values ​​in the [0,1] interval using the Sigmoid activation function. The value vector is then filtered, and the filtered messages from neighbors are aggregated and concatenated with the residual features of the original nodes to obtain the final node features. : , .

[0036] (3) Output module: Global pooling and property output After the interaction of graph convolution and gated attention mechanism, the updated node features are... Perform global average pooling to map atomic-level features to crystal-level feature vectors G: , in The total number of atoms in the crystal. It has a crystal structure.

[0037] Subsequently, the global vector G is input into a fully connected network containing a nonlinear activation function and projected onto the target attribute space to obtain the final crystal property prediction results: .

[0038] Example 1: Specific Implementation of Crystal Property Prediction Method This embodiment demonstrates crystal property prediction on two public datasets, MaterialsProject (MP) and JARVIS. The specific steps are as follows: Step 1: Data Preprocessing The selected public datasets include target properties such as formation energy, band gap, bulk modulus, shear modulus, and convex hull energy. Each dataset is divided into training, validation, and test sets, ensuring that the training set accounts for no less than 80% of the samples and that the validation and test sets are roughly balanced in size.

[0039] Step 2: Atomic Attribute Encoding For each atom in a crystal sample, nine key physical properties are extracted, including group number, period number, electronegativity, covalent radius, number of valence electrons, first ionization energy, electron affinity, region, and atomic volume. Each property is one-hot encoded using a range partitioning method, dividing each property into preset numerical ranges. If an atomic property value falls into a certain range, the corresponding binary bit is set to 1; otherwise, it is set to 0. The encoded vectors of the nine property types are concatenated to generate a 93-dimensional initial feature vector, which is then projected onto a fully connected layer to form a 256-dimensional nodal feature vector.

[0040] Step 3: Calculation of multi-scale potential edge characteristics Local Coulomb potential calculation: A cutoff distance is set, and only atomic pairs within this distance are considered. The Coulomb potential is calculated and simplified. The simplified potential is embedded using 256 Gaussian radial basis functions with centers ranging from -4.0 to 4.0. The embedded features are processed by the SiLU activation function and then linearly transformed to obtain 256-dimensional local potential edge features.

[0041] Global infinite potential energy calculation: Integrating Coulomb potential, London dispersion potential, and Pauli repulsion potential, the global infinite potential energy is obtained through approximate Ewald summation. The core parameters used are determined through grid search. The global potential energy is expanded using 64 radial basis functions with centers ranging from -4.0 to 4.0. The expanded features are input into a multilayer perceptron, and after linear transformation, Softplus activation function, and batch normalization, the dimensionality is increased to 256 to obtain the global potential energy edge features.

[0042] Step 4: Constructing Directional Interaction Features Atom triplet structures are constructed, and the radial distances and bond angles between atoms are calculated. Radial distance dependencies are encoded using radial basis functions, and angular dependencies of the atom triples are encoded using spherical Bessel functions. Initial edge messages are generated by fusing atom type and radial geometric features, and then mapped to directly connected components and neighbor components. The neighbor components are sequentially subjected to Hadamard product modulation, downsampling, angular information encoding, weighted aggregation, and upsampling. After fusing with the directly connected components, a two-stage residual connection is used to finally obtain 256-dimensional directional edge features.

[0043] Step 5: Multi-source feature map convolution Local potential energy features, global potential energy features, and directional interaction features are concatenated and fused into a unified edge feature vector. The features of the central node, neighboring nodes, and the comprehensive edge features are concatenated along the feature dimension to form a comprehensive message source. This comprehensive message source is input into a three-layer graph convolutional network. Each layer generates gating coefficients through two parallel linear transformations to regulate the information flow, aggregating messages from all neighboring nodes and performing residual connections with the original central node features to complete the iterative update of node features.

[0044] Step 6: Processing element-by-element gating attention mechanism The node features output from the graph convolutional network are input into the element-wise gating attention mechanism module. A linear layer maps node and edge features into query, key, and value vectors. The query vector is copied and concatenated four times to achieve dimension alignment, while the key and value vectors are concatenated and fused with the edge features. Attention weights for each feature channel are calculated using the Hadamard product. After layer normalization to stabilize the feature distribution, the attention coefficients are transformed into gating values ​​between 0 and 1 using the Sigmoid activation function, and the value vectors are filtered. The filtered messages from neighboring nodes are aggregated and residually concatenated with the original node features to obtain the final node features.

[0045] Step 7: Global Pooling and Prediction A global average pooling operation is performed on the final node features to map the atomic-level features to a crystal-level global feature representation based on the total number of atoms in the crystal. The global feature vector is then input into a fully connected network with a Softplus activation function, projected onto the target attribute space through a linear transformation, and the crystal property prediction results are output.

[0046] Step 8: Model Training and Testing Training hyperparameters: The AdamW optimizer was used, the loss function was mean squared error, the learning rate scheduling strategy was one-cycle, and the initial learning rate was set to 1×10⁻⁶. -3 The training rounds are 500, the batch size is 64, the weight decay coefficient is 0.0, the maximum number of neighbors is 16, and the number of convolutional layers is 3.

[0047] Hardware and software environment: The hardware uses an NVIDIA RTX 4090D graphics card with 24GB of video memory, an Intel(R) Xeon(R) Platinum 8474C processor with 15 vCPU cores and 80GB of memory; the software is based on the PyTorch deep learning framework and combined with Cython extension modules.

[0048] Test metrics and results: The mean absolute error was used to evaluate the model performance. The test results show that the model performs best in most prediction tasks on the three major public datasets, and the mean absolute error of the core property prediction is significantly lower than that of existing models.

[0049] Example 2: Module Implementation of Crystal Property Prediction Model The model of this invention is implemented using the PyTorch framework and mainly consists of three modules: an input module, an interaction module, and an output module. The implementation logic of each module is as follows: The input module comprises three core classes, implementing atomic attribute encoding, multi-scale potential energy edge feature calculation, and directional interaction feature construction, respectively. The atomic attribute encoding class takes an atomic attribute matrix as input, generates 93-dimensional features through a one-hot encoding layer, and then outputs 256-dimensional node features through a fully connected layer. The multi-scale potential energy edge feature class includes two sub-modules: local Coulomb potential and global infinite potential, each outputting corresponding 256-dimensional edge features. The directional interaction feature class integrates sub-modules such as radial basis function encoding, spherical Bezier function encoding, message initialization, and residual blocks, outputting 256-dimensional directional edge features through sequence concatenation.

[0050] The interaction module includes two classes: Multi-source Feature Fusion Graph Convolutional Network and Element-wise Gated Attention Mechanism. The Multi-source Feature Fusion Graph Convolutional Network contains three custom graph convolutional layers, each implementing a gating mechanism and residual connections. It takes node features and multi-source fused edge features as input and outputs initially updated node features. The Element-wise Gated Attention Mechanism class contains four sub-modules: vector mapping, weight calculation, feature filtering, and residual aggregation. It takes the node features and edge features output from the graph convolution as input and outputs the final node features.

[0051] Output module: Contains two classes: global pooling and property prediction. The global pooling class implements global average pooling, takes the final node features as input, and outputs a crystal-level global feature representation. The property prediction class contains a fully connected layer and a Softplus activation function, takes the global feature representation as input, and outputs the crystal property prediction result.

[0052] After the model is instantiated, the atomic properties, atomic coordinates, and lattice parameters of the crystal are input. After being processed by the input module, interaction module, and output module in sequence, accurate crystal property prediction results can be output, providing technical support for the design and screening of new materials.

[0053] To systematically evaluate the performance of the CAPNet model in the crystal property prediction task, we compared it with a series of benchmark models. The evaluation metric used uniformly is the mean absolute error (MAE) on the test set, which calculates the deviation between predicted and true values. The formula for calculating MAE is as follows: , As shown in Table 2, the CAPNet model achieved superior performance on The Materials Project dataset. Specifically, in the forming energy prediction task, CAPNet achieved a MAE of 0.0178 eV / atom, and in the bandgap prediction task, it achieved an MAE of 0.196 eV, both of which surpass state-of-the-art models such as PotNet and Matformer. In contrast, CAPNet performed slightly worse than PotNet in the bulk modulus and shear modulus prediction tasks. This performance difference is mainly attributed to the limitation of the training sample size. The training sets for these two tasks only contain approximately 4,664 samples. The limited training data restricts the ability of highly complex models to learn fine-grained feature patterns and may lead to overfitting. Conversely, PotNet's relatively streamlined structure exhibits stronger adaptability under small sample conditions. Experimental results demonstrate that with increased training data, CAPNet can learn deeper feature representations from crystal data, capturing complex geometric and physical interactions, thereby improving prediction accuracy.

[0054] Table 2 Comparison results on MP data , Table 7 Comparison results on JARVIS data , On the JARVIS dataset, CAPNet's advantages are further demonstrated, with even better results. As shown in Table 3, our model achieved new records for the lowest MAE in all four tasks: formation energy, total energy, bandgap (OPT), and Ehull. Compared to the previous best-performing model, PotNet, CAPNet reduced the MAE in the formation energy task from 0.0294 eV / atom to 0.0275 eV / atom, an improvement of approximately 6.5%. The error in the bandgap (OPT) task was optimized from 0.127 eV to 0.110 eV, an improvement of approximately 13.4%. In Ehull prediction, the MAE was further reduced from 0.055 eV to 0.032 eV, an improvement of 41.8%. In the total energy prediction task, the MAE decreased from 0.032 eV / atom to 0.0296 eV / atom, with an improvement in prediction accuracy of approximately 7.5%. However, in the Bandgap (MBJ) prediction task, CAPNet's MAE is 0.29 eV, slightly higher than PotNet's 0.27 eV. This is mainly because the training samples for this task are extremely limited, approximately 14,537, far fewer than the 44,578 samples for other tasks, making it difficult for deep models to fully learn the mapping relationship between complex structures and properties. This demonstrates that introducing global state energy, directionality, and attention mechanisms does indeed enhance the model's ability to represent complex electronic structures.

[0055] The above description is merely illustrative of the embodiments of the present invention and is not intended to limit the present invention. For those skilled in the art, any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the protection scope of the present invention.

Claims

1. A method for predicting crystal properties based on graph convolution and attention mechanisms, characterized in that, Includes the following steps: Step (1) Atomic property encoding: The nine key physical properties of each atom in the crystal are encoded using one-hot encoding based on interval partitioning, and the resulting 93-dimensional initial feature vector is generated by splicing. The feature vector is then projected through a fully connected layer to obtain the node features of the hidden layer space of the model. ; Step (2) Construction of multi-scale potential edge features: Calculate the local Coulomb potential edge features and the global infinite potential edge features between atoms respectively, and obtain 256-dimensional local potential edge features after dimension matching. and the overall situation and its characteristics ; Step (3) Construction of directional interaction features: Combining the radial distance and bond angle information between atoms, the joint geometric representation of the atomic triples is encoded by radial basis functions and spherical Bessel functions. A 256-dimensional directional edge feature is generated through a multi-level residual nested directional message passing network. ; Step (4) Multi-source feature fusion map convolution: Convolution of local potential features Overall situation characteristics directional interaction feature vector splicing into uniform edge features The node features are then input into a 3-layer graph convolutional network, and the node features are iteratively updated through gating mechanisms and residual connections. Step (5) Element-wise gating attention mechanism processing: Map the node features output by graph convolution to Q / K / V vectors, fuse node and edge features to calculate attention weights per feature dimension, and obtain the final node features after dynamic filtering of feature channels. ; Step (6) Global pooling and prediction: For the final node features Global average pooling is performed to obtain a crystal-level global representation G. G is then input into a fully connected network with Softplus activation, which maps the representation to the target attribute space and outputs the crystal property prediction results.

2. The crystal property prediction method based on graph convolution and attention mechanism according to claim 1, characterized in that, The nine key physical properties mentioned in step (1) include group number, period number, electronegativity, covalent radius, number of valence electrons, first ionization energy, electron affinity, region, and atomic volume.

3. The crystal property prediction method and model based on graph convolution and attention mechanism according to claim 1, characterized in that, The calculation process of the local Coulomb potential edge characteristics mentioned in step (2) is as follows: First, calculate the Coulomb potential of the atomic pairs within the cutoff radius and simplify it to: , Then, by embedding 256 Gaussian radial basis functions with centers ranging from -4.0 to 4.0, and then performing SiLU activation and linear transformation, the local potential energy characteristics are obtained. .

4. A method for predicting crystal properties based on graph convolution and attention mechanisms according to claim 1 or 3, characterized in that, The calculation process for the global infinite potential edge characteristics mentioned in step (2) is as follows: integrating the Coulomb potential London dispersion potential Pauli repulsion potential Obtaining global infinite potential energy After expansion with 64 RBF kernels centered between -4.0 and 4.0, the local potential energy features are obtained by upscaling to 256 dimensions using an MLP with linear transformation, Softplus activation, and batch normalization. ,in: , =0.801、 =0.074、 =3.0、 =0.

145.

5. The crystal property prediction method based on graph convolution and attention mechanism according to claim 1, characterized in that, The implementation process of the directional message passing network in step (3) is as follows: first, the atomic type and radial geometric features are fused to generate the initial side message. Then map it to a direct component. and neighbor's share The neighbor components are modulated by Hadamard product, downsampled, and then their angle information is encoded by spherical Bessel function. After weighted aggregation and upsampling, they are fused with the directly connected components. Finally, the updated directional edge features are obtained through two-level residual connections. .

6. The crystal property prediction method based on graph convolution and attention mechanism according to claim 1, characterized in that, The message passing process of the 3-layer graph convolutional network in step (4) is as follows: First, the features of the center node, the features of the neighbor nodes, and the edge features are concatenated into a comprehensive message source. Then, two parallel linear transformations are used to generate gating coefficients to adjust the information flow. Finally, neighbor node messages are aggregated and connected with the feature residuals of the original central node to complete the node feature update.

7. The crystal property prediction method based on graph convolution and attention mechanism according to claim 1, characterized in that, The specific implementation of the element-wise gating attention mechanism described in step (5) is as follows: First, the node features and edge features are mapped to the attention space using a linear layer transformation to obtain the feature vector; in order to capture the complex interaction between the center node features, neighbor features, and edge features, the three are concatenated to obtain the key vector k. ij Sum vector v ij To align the dimensions with the key and value vectors, the query vector is copied and concatenated three times to obtain q. ij Attention weights are calculated per-feature dimension using the Hadamard product, then gated to a [0,1] interval using the Sigmoid function. The value vector is then filtered, and the filtered neighbor messages are aggregated and concatenated with the residuals of the original node features to obtain the final node features. .

8. The crystal property prediction method based on graph convolution and attention mechanism according to claim 7, characterized in that, The formula for calculating the global average pooling in step (6) is: in, The total number of atoms in the crystal. It has a crystal structure; the output formula of the fully connected network is: 。 9. A crystal property prediction model based on graph convolution and attention mechanisms, characterized in that, It includes three main modules: an input module, an interaction module, and an output module. The input module includes an atomic attribute encoding unit, a multi-scale potential edge feature unit, and a directional interaction feature unit. The interaction module includes a 3-layer multi-source feature fusion graph convolutional network and an element-wise gated attention mechanism unit. The output module includes a global average pooling unit and a fully connected prediction unit. The atomic attribute encoding unit is used to one-hot encode the nine types of physical attributes of atoms and project them as node features; The multi-scale potential energy edge feature unit is used to calculate and output 256-dimensional local potential energy edge features. and the overall situation and its characteristics ; The directional interaction feature unit is used to encode the geometric information of atomic triples and output 256-dimensional directional edge features. ; The multi-source feature fusion graph convolutional network is used to aggregate multi-source edge features and node features and complete iterative updates; The element-wise gating attention mechanism unit is used to dynamically adjust the importance of feature channels and output... ; The output module is used to aggregate atomic-level features into crystal-level features and output property prediction results.

10. A crystal property prediction model based on graph convolution and attention mechanism according to claim 9, characterized in that, The directional interactive feature unit uses radial basis functions and spherical Bessel functions to jointly encode geometric information and has a built-in multi-level residual nesting structure; the multi-source feature fusion graph convolutional network and the element-wise gated attention mechanism unit are both equipped with residual connections.