Molecular graph property prediction method based on dropout connection graph stochastic neural network
By using a graph random neural network method based on dropout connections, a new adjacency matrix is generated by leveraging the importance of chemical bonds and combining supervised and unsupervised loss calculations. This solves the overfitting problem in molecular graph attribute prediction and improves model performance and unlabeled data utilization.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- TSINGHUA UNIVERSITY
- Filing Date
- 2022-12-06
- Publication Date
- 2026-04-21
AI Technical Summary
Existing deep learning methods suffer from overfitting in molecular graph attribute prediction and fail to fully utilize information from unlabeled data, leading to a decline in model performance.
A graph stochastic neural network method based on dropout connections is adopted to generate a new adjacency matrix by weighting chemical bonds and transforming soft connections. The model parameters are optimized to improve performance by combining supervised and unsupervised loss calculations.
It effectively reduces the risk of overfitting, makes full use of unlabeled data, and improves the performance of molecular graph attribute prediction and the model's generalization ability.
Smart Images

Figure CN115860065B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of graph attribute prediction technology, and in particular to a molecular graph attribute prediction method based on a graph random neural network with dropout connections. Background Technology
[0002] Graph neural networks (GNNs) design graphs and learn representations through a series of model designs. Graph representation learning can be applied to three downstream tasks: node classification, link prediction, and graph classification. Graph classification involves predicting the class label of a graph, and molecular graph attribute prediction is a typical graph classification task. A molecule can be viewed as a graph, with atoms corresponding to nodes and chemical bonds to edges. Currently, deep learning methods have been proposed for molecular graph attribute prediction; however, MPNNs (Multi-Level Neural Networks) mention that modeling a density function is theoretically very expensive. Therefore, due to the limitation of the amount of labeled data, these methods perform poorly. Recently, some advanced GNN-based models have attempted to improve performance in traditional semi-supervised learning. However, calculating supervised loss functions and training parameters only on existing labeled data easily leads to overfitting and degrades model performance. To address this issue, for node classification tasks, GRAND proposes a graph data augmentation method and uses consistency regularization for semi-supervised learning. This method performs supervised training on labeled data and unsupervised learning on unlabeled data. For molecular graph attribute prediction, this invention requires a deep understanding of the characteristics of atoms and the chemical bonds between them and proposes a novel data augmentation strategy.
[0003] Unlike images and text in computer vision (CV) and natural language processing (NLP), graph data is irregular and more complex. Currently, various data augmentation strategies, including occlusion attributes, and adding and removing nodes and edges, have been proposed to address graph data problems. DropEdge randomly drops out node features and generates new ones, randomly removes some edges, and modifies the adjacency matrix to prevent overfitting. AdaEdge iteratively adds edges between nodes with the same label. GAUG removes noisy edges and adds missing edges to the original graph. However, randomly dropping out nodes or adding edges without considering the features of the edges, i.e., chemical bonds, may disrupt the structure of molecular graphs. KPGT emphasizes that the features of chemical bonds are crucial for predicting molecular graph attributes; therefore, considering their features when performing data augmentation on edges may be the best strategy on graphs. However, existing GNN methods always directly use the original features of chemical bonds in the representation space, and data augmentation strategies on chemical bonds are still under exploration. Summary of the Invention
[0004] The present invention aims to at least partially solve one of the technical problems in the related art.
[0005] To address this, this invention proposes a molecular graph attribute prediction method based on a graph random neural network with dropout connections. This method fully considers the importance of chemical bonds and makes full use of information from unlabeled data during the molecular graph attribute prediction process, helping to generate more training data and improve the performance of molecular graph attribute prediction.
[0006] Another objective of this invention is to provide a molecular graph attribute prediction device based on a graph random neural network with dropout connections.
[0007] To achieve the above objectives, this invention proposes a molecular graph attribute prediction method based on a graph random neural network with dropout connections, comprising:
[0008] Weights are assigned to the edges based on the edge characteristics of the molecular graph, and soft connection transformation is performed on the nodes of the molecular graph after weight assignment to generate the first adjacency matrix.
[0009] A masking operation is performed on the first adjacency matrix after discarding soft connections to generate a second adjacency matrix. The original node features of the molecular graph and the second adjacency matrix are input into the graph neural network model to obtain the graph encoding as the output.
[0010] Based on the preset labeled and unlabeled data, supervised loss calculation and unsupervised loss calculation are performed on the graph encoding respectively to obtain the first loss calculation result and the second loss calculation result;
[0011] The final loss calculation result is obtained based on the first loss calculation result and the second loss calculation result. The parameters of the graph neural network model are optimized according to the final loss calculation result so as to obtain the prediction result by performing molecular graph attribute prediction according to the optimal graph neural network model.
[0012] In addition, the molecular graph attribute prediction method based on a graph random neural network with dropout connections according to the above embodiments of the present invention may also have the following additional technical features:
[0013] Furthermore, in one embodiment of the present invention, the expression for performing soft link transformation on the nodes of the weighted molecular graph to generate the first adjacency matrix is:
[0014] A ′ =GSC(G)=σ(f mlp (E)
[0015] Among them, A ′ G is the first adjacency matrix, G is the molecular graph, GSC represents the formation of soft links, and E represents the characteristics of chemical bonds.
[0016] Furthermore, in one embodiment of the present invention, the step of performing a masking operation on the first adjacency matrix after discarding soft links to generate the second adjacency matrix includes:
[0017] Perform a masking operation on the first adjacency matrix A′ and the matrix ∈ which follows a Bernoulli distribution. After the masking operation, the result is multiplied by the factor. Multiplying these results in the second adjacency matrix. The formula for calculating the discard soft connection DSC is then:
[0018]
[0019] Where M is the second adjacency matrix.
[0020] Further, in one embodiment of the present invention, the step of inputting the original node features of the molecular graph and the second adjacency matrix into the graph neural network model to obtain the graph encoding as output includes:
[0021] The second adjacency matrix M is symmetrically normalized to obtain the third adjacency matrix M′, and the original node features X of the molecular graph are propagated a predetermined number of times to generate node features X′. The third adjacency matrix M′ and the node features X′ are input into the GNN graph neural network model to obtain the graph encoding of the labeled data output T and the unlabeled data output Q:
[0022]
[0023]
[0024] T,Q=GNN(X′,M′)
[0025] Further, in one embodiment of the present invention, the step of performing supervised loss calculation and unsupervised loss calculation based on the graph coding according to preset labeled data and unlabeled data to obtain a first loss calculation result and a second loss calculation result includes:
[0026] The first loss is calculated using the binary cross-entropy loss function containing logits, yielding the following result:
[0027]
[0028] Where P is the number of classes in the multi-label binary classification, and y c It is a true label for class c, L sup This is the result of the first loss calculation;
[0029] Calculate the mean of all unlabeled data distributions, and generate a label distribution center Q′ on the unlabeled data to minimize the entropy value. Minimize the output value Q of the model and the output value of the sharpen method
[0030]
[0031]
[0032]
[0033] Where S represents the number of data augmentations, τ represents the clarity of the category distribution controlled by the temperature hyperparameter, γ is a predefined threshold, and L... cr This is the result of the second loss calculation.
[0034] To achieve the above objectives, another aspect of the present invention proposes a molecular graph attribute prediction device based on a graph random neural network with dropout connections, comprising:
[0035] The soft link generation module is used to assign weights to the edges based on the edge characteristics of the molecular graph, and to perform soft link transformation on the nodes of the molecular graph after weight assignment to generate the first adjacency matrix.
[0036] The masking and graph encoding module is used to perform a masking operation on the first adjacency matrix after discarding soft connections to generate a second adjacency matrix. The original node features of the molecular graph and the second adjacency matrix are input into the graph neural network model to obtain the graph encoding as the output.
[0037] The loss result calculation module is used to perform supervised loss calculation and unsupervised loss calculation based on the graph encoding according to the preset labeled data and unlabeled data to obtain the first loss calculation result and the second loss calculation result.
[0038] The attribute prediction output module is used to obtain a final loss calculation result based on the first loss calculation result and the second loss calculation result, and to optimize the parameters of the graph neural network model according to the final loss calculation result, so as to obtain a prediction result by performing molecular graph attribute prediction according to the optimal graph neural network model.
[0039] The molecular graph attribute prediction method and apparatus based on dropout-connected graph random neural networks of the present invention can fully consider the importance of chemical bonds and make full use of information in unlabeled data during the molecular graph attribute prediction process, thereby helping to generate more training data and improve the performance of molecular graph attribute prediction.
[0040] The beneficial effects of this invention are as follows:
[0041] 1) This invention proposes a novel adaptive data augmentation strategy, DropConn, to learn a general and robust representation of molecular graphs, while also emphasizing the importance of chemical bonds and establishing soft connections between atoms. Unlike existing dropout node features and edges, the augmentation strategy proposed in this invention utilizes the features of edges to construct a new adjacency matrix, and then drops out edges in the new adjacency matrix to reduce the risk of altering the molecular structure.
[0042] 2) In order to make full use of the information in unlabeled data, this invention designs a confidence-aware consistency regularization training strategy based on semi-supervised learning to solve the problem of scarce data and improve the generalization ability of the model.
[0043] 3) The present invention was tested on seven molecular datasets using four directly trained models and one downstream debugged model. The experiments show that the proposed method improves the performance of molecular graph attribute prediction.
[0044] Additional aspects and advantages of the invention will be set forth in part in the description which follows, and in part will be obvious from the description, or may be learned by practice of the invention. Attached Figure Description
[0045] The above and / or additional aspects and advantages of the present invention will become apparent and readily understood from the following description of the embodiments taken in conjunction with the accompanying drawings, wherein:
[0046] Figure 1 This is a flowchart of a molecular graph attribute prediction method based on a graph random neural network with dropout connections according to an embodiment of the present invention;
[0047] Figure 2 This is a framework diagram of a molecular graph attribute prediction method based on a graph random neural network with dropout connections according to an embodiment of the present invention;
[0048] Figure 3 This is a schematic diagram of a molecular graph attribute prediction device based on a graph random neural network with dropout connections according to an embodiment of the present invention. Detailed Implementation
[0049] It should be noted that, unless otherwise specified, the embodiments and features described in the present invention can be combined with each other. The present invention will now be described in detail with reference to the accompanying drawings and embodiments.
[0050] To enable those skilled in the art to better understand the present invention, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of the present invention.
[0051] The following description, with reference to the accompanying drawings, describes a method and apparatus for predicting molecular graph attributes based on a graph random neural network with dropout connections, according to embodiments of the present invention.
[0052] Figure 1 This is a flowchart of a molecular graph attribute prediction method based on a graph random neural network with dropout connections, according to an embodiment of the present invention.
[0053] like Figure 1 As shown, the method includes, but is not limited to, the following steps:
[0054] S1. Based on the edge characteristics of the molecular graph, weights are assigned to the edges, and soft connections are transformed to the nodes of the molecular graph after weight assignment to generate the first adjacency matrix.
[0055] S2, perform a masking operation on the first adjacency matrix after discarding soft connections to generate a second adjacency matrix, and input the original node features of the molecular graph and the second adjacency matrix into the graph neural network model to obtain the graph encoding as the output;
[0056] S3, based on the preset labeled data and unlabeled data, supervised loss calculation and unsupervised loss calculation are performed based on graph coding to obtain the first loss calculation result and the second loss calculation result;
[0057] S4. Based on the first loss calculation result and the second loss calculation result, the final loss calculation result is obtained, and the parameters of the graph neural network model are optimized according to the final loss calculation result, so as to obtain the prediction result by performing molecular graph attribute prediction based on the optimal graph neural network model.
[0058] The molecular graph attribute prediction method based on a graph random neural network with dropout connections according to an embodiment of the present invention will be described in detail below with reference to the accompanying drawings.
[0059] The method proposed in this invention can fully consider the importance of chemical bonds and make full use of information in unlabeled data during molecular graph attribute prediction, helping to generate more training data and improve the performance of molecular graph attribute prediction. Specifically, firstly, weights are generated for the chemical bonds in the molecular graph in a learnable manner; then, some chemical bond weights are randomly set to 0 with a probability following a Bernoulli distribution; finally, the newly set chemical bonds are multiplied by the original atomic features to obtain new atomic features, which are used as input to the graph neural network.
[0060] This problem can be formally defined as follows: the input is a molecular graph G = (V, E, X, Z), where V represents the set of |V| atoms (nodes), E represents the set of |E| chemical bonds (edges), and X and Z represent the features of the atomic nodes and chemical bonds, respectively.
[0061] To address the importance of chemical bonds and the scarcity of labeled data, this invention proposes the DropConn method for each input molecular graph, such as... Figure 2 As shown:
[0062] Input: Molecular diagram G, which contains atoms and chemical bonds, each with 9-dimensional and 3-dimensional features.
[0063] Step 1: Generate soft connections. Given a graph G, GSC learns the importance of edges, assigns weights to edges based on their features, and then generates a new adjacency matrix by converting hard connections (with a value of 1) between two nodes into soft connections (with a data value between 0 and 1 probability value).
[0064] Step 2: Drop soft connections. DSC randomly drops out some soft connections, generating a new adjacency matrix M using the mask matrix. The weights of each connection are learnable and adaptive, so dropping out the weights can avoid overfitting and improve the robustness of the model.
[0065] Step 3: Propagate the molecular graph. PG performs graph propagation operations on the original node feature matrix X and the new adjacency matrix obtained in Step 2 using the GNNs model, and obtains the model output.
[0066] Step 4: Training and Optimization. On the labeled dataset, calculate the supervised loss function using the graph encoding obtained in Step 3 and the original graph labels. On the unlabeled dataset, calculate the unsupervised loss function using the graph encoding obtained in Step 3 and the predicted values obtained through the consistency regularization method.
[0067] Specifically, step 1: Generating soft connections. In this invention, when constructing an adjacency matrix, the value in the matrix is 1 if two nodes are connected, and 0 otherwise. Unlike other datasets, molecular graphs provide the feature E of chemical bonds, so an adjacency matrix with weighted values can be constructed using the features of the edges. Thus, a soft connection between two nodes has a corresponding score. In the implementation, a multilayer perceptron is first used to learn the importance of the edges, and then an activation function is used to map the weights to probability values between (0,1). The calculation process is as follows:
[0068] A ′ =GSC(G)=σ(f mlp ().
[0069] Step 2: Dropout Soft Connections (DSC). This step involves dropping out the adjacency matrix A generated in Step 1 during training. ′ The present invention will use A ′ Multiply by a matrix ∈ that follows a Bernoulli distribution for masking, and finally multiply by a factor. Multiplication ensures that the adjacency matrix after perturbation is the same as the original A. ′ Similar. It's important to note that the perturbation process only occurs during training; the original A is used during inference. ′ The calculation process for DSC is as follows:
[0070]
[0071] It can be seen that DSC and dropedge are similar in process. The difference is that dropedge directly drops out some hard connections randomly on the adjacency matrix and then generates a new adjacency matrix, while DSC randomly masks some soft connections to reduce the risk of over-smoothing and changes in the molecular graph structure. To compare their performance, this invention ran both perturbation methods in the experiments in Part III. The experimental results also show that DSC outperforms dropedge on six datasets.
[0072] Step 3: Propagation Graph (PG). In this process, the present invention first performs a symmetric normalization operation on the adjacency matrix M generated in Step 2 to generate M′, then performs a fixed number of propagation operations on the original node features to generate new node features X′, and finally executes the GNNs model to obtain the output T of labeled data and the output Q of unlabeled data.
[0073]
[0074]
[0075] T,Q=GNN(X′,M′)
[0076] Step 4: Calculate the supervised loss function. The task of supervised learning is to predict the properties of a molecular graph as accurately as possible. The supervised loss function for graph classification can be calculated using the binary cross-entropy loss function containing logits.
[0077]
[0078] This invention defines P as the number of classes in a multi-label binary classification, and y c This is the true label of class c. This invention demonstrates that this loss function combines the binary cross-entropy loss function and the sigmoid layer.
[0079] Step 5: Calculate the supervised loss function. This invention proposes a consistency regularization loss function calculation method on unlabeled data after performing S data augmentations. First, this invention calculates the average of all distributions and generates a label distribution center Q′ on the unlabeled data. Then, it uses label guessing and augmentation methods to minimize the entropy value. Finally, minimize the model's output value Q and the output value of the sharpen method.
[0080]
[0081]
[0082]
[0083] Here, τ is a temperature hyperparameter controlling the sharpness of the class distribution. If τ approaches 0, the Sharpen method output will tend towards one-hot encoding. The Sharpen result will be used for the model's target prediction. Therefore, this invention chooses a relatively small τ to ensure that the model can output a relatively low entropy prediction. γ is a predefined threshold.
[0084] Furthermore, the overall loss function is calculated, where λ controls the weights of the supervised loss and the semi-supervised loss, respectively.
[0085] L = L sup +λL cr
[0086] Furthermore, this invention includes two experimental setups: direct training and pre-training-fine-tuning. In the direct training setup, experiments were conducted on seven molecular graph datasets with varying sizes, using four graph neural network encoding models as the backbone. In the pre-training-fine-tuning setup, one model was pre-trained on one dataset, and then fine-tuned on seven datasets. These experiments verified the efficiency of the method described in this invention. This invention is primarily compared with existing DropEdge, DropNode in GRAND, and DropEdge in GRAND.
[0087] Experimental results using direct training settings demonstrate that this method achieves competitive results on five datasets. Specifically, the proposed method improves performance on the ogbg-molbace dataset by 2.98% on the ogbg-molbbbp dataset by 3.84%, and on the ogbg-molclintox dataset by 4.01%. Furthermore, the proposed method achieves state-of-the-art results on the ogbg-molsider and ogbg-moltoxcast datasets.
[0088] Experimental results from pre-training and fine-tuning show that the present invention achieves the best performance on six datasets and the second-best performance on the remaining dataset. For example, the present invention achieves improvements of 5.72%, 3.75%, and 4.12% on the ogbg-molbace, ogbg-molbbbp, and ogbg-molclintox datasets, respectively, and improvements of 3.49%, 0.53%, and 0.31% on the ogbg-molhiv, ogbg-molsider, and ogbg-moltox21 datasets, respectively.
[0089] Furthermore, ablation experiments were conducted for comparison. First, the impact of generating soft links was verified by weighting learnable chemical bonds. It was found that generating soft links yielded better results than performing the roll-up operation using the original features. Additionally, after applying learnable weights, randomly discarding learnable chemical bonds was better than directly randomly discarding the original chemical bonds. These results all demonstrate the crucial role of learnable chemical bonds.
[0090] The effect of randomly dropping soft connections was then verified. It was found that randomly dropping soft connections yielded better results on six datasets. This also demonstrates the importance that randomly dropping soft connections does not alter the semantics of the molecular graph.
[0091] Finally, the impact of the consistency regularization training method was verified. This invention clearly shows that the training method with consistency regularization outperforms simply discarding soft connections. Secondly, when directly discarding original edges, the method with consistency regularization yields the best results on all four datasets. However, when using regularization alone, the results are unstable, indicating that using consistency regularization alone is not necessarily effective. The method is stable and effective when combined with multiple data augmentation operations.
[0092] The molecular graph attribute prediction method based on a graph random neural network with dropout connections according to embodiments of the present invention can fully consider the importance of chemical bonds and make full use of information in unlabeled data during the molecular graph attribute prediction process, thereby helping to generate more training data and improve the performance of molecular graph attribute prediction.
[0093] To achieve the above embodiments, such as Figure 3 As shown, this embodiment also provides a molecular graph attribute prediction device 10 based on a graph random neural network with dropout connections. The device 10 includes a soft connection generation module 100, a mask and graph encoding module 200, a loss result calculation module 300, and an attribute prediction output module 400.
[0094] The soft link generation module 100 is used to assign weights to the edges based on the edge characteristics of the molecular graph, and to perform soft link transformation on the nodes of the molecular graph after weight assignment to generate the first adjacency matrix.
[0095] The masking and graph encoding module 200 is used to perform a masking operation on the first adjacency matrix after discarding soft connections to generate a second adjacency matrix. The original node features of the molecular graph and the second adjacency matrix are input into the graph neural network model to obtain the graph encoding as the output.
[0096] The loss result calculation module 300 is used to perform supervised loss calculation and unsupervised loss calculation based on graph coding according to preset labeled data and unlabeled data to obtain the first loss calculation result and the second loss calculation result.
[0097] The attribute prediction output module 400 is used to obtain the final loss calculation result based on the first loss calculation result and the second loss calculation result, and to optimize the parameters of the graph neural network model according to the final loss calculation result, so as to obtain the prediction result by performing molecular graph attribute prediction according to the optimal graph neural network model.
[0098] Furthermore, in the aforementioned soft link generation module 100, the expression for the first adjacency matrix is:
[0099] A ′ =GSC(G)=σ(f mlp (E)
[0100] Among them, A′ G is the first adjacency matrix, G is the molecular graph, GSC represents the formation of soft links, and E represents the characteristics of chemical bonds.
[0101] Furthermore, the aforementioned mask and graph encoding module 200 is also used for:
[0102] For the first adjacency matrix A ′ A masking operation is performed on a matrix ∈ that follows a Bernoulli distribution. After the masking operation, the result is multiplied by a factor. Multiplying these results in the second adjacency matrix. The formula for calculating the discard soft connection DSC is then:
[0103]
[0104] Where M is the second adjacency matrix.
[0105] Furthermore, the aforementioned mask and graph encoding module 200 is also used for:
[0106] The second adjacency matrix M is symmetrically normalized to obtain the third adjacency matrix M′, and the original node features X of the molecular graph are propagated a predetermined number of times to generate node features X′. The third adjacency matrix M′ and the node features X′ are input into the GNN graph neural network model to obtain the graph encoding of the labeled data output T and the unlabeled data output Q:
[0107]
[0108]
[0109] T,Q=GNN(X′,M′)
[0110] Furthermore, the aforementioned loss calculation module 300 is also used for:
[0111] The first loss is calculated using the binary cross-entropy loss function containing logits, yielding the following result:
[0112]
[0113] Where P is the number of classes in the multi-label binary classification, and y c It is a true label for class c, L sup This is the result of the first loss calculation;
[0114] Calculate the mean of all unlabeled data distributions, and generate a label distribution center Q′ on the unlabeled data to minimize the entropy value. Minimize the output value Q of the model and the output value of the sharpen method
[0115]
[0116]
[0117]
[0118] Where S represents the number of data augmentations, τ represents the clarity of the category distribution controlled by the temperature hyperparameter, γ is a predefined threshold, and L... cr This is the result of the second loss calculation.
[0119] The molecular graph attribute prediction device based on a graph random neural network with dropout connections according to embodiments of the present invention can fully consider the importance of chemical bonds and make full use of information in unlabeled data during the molecular graph attribute prediction process, thereby helping to generate more training data and improve the performance of molecular graph attribute prediction.
[0120] In the description of this specification, the references to terms such as "one embodiment," "some embodiments," "example," "specific example," or "some examples," etc., indicate that a specific feature, structure, material, or characteristic described in connection with that embodiment or example is included in at least one embodiment or example of the present invention. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples. Moreover, without contradiction, those skilled in the art can combine and integrate the different embodiments or examples described in this specification, as well as the features of different embodiments or examples.
[0121] Furthermore, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one of that feature. In the description of this invention, "a plurality of" means at least two, such as two, three, etc., unless otherwise explicitly specified.
Claims
1. A method for predicting molecular graph attributes based on a graph random neural network with dropout connections, characterized in that, Includes the following steps: Based on the chemical bond features of the molecular graph, a multilayer perceptron is used to assign weights to the chemical bonds to learn the importance of the connections. The weights are then mapped to probability values in the (0, 1) interval through an activation function to convert hard connections between nodes in the molecular graph into soft connections, thereby generating the first adjacency matrix. A dropout operation is performed on the first adjacency matrix, where each element is a soft connection weight representing the importance of the corresponding chemical bond, generated in a learnable manner. The dropout operation is performed only during training and includes: randomly masking the first adjacency matrix using a mask matrix that follows a Bernoulli distribution to randomly discard some soft connections, and factoring the resulting masked matrix. Multiply them to generate a second adjacency matrix, which reduces the risk of oversmoothing and changes in the molecular graph structure while maintaining the similarity between the expected value and the original first adjacency matrix; input the original node features of the molecular graph and the second adjacency matrix into the graph neural network model to obtain the graph encoding as the output; Based on the preset labeled and unlabeled data, supervised loss calculation and unsupervised loss calculation are performed on the graph encoding respectively to obtain the first loss calculation result and the second loss calculation result. Based on the first loss calculation result and the second loss calculation result, the final loss calculation result is obtained, and the parameters of the graph neural network model are optimized according to the final loss calculation result, so as to perform molecular graph attribute prediction according to the optimal graph neural network model and obtain the prediction result.
2. The method according to claim 1, characterized in that, The expression for performing soft link transformation on the nodes of the molecular graph after weight allocation to generate the first adjacency matrix is as follows: in, This is the first adjacency matrix. This is a molecular diagram, where GSC represents the formation of soft links and E represents the characteristic of chemical bonds.
3. The method according to claim 2, characterized in that, The second adjacency matrix is generated by performing a masking operation on the first adjacency matrix after discarding soft links, including: right And a matrix that follows a Bernoulli distribution Perform a masking operation, and then multiply the result by the factor. Multiplying these results in the second adjacency matrix. The formula for calculating the discard soft connection DSC is then: in, This is the second adjacency matrix.
4. The method according to claim 3, characterized in that, The step of inputting the original node features of the molecular graph and the second adjacency matrix into the graph neural network model to obtain the graph encoding as output includes: For the second adjacency matrix The third adjacency matrix is obtained by performing symmetric normalization. and the original node features of the molecular graph Generate node features by performing a preset number of propagation operations. The third adjacency matrix and the node features enter A graph neural network model produces labeled data as output. Graph encoding of the output Q of unlabeled data:
5. The method according to claim 4, characterized in that, The step of obtaining a first loss calculation result and a second loss calculation result by performing supervised loss calculation and unsupervised loss calculation based on the graph encoding according to preset labeled data and unlabeled data includes: The first loss is calculated using the binary cross-entropy loss function containing logits, yielding the following result: in, It is the number of classes in a multi-label binary classification. It is a true tag of type C. This is the result of the first loss calculation; Calculate the mean of all unlabeled data distributions and generate a label distribution center on the unlabeled data. To minimize the value of entropy Minimize the model's output value and the output value of the sharpen method : in, For the number of data augmentations, To improve the clarity of category distribution by controlling temperature hyperparameters, For a predefined threshold, This is the result of the second loss calculation.
6. A molecular graph attribute prediction device based on a graph random neural network with dropout connections, characterized in that, include: The soft connection generation module is used to learn the importance of the connection by weighting the chemical bonds based on the chemical bond features of the molecular graph and by using a multilayer perceptron to assign weights to the chemical bonds. The weights are then mapped to probability values in the (0, 1) interval through an activation function to convert hard connections between nodes in the molecular graph into soft connections, thereby generating the first adjacency matrix. The mask and graph encoding module is used to perform a dropout operation on the first adjacency matrix, where each element in the first adjacency matrix is a soft connection weight representing the importance of the corresponding chemical bond, generated in a learnable manner. The dropout operation is performed only during training and includes: randomly masking the first adjacency matrix using a mask matrix that follows a Bernoulli distribution to randomly discard some soft connections, and factoring the resulting masked matrix. Multiply them to generate a second adjacency matrix, which reduces the risk of oversmoothing and changes in the molecular graph structure while maintaining the similarity between the expected value and the original first adjacency matrix; input the original node features of the molecular graph and the second adjacency matrix into the graph neural network model to obtain the graph encoding as the output; The loss result calculation module is used to perform supervised loss calculation and unsupervised loss calculation based on the graph encoding according to the preset labeled data and unlabeled data, respectively, to obtain the first loss calculation result and the second loss calculation result; The attribute prediction output module is used to obtain a final loss calculation result based on the first loss calculation result and the second loss calculation result, and to optimize the parameters of the graph neural network model according to the final loss calculation result, so as to perform molecular graph attribute prediction according to the optimal graph neural network model and obtain the prediction result.
7. The apparatus according to claim 6, characterized in that, In the soft link generation module, the expression for the first adjacency matrix is: in, This is the first adjacency matrix. This is a molecular diagram, where GSC represents the formation of soft links and E represents the characteristic of chemical bonds.
8. The apparatus according to claim 7, characterized in that, The mask and graph encoding module is also used for: right And a matrix that follows a Bernoulli distribution Perform a masking operation, and then multiply the result by the factor. Multiplying these results in the second adjacency matrix. The formula for calculating the discard soft connection DSC is then: in, This is the second adjacency matrix.
9. The apparatus according to claim 8, characterized in that, The mask and graph encoding module is also used for: For the second adjacency matrix The third adjacency matrix is obtained by performing symmetric normalization. and the original node features of the molecular graph Generate node features by performing a preset number of propagation operations. The third adjacency matrix and the node features enter A graph neural network model produces labeled data as output. Graph encoding of the output Q of unlabeled data:
10. The apparatus according to claim 9, characterized in that, The loss calculation module is also used for: The first loss is calculated using the binary cross-entropy loss function containing logits, yielding the following result: in, It is the number of classes in a multi-label binary classification. It is a true tag of type C. This is the result of the first loss calculation; Calculate the mean of all unlabeled data distributions and generate a label distribution center on the unlabeled data. To minimize the value of entropy Minimize the model's output value and the output value of the sharpen method : in, For the number of data augmentations, To improve the clarity of category distribution by controlling temperature hyperparameters, For a predefined threshold, This is the result of the second loss calculation.
Citation Information
Patent Citations
Individual driving gene prediction method based on semi-supervised graph neural network
CN115019891A
Attribute value prediction device and attribute value prediction program
JP2019095957A