An interpretable molecular property prediction method based on graph neural network

By leveraging the influence of generated and mapped subgraph patterns, the problem of insufficient interpretability in graph neural networks is addressed, thereby improving their interpretability and robustness in predicting the properties of chemical molecules.

CN119358591BActive Publication Date: 2025-11-18CHONGQING UNIV OF POSTS & TELECOMM
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411477215.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-10-22
Publication Date
2025-11-18
Estimated Expiration
2044-10-22

AI Technical Summary

Technical Problem

Graph neural networks lack interpretability when processing graph-structured data, and existing methods struggle to understand their decision-making processes, limiting their application in risk-sensitive scenarios.

Method used

The MiCaM algorithm is used to generate key subgraph patterns. Node embeddings and edge mask matrices are obtained through a graph neural network model. Interpretive subgraphs are generated by combining a perceptron and a mask updater. The impact of subgraph patterns on model decisions is mapped, thereby optimizing the interpretability of the model.

Benefits of technology

It improves the interpretability and robustness of graph neural networks when processing complex structured data, avoids the limitations of manually selecting subgraph patterns and automatic learning noise, and optimizes the model's performance.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119358591B_ABST
    Figure CN119358591B_ABST
Patent Text Reader

Abstract

The application belongs to the field of graph neural network interpretation, and particularly relates to an interpretable molecular property prediction method based on a graph neural network, which comprises the following steps: acquiring graph data G, iteratively processing the graph data, and generating K key subgraphs; acquiring a graph neural network graph classification model, and acquiring node embedding according to the graph neural network graph classification model; obtaining an edge mask matrix of the graph according to the node embedding; inputting the K key subgraphs and the mask matrix into a perceiver to score the importance of each key subgraph, obtaining a score matrix W and a belonging relationship matrix L of each edge in the graph G and a key subgraph mode; inputting the score matrix W and the belonging relationship matrix into a mask updater, and obtaining a final mask matrix M; and selecting topK edges with the highest mask values from the mask matrix M to generate an explanation subgraph as an explanation of the graph neural network graph classification model; and the frequent subgraph mining algorithm is used to extract important subgraph modes in the data, so that the interpretable accuracy is improved.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The application belongs to the field of graph generation and graph neural network explanation, and particularly relates to an interpretable molecular property prediction method based on a graph neural network. BACKGROUND

[0002] With the popularity of the Internet and the rapid development of data technology, people can collect a large amount of data. Unlike traditional neural networks that process vector or matrix data, graph neural networks (GNN) can directly process graph structured data, can model nodes and edges, can learn feature representations of nodes and edges from graph structured data, and can use these representations in various applications of graphs. Due to the widespread existence of graph structured data, graph neural networks have achieved good performance in many fields, such as social networks, recommendation systems, protein structure prediction, etc.

[0003] Although graph neural networks have better performance on graph structured data than some traditional machine learning algorithms, people cannot understand how they make decisions, so GNN is considered a black box. This limits its use in some risk-sensitive and high-security scenarios, such as finance and bioinformatics. Therefore, it is of great research significance to explore how graph neural networks make decisions.

[0004] However, in real-world graph data, the structure plays an important role in the properties of the graph. For example, in chemical molecules, molecules with benzene rings have certain stability, molecules with amino groups exhibit certain basic properties, and molecules with aldehyde groups exhibit certain water solubility, etc. Since the post-hoc explanation method based on masks only considers the influence of edges and nodes, the generated explanation subgraph is often scattered in structure and lacks semantic information. SUMMARY

[0005] To solve the above problems existing in the prior art, the application provides an interpretable molecular property prediction method based on a graph neural network, which comprises the following steps: obtaining a chemical molecular structure graph G, using a MiCaM algorithm to iterate the chemical molecular structure graph to generate K key subgraph patterns; obtaining a trained graph neural network model for classifying the molecular structure graph, and obtaining node embeddings in the molecular structure graph according to the graph neural network model; obtaining an edge mask matrix of the graph according to the node embeddings; inputting the K key subgraphs and the edge mask matrix into a perceptron to score the importance of each key subgraph, to obtain a score matrix W and a belonging relationship matrix L of each edge in the graph G and the key subgraph pattern; inputting the score matrix W and the belonging relationship matrix into a mask updater to obtain a final mask matrix According to the mask matrix The topK edges with the highest mask value are selected to generate an explanation subgraph, and the explanation subgraph is taken as an explanation result of the graph neural network graph classification model; and the chemical properties of the chemical molecular structure graph are predicted according to the explanation result of the graph neural network graph classification model.

[0006] The present application has the following beneficial effects:

