A method, system and device for graph structure optimization for compound property prediction

By optimizing the graph structure by calculating commuting time distance on the compound graph structure and combining a GNN classifier with graph convolution and graph pooling modules, the problem of low accuracy in predicting compound properties in existing technologies is solved, and higher prediction accuracy is achieved.

CN115662536BActive Publication Date: 2026-01-06WUHAN UNIV
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202211284312.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-10-20
Publication Date
2026-01-06
Estimated Expiration
2042-10-20

AI Technical Summary

Technical Problem

Existing methods for predicting the properties of compounds are ineffective at capturing high-order structural information when faced with complex and diverse biomolecules, resulting in inaccurate prediction results.

Method used

By calculating the commuting time distance on the compound graph structure, the graph structure is optimized, and a GNN classifier combining graph convolution and graph pooling modules is used to extract node-level and graph-level representations for compound property prediction.

Benefits of technology

It improves the accuracy of compound property prediction, especially in cases with a wide variety of compounds and complex properties, and captures more graph structural information.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115662536B_ABST
    Figure CN115662536B_ABST
Patent Text Reader

Abstract

The application discloses a kind of graph structure optimization method, system and method for compound property prediction, first obtain compound data, including compound total number, compound category number, average small molecule number in compound and average edge number, data preprocessing is carried out to compound data;Then the data after pre-processing is used to calculate the commuting time distance on graph, and then the optimized compound graph structure is obtained by neighborhood selection function;Finally, the optimized compound graph structure obtained in step 2 is input into GNN classifier, and property prediction is carried out on compound graph data;The application can effectively complete the task of compound property prediction, and is suitable for strong structure, large amount of data, compound property variety scene, and the accuracy of multiple models has obvious improvement.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the fields of computer science, biochemistry and machine learning technology, and relates to a graph structure optimization method, system and device, specifically a graph structure optimization method, system and device for predicting the properties of compounds. Background Technology

[0002] In the biomedical field, it is often necessary to classify the properties of an unknown biomolecule. Determining molecular properties using traditional biological analysis methods is extremely time-consuming and laborious, necessitating the introduction of neural network models for efficient and accurate prediction of molecular properties. Regarding compound property prediction models, Max Welling et al. proposed GCN (Graph Convolutional Neural Network) in 2016 by defining Fourier transforms on a graph. Using aggregation strategies and combination functions, they obtained the representation of each node, and then obtained a graph-level representation through common graph pooling functions such as sum and max. Based on this representation, the original compound was classified. Subsequently, in 2017, Petar Velickovic et al. introduced an attention mechanism into GCN, proposing GAT (Graph Attention Network), which enabled better node representation. KeyuluXu et al., through theoretical analysis in 2018, introduced a new aggregation strategy into GCN, proposing GIN (Graph Isomorphic Network), which can balance node representation and graph-level representation, achieving higher accuracy in compound property classification. Similarly, Will... Hamilton et al., considering the difficulty of training models with large-scale graph data, applied graph sampling methods to the aggregation strategy of graph neural networks, proposing GraphSAGE (Graph Neural Network Using Graph Sampling), which is highly practical for large-scale graph network data while maintaining accuracy. On the other hand, combination functions are also a focus of attention. In 2020, Hao Zhu et al. defined a new combination function based on random walks on graphs, enabling graph neural networks to consider nodes with different hop counts, thus proposing SSGC (Graph Neural Network Based on Markov Graph Diffusion Kernel), which has shown good results in many aspects.

[0003] Besides the methods mentioned above, other methods have designed specialized graph pooling functions to obtain graph-level representations for better classification and prediction results. As early as 2015, Oriol Vinyals attempted to pool nodes on a graph, proposing Set2Set (a graph pooling method based on encoding all nodes using a recurrent neural network). More recently, in 2020, Ekagra Ranjan et al., leveraging a node discarding mechanism, used a scoring function to remove nodes (or clusters) with lower scores for pooling, proposing ASAP (a graph pooling method based on a node discarding mechanism) and achieving good results.

[0004] In summary, from the earliest simple graph pooling method Set2Set, to the combination of graph neural networks (GCN) and general graph pooling methods, to improved graph neural network variants such as GAT and GIN for different problems, and finally to the design of a dedicated graph pooling method ASAP, this development process reveals that the methods or techniques used in these models focus more on the internal mechanisms of the model, such as aggregation strategies and combination functions in graph neural networks, and different pooling mechanisms in graph pooling functions. They all attempt to extract information from the graph, rather than making good use of the information already present in the graph. However, biomolecular structures in the biomedical field are more complex and structurally robust than other types of graph structure data. Therefore, predicting the properties of biomolecular structures requires methods that better highlight the graph structure and make the differences between different types of biomolecules more apparent. Summary of the Invention

[0005] To address the aforementioned technical problems, this invention proposes a method, system, and device for predicting compound properties by pre-optimizing the graph structure data of compounds based on commuting time and distance on a graph, thereby enabling the model to perform better. This allows multiple models to perform well even in prediction scenarios with strong structure and diverse types.

