Graph classification method based on saliency regularization graph neural network and related device
By using saliency-regularized graph neural networks, combined with backbone networks and graph neural memory networks, the problem of ignoring the global importance of nodes in existing technologies is solved, thereby improving the accuracy and effectiveness of graph classification.
Patent Information
- Application Number
- CN202310459053.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-04-18
- Publication Date
- 2026-01-09
- Estimated Expiration
- 2043-04-18
AI Technical Summary
Existing graph classification methods focus on modeling local dependencies when learning the feature matrix of graph nodes, ignoring the global importance of nodes in graph classification tasks, which affects classification accuracy.
A saliency-regularized graph neural network is adopted. The node feature matrix is learned through the skeleton network and the compact graph feature representation is extracted through the graph neural memory network. The skeleton network is then globally regularized by combining the saliency distribution vector, focusing on nodes related to graph classification.
It improves the classification performance of graph classification tasks by focusing on the global saliency of nodes, thereby enhancing the effectiveness and accuracy of graph learning.
Smart Images

Figure CN116894218B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of computer, in particular to a graph classification method based on saliency regularization graph neural network and related device. BACKGROUND
[0002] The graph classification task is to predict the category corresponding to the graph structure data, and the task is widely used in social networks, biochemical fields and other fields. In the graph classification task, the graph neural network model not only needs to perform effective feature representation learning on each node and each edge, but also needs to perform effective feature representation learning on the whole information of the graph. However, when the existing graph classification method is subjected to neighborhood aggregation on the graph nodes, it generally focuses on modeling the local dependency relationship between adjacent nodes. In this way, although the node feature matrix representation in the graph can be effectively learned, the global importance of each node in the graph classification task is ignored, which will inevitably affect the accuracy of the graph classification.
[0003] Therefore, the prior art still needs to be improved and improved. SUMMARY
[0004] The technical problem to be solved by the present application is that, in view of the deficiencies of the prior art, a graph classification method based on saliency regularization graph neural network and related device are provided.
[0005] In order to solve the above technical problems, the first aspect of the embodiment of the present application provides a graph classification method based on saliency regularization graph neural network, the method comprises:
[0006] Obtaining the graph structure data corresponding to the target to be classified, and inputting the graph structure data into the saliency regularization graph neural network;
[0007] Determining the classification category of the target to be classified through the saliency regularization graph neural network;
[0008] The saliency regularization graph neural network comprises a skeleton network layer with a plurality of skeleton network layers and a graph neural memory network with a plurality of graph neural memory layers, the skeleton network is used to learn the node feature matrix of the graph structure data, and the graph neural memory network is used to extract the compact graph feature representation corresponding to the graph structure data through the node feature matrix, and the compact graph feature representation is used to regularize the skeleton network through the saliency distribution vector determined based on the compact graph feature representation.
[0009] The graph classification method of the saliency-regularized graph neural network, wherein the input of the skeleton network layer includes a node feature matrix output by a previous skeleton network layer and a saliency distribution vector determined based on the node feature matrix output by the previous skeleton network layer and a compact graph feature representation output by a graph neural memory layer corresponding to the skeleton network layer; and the input of the graph neural memory layer includes a node feature matrix output by a skeleton network layer corresponding to a previous graph neural memory layer and a compact graph feature representation output by the previous graph neural memory layer.
[0010] The graph classification method of the saliency-regularized graph neural network, wherein the determination process of the saliency distribution vector specifically includes:
[0011] determining a normalized K value based on the node feature matrix determined by the skeleton network layer and determining a normalized Q value based on the compact graph feature representation determined by the graph neural memory network;
[0012] determining the saliency distribution vector based on the similarity score normalization function, the normalized K value and the normalized Q value.
[0013] The graph classification method of the saliency-regularized graph neural network, wherein the input of the first skeleton network layer is graph structure data, and the first graph neural memory layer is configured with a compact graph feature representation generated by a random initialization method.
[0014] The graph classification method of the saliency-regularized graph neural network, wherein the graph neural memory layer includes a cross-attention unit, a Q value of the cross-attention unit is determined based on a previous compact graph feature representation, a K value is determined based on a current node feature matrix, and a V value is determined based on the current node feature matrix.
[0015] The graph classification method of the saliency-regularized graph neural network, wherein the global regularization of the skeleton network based on the saliency distribution vector determined based on the compact graph feature representation specifically includes:
[0016] fusing the saliency distribution vector and a local weight corresponding to the skeleton network to obtain a fusion weight;
[0017] performing global regularization on the skeleton network based on the fusion weight.
[0018] The graph classification method of the saliency-regularized graph neural network, wherein the determination of the classification category of the target to be classified by the saliency-regularized graph neural network specifically includes:
[0019] learning the graph structure data by each skeleton network layer and each graph neural memory layer in the saliency-regularized graph neural network, and determining a target compact graph feature representation by a last graph neural memory layer.
[0020] determine a classification category corresponding to the target to be classified based on the compact graph feature representation of the target.
[0021] The second aspect of the embodiments of the present application provides a graph classification system based on a saliency regularized graph neural network, and the system comprises:
[0022] An acquisition module is configured to acquire graph structure data corresponding to a target to be classified, and input the graph structure data into a saliency regularized graph neural network.
[0023] A classification module is configured to determine a classification category of the target to be classified by using the saliency regularized graph neural network.
[0024] The saliency regularized graph neural network comprises a skeleton network layer with a plurality of skeleton network layers and a graph neural memory network with a plurality of graph neural memory layers. The skeleton network is configured to learn a node feature matrix of the graph structure data. The graph neural memory network is configured to extract a compact graph feature representation corresponding to the graph structure data by using the node feature matrix, and apply the compact graph feature representation to the skeleton network to globally regularize the skeleton network by using a saliency distribution vector determined based on the compact graph feature representation.
[0025] The third aspect of the embodiments of the present application provides a computer readable storage medium, which stores one or more programs, and the one or more programs can be executed by one or more processors to implement the steps of the graph classification method based on the saliency regularized graph neural network.
[0026] The fourth aspect of the embodiments of the present application provides a terminal device, which comprises a processor, a memory and a communication bus. The memory stores a computer readable program which can be executed by the processor.
[0027] The communication bus realizes the connection and communication between the processor and the memory.
[0028] The processor executes the computer readable program to implement the steps of the graph classification method based on the saliency regularized graph neural network.
[0029] Beneficial effects: compared with the prior art, the present application provides a graph classification method based on a saliency regularized graph neural network and related devices, the method comprising obtaining graph structure data corresponding to a target to be classified, and inputting the graph structure data into a saliency regularized graph neural network; determining the classification category of the target to be classified through the saliency regularized graph neural network; wherein the saliency regularized graph neural network learns a node feature matrix through a skeleton network, extracts the node feature matrix into a compact graph feature representation through a graph neural memory network, determines a saliency distribution vector based on the compact graph feature representation and the node feature matrix, and finally normalizes the aggregation weight of the skeleton network through the saliency distribution vector. In this way, the saliency regularized graph neural network focuses on the nodes more relevant to graph classification by measuring the compatibility between the entire compact graph feature representation and the node feature matrix, and can learn a more effective representation for the entire graph, thereby improving the classification effect of the graph classification task. BRIEF DESCRIPTION OF DRAWINGS
[0030] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed in the embodiment description will be briefly introduced as follows. Obviously, the drawings in the following description are only some embodiments of the present application, and other drawings can also be obtained according to these drawings without creative labor for those skilled in the art.
[0031] Figure 1 The flow chart of the graph classification method based on the saliency regularized graph neural network provided by the present application.
[0032] Figure 2 The flow chart of the method for predicting the properties of chemical molecules.
[0033] Figure 3 The structure principle diagram of the saliency regularized graph neural network.
[0034] Figure 4 The flow chart of the saliency regularization process.
[0035] Figure 5 The comparison chart of the experimental results of the present application and related technologies on the triangle data set.
[0036] Figure 6 The comparison chart of the experimental results of the present application and related technologies on the MUTAG data set.
[0037] Figure 7 The t-SNE chart of the experimental results of each model of the ENZYMES and Letter-high data sets.
[0038] Figure 8 The structure principle diagram of the graph classification system based on the saliency regularized graph neural network provided by the present application.
[0039] Figure 9 The structural schematic diagram of the terminal device provided in the present application is shown in the following figure. DETAILED DESCRIPTION
[0040] The present application provides a graph classification method based on saliency regularization graph neural network and related device, in order to make the purpose, technical scheme and effect of the present application more clear and definite, the present application will be further described in detail below with reference to the drawings and examples. It should be understood that the specific examples described herein are only used to explain the present application and do not limit the present application.
[0041] Those skilled in the art can understand that, unless specifically stated otherwise, the singular form "a", "an" and "said" used herein also includes the plural form. It should be further understood that the phrase "comprising" used in the specification of the present application means that the features, integers, steps, operations, elements and / or components exist, but does not exclude the existence or addition of one or more other features, integers, steps, operations, elements, components and / or their groups. It should be understood that when we say that an element is "connected" or "coupled" to another element, it can be directly connected or coupled to the other element, or there can be intermediate elements. In addition, "connected" or "coupled" used herein can include wireless connection or wireless coupling. The phrase "and / or" used herein includes all or any single unit and all combinations of the associated listed items.
[0042] Those skilled in the art can understand that, unless otherwise defined, all terms (including technical terms and scientific terms) used herein have the same meaning as that generally understood by those skilled in the art to which the present application belongs. It should also be understood that terms such as those defined in a general dictionary should be understood to have meanings consistent with those in the context of the prior art, and should not be interpreted in an idealized or overly formal sense unless specifically defined as such.
[0043] It should be understood that the sequence numbers and sizes of the steps in the embodiments do not mean the order of execution, and the execution order of the processes is determined by its function and inherent logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.
[0044] It is found through research that the graph classification task is to predict the category corresponding to the graph structure data, and the task is widely used in social networks, biochemical fields and the like. In the graph classification task, the graph neural network model needs to effectively learn feature representation of the whole graph information in addition to each node and each edge. However, when the existing graph classification method is subjected to neighborhood aggregation on the graph node, it generally focuses on modeling the local dependency relationship between adjacent nodes. In this way, the node feature matrix representation in the graph can be effectively learned, but the global importance of each node in the graph classification task is ignored.
[0045] To solve the above problem, in the embodiment of the present application, the graph structure data corresponding to the target to be classified is obtained, and the graph structure data is input into the saliency regularization graph neural network; the classification category of the target to be classified is determined through the saliency regularization graph neural network; wherein the saliency regularization graph neural network learns the node feature matrix through the skeleton network, extracts the node feature matrix into the compact graph feature representation through the graph neural memory network, determines the saliency distribution vector based on the compact graph feature representation and the node feature matrix, and finally normalizes the aggregation weight of the skeleton network through the saliency distribution vector. In this way, the saliency regularization graph neural network focuses on the nodes more related to the graph classification by measuring the compatibility between the compact graph feature representation and the node feature matrix, and can learn more effective representation for the whole graph, so as to improve the classification effect of the graph classification task.
[0046] The application content will be further described through the description of the embodiments in combination with the drawings.
[0047] The embodiment provides a graph classification method based on a saliency regularization graph neural network, as shown in Figure 1 The method comprises the following steps:
[0048] S10, obtaining the graph structure data corresponding to the target to be classified, and inputting the graph structure data into the saliency regularization graph neural network.
[0049] Specifically, the target to be classified is a task to be classified by the saliency regularization graph neural network, and the target to be classified can form graph structure data, wherein the target to be classified is a task in the social network, the biochemical field and the like. For example, the target to be classified is a chemical molecule and the like. The graph structure data is a graph structure formed based on the target to be classified, wherein the graph structure data comprises nodes and edges, and the edges are used to reflect the interaction relationship between the nodes. For example, as shown in Figure 2 The target to be classified is a chemical molecule, and the graph structure data is a graph structure formed by the chemical molecule, wherein the nodes in the graph structure data are atoms in the chemical molecule, the edges represent the interaction relationship between the atoms, and each node and edge contains a multi-dimensional feature vector for representing the attribute corresponding to the node or edge.
[0050] S20, determining a classification category of the target to be classified by the saliency regularized graph neural network.
[0051] Specifically, the classification category is used to reflect the node category of the target to be classified. For example, the target to be classified is a chemical molecule, and the classification category is the property of the chemical molecule. It can be understood that the feature vector of the node distinguishes whether the node type is a carbon atom or a hydrogen atom. Then, the graph structure data of the chemical molecule is input into the saliency regularized graph neural network to extract various information of the graph, including node information, edge information and graph structure information. The information of each node (center node) and its neighbor nodes is integrated by a neighborhood aggregation function, and the integrated information is updated to the feature vector of the corresponding center node to obtain the local information of the node. Finally, the feature vectors of all nodes and edges are integrated into a graph feature representation, and the property of the chemical molecule is determined based on the graph feature representation.
[0052] In the step S10, as shown in Figure 3 The saliency regularized graph neural network includes a skeleton network and a graph neural memory network. The skeleton network includes a plurality of skeleton network layers, and the graph neural memory network includes a plurality of graph neural memory layers. Each of the plurality of skeleton network layers corresponds to one of the plurality of graph neural memory layers. Alternatively, the compact graph feature representation of the first graph neural memory layer is learned from the node feature matrix of the graph structure data, so that the graph neural memory layer can include one more layer than the skeleton network layer. That is, each of the plurality of graph neural memory layers corresponds to one of the plurality of skeleton network layers except for the last skeleton network layer.
[0053] For ease of description, the corresponding skeleton network layer and graph neural memory layer are recorded as a group of network layer groups. For two adjacent network layer groups, the skeleton network layer in the former network layer group is connected to the skeleton network layer in the latter network layer group, the graph neural memory layer in the former network layer group is connected to the graph neural memory layer in the latter network layer group, the skeleton network layer in the former network layer group is connected to the graph neural memory layer in the latter network layer group, and the graph neural memory layer in the former network layer group is connected to the skeleton network layer in the latter network layer group. In a typical implementation, the graph neural memory layers in the two adjacent network layer groups are connected by residual connections.
[0054] Based on this, as shown in Figure 3As shown, the input to the skeleton network layer in each network layer group includes the node feature matrix output by the skeleton network layer in the previous network layer group, and a saliency distribution vector determined based on the node feature matrix output by the skeleton network layer in the previous network layer group and the compact graph feature representation output by the graph neural memory layer in the current network layer group. The input to the graph neural memory layer includes the node feature matrix output by the skeleton network layer in the previous network layer group and the compact graph feature representation output by the graph neural memory layer in the previous network layer group. Furthermore, the input to the skeleton network layer in the foremost network layer group is graph structure data, and the graph neural memory layer is configured with a compact graph feature representation generated through random initialization, wherein the compact graph feature representation of the graph neural memory layer is a learnable vector and is randomly initialized.
[0055] Furthermore, taking a graph G with N nodes as input, the working process of each group of network layers in the saliency regularization graph neural network is explained. The working process specifically includes:
[0056] First, the graph neural memory layer extracts a compact graph feature representation from the node feature matrix output by the backbone network layer in the previous network layer group and the compact graph feature representation output by the graph neural memory layer in the previous network layer group. The compact graph feature representation can be expressed as:
[0057]
[0058] in, Indicates that the l-th group has d M Compact graph feature representation of dimensions, This represents the node feature matrix output by the skeleton network layer in group (l-1), where each node has d H Feature dimensions, It is the transformation function of the graph neural memory layer.
[0059] Secondly, based on the compact graph feature representation M l The global saliency of each node is measured to obtain a saliency distribution vector. This saliency distribution vector can be understood as the vector of the saliency distributions of all nodes in the (l-1)th group, reflecting the relevance of each node to the graph classification. The saliency distribution vector can be obtained through a function... For M l The saliency distribution vector of the nodes is learned by modeling the compatibility between the features of each node and the nodes themselves.
[0060]
[0061] in, Let s represent the significance distribution vector. l-1the sum of the elements in the vector is 1, and is the vector of the significance distribution of all nodes in the skeleton network layer in the l-1th group.
[0062] Finally, the significance distribution vector s l-1 The skeleton network layer in the lth group is standardized to perfect the node feature matrix learning of the skeleton network layer in the lth group, wherein the node feature matrix of the skeleton network layer in the lth group can be represented as:
[0063]
[0064] wherein, is the conversion function of the skeleton network.
[0065] Further, the node feature matrix extracted in the previous network layer group is used to refine the compact graph feature representation M l+1 , and the same is true for the last network layer group, so that the refinement of the compact graph feature representation and the node feature matrix is interdependent. In addition, the compact graph feature representation M L+1 output by the graph neural memory layer in the last network layer group is finally used for the graph classification task.
[0066] Based on this, the classification category of the target to be classified determined by the significance regularized graph neural network specifically includes:
[0067] The graph structure data is learned by each skeleton network layer and each graph neural memory layer in the significance regularized graph neural network, and the target compact graph feature representation is determined by the last graph neural memory layer;
[0068] Based on the target compact graph feature representation, the classification category corresponding to the target to be classified is determined.
[0069] Specifically, each skeleton network layer and each graph neural memory layer gradually learns the node feature matrix and the compact graph representation in a cascading order until the target compact graph feature representation output by the last graph neural memory layer is obtained, and then the classification category corresponding to the target to be classified is determined based on the target compact graph feature representation. In one implementation, a classifier can be connected after the last graph neural memory layer, and the classifier determines the classification category corresponding to the target to be classified based on the target compact graph feature representation, wherein the classifier can be a pre-trained classification network model or a multilayer perceptron.
[0070] In one implementation, the classifier can use a multilayer perceptron, and the target compact graph feature representation is denoted as M L+1 The predicted graph label determined by the classifier can be represented as:
[0071]
[0072] wherein, denotes the predicted probability for all K classes, denotes the transformation function of the multi-layer perceptron.
[0073] Further, the saliency regularized graph neural network determines the classification category corresponding to the target to be classified based on the predicted graph label in use. In the training process, the saliency regularized graph neural network can be trained based on the predicted category and the labeled category, wherein the saliency regularized graph neural network can be optimized in an end-to-end manner through cross-entropy loss, and the loss function can be expressed as:
[0074]
[0075] wherein, X i and y i denote the i-th training sample and its labeled graph label, N t denotes the size of the training set.
[0076] In one implementation, the graph neural memory network extracts a compact graph feature representation of the whole graph from the node feature matrix in the skeleton network, predicts the graph classification through the compact graph feature representation, estimates the global saliency of each node in the graph classification, and then globally regularizes the skeleton network, wherein the graph neural memory layer learns a latent embedding of a vector as a compact graph feature representation, and repeatedly refines it using cross-attention operation.
[0077] As shown in Figure 3 , the graph neural memory layer includes a cross-attention unit, the Q value of the cross-attention unit is determined based on the previous compact graph feature representation, the K value is determined based on the current node feature matrix, and the V is determined based on the current node feature matrix.
[0078]
[0079]
[0080]
[0081] wherein, the compact graph feature representation M l-1 in the l-1 group of the graph neural memory layer is taken as a query, the node feature matrix H l-1 in the l-1 group of the skeleton network layer is taken as a key and a value in the cross-attention operation, is a learnable parameter matrix of linear transformation; represents a Multilayer Perceptron (MLP) module, which consists of two fully connected layers with ReLU function. In addition, the transformation function The transformation is performed for k iterations (adjusted as a hyperparameter) in the graph neural memory layer.
[0082] Further, the learned M l is also used to regularize the skeleton network to refine the node feature matrix H l Therefore, the graph neural memory layer can extract a compact graph representation from each new refined node feature matrix, instead of the invariant node information. Among them, the M 0 is modeled as a learnable parameter to learn appropriate initial feature points compatible with the latent space of the skeleton node feature matrix.
[0083] In an implementation, the compact graph representation extracted from the graph neural memory network is used to globally regularize the skeleton network, which enables the skeleton network to perceive the global node significance when learning the node feature matrix. The embodiment of the application first measures the global significance of each node using the compact graph feature representation, and then normalizes the skeleton network layer using the node significance distribution. The significance of the node and the classification of the graph are measured by establishing compatibility between the compact graph feature representation and the features of each node in the graph, wherein the compatibility between the compact graph feature representation and the features of each node in the graph can be calculated by using the dot product of the node feature matrix and the point projection in the latent space to calculate the similarity between the node feature matrix and the compact graph feature representation, and then normalizing the similarity scores obtained for all nodes.
[0084] Based on this, the determination process of the significance distribution vector specifically includes:
[0085] Based on the node feature matrix determined by the skeleton network, determine the normalization K value, and based on the compact graph feature representation determined by the graph neural memory network, determine the normalization Q value;
[0086] Based on the similarity score normalization function, the normalization K value and the normalization Q value, determine the significance distribution vector.
[0087] Specifically, the normalization K value, the normalization Q value and the significance distribution vector can be represented as:
[0088]
[0089]
[0090] wherein, represents a learnable parameter matrix for transforming the compact graph representation Ml and node feature matrix H l-1 Projection to the same latent space, scaling factor is used to avoid the explosive growth of the dot product between two vectors, and softmax() represents a similarity score normalization function.
[0091] In one implementation, as shown in Figure 4 The global regularization of the skeleton network by the saliency distribution vector determined based on the compact graph feature representation specifically includes:
[0092] Fusing the saliency distribution vector and the local weight corresponding to the skeleton network to obtain a fused weight;
[0093] Global regularization of the skeleton network based on the fused weight.
[0094] Specifically, the local weight is the focusing weight of the node configured for the skeleton network, and the saliency distribution vector is the global weight distribution of the node. By fusing the local weight and the global weight together as the focusing weight of the node, the skeleton network is regularized by the node saliency. In addition, the skeleton network includes several skeleton network layers, and each graph neural memory layer corresponding to each skeleton network layer will perform abnormal regularization on the skeleton network when it adopts its corresponding compact graph feature representation to react on the skeleton network.
[0095] In one implementation, the fused weight can be obtained by weighting the saliency distribution vector and the local weight corresponding to the skeleton network, that is, the fused weight can be represented as:
[0096]
[0097] point index, β is a hyperparameter adjusted on the validation set, and the softmax function is used for normalization, represents the local weight of the i-th node, represents the neighbor node set of the i-th node.
[0098] In one implementation, the fused weight can be obtained by regularizing the saliency distribution vector Scaling regularized (SW) local weight, that is, the fused weight can be represented as:
[0099]
[0100] where γ>0 is a hyperparameter.
[0101] Further, the local weight The skeleton network can be determined according to a skeleton network, wherein the skeleton network is a graph neural network, for example, the skeleton network can be a graph convolutional network (GCN), a Graph Sample and Aggregate (GraphSAGE) or a graph isomorphism network (GIN).
[0102] The following is described respectively with the skeleton network being a graph convolutional network, a GraphSAGE and a graph isomorphism network.
[0103] 1. The skeleton network is a graph convolutional network
[0104] The degree distribution is considered when performing local neighborhood aggregation: is the adjacency matrix in the GCN and the degree matrix is the re-normalized local aggregation weight matrix, Θ represents the regularization weight matrix of all nodes l is the learnable parameter matrix of the linear transformation in the lth layer, and σ is an activation function.
[0105] 2. The skeleton network is a GraphSAGE
[0106] Taking the average aggregator of the GraphSAGE as an example, the local aggregation weight a l of all adjacent nodes is uniformly equal to 1, therefore, the feature of the ith node is refined as: wherein, Θ represents the regularization weight of the ith node and its adjacent nodes.
[0107] 3. The skeleton network is a graph isomorphism network
[0108] The local aggregation weight is equal to 1 except for the center node, wherein, Θ represents the transformation function of the multilayer perceptron of the lth group of the skeleton network.
[0109] In summary, the embodiment provides a graph classification method based on a saliency regularized graph neural network, which comprises obtaining graph structure data corresponding to a target to be classified, and inputting the graph structure data into a saliency regularized graph neural network; determining the classification category of the target to be classified through the saliency regularized graph neural network; wherein the saliency regularized graph neural network learns a node feature matrix through a backbone network, extracts the node feature matrix into a compact graph feature representation through a graph neural memory layer, determines a saliency distribution vector based on the compact graph feature representation and the node feature matrix, and finally normalizes the aggregation weight of the backbone network through the saliency distribution vector. In this way, the saliency regularized graph neural network focuses on the nodes more related to graph classification by measuring the compatibility between the entire compact graph feature representation and the node feature matrix, and can learn a more effective representation for the entire graph, thereby improving the classification effect of the graph classification task.
[0110] Further, in order to illustrate the use of node global saliency regularization to regularize the neighborhood aggregation process of the backbone network provided in the embodiment, which helps to improve the performance of the graph classification task. The advantages of the embodiment are verified on different experiments:
[0111] Table 1 is an ablation experiment on MUTAG and Letter-high data sets, taking each backbone network (Backbone) as a base model (Base model), to explore the effects of five different transformations, including: GNM-GNN (only using a graph neural memory layer to learn a compact graph feature representation for classification prediction, without involving node saliency regularization), SAR-Pooling (pooling the feature matrix representing all nodes in the last layer of the backbone network, using the graph feature representation obtained after pooling for classification prediction, rather than using the compact graph feature representation for prediction), and two different fusion mechanisms discussed in the embodiment (SAR-GNN-W, SAR-GNN-S).
[0112] Table 1 Accuracy (%) of ablation experiment of graph classification task
[0113]
[0114]
[0115] Table 2 shows the classification effect comparison of the embodiment (SAR-GNN) and other models on different data sets:
[0116] Table 2 Accuracy (%) of graph classification task
[0117]
[0118] From the analysis of the above experimental results, first, the embodiments of the present application all achieve considerable performance improvement compared with the base model corresponding to the skeleton network on all data sets, which verifies the effectiveness and adaptability of the embodiments of the present application in different types of skeleton networks. Secondly, the embodiments of the present application based on one of the three skeleton networks all achieve the best performance on the five data sets, exceeding other related technical models, which embodies the robustness of the embodiments of the present application.
[0119] In Figure 5 , taking the triangle data set (TRIANGLES) as an example, the visualization of the node saliency learned by the embodiments of the present application SAR-GCN and the related technical model (CHEBYGIN-UNSUP) on four graphs in the data set is shown. These graphs are randomly selected from the test set. The graph classification task is to predict the number of triangles on the graph, and the number of triangles is represented by the shaded area, and the number of triangles is given as the graph label. The embodiments of the present application can capture more discriminative nodes related to triangles, and perform more accurately than related technologies.
[0120] In Figure 6 , the visualization of the node global saliency learned by the embodiments of the present application SAR-GraphSAGE and the related technical model (CHEBYGIN-UNSUP) on three positive samples in the MUTAG data set is shown. SAR-GraphSAGE assigns a higher saliency score to the node located at the center of the fused ring, which is consistent with the chemical background knowledge. The data of these visualizations clearly show the advantage of the embodiments of the present application SAR-GNN in learning global node saliency for graph classification compared with related technologies.
[0121] In Figure 7 , the t-SNE graphs of the test data experimental results of the embodiments of the present application and related technologies on the Letter-high and ENZYMES data sets are shown. These graphs show consistent results of quantitative evaluation between different methods, which again proves the advantage of the embodiments of the present application: benefiting from saliency-aware regularization and graph neural memory layers, it can learn more effective compact graph feature representations than other related technologies.
[0122] Based on the above saliency regularization graph neural network-based graph classification method, the embodiments of the present application provide a saliency regularization graph neural network-based graph classification system, as shown in Figure 8 , the system comprises:
[0123] The acquisition module 100 is configured to acquire the graph structure data corresponding to the target to be classified, and input the graph structure data into the saliency regularization graph neural network.
[0124] The classification module 200 is configured to determine a classification category of the target to be classified by the saliency-regularized graph neural network.
[0125] The saliency-regularized graph neural network includes a skeleton network having a plurality of skeleton network layers and a graph neural memory network having a plurality of graph neural memory layers. The skeleton network is configured to learn a node feature matrix of the graph structure data. The graph neural memory network is configured to extract a compact graph feature representation corresponding to the graph structure data from the node feature matrix, and feed back the compact graph feature representation to the skeleton network to globally regularize the skeleton network by a saliency distribution vector determined based on the compact graph feature representation.
[0126] Based on the above-mentioned saliency-regularized graph neural network-based graph classification method, the present embodiment provides a computer-readable storage medium storing one or more programs, which can be executed by one or more processors to implement the steps of the saliency-regularized graph neural network-based graph classification method as described in the above-mentioned embodiments.
[0127] Based on the above-mentioned saliency-regularized graph neural network-based graph classification method, the present embodiment provides a terminal device, as shown in the accompanying drawings, which includes at least one processor 20, a display screen 21, and a memory 22, and can further include a communications interface 23 and a bus 24. The processor 20, the display screen 21, the memory 22, and the communications interface 23 can communicate with each other through the bus 24. The display screen 21 is configured to display a user guide interface preset in an initial setting mode. The communications interface 23 can transmit information. The processor 20 can call logical instructions in the memory 22 to execute the method in the above-mentioned embodiments. Figure 9
[0128] In addition, the logical instructions in the above-mentioned memory 22 can be implemented in the form of a software functional unit and sold or used as an independent product, which can be stored in a computer-readable storage medium.
[0129] The memory 22 as a computer-readable storage medium can be configured to store software programs, computer executable programs, such as program instructions or modules corresponding to the method in the embodiments of the present disclosure. The processor 20 executes the functions of the application and data processing by running the software programs, instructions or modules stored in the memory 22, that is, implements the method in the above-mentioned embodiments.
[0130] The memory 22 can include a program storage area and a data storage area, wherein the program storage area can store an operating system, application programs required by at least one function; the data storage area can store data created according to the use of the terminal device, etc. In addition, the memory 22 can include a high-speed random access memory, and can also include a non-volatile memory. For example, various media that can store program codes, such as a U disk, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, etc. can also be a transitory storage medium.
[0131] In addition, the specific processes of the above-mentioned storage medium and the plurality of instruction processors in the terminal device load and execute have been described in detail in the above-mentioned method, and will not be described one by one here.
[0132] Finally, it should be pointed out that: the above examples are only used to illustrate the technical solutions of the present application, and not to limit them; although the present application has been described in detail with reference to the foregoing examples, those skilled in the art should understand that: it can still modify the technical solutions recorded in the foregoing examples, or make equivalent replacement for part of the technical features; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present application.
Claims
1. A graph classification method based on saliency regularized graph neural network, characterized in that, The method comprises: obtaining graph structure data corresponding to a target to be classified, and inputting the graph structure data into a saliency regularized graph neural network, wherein the target to be classified is a chemical molecule in the biochemical field, the graph structure data is a graph structure formed based on the target to be classified, the graph structure data comprises nodes and edges, the edges are used to reflect the interaction relationship between the nodes, each node and edge contains a multi-dimensional feature vector for representing the attribute corresponding to the node or edge, and the feature vector of the node is used to distinguish whether the type of the node is a carbon atom or a hydrogen atom; determining a classification category of the target to be classified through the saliency regularized graph neural network, and the classification category is the property of the chemical molecule; wherein the saliency regularized graph neural network comprises a skeleton network with a plurality of skeleton network layers and a graph neural memory network with a plurality of graph neural memory layers, the skeleton network is used to learn a node feature matrix of the graph structure data, the graph neural memory network is used to extract a compact graph feature representation corresponding to the graph structure data through the node feature matrix, and the compact graph feature representation is fed back to the skeleton network to globally regularize the skeleton network through a saliency distribution vector determined based on the compact graph feature representation; the determination process of the saliency distribution vector specifically comprises: determining a normalized K value based on the node feature matrix determined by the skeleton network layer, and determining a normalized Q value based on the compact graph feature representation determined by the graph neural memory network; determining the saliency distribution vector based on a similarity score normalization function, the normalized K value and the normalized Q value; the graph neural memory layer comprises a cross-attention unit, the Q value of the cross-attention unit is determined based on a previous compact graph feature representation, the K value is determined based on a current node feature matrix, and the V is determined based on the current node feature matrix.
2. The graph classification method based on saliency regularized graph neural network according to claim 1, characterized in that, the input items of the skeleton network layer comprise a node feature matrix output by a previous skeleton network layer and a saliency distribution vector determined based on the node feature matrix output by the previous skeleton network layer and a compact graph feature representation output by the graph neural memory layer corresponding to the skeleton network layer; the input items of the graph neural memory layer comprise a node feature matrix output by the skeleton network layer corresponding to a previous graph neural memory layer and a compact graph feature representation output by the previous graph neural memory layer.
3. The graph classification method based on saliency regularized graph neural network according to claim 1, characterized in that, the input item of the skeleton network layer located at the front is the graph structure data, and the graph neural memory layer located at the front is configured with a compact graph feature representation generated through a random initialization mode.
4. The graph classification method based on saliency regularized graph neural network according to claim 1, characterized in that, the global regularization of the skeleton network through the saliency distribution vector determined based on the compact graph feature representation specifically comprises: fusing the saliency distribution vector and the local weight corresponding to the skeleton network to obtain a fused weight; globally regularizing the skeleton network based on the fused weight.
5. The graph classification method based on saliency regularized graph neural network according to claim 1, characterized in that, the determination of the classification category of the target to be classified through the saliency regularized graph neural network specifically comprises: learning the graph structure data through each skeleton network layer and each graph neural memory layer in the saliency regularized graph neural network, and determining a target compact graph feature representation through the graph neural memory layer located at the last; Based on the target compact graph feature representation, a classification category corresponding to the target to be classified is determined.
6. A graph classification system based on saliency regularized graph neural networks, characterized in that, The system comprises: An acquisition module is configured to acquire graph structure data corresponding to a target to be classified, and input the graph structure data into a saliency regularized graph neural network, wherein the target to be classified is a chemical molecule in the biochemistry field, the graph structure data is a graph structure formed based on the target to be classified, the graph structure data comprises nodes and edges, the edges are used to reflect the interaction relationship between the nodes, each node and edge contains a multi-dimensional feature vector used to represent the attribute corresponding to the node or edge, and the feature vector of the node is used to distinguish whether the node type is a carbon atom or a hydrogen atom; A classification module is configured to determine a classification category of the target to be classified by using the saliency regularized graph neural network, and the classification category is the property of the chemical molecule. The saliency regularized graph neural network comprises a skeleton network with a plurality of skeleton network layers and a graph neural memory network with a plurality of graph neural memory layers, the skeleton network is used to learn a node feature matrix of the graph structure data, the graph neural memory network is used to extract a compact graph feature representation corresponding to the graph structure data by using the node feature matrix, and the compact graph feature representation is fed back to the skeleton network, so that the skeleton network is globally regularized by using a saliency distribution vector determined based on the compact graph feature representation. The determination process of the saliency distribution vector specifically comprises: determining a normalized K value based on the node feature matrix determined by the skeleton network layer, and determining a normalized Q value based on the compact graph feature representation determined by the graph neural memory network; determining the saliency distribution vector based on a similarity score normalization function, the normalized K value and the normalized Q value; The graph neural memory layer comprises a cross-attention unit, the Q value of the cross-attention unit is determined based on a previous compact graph feature representation, the K value is determined based on a current node feature matrix, and the V value is determined based on the current node feature matrix.
7. A computer readable storage medium characterized by The computer readable storage medium stores one or more programs, which can be executed by one or more processors to implement the steps in the graph classification method based on the saliency regularized graph neural network according to any one of claims 1-5.
8. A terminal device, comprising: Comprise: a processor, a memory and a communication bus; The memory stores a computer readable program that can be executed by the processor; The communication bus realizes the connection communication between the processor and the memory; The processor executes the computer readable program to realize the steps in the graph classification method based on the saliency regularized graph neural network according to any one of claims 1-5.
Citation Information
Patent Citations
Complex network node classification method based on graph attention network
CN112085124A
Small sample image classification method based on memory mechanism and graph neural network
CN113688878A