[0007] The present application simultaneously considers the influence of edges and subgraph patterns on the prediction of the graph neural network from the perspective of multi-granularity; considering that the subgraph pattern may have an important influence on the prediction of the model, in order to avoid the limitation of manually selecting a specific subgraph pattern, a frequent subgraph mining algorithm is used to extract important subgraph patterns in the data. The present application proposes a multi-granularity structure perception unit, which learns the importance score of the model decision from the extracted important subgraph patterns, and the score reflects the degree of positive or negative influence of the subgraph pattern on the decision. Based on the learned score, the present application further maps the influence of the subgraph pattern on the model decision to the mask matrix of the explainer, thereby generating an explanation subgraph and taking it as the explanation of the model. Through this method, the requirement for knowledge of the manually defined subgraph pattern is avoided, and the problem of noise caused by automatic learning of multi-granularity subgraph patterns is avoided, thereby optimizing and improving the performance and robustness of the graph neural network in processing complex structure data. BRIEF DESCRIPTION OF DRAWINGS

[0008] Figure 1 A flowchart of the subgraph pattern mask-oriented graph neural network explanation method of the present application;

[0009] Figure 2 A structure diagram of the overall framework of the present application. DETAILED DESCRIPTION

[0010] The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative labor fall within the scope of protection of the present application.

[0011] An interpretable molecular property prediction method based on a graph neural network, the method comprising: obtaining a chemical molecular structure graph G, using a MiCaM algorithm to iterate the chemical molecular structure graph to generate K key subgraph patterns; obtaining a trained graph neural network model for classifying the molecular structure graph, and obtaining node embedding in the molecular structure graph according to the graph neural network model; obtaining an edge mask matrix of the graph according to the node embedding; inputting the K key subgraphs and the edge mask matrix into a perceiver to score the importance of each key subgraph, obtaining a score matrix W and a belonging relationship matrix L of each edge in the graph G and the key subgraph pattern; inputting the score matrix W and the belonging relationship matrix into a mask updater to obtain a final mask matrix According to the mask matrix Select the topK edges with the highest mask values to generate an explanation subgraph, and take the explanation subgraph as the interpretability result of the graph neural network graph classification model; and predict the chemical property of the chemical molecular structure graph according to the interpretability result of the graph neural network graph classification model.

[0012] The present application provides an interpretable molecular property prediction method based on a graph neural network, which comprises the following steps: Figure 1 In the graph data set , K key subgraph patterns are generated by using a MiCaM algorithm for iteration Among them represents the set of edges in the original graph G contained in the i-th common subgraph.

[0013] A graph neural network graph classification model is trained as a model to be explained, and the node embedding Z i is obtained from the model to be explained. For example, by using the reparameterization technique, an edge mask matrix M is obtained by using the node embedding. The structure of the graph neural network graph classification model is shown in Figure 2 .

[0014] The obtained mask matrix M and the generated first K subgraph patterns are input into a structure perceiver to score the importance of each subgraph pattern, and a score matrix W and a belonging relationship matrix L of each edge in the graph G and the key subgraph pattern are obtained.

[0015] The obtained subgraph pattern score matrix W and the relationship matrix L are input into a mask updater to finally obtain a mask matrix According to the mask matrix Select the topK edges with the highest mask values to generate an explanation subgraph as the explanation of the model to be explained.

[0016] In this embodiment, the design of the MiCaM algorithm is as follows: in the data set , K key subgraph patterns are generated by using a MiCaM algorithm for iteration represents each graph data. For each graph G, use to track the merging state, which represents the fragments of the graph and their connections. In each merged graph G M , each node represents a fragment of the graph data. The edge set represents the connection relationship between two fragments, and each merged graph in the original graph is initialized by regarding each node as a single fragment and inheriting the connection of G, that is Define an operation "⊕" to create a new fragment by merging two fragments and :

[0017]

[0018] The newly obtained contains all nodes and edges from , as well as all edges between them. The kth merging operation is defined as: if then merge and together. Update them to Repeat K iterations to obtain the merging operation sequence where represents the i-th key subgraph, represents the set of edges in the original graph G contained in the i-th common subgraph.

[0019] Design of graph neural network GCN:

[0020]

[0021] where σ represents the activation function, A represents the adjacency matrix, D represents the degree matrix, I represents the identity matrix, represents the degree matrix of . H (l) represents the node features of the lth layer in the graph neural network, when l=0, H (l) =X is the original feature of the node, W (l) represents the parameters to be learned in the lth layer of the graph neural network.

[0022] Design of structure perceiver:

[0023]

[0024] W uv =σ(MLP(concat(Z u |Z v )))∈R 1×k

[0025] L u,v ={l1,l2,…,l k}∈R n×n×k

[0026] Where Q = {q1, q2, ..., q} n}∈R 1×k Let represent the average score of each subgraph pattern. ε is the set of edges in the original graph G contained in all common subgraphs. M is the set of edges in the original graph G contained in the i-th common subgraph. (u,v) W is the original mask value of the edge containing nodes u and v. uv Let Z represent the importance of the edges containing nodes u and v in the k most common subgraph patterns, σ be the activation function, and Z be the value of the edges containing nodes u and v. u For node embedding of node u, Z v For node embedding of node v, R 1×k Let L be a 1×k dimensional vector. u,v To determine whether the edges containing nodes u and v belong to the k most common subgraphs, l k A value of 1 indicates that the edges containing nodes u and v belong to the k-th most common subgraph, R. n×n×k It is an n×n×k dimensional vector. Structure perceptron W uv Let L represent the score of edge (u,v) on the k subgraph patterns to which it belongs. Let L represent the relationship matrix between edges and subgraph patterns.