[0006] The technical solution adopted by the method of the present invention is: a graph structure optimization method for predicting compound properties, comprising the following steps:

[0007] Step 1: Obtain compound data, including the total number of compounds, the number of compound categories, the average number of small molecules in the compounds, and the average number of edges. Perform data preprocessing on the compound data.

[0008] Step 2: Calculate commuting time and distance on the graph using the preprocessed data, and then obtain the optimized compound graph structure through a neighborhood selection function;

[0009] Step 3: Input the optimized compound graph structure obtained in Step 2 into the GNN classifier to predict properties on the compound graph data;

[0010] The GNN classifier is composed of a graph convolution module and a graph pooling module, including a first input_dim×hidden convolution block, a first hidden×hidden convolution block, a second hidden×hidden convolution block, a graph pooling function, and a hidden×output_dim multilayer linear perceptron.

[0011] The first input_dim×hidden convolutional block, the first hidden×hidden convolutional block, and the second hidden×hidden convolutional block are sequentially connected to form a graph convolutional module. The optimized compound graph structure is input, and after passing through the graph convolutional module, the node features on the graph are aggregated and updated to extract node-level representations.

[0012] The graph pooling function and the hidden×output_dim multilayer linear perceptron are sequentially connected to form a graph pooling module. The node-level representation mentioned above is input, and after passing through the graph pooling module, the graph-level representation is extracted and used as the input of the hidden×output_dim multilayer linear perceptron. This process together constitutes the graph pooling module. The input is the node-level representation on the graph. After processing by the graph pooling function and updating by the multilayer linear perceptron, the compound property prediction result is output.

[0013] The first input_dim×hidden convolutional block consists of an input_dim×hidden convolutional layer and a ReLU activation function; the first hidden×hidden convolutional block and the second hidden×hidden convolutional block each consist of a hidden×hidden convolutional layer and a ReLU activation function; the graph pooling function consists of various graph pooling layers, generally mean, add, or sum methods; the hidden×output_dim multilayer linear perceptron consists of a hidden×hidden linear layer, a ReLU activation function, a dropout layer, a hidden×output_dim linear layer, and a log_softmax function.

[0014] The technical solution adopted by the system of the present invention is: a graph structure optimization system for predicting compound properties, comprising the following modules:

[0015] Module 1 is used to acquire compound data, including the total number of compounds, the number of compound categories, the average number of small molecules in the compounds, and the average number of edges, and to perform data preprocessing on the compound data;

[0016] Module 2 is used to calculate commuting time and distance on the graph using preprocessed data, and then obtains the optimized compound graph structure through a neighborhood selection function;

[0017] Module 3 is used to input the optimized compound graph structure obtained in Module 2 into the GNN classifier to predict properties on the compound graph data;

[0018] The GNN classifier is composed of a graph convolution module and a graph pooling module, including a first input_dim×hidden convolution block, a first hidden×hidden convolution block, a second hidden×hidden convolution block, a graph pooling function, and a hidden×output_dim multilayer linear perceptron.

[0019] The first input_dim×hidden convolutional block, the first hidden×hidden convolutional block, and the second hidden×hidden convolutional block are sequentially connected to form a graph convolutional module. The optimized compound graph structure is input, and after passing through the graph convolutional module, the node features on the graph are aggregated and updated to extract node-level representations.

[0020] The graph pooling function and the hidden×output_dim multilayer linear perceptron are sequentially connected to form a graph pooling module. The node-level representation mentioned above is input, and after passing through the graph pooling module, the graph-level representation is extracted and used as the input of the hidden×output_dim multilayer linear perceptron. This process together constitutes the graph pooling module. The input is the node-level representation on the graph. After processing by the graph pooling function and updating by the multilayer linear perceptron, the compound property prediction result is output.

[0021] The first input_dim×hidden convolutional block consists of an input_dim×hidden convolutional layer and a ReLU activation function; the first hidden×hidden convolutional block and the second hidden×hidden convolutional block each consist of a hidden×hidden convolutional layer and a ReLU activation function; the graph pooling function consists of various graph pooling layers, generally mean, add, or sum methods; the hidden×output_dim multilayer linear perceptron consists of a hidden×hidden linear layer, a ReLU activation function, a dropout layer, a hidden×output_dim linear layer, and a log_softmax function.

[0022] The technical solution adopted by the device of the present invention is: a graph structure optimization device for predicting compound properties, comprising:

[0023] One or more processors;

[0024] A storage device for storing one or more programs, which, when executed by one or more processors, cause the one or more processors to implement the graphical structure optimization method for predicting compound properties.