[0027] Design of the mask updater:

[0028]

[0029] in, M represents the updated mask value of the edge containing nodes u and v. uv Let be the original mask value of the edge containing nodes u and v, Q be the score of all subgraph patterns, ⊙ be the dot product, and L be the original mask value. uv To determine whether the edges containing nodes u and v belong to the k most common subgraphs. Let X be the transpose of the importance matrix of the edges containing nodes u and v in the k most common subgraph patterns. s To explain subgraph G S Node characteristics, A S To explain subgraph G S The adjacency matrix, Let A be the updated mask matrix, and A be the adjacency matrix of the original image. To explain subgraph G S According to the prediction, G S This represents the interpretive subgraph for mask matrix generation, where MI stands for mutual information. Y represents sparsity, and Y represents the loss function.

[0030] The above-described embodiments further illustrate the purpose, technical solution, and advantages of the present invention. It should be understood that the above-described embodiments are merely preferred embodiments of the present invention and are not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc., made to the present invention within the spirit and principles of the present invention should be included within the protection scope of the present invention.

Claims

1. A method for predicting interpretable molecular properties based on graph neural networks, characterized in that, include: Obtain the chemical molecular structure diagram G, and use the MiCaM algorithm to iterate through the chemical molecular structure diagram to generate K key subgraph patterns; obtain the trained graph neural network model for classifying the molecular structure diagram, and obtain the embedding of each node in the molecular structure diagram based on the graph neural network model; obtain the edge mask matrix of the graph based on the node embedding; input the K key subgraphs and the edge mask matrix into a perceptron to score the importance of each key subgraph, and obtain the score matrix W and the attribution relationship matrix L of each edge and key subgraph pattern in graph G; The score matrix W and the attribution matrix are input into the mask updater to obtain the final mask matrix. According to the mask matrix The top K edges with the highest mask values ​​are selected to generate an interpretive subgraph, which is then used as the interpretive result of the graph neural network graph classification model. Predict the chemical properties of chemical molecular structure diagrams based on the interpretive results of graph neural network classification models; The MiCaM algorithm is used to iterate over graph data, including: for each graph use Track the merge status to obtain fragments; combine the two fragments and Merging yields a new fragment; the merged graph at the k-th iteration. In the diagram, each edge represents a pair of segments. They are adjacent in the original graph; traverse all merged graphs. All edges statistics The frequency, and the most frequent Represented as All of The sequences are merged to obtain the final sequence, and the final training is used as the key subgraph pattern. The graph neural network graph classification model is: Where σ represents the activation function, and I represents the identity matrix. express The degree matrix, X represents the original features of the nodes, and W represents the parameters that need to be learned in the graph neural network; Node embedding is as follows: Z = GCN(S,X,W) Where Z represents the node embedding, A represents the adjacency matrix, X represents the original node features, and W represents the parameters that need to be learned in the graph neural network. The edge mask matrix of the graph obtained from the node embedding includes: W ij =ConCat(Z i ,Z j ) Among them, Z i Z j W represents the embedding of nodes i and j. ij This represents the mask value of the edge connecting node i and node j; The sensor is: IN uv =σ(MLP(concat(Z u |Z v )))∈R 1×k L u,v ={l1,l2,…,l k }∈R n×n×k Where, q i Let ε be the score of the i-th subgraph pattern, and ε be the set of edges in the original graph G contained in all common subgraphs. M is the set of edges in the original graph G contained in the i-th common subgraph. (u,v) W is the original mask value of the edge containing nodes u and v. uv Let Z represent the importance of the edges containing nodes u and v in the k most common subgraph patterns, σ be the activation function, and Z be the value of the edges containing nodes u and v. u For node embedding of node u, Z v For node embedding of node v, R 1×k Let L be a 1×k dimensional vector. u,v To determine whether the edges containing nodes u and v belong to the k most common subgraphs, l k A value of 1 indicates that the edges containing nodes u and v belong to the k-th most common subgraph, R. n×n×k It is an n×n×k dimensional vector; The mask updater is: in, M represents the updated mask value of the edge containing nodes u and v. uv Let be the original mask value of the edge containing nodes u and v, Q be the score of all subgraph patterns, and ⊙ be the dot product. Let X be the transpose of the importance matrix of the edges containing nodes u and v in the k most common subgraph patterns. s To explain subgraph G S Node characteristics, A S To explain subgraph G S The adjacency matrix, Let A be the updated mask matrix, and A be the adjacency matrix of the original image. To explain subgraph G S According to the prediction, G S This represents the interpretive subgraph for mask matrix generation, where MI stands for mutual information. Indicates sparsity.

Citation Information

Patent Citations

  • Graph neural network interpretation method for keeping dependency relationship between prediction sequence and structure

    CN115169521A

  • Graph neural network-based interpretable molecular property prediction method and system

    CN115798629A