[0025] Compared with existing technologies, the beneficial effects of this invention are as follows: Due to the strong structural characteristics, complex types, and diverse properties of compounds such as proteins and biomolecules, although existing technologies have made certain breakthroughs in predicting compound properties, the prediction results are not good enough when dealing with such strongly structured data, and it is often difficult to capture high-order structural information. By comprehensively considering long-distance nodes and short-distance nodes in the graph, the commuting time distance is preprocessed to obtain a better graph structure, which makes the model have better accuracy and can perform well even in the case of a wide variety of complex properties. Attached Figure Description

[0026] Figure 1 This is a block diagram illustrating the principle of the method in an example of the present invention;

[0027] Figure 2 This is a diagram of the GNN classifier structure in an example of the present invention;

[0028] Figure 3 This diagram illustrates the accuracy of results using different topk values ​​on the MUTAG dataset when selecting parameters in an embodiment of the present invention.

[0029] Figure 4 This diagram illustrates the accuracy of results using different topk values ​​on the PTC-MR dataset when selecting parameters in an embodiment of the present invention.

[0030] Figure 5 This is a schematic diagram comparing the accuracy of different algorithms in this invention on the MUTAG dataset.

[0031] Figure 6 This is a schematic diagram comparing the accuracy of different algorithms in this invention on the D&D dataset;

[0032] Figure 7 This is a schematic diagram comparing the accuracy of different algorithms in this invention on the PROTEINS dataset.

[0033] Figure 8 This is a schematic diagram comparing the accuracy of different algorithms in this invention on the PTC-MR dataset;

[0034] Figure 9This diagram illustrates the accuracy comparison of different algorithms in this invention on the ENZYMES dataset. Detailed Implementation

[0035] To facilitate understanding and implementation of the present invention by those skilled in the art, the present invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the embodiments described herein are for illustration and explanation only and are not intended to limit the present invention.

[0036] Please see Figure 1 The present invention provides a graphical structure optimization method for predicting compound properties, comprising the following steps:

[0037] Step 1: Obtain compound data, including the total number of compounds, the number of compound categories, the average number of small molecules in the compounds, and the average number of edges. Perform data preprocessing on the compound data.

[0038] In this embodiment, the compound data is preprocessed, including variable derivation, data cleaning and transformation, and feature standardization.

[0039] The reason for variable derivation in this embodiment lies in the topological information in the compound structure graph, such as first-order connectivity and second-order connectivity, which plays a crucial role in predicting its properties. Relying solely on single node features may be insufficient for predicting compound properties; therefore, it is necessary to consider not only the connections between molecular nodes but also to process and integrate these features to form new variables. In molecular and protein data, certain structural patterns are inherently linked to functional properties. Therefore, for datasets that originally lack node features, we can indirectly model these structural patterns as their node features. For example, based on the connectivity of nodes in the graph, the degree of each node can be OneHot encoded to form its feature. This derived new variable can be input into the model, effectively improving the model's accuracy in predicting compound properties. Furthermore, for graphs with large node degrees, OneHot encoding cannot fully describe its degree information. Orthogonal transformations can be performed on the degree of each node to use as its feature. In addition, based on some important attributes in the graph, a series of weights reflecting these attributes can be added, and various calculation methods such as adding, connecting, and calculating Cartesian products can be used to integrate multiple attributes, resulting in new feature variables that better reflect the compound's properties.

[0040] The data cleaning and transformation in this embodiment mainly includes the following tasks: Cleaning of isolated nodes: In the graph data of some compounds, there may be some isolated nodes. Although they contain some information, their presence has a greater impact on the model's noise, so they are often directly removed to obtain a maximum connected subgraph. Data cleaning is technically simple, but the processing is quite complex. In addition to using tools or manual processing, some code can also be written to assist in the cleaning process.

[0041] Data transformation involves unifying graph data of different data types, including scipy, sparse.coo_matrix, and numpy.ndarray, into the form of edge_index + edge_weight. This facilitates subsequent model training and significantly reduces memory overhead. For some models, sparse matrix form does not meet their input requirements, so we need to further transform the graph data into a dense matrix form using this method before proceeding with model training.

[0042] The specific operation of feature standardization is to perform a linear transformation on the node features in the original graph data so that the result value is mapped to the range [0, 1]. This maps the value of each attribute to a relatively close numerical value and fluctuation range, thereby improving the convergence speed and model accuracy during gradient descent.

[0043] Step 2: Calculate commuting time and distance on the graph using the preprocessed data, and then obtain the optimized compound graph structure through a neighborhood selection function;

[0044] For a graph structure with n nodes and m edges, this embodiment uses G = (V, E) to represent it, where V is the initial set of nodes in G and E is the initial set of edges in G. Furthermore, this embodiment uses A to represent the adjacency matrix of G and D to represent the degree information diagonal matrix of G. Each node in the graph possesses corresponding features, which this embodiment uses... Let q0 be the feature dimension of the node in G.

[0045] The commute time distance (denoted as ECTD) on the graph can be realized by calculating the generalized inverse L+ of the graph Laplacian matrix. The specific formula for calculating the commute time distance between node i and node j is shown in (1):

[0046] ECTD i,j =Vol G (e i -e j ) T L + (e i -e j (1)

[0047] Among them, Vol G The total degree of the entire graph G can be considered a constant; e i Represents the i-th row of the identity matrix.

[0048] Obviously, calculating commuting time and distance on the map in this way is very time-consuming. In order to reduce the time cost without affecting the effectiveness, this embodiment adopts the following measures:

[0049] First, this embodiment uses a normalized Laplace matrix L. sym The Laplace matrix on the graph is defined as L, and its calculation method is as shown in equation (2):

[0050] L = DA (2)

[0051] Clearly, L contains both degree and connectivity information of the graph. However, directly using L in a graph can lead to several problems. For example, the degree information between different nodes can vary significantly; node m might only be connected to two nodes, while node n might be connected to 100 nodes. This would greatly slow down the convergence speed during model training, resulting in longer training times. Furthermore, graph structures containing proteins or biomolecules often exhibit vastly different edge weights. The edge weights of node A with other nodes might range from 0 to 1, while the edge weights of node B with other nodes might range from 1 to 100. This would cause the model to focus on learning nodes with high weights, neglecting nodes with low edge weights. To address these issues, this embodiment uses a symmetric normalized Laplacian matrix L. sym This is because, for different nodes, the absolute values ​​of edge weights and the number of edges are not important; their relative magnitudes are what matter. The symmetric normalized Laplace matrix L... sym The calculation is as shown in equation (3), where I represents the identity matrix:

[0052]

[0053] Next, this embodiment uses the low-rank approximation to calculate the generalized inverse of the normalized Laplace matrix. By L sym calculate Generally, SVD is used, which often requires calculating multiple n×n matrices. To simplify the computational complexity, this embodiment uses a low-rank approximation, that is, discarding some structural information in exchange for computational efficiency. The calculation method is as shown in equation (4):

[0054]

[0055] rank is the threshold for low-rank approximation. In this embodiment, this parameter has not been optimized, but its default value of 1e-15 is used.

[0056] Finally, this embodiment indirectly calculates the commuting time distance by calculating the average first arrival time (AFT). From equation (1), this embodiment knows how to calculate a single element of the ECTD matrix, but this method is undoubtedly inefficient when calculating the commuting time distance across the entire map. Therefore, this embodiment calculates ECTD more efficiently by first calculating the AFT. By definition, the commuting time distance between node i and node j is equivalent to the average first arrival time from node i to node j, plus the average first arrival time from node j to node i, as shown in equation (5):

[0057] ECTD i,j =AFT i,j +AFT j,i (5)

[0058] In order to simplify the computational complexity of AFT calculation, Fouss et al. derived a very ingenious AFT calculation method by relating the Laplacian matrix of the original graph to the Laplacian matrix of the subgraph after removing a node. The process is shown in equations (6)-(8):

[0059]

[0060]

[0061] AFT_norm = AFT / Vol G (8)

[0062] diag() is used to extract the main diagonal elements of the matrix. The AFT has already been calculated in this embodiment using equation (7). However, considering the issues of model convergence and node feature learning, this embodiment uses Vol... G To standardize the AFT. After calculating the AFT, the ECTD of the entire image can be obtained through equation (5) in this embodiment.

[0063] After calculating the ECTD of the entire graph, this embodiment uses a neighborhood selection function to determine the new neighborhood of each node, as shown in equation (9):

[0064] N ectd (i) = selection(ECTD) (9)

[0065] Here N ectd(i) represents the neighborhood of node i based on ECTD. The selection function selects a suitable neighborhood for node i based on the ECTD values ​​between nodes. In this embodiment, the top k nodes with the smallest ECTD values ​​are simply selected as the neighborhood of the central node, meaning each node has at most top k neighbors. This way, the neighborhood selection function provides each node with a more reasonable neighborhood distribution and more suitable neighborhood information. Therefore, this embodiment strives to connect each node to a fixed number of top k neighbors, who may have a stronger connection.

[0066] Step 3: Input the optimized compound graph structure obtained in Step 2 into the GNN classifier to predict properties on the compound graph data;

[0067] Please see Figure 2 The GNN classifier in this embodiment is composed of a graph convolution module and a graph pooling module, including a first input_dim×hidden convolution block, a first hidden×hidden convolution block, a second hidden×hidden convolution block, a graph pooling function, and a hidden×output_dim multilayer linear perceptron.

[0068] The first input_dim×hidden convolutional block, the first hidden×hidden convolutional block, and the second hidden×hidden convolutional block are sequentially connected to form a graph convolutional module. The optimized compound graph structure is input, and after passing through the graph convolutional module, the node features on the graph are aggregated and updated to extract node-level representations.

[0069] The graph pooling function and the hidden×output_dim multilayer linear perceptron are sequentially connected to form the graph pooling module. The node-level representation mentioned above is input, and after passing through the graph pooling module, the graph-level representation is extracted and used as the input to the hidden×output_dim multilayer linear perceptron. This process together constitutes the graph pooling module. The input is the node-level representation on the graph. After processing by the graph pooling function and updating by the multilayer linear perceptron, the compound property prediction result is output.

[0070] The first input_dim×hidden convolutional block consists of an input_dim×hidden convolutional layer and a ReLU activation function; the first hidden×hidden convolutional block and the second hidden×hidden convolutional block each consist of a hidden×hidden convolutional layer and a ReLU activation function; the graph pooling function consists of various graph pooling layers, generally the mean, add, or sum methods; the hidden×output_dim multilayer linear perceptron consists of a hidden×hidden linear layer, a ReLU activation function, a dropout layer, a hidden×output_dim linear layer, and a log_softmax function.

[0071] In this embodiment, the GNN classifier is a pre-trained GNN classifier; its training process is as follows:

[0072] (1) Obtain relevant information / data from the compound dataset, including the total number of compounds, the number of compound categories, the average number of small molecules in the compounds and the average number of edges, perform data preprocessing on the compound data, and divide the data into training set, test set and validation set;

[0073] (2) Use the preprocessed data to calculate the commuting time and distance on the graph, and then use the neighborhood selection function to obtain the optimized compound graph structure; set an appropriate threshold for the neighborhood selection function;

[0074] This is determined by comparing the performance of the GNN classifier when a parameter is selected with different values, such as... Figure 2 As shown, in the MUTAG dataset, the GNN classifier achieves optimal prediction performance when the topk value of the neighborhood selection function is around 10. Therefore, when using the GNN classifier in the MUTAG dataset, a topk value of 10 for the neighborhood selection function is appropriate. The same principle applies to parameter selection in other cases.

[0075] (3) Semi-supervised learning is performed using the optimized compound structure data to train a GNN classifier, and the model is serialized and permanently stored on the hard disk. The specific implementation method is as follows:

[0076] In compound property prediction, the GNN classifier includes a graph pooling module and a classification module. The graph pooling module performs pooling operations on the graph structure to obtain a representation of the graph structure; the classification module, based on the representation of the graph structure, obtains the classification result of the graph structure. The output of the graph pooling module is connected to the input of the classification module, and the output of the classification module serves as the output of the GNN classifier.

[0077] The graph pooling module can use a graph neural network, and the classification module can be at least one fully connected layer. The graph pooling module and the classification module form a classification network. Each time the classification network is trained in an iteration, the graph pooling module performs a graph pooling method on the image to obtain the representation of the image under the current iteration training.

[0078] Next, the graph structure of the sample images selected from the training dataset is input into the classification network to calculate the loss value of the classification network. In each training iteration, the loss value of the classification network is calculated based on the loss values ​​of the graph pooling module and the classification module. Both the loss values ​​of the graph pooling module and the classification module can be calculated using the graph structure of the selected sample images and their respective loss functions.

[0079] After multiple iterations of training, the loss value of the classification network is used to check whether the GNN classifier meets the training completion condition. If the GNN classifier meets the training completion condition, it is considered a trained GNN classifier.

[0080] Training completion conditions include at least one of the following: the number of training iterations reaches a predetermined iteration threshold (a threshold pre-estimated using the loss value of the GNN classifier), or the loss value of the GNN classifier is less than a predetermined loss threshold. For example, 5,000 training iterations are performed, and the loss value is less than 0.05. Setting training completion conditions can accelerate model convergence.

[0081] If the GNN classifier does not meet the training completion conditions, the relevant parameters in the GNN classifier are adjusted to make the loss value of the GNN classifier converge, based on the adjusted GNN classifier and the adjusted loss value of the GNN classifier.

[0082] Once the entire GNN classifier training is complete, the model can be serialized and permanently stored on the hard drive.

[0083] Using a GNN classifier to predict the properties of compound graph data involves deserializing the data from the hard drive into memory, inputting new compound structure data, and then predicting its properties.

[0084] If new data emerges after a period of time and retraining is required, return to step 1.

[0085] This embodiment addresses the issue of low prediction accuracy in predicting the properties of a wide variety of compounds with strong structural characteristics using existing technologies. It proposes a graph structure optimization method for compound property prediction to solve these problems. To verify the effectiveness of the compound property prediction method based on commuting time distance, the following five datasets are used:

[0086] (1) MUTAG is a dataset of nitrified compounds designed to predict their mutagenesis in Salmonella typhimurium. The input graph represents the compounds, where nodes represent atoms and are labeled by the atom type, and the edges between nodes represent the bonds between the corresponding atoms. It includes 188 compound samples with 7 discrete node labels, 2 classes of compounds, with an average of 17.93 nodes and an average of 19.79 edges per graph.

[0087] (2) D&D is a dataset containing 1,178 protein structures. Each protein is represented by a graph where nodes are amino acids, and two nodes are connected by an edge if they are less than 6 angstroms apart. The prediction objective is to distinguish between enzymes and non-enzymes in these proteins. It contains 1,178 graphs, divided into two protein classes, with an average of 284.32 nodes and an average of 715.66 edges per graph.

[0088] (3) PROTEINS is a dataset containing 1,113 proteins, which are divided into enzymes and non-enzymes. Nodes represent amino acids, and two nodes are connected by an edge if they are less than 6 angstroms apart. It contains 1,113 graphs divided into two protein classes, with an average of 39.06 nodes and an average of 72.82 edges per graph.

[0089] (4) PTC-MR is a dataset containing 344 compounds that report their carcinogenicity in rats. Each node represents a compound molecule with 19 node labels, and the edges represent the bonds between them. The prediction task is to determine whether they are carcinogenic to rats. It contains 344 graphs, divided into two classes of compounds. The average number of nodes per graph is 14.30, and the average number of edges per graph is 14.69.

[0090] (5) ENZYMES is a dataset of 600 protein tertiary structures extracted from the BRENDA enzyme database. It contains 6 enzymes, and the prediction task is to classify these 6 enzymes. It contains 600 graphs, divided into six enzyme classes, with an average of 32.63 nodes and an average of 124.20 edges per graph.

[0091] A graph structure optimization method for predicting compound properties is compared with seven graph neural network methods:

[0092] (1) GCN (Graph Convolutional Neural Network);

[0093] (2) GAT (Graph Attention Neural Network);

[0094] (3)SSGC (Graph Neural Network Based on Markov Graph Diffusion Kernel);

[0095] (4) SAGE (Graph Neural Network Using Graph Sampling);

[0096] (5) GIN (Graph Isomorphic Network);

[0097] (6) Set2Set (a graph pooling method based on recurrent neural networks that encodes all nodes);

[0098] (7) ASAP (a graph pooling method based on a node discarding mechanism).

[0099] In this embodiment, in order to explore the parameter settings of the graphical structure optimization method for predicting compound properties, an experiment was designed to compare the performance of the model when the same parameter is selected with different values, so as to obtain the best parameter settings;

[0100] In order to verify the feasibility of using commuting time distance for compound property prediction, this embodiment designs an experiment to apply commuting time distance to a graph isomorphic network in a traditional method and compare its performance with its original performance, comparing the accuracy on multiple datasets.

[0101] In order to verify the improvement effect of commuting time distance on graph neural networks, this embodiment designs an experiment to apply commuting time distance to traditional methods such as graph convolutional neural networks, graph attention neural networks, graph neural networks based on Markov graph diffusion kernels, graph neural networks using graph sampling, graph isomorphic networks, graph pooling methods based on recurrent neural networks to encode all nodes, and graph pooling methods based on a node discarding mechanism, and compares their accuracy on different datasets.

[0102] The graph structure optimization method used for predicting compound properties mainly involves the topk value of the neighborhood selection function, which has a significant impact on the algorithm's performance. This embodiment explores the optimal setting of the parameters through experiments.

[0103] like Figure 3 As shown, in the MUTAG dataset, the classification accuracy of the GCN, GIN, and ASAP models changes with the topk value. For the GIN model, a topk value of around 10 yields the greatest performance improvement, while for the GCN and ASAP models, a topk value of around 13 yields the greatest performance improvement. Therefore, on the same dataset, different topk values ​​can be selected for different models to achieve the maximum performance improvement.

[0104] like Figure 4As shown, in the PTC-MR dataset, the classification accuracy of the GCN, GIN, and ASAP models changes with the topk value. For the GIN model, a topk value of around 10 yields the greatest performance improvement, while for the GCN and ASAP models, a topk value of around 10 also provides the greatest performance improvement. Therefore, on different datasets, the topk value selected for the same model can be different to achieve the maximum performance improvement.

[0105] The same applies to parameter selection in other cases.

[0106] from Figures 5 to 9 It can be observed that the accuracy of the GIN model compared with that of the graph structure optimization method on five datasets is directly reflected in the model's correctness, and is also the most intuitive indicator of the model's performance.

[0107] These figures show that, for the GIN model, the accuracy using the graph structure optimization method is higher than the original model on all five biochemical datasets. Compared to the original model, the graph structure optimization method achieves 1.11% higher accuracy on the MUTAG dataset; 3.19% higher on the D&D dataset; 3.67% higher on the PROTEINS dataset; 1.77% higher on the PTC-MR dataset; and 1.45% higher on the ENZYMES dataset. In conclusion, the graph structure optimization method is compatible with neural network methods and is effective in predicting compound properties. Furthermore, the results from the PROTEINS, D&D, and ENZYMES datasets demonstrate that the graph structure optimization method is also applicable when dealing with a wide variety of compounds with diverse properties.

[0108] from Figures 5 to 9 It can be observed that the accuracy of the seven neural network models compared with their accuracy when running on five datasets using the commuting time distance method directly reflects the correctness of the model and is also the most intuitive indicator of the model's performance.

[0109] These figures show that on the five biochemical datasets, the accuracy of the graph structure optimization method is higher than the original model in most cases, especially on the MUTAG dataset where it achieves a significant performance improvement, and on the PROTEINS and PTC-MR datasets, it achieves competitive results. However, it can be observed that the GCN model using the graph structure optimization method only shows performance improvement over the original model on half of the datasets. This may be because the choice of graph pooling method affects the model's accuracy. Future research could explore different combination strategies of graph pooling methods and graph structure optimization methods. In summary, the graph structure optimization method improves the performance of most neural network methods, demonstrating its high practicality. Furthermore, its breakthrough in accuracy on multiple biochemical datasets further confirms that the optimization of the graph structure optimization method does indeed improve the model's predictive ability.

[0110] It should be understood that any parts not described in detail in this specification belong to the prior art.

[0111] It should be understood that the above description of the preferred embodiments is quite detailed, but it should not be considered as a limitation on the scope of protection of this invention. Those skilled in the art, under the guidance of this invention, can make substitutions or modifications without departing from the scope of protection of the claims of this invention, and all such substitutions or modifications fall within the scope of protection of this invention. The scope of protection of this invention should be determined by the appended claims.

Claims

1. A graph structure optimization method for compound property prediction, characterized in that, The method comprises the following steps: Step 1: obtaining compound data, including the total number of compounds, the number of compound categories, the average number of small molecules in the compounds and the average number of edges, and performing data preprocessing on the compound data; Step 2: using the preprocessed data to calculate the commuting time distance on the graph, and then obtaining the optimized compound graph structure through a neighborhood selection function; Step 3: inputting the optimized compound graph structure obtained in step 2 into a GNN classifier to perform property prediction on the compound graph data; The GNN classifier is composed of a graph convolution module and a graph pooling module, and comprises a first input_dimxhidden convolution block, a first hiddenxhidden convolution block, a second hiddenxhidden convolution block, a graph pooling function and a hiddenxoutput_dim multilayer linear perception machine; The first input_dimxhidden convolution block, the first hiddenxhidden convolution block and the second hiddenxhidden convolution block are sequentially connected and jointly constitute the graph convolution module, input the optimized compound graph structure, aggregate and update the node features on the graph through the graph convolution module, and extract the node-level representation; The graph pooling function and the hiddenxoutput_dim multilayer linear perception machine are sequentially connected and jointly constitute the graph pooling module, input the above-mentioned node-level representation, and extract the graph-level representation through the graph pooling module, which is taken as the input of the hiddenxoutput_dim multilayer linear perception machine; this process jointly constitutes the graph pooling module, the input is the node-level representation on the graph, and after processing by the graph pooling function and updating by the multilayer linear perception machine, the output is the compound property prediction result; The first input_dimxhidden convolution block is composed of an input_dimxhidden convolution layer and a relu activation function; the first hiddenxhidden convolution block and the second hiddenxhidden convolution block are composed of a hiddenxhidden convolution layer and a relu activation function; the graph pooling function is composed of various graph pooling layers, generally mean, add or sum method; the hiddenxoutput_dim multilayer linear perception machine is composed of a hiddenxhidden linear layer, a relu activation function, a dropout layer, a hiddenxoutput_dim linear layer and a log_softmax function.

2. The graph structure optimization method for compound property prediction according to claim 1, characterized in that: The data preprocessing of the compound data in step 1 comprises variable derivation; the specific implementation comprises one or a combination of the following processing methods: For a data set without node features, the degree of each node is OneHot coded according to the connectivity of the nodes in the graph to form the features of the nodes; For a graph with node degrees greater than a preset value, orthogonal transformation is performed on each node degree to obtain the features of the nodes. According to the attribute importance in the figure, a series of weights reflecting the attributes are added, and one or more of addition, connection, or calculation of Cartesian product is used to integrate multiple attributes into new characteristic variables that can better reflect the properties of the compounds.

3. The graph structure optimization method for compound property prediction according to claim 1, wherein: The data preprocessing of the compound data in step 1 includes data cleaning, conversion and feature standardization processing; The data cleaning is cleaning of isolated nodes to obtain a maximum connected subgraph; The data conversion is to uniformly process the original different data types of graph data into a unified format; The feature standardization processing is a linear transformation of the node features in the original graph data, so that the result value is mapped to [0, 1].

4. The graph structure optimization method for compound property prediction according to claim 1, wherein: In step 2, for a graph structure data with n nodes and m edges, denoted as G=(V, E), where V is the initial node set and E is the initial edge set; use A to represent the adjacency matrix of G, and D to represent the degree information diagonal matrix of G; each node in G has a corresponding feature, denoted as where q0 is the feature dimension of the node in G. The Laplacian matrix of G is defined as L: L = D - A; computing a symmetric normalized laplacian matrix L sym : Where I represents the identity matrix: Computing the generalized inverse of a normalized laplacian using low rank approximation Where rank is the threshold of low-rank approximation; Define the commute time distance ECTD between node i and node j i,j is equivalent to the average first arrival time AFT from node i to node j i,j plus the average first arrival time AFT from node j to node i j,i ; ECTD i,j = AFT i,j + AFT j,i ; AFT norm = AFT / Vol G ; where AFT norm is the normalized AFT, Vol G denotes the total degree of the graph; diag() takes the main diagonal elements of a matrix; AFT denotes the average first passage time between all nodes of the graph; According to ECTD i,j The total graph commute time distance ECTD is calculated between all nodes, and then a new neighborhood N for each node is determined by a neighborhood selection function ectd (i): N ectd (i) = selection(ECTD); where N ectd (i) represents the neighborhood of node i based on ECTD, the selection function selects appropriate neighborhood for node i based on ECTD value between nodes, where topk nodes with minimum ECTD value are selected as the neighborhood of the central node, that is, each node has at most topk neighbors.

5. The graph structure optimization method for compound property prediction according to claim 1, wherein: In step 3, the property prediction on the compound graph data is to deserialize from the hard disk to the memory, input the new compound graph structure information, and predict its properties.

6. The graph structure optimization method for compound property prediction according to any one of claims 1-5, characterized in that: In step 3, the GNN classifier is a trained GNN classifier; The training process is as follows: (1) Obtain a plurality of related information / data in the compound data set, including the total number of compounds, the number of compound categories, the average number of small molecules in the compound, and the average number of edges, and perform data preprocessing on the compound data; and divide the data into a training set, a test set and a validation set; (2) Calculate the commuting time distance on the graph using the preprocessed data, and then obtain the optimized compound graph structure through the neighborhood selection function; set a suitable threshold value for the neighborhood selection function; (3) Input the graph structure of the sample image selected from the training set into the GNN classifier, and calculate the loss value of the GNN classifier; In each iteration training, the loss value of the GNN classifier is calculated based on the loss value of the graph pooling module and the loss value of the classification module; (4) Detect whether the GNN classifier meets the training completion condition through the loss value of the GNN classifier, if the GNN classifier meets the training completion condition, the GNN classifier is used as a trained GNN classifier; and the GNN classifier is serialized and permanently stored to the hard disk; Wherein, the training completion condition includes at least one of the following: the number of training iterations reaches a predetermined iteration threshold, and the loss value of the GNN classifier is less than a predetermined loss value threshold.

7. A graph structure optimization system for compound property prediction, characterized in that, The following modules are included: Module 1 is used to obtain compound data, including the total number of compounds, the number of compound categories, the average number of small molecules in the compound, and the average number of edges, and to perform data preprocessing on the compound data; Module 2 is used to calculate the commuting time distance on the graph using the preprocessed data, and then obtain the optimized compound graph structure through the neighborhood selection function; Module 3 is used to input the optimized compound graph structure obtained in module 2 into the GNN classifier to predict the properties on the compound graph data; The GNN classifier is composed of a graph convolution module and a graph pooling module, and includes a first input_dimxhidden convolution block, a first hiddenxhidden convolution block, a second hiddenxhidden convolution block, a graph pooling function, and a hiddenxoutput_dim multilayer linear perception. The first input_dimxhidden convolution block, the first hiddenxhidden convolution block, and the second hiddenxhidden convolution block are sequentially connected and jointly constitute the graph convolution module, input the optimized compound graph structure, and aggregate and update the node features on the graph through the graph convolution module to extract the node-level representation. The graph pooling function and the hiddenxoutput_dim multilayer linear perception are sequentially connected and jointly constitute the graph pooling module, input the node-level representation, and extract the graph-level representation through the graph pooling module to serve as the input of the hiddenxoutput_dim multilayer linear perception; this process jointly constitutes the graph pooling module, inputs the node-level representation on the graph, and outputs the compound property prediction result after processing by the graph pooling function and updating by the multilayer linear perception. The first input_dimxhidden convolution block is composed of an input_dimxhidden convolution layer and a relu activation function; the first hiddenxhidden convolution block and the second hiddenxhidden convolution block are composed of a hiddenxhidden convolution layer and a relu activation function; the graph pooling function is composed of various graph pooling layers, and is generally a mean, add, or sum method; and the hiddenxoutput_dim multilayer linear perception is composed of a hiddenxhidden linear layer, a relu activation function, a dropout layer, a hiddenxoutput_dim linear layer, and a log_softmax function.

8. An apparatus for graph structure optimization for compound property prediction, comprising: The method comprises: one or more processors; a storage device for storing one or more programs, which, when executed by the one or more processors, cause the one or more processors to implement the graph structure optimization method for compound property prediction according to any one of claims 1 to 6.

Citation Information

Patent Citations

  • Edge message passing neural network

    US20210287067A1

  • Model and method for multi-source domain adaptation by aligning partial features

    US20220138495A1