Graph classification method and system integrating high-order structure embedding and composite pooling

By fusing high-order structural embedding and composite pooling in the graph classification model, passing messages and fusing sub-graph features, the problem of insufficient attention to high-order structural information in the existing model is solved, and the accuracy of graph classification and comprehensive feature representation are improved sex.

CN114792384BActive Publication Date: 2025-01-14SHANDONG UNIV
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210486421.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-05-06
Publication Date
2025-01-14
Estimated Expiration
2042-05-06

AI Technical Summary

Technical Problem

The existing graph classification model lacks attention to high-order graph structure information and cannot effectively capture the complex relationships and hierarchies in the graph, resulting in the loss of graph feature information and low classification accuracy.

Method used

The graph classification method that integrates high-order structural embedding and composite pooling is adopted. By passing messages between subgraphs, the structure information that is invisible at the node level is captured, and the subgraph features and graph topology are considered during the pooling process. The attention mechanism integrates local neighborhood features to generate a more comprehensive graph representation vector.

Benefits of technology

Improve the accuracy of graph classification, effectively utilize graph structure information, retain the original features of the input graph, can handle complex multivariate structures and their relationships, and provide a more objective graph embedded representation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114792384B_ABST
    Figure CN114792384B_ABST
Patent Text Reader

Abstract

The present invention belongs to the field of artificial intelligence graph classification technology, and provides a graph classification method and system that integrates high-order structure embedding and composite pooling, including: obtaining a graph to be classified; inputting the graph to be classified into a graph neural network to obtain the category to which the graph belongs; wherein, for each subgraph set of the graph, each convolution layer calculates the features of each subgraph based on the subgraph set output by the previous neural network layer, and each composite pooling layer updates the subgraph set based on the features of each subgraph output by the convolution layer, and at the same time, for each subgraph in the updated subgraph set, the features of the subgraphs in the local neighborhood are integrated through the attention mechanism to update the features of the subgraphs; the readout layer obtains the graph representation vector, and inputs it into the classifier to obtain the category to which the graph belongs. By utilizing the high-order structure, messages are directly transmitted between subgraphs, and structural information that is invisible at the node level is captured, thereby improving the classification accuracy of the graph.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of artificial intelligence graph classification, and in particular to a graph classification method and system integrating high-order structure embedding and composite pooling. Background Art

[0002] The statements in this section merely provide background information related to the present invention and do not necessarily constitute prior art.

[0003] In real life, data from many real-world scenarios can be naturally represented by graphs. From biological and chemical informatics to social network analysis, graph-structured data are ubiquitous in application areas, and graph classification is one of the important applications. Simply put, given a dataset of graphs in the form of (G, y), where G represents a graph and y is its category, the goal of the graph classification task is to use the given graph structure and node features to predict the label associated with the entire graph. Many real-world graphs have typical local structures. For example, in social network graphs, the self-network around each node and the complex multivariate relationships of the entire community have hierarchical characteristics; in chemical molecular network graphs, in order to effectively label the graph structure of organic molecules, complex structures such as atomic groups and bonds representing functional units in molecules are encoded. Such complex multivariate structures are defined as high-order structures in graphs, and they play a vital role in the feature representation of network subgraphs. In order to develop effective graph classification models in the graph field, it is necessary to make full use of the rich information inherent in the graph structure and the feature information contained in the graph nodes and edges. In recent years, a large number of related models have been proposed to capture the complex structural relationships in graphs to improve the performance of models in specific tasks. Although these models have good performance on their respective problems, they still have the following shortcomings:

[0004] (1) Existing models only use information about vertices and edges in the graph for classification, lacking attention to high-order graph structure information. In practical applications, interactions may occur in groups of three or more nodes, which cannot be simply described as pairwise relationships between entities, but can be decomposed and expressed as high-order structures at different levels, e.g. Figure 2 High-order structures and node features play an important role in the actor social network graph. The yellow, green and blue dotted boxes represent the second-order subgraph, third-order subgraph and fourth-order subgraph respectively, while the existing models cannot represent this complex relationship.

[0005] (2) Most existing models lack a hierarchical structure. The naturally constructed graph structure itself is composed of single nodes that are interconnected, which contains a large amount of structural semantics. Learning the representation of the graph in a hierarchical manner is very important for capturing the local structure existing in the graph.

[0006] (3) In order to achieve hierarchical structure in graph classification tasks, existing graph neural network methods use pooling mechanism to achieve hierarchical learning. However, the graph pooling method in existing models is single, and the subgraphs that do not participate in graph pooling are directly discarded in the topology generation process, resulting in the loss of graph feature information; and they still only focus on the node level without considering higher-order structural information; and when generating the pool graph topology, they do not explicitly consider the graph topology structure and node feature representation at the same time. Summary of the invention

[0007] In order to solve the technical problems existing in the above-mentioned background technology, the present invention provides a graph classification method and system that integrates high-order structure embedding and composite pooling, utilizes high-order structure to directly transmit messages between sub-graphs, captures structural information that is invisible at the node level, and improves the classification accuracy of the graph.

[0008] In order to achieve the above object, the present invention adopts the following technical solution:

[0009] A first aspect of the present invention provides a graph classification method integrating high-order structure embedding and composite pooling, which comprises:

[0010] Get the image to be classified;

[0011] Input the graph to be classified into the graph neural network to obtain the category to which the graph belongs;

[0012] Among them, the graph neural network includes a readout layer, a classifier and multiple layers of neural network layers connected in sequence, each neural network layer is composed of convolutional layers and composite pooling layers connected in sequence; for each subgraph set of the graph, each convolutional layer calculates the features of each subgraph based on the subgraph set output by the previous neural network layer, and each composite pooling layer updates the subgraph set based on the features of each subgraph output by the convolutional layer. At the same time, for each subgraph in the updated subgraph set, the features of the subgraphs in the local neighborhood are fused through the attention mechanism to update the features of the subgraph; the readout layer aggregates the features of all subgraphs in all subgraph sets output by the last neural network layer to obtain a graph representation vector, and inputs it into the classifier to obtain the category to which the graph belongs.

[0013] Furthermore, the graph corresponds to a plurality of subgraph sets, and all subgraphs in the same subgraph set are of the same order.

[0014] Furthermore, within a subgraph set, if there is an edge connection between the non-common nodes of two subgraphs, the two subgraphs can be added to each other's local neighborhood.

[0015] Furthermore, the features of each subgraph in the first convolutional layer are calculated by aggregating the low-order features of each node in the subgraph and combining them with the initial features of the subgraph.

[0016] Furthermore, each composite pooling layer calculates the score of each sub-graph based on the features of each sub-graph output by the convolutional layer, and selects several sub-graphs according to the scores to update the sub-graph set.

[0017] Furthermore, the score of each subgraph is a weighted sum of a structural information score and a feature score.

[0018] Furthermore, the readout layer first accumulates and sums the features of all subgraphs of each subgraph set to obtain a vector representation corresponding to each subgraph set; then, the vector representations corresponding to all subgraph sets are concatenated to obtain a graph representation vector.

[0019] A second aspect of the present invention provides a graph classification system integrating high-order structure embedding and composite pooling, comprising:

[0020] An acquisition module is configured to: acquire a graph to be classified;

[0021] A classification module is configured to: input the graph to be classified into the graph neural network to obtain the category to which the graph belongs;

[0022] Among them, the graph neural network includes a readout layer, a classifier and multiple layers of neural network layers connected in sequence, each neural network layer is composed of convolutional layers and composite pooling layers connected in sequence; for each subgraph set of the graph, each convolutional layer calculates the features of each subgraph based on the subgraph set output by the previous neural network layer, and each composite pooling layer updates the subgraph set based on the features of each subgraph output by the convolutional layer. At the same time, for each subgraph in the updated subgraph set, the features of the subgraphs in the local neighborhood are fused through the attention mechanism to update the features of the subgraph; the readout layer aggregates the features of all subgraphs in all subgraph sets output by the last neural network layer to obtain a graph representation vector, and inputs it into the classifier to obtain the category to which the graph belongs.

[0023] The third aspect of the present invention provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps in the graph classification method that integrates high-order structure embedding and composite pooling as described above.

[0024] The fourth aspect of the present invention provides a computer device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, the steps in the graph classification method integrating high-order structure embedding and composite pooling as described above are implemented.

[0025] Compared with the prior art, the present invention has the following beneficial effects:

[0026] The present invention provides a graph classification method that integrates high-order structure embedding and composite pooling. It utilizes high-order structures to directly pass messages between subgraphs instead of between single nodes. This high-order form of message passing can capture structural information that is invisible at the node level.

[0027] The present invention provides a graph classification method that integrates high-order structure embedding and composite pooling. In the pooling process, both subgraph feature information and graph topology information are considered. For feature generation after selecting a pooled subgraph, the original features of the input graph are retained to the greatest extent. Feature fusion is used to ensure that the feature representation of the pooled subgraph contains sufficient and effective information from the graph.

[0028] The present invention provides a graph classification method that integrates high-order structure embedding and composite pooling, which can effectively utilize the structural information of the graph and process the simple and complex multivariate structures of a given graph and the relationships between them. Comprehensively considering the topological structure and node features in a graph can obtain a more objective and comprehensive graph embedding representation. BRIEF DESCRIPTION OF THE DRAWINGS

[0029] The accompanying drawings in the specification, which constitute a part of the present invention, are used to provide a further understanding of the present invention. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute improper limitations on the present invention.

[0030] Figure 1 This is a flow chart of a graph classification method integrating high-order structure embedding and composite pooling according to the first embodiment of the present invention;

[0031] Figure 2 is a schematic diagram of a high-level structure in an actor social network graph according to the first embodiment of the present invention;

[0032] Figure 3 This is a schematic diagram of subgraph attribute increment according to the first embodiment of the present invention. DETAILED DESCRIPTION

[0033] The present invention will be further described below in conjunction with the accompanying drawings and embodiments.

[0034] It should be noted that the following detailed descriptions are all illustrative and intended to provide further explanation of the present invention. Unless otherwise specified, all technical and scientific terms used herein have the same meanings as those commonly understood by those skilled in the art to which the present invention belongs.

[0035] It should be noted that the terms used herein are only for describing specific embodiments and are not intended to limit exemplary embodiments according to the present invention. As used herein, unless the context clearly indicates otherwise, the singular form is also intended to include the plural form. In addition, it should be understood that when the terms "comprising" and / or "including" are used in this specification, it indicates the presence of features, steps, operations, devices, components and / or combinations thereof.

[0036] Embodiment 1

[0037] This embodiment provides a graph classification method that integrates high-order structure embedding and composite pooling, which specifically includes the following steps:

[0038] Step 1: Obtain graph data with known category labels and obtain graph data to be classified;

[0039] Specifically, a graph data is node data and node relationship data (edges), which constitute the nodes and edges of the graph. For classification applications, a graph data with a known category label corresponds to a label graph (G, y), where the graph G = (V, E), V (G) represents a node set, a node is an entity in the graph, E (G) represents an edge set, if there is an edge between two nodes, it means that the two entities corresponding to the nodes are related, and y is the label corresponding to the graph.

[0040] Specifically, the graph is a network graph. For example, the graph can be a social network graph about movie collaboration (movie social network graph). In the social network graph, nodes represent actors, and the edge between two nodes indicates that the corresponding two actors have a collaboration relationship in the same movie. In other words, if there is an edge between two nodes, it means that the two actors corresponding to the nodes have a collaboration relationship. Each graph structure represents the self-network of an actor. The label of the graph indicates the type of movie style to which the self-network belongs, and the corresponding high-order structure in the graph represents a node set with specific semantics composed of different actors.

[0041] Step 2: Use graph data with known category labels to train the neural network, where the neural network is a graph neural network.

[0042] Step 3: Input the graph to be classified into the trained graph neural network to obtain the category to which the graph belongs. The graph neural network includes a readout layer, a classifier, and multiple layers of neural network layers connected in sequence, each neural network layer consists of a convolutional layer and a composite pooling layer connected in sequence; for each subgraph set of the graph, each convolutional layer calculates the features of each subgraph based on the subgraph set output by the previous neural network layer, and each composite pooling layer updates the subgraph set based on the features of each subgraph output by the convolutional layer. At the same time, for each subgraph in the updated subgraph set, the features of the subgraphs in the local neighborhood are fused through the attention mechanism to update the features of the subgraphs; the readout layer aggregates the features of all subgraphs in all subgraph sets output by the last neural network layer to obtain a graph representation vector, and inputs it into the classifier to obtain the category to which the graph belongs.

[0043] Specifically, Figure 1 As shown, the following steps are included:

[0044] Step 301: Based on the acquired graph data information, the features of its k-th order neighbors are aggregated through the incremental convolutional layers of the high-order structure to obtain its feature representation at the k-th order.

[0045] In the specific implementation, for each subgraph containing k nodes, the learned features of all subgraphs containing k-1 nodes are used for initialization. The features of each node are composed of its own node features, the features of the first-order neighbors to the features of the k-order neighbors. Each subgraph obtains a new embedded representation through the convolution calculation of the incremental convolution layer on the local neighborhood. Incremental convolution means that this method transfers the features of the previous order to the next order in terms of features, for example Figure 3 As shown, the third-order features include aggregated first-order information and aggregated second-order information.

[0046] As one or more embodiments, in step 301, in a given input graph, N(v) is used to represent the first-order neighborhood of node v in V(G), that is, N(v) = {u∈V(G)|(v,u)∈E(G)}. E P ={(v,u)∈E(G)|u,v∈P}, then G[P]=(P,E P ) is defined as a subgraph derived from P, requiring that G[P] must be a connected subgraph.

[0047] like Figure 2 As shown in the figure, in the movie social network, a node set of size k represents k actors (or actors and related staff such as producers) forming a k-order subgraph. For example, when k = 2, there is a binary set consisting of main actors and ordinary actors, or a binary set consisting of male and female protagonists, or a binary set consisting of main actors and producers, etc. If P is regarded as a set, then [P] k= {U∈P||U|=k} represents the set consisting of all subsets with cardinality k in the set. Specifically, if the node set of size k is defined as a k-order node set (or a k-order subgraph) s = (s1,...,s k ), s i represents the i-th node in a k-order subgraph, then [V(G)] k represents the set consisting of all s in the graph, that is, s∈[V(G)] k , where [V(G)] k represents the set of all k-order subgraphs. That is, a graph corresponds to several subgraph sets, and the same subgraph set [V(G)] k All subgraphs s in have the same order, that is, s=(s1,...,s k ).

[0048] Graph neural networks are composed of many neural network layers, each of which aggregates local neighbor information around each node, that is, the features of the neighbors, and then passes this aggregated information to the next layer. When high-order structures are incrementally embedded, the embedding of each order structure requires multiple layers of convolution to achieve feature aggregation. For the k-th order embedding, when the number of convolution layers t>0, a new feature is calculated in the feature matrix of node v:

[0049]

[0050] Among them, H (t) (v) represents the feature representation of a node v in a graph iterated at the tth layer, t-1 represents the previous layer of t; N(v) represents the neighborhood of node v; v′∈N(v) represents that node v′ is a node in the neighborhood of node v; and The size is R N×F The parameter matrix is ​​N, where N is the number of nodes and F is the number of node features; σ is the activation function, such as Sigmode or ReLU. During the training process, in order to adapt the parameters to the given data distribution, they are optimized together with the neural network parameters used for classification by the stochastic gradient descent method. This neural network is called a single-order GNN. Correspondingly, the multi-order aggregation method, that is, the k-order feature aggregation, is the incremental embedding based on the k-1 order.

[0051] The present invention performs multi-order aggregation according to the node set in the subgraph. For a given order k, all subgraphs containing k elements in V(G) are regarded as a whole. Then V(G) in the single-order embedding is the set [V(G)] in the multi-order mode. k To describe the algorithm, choose [V(G)] kThe node set s of order k has a node set s′ with k-1 common nodes, which constitute the neighbor set of s, which can be expressed as: N(s) = {t∈[V(G)] k ||s∩t|=k-1}.

[0052] In a subgraph set, if there is an edge connection between the non-common nodes of two subgraphs, then the two subgraphs can join each other's local neighborhood. Specifically, if there is an edge connection between the non-common nodes of subgraph s and subgraph s', then subgraph s' can join the local neighborhood N of subgraph s. L (s), and vice versa; N(s) and N L The relative difference of (s) is N(s)\N L (s) is called the global neighborhood N G (s).

[0053] When t ≥ 0, in each incremental convolution layer, [V(G)] k For each subgraph s in the Based on the definition of local neighborhood and global neighborhood, the feature representation obtained by iterating at the tth layer for each k-order subgraph s in the k-order subgraph set is:

[0054]

[0055] in, and is the parameter matrix of the tth layer, and σ is the activation function. In addition, the sum of the above neighborhood can be divided into two ranges, respectively in N L (s) and N G (s), using different parameter matrices to enable the model to calculate the features on the local neighborhood and the global neighborhood respectively. In order to expand HSECP to larger data sets and prevent overfitting, the model ignores the global neighborhood of s and only considers the local neighborhood when calculating, and we can get the subgraph set [V(G)] k The feature representation of each k-order subgraph s in . That is, each convolutional layer is based on the subgraph set [V(G)] output by the previous neural network layer. k , calculate the subgraph set [V(G)] k The features obtained by iterating each k-order subgraph s at the tth layer:

[0056]

[0057] Where u∈N L (s) indicates that subgraph u belongs to a subgraph in the local neighborhood of subgraph s.

[0058] In order to better utilize the structural information of the graph, and considering that using a one-hot vector as the initial feature input of HSECP is too simplistic, in addition to the labeled isomorphic types, the present invention also uses the features learned by the k-1-order convolutional layer as the initial features, that is, the k-th order feature will contain the features aggregated by the first k-1 orders. That is, the features of each subgraph in the first convolutional layer By aggregating the low-level features of each node in the subgraph After that, combined with the initial feature H of the subgraph k (s) is calculated.

[0059]

[0060] Where v∈s means that node v belongs to subgraph s, W k-1 is a parameter matrix, and the square brackets represent matrix cascades. Through the above method, the features of the input graph with multiple high-order structures from 1st to kth order can be learned end-to-end.

[0061] Step 302: Take the processed high-order embedding as input, add a composite pooling layer after each convolution layer, select the sub-graphs with the top K final pooling scores, and use the output of the composite pooling layer as the input of the next convolution layer. The final output result is summarized in the readout layer, and the output of each readout layer is passed to the linear layer for classification.

[0062] In the specific implementation, a composite pooling layer is added after each convolutional layer. The sub-graph composite pooling process after each high-order structure aggregation includes two steps: selection of pooled sub-graphs and aggregation of pooled sub-graph features.

[0063] (1) Selection of pooled subgraphs, i.e., topology-based TOP-K pooling, feature-based TOP-K pooling, and fusion of pooling results. The composite pooling layer is used to extract more effective information on the graph and accelerate calculations. The structural information of the graph is obtained through topology-based pooling, and then feature-based pooling is used to extract feature information to strengthen topology pooling, and finally select the top K subgraphs with the final pooling score;

[0064] As one or more embodiments, the pooling of each order subgraph in (1) first performs topology-based TOP-K pooling, uses GCNConv to evaluate the importance of the high-order subgraph structure, and calculates the structural information score of the high-order subgraph:

[0065]

[0066] Among them, A represents the adjacency matrix of subgraph s, D represents the degree matrix of subgraph s, and I represents the identity matrix. After normalizing the adjacency matrix, we can get W represents the parameter matrix.

[0067] The feature-based TOP-K pooling uses the adaptive feature information aggregation method MLP to obtain sub-graph features and calculate the feature scores of high-order sub-graphs:

[0068]

[0069] According to the aggregation results, the features of additional important subgraphs can be retained. GCNConv can effectively refine the local structural information of the graph, and MLP focuses on the feature information of the nodes. In order to make the subgraph evaluation criteria more objective, after obtaining the above two scores, these two methods are used to calculate the subgraph score. The score of each subgraph is the weighted sum of the structural information score and the feature score, that is, the final score is combined as follows:

[0070] S final =αS1+(1-α)S2

[0071] Among them, the weight α is a hyperparameter. According to the final score S final Sort the subgraphs and obtain the top K subgraphs as the pooling result. For each subgraph set [V(G)] of the graph k , according to the score S final Select the subgraph set [V(G)] k Several subgraphs in , i.e., the subgraphs with the top K scores, are used to form a new subgraph set to update the subgraph set [V(G)] k .

[0072] (2) Pooled sub-graph feature aggregation is the pooled sub-graph feature representation, which focuses on retaining the features of the unselected sub-graphs and retaining the feature information of the unselected sub-graph structure through sub-graph feature aggregation. The output of the composite pooling layer is used as the input of the next convolutional layer, and the final output result is summarized in the readout layer. The output of each readout layer is passed to the linear layer for classification;

[0073] As one or more embodiments, in the (2) pooling method for selecting the top-K at each level, only some sub-graphs are selected as the pooling result. In order to utilize the effective information of the unselected sub-graphs, their features must be aggregated before discarding them, such as aggregating the selected sub-graphs. Figure 1 The features of the hop or two-hop neighbors can make fuller use of the subgraph feature information and make the final graph embedding vector more representative. The subgraph features are fused through the attention mechanism. The attention aggregation process is as follows. First, the attention score e between the subgraph s and its neighbor u is calculated. su , and normalize it using the softmax function:

[0074]

[0075]

[0076] Among them, a T Represents the attention vector, W1 and W2 represent the parameter matrix. After obtaining the attention score, the nonlinear parameter σ is used to generate the subgraph embedding, that is, the features of the subgraph in the local neighborhood are fused through the attention mechanism to obtain the subgraph features:

[0077]

[0078] For each updated subgraph set [V(G)] k , the sub-graph features obtained by fusing the features of the sub-graphs in the local neighborhood through the attention mechanism As a new subgraph feature When input into the convolutional layer of the next neural network layer, under the combined effect of these methods, the selected pooled subgraph will carry feature information from its neighbors, and the pooling result can highly represent the entire graph.

[0079] Step 303: After obtaining the output graphs of each order of the graph data of the category label to be predicted, the feature vectors obtained after aggregating the high-order structure are concatenated as the final feature representation of the graph, and the pre-trained neural network is used for classification prediction to complete the classification task.

[0080] In a specific implementation, after obtaining the feature representation of the entire graph through the calculations in the above steps, a multilayer perceptron (MLP) is used for classification prediction to output the category label of the graph to be predicted.

[0081] As one or more embodiments, in step 303, after calculating all high-order subgraph structures and obtaining their feature representations, a classifier is used for classification prediction, and a multilayer perceptron uses a hidden layer activation function to increase nonlinearity, and selects it for classification in the classification stage.

[0082] The readout layer calculates the vector representation of the entire graph by accumulating and summing the embeddings of each subgraph, that is, accumulating and summing the features of all subgraphs in each subgraph set to obtain the vector representation corresponding to each subgraph set:

[0083]

[0084] Among them, T represents the last layer of the convolutional layer, Represents the output result of the last layer of the k-th order composite pooling layer. The graph representation vectors obtained by the output graphs of each order are concatenated to obtain the final representation vector, that is, the vector representations corresponding to all subgraph sets are concatenated to obtain the graph representation vector:

[0085] F(G)=concat{H1(G),...,H k (G)}

[0086] The embedding of the self-network graph obtained by the readout layer will be input into the classifier for classification prediction to obtain the label, namely:

[0087]

[0088] The classification results of the graph corresponding to the movie social network correspond to the type prediction of the actor's self-network, such as romantic or action.

[0089] Based on the domain knowledge of graph neural networks, this paper proposes a new hierarchical, multi-order high-order structure, end-to-end graph classification method to address the problem of lack of effective use of high-order structural information in graph classification embedding representation. By introducing high-order structures, the role of subgraphs in feature aggregation is considered, and a pooling strategy that fuses structural information and attribute information is used to obtain the embedded representation of the graph, which can extract the complex hierarchical structure of the graph.

[0090] Embodiment 2

[0091] This embodiment provides a graph classification system that integrates high-order structure embedding and composite pooling, which specifically includes the following modules:

[0092] An acquisition module is configured to: acquire a graph to be classified;

[0093] A classification module is configured to: input the graph to be classified into the graph neural network to obtain the category to which the graph belongs;

[0094] Among them, the graph neural network includes a readout layer, a classifier and multiple layers of neural network layers connected in sequence, each neural network layer is composed of convolutional layers and composite pooling layers connected in sequence; for each subgraph set of the graph, each convolutional layer calculates the features of each subgraph based on the subgraph set output by the previous neural network layer, and each composite pooling layer updates the subgraph set based on the features of each subgraph output by the convolutional layer. At the same time, for each subgraph in the updated subgraph set, the features of the subgraphs in the local neighborhood are fused through the attention mechanism to update the features of the subgraph; the readout layer aggregates the features of all subgraphs in all subgraph sets output by the last neural network layer to obtain a graph representation vector, and inputs it into the classifier to obtain the category to which the graph belongs.

[0095] It should be noted here that each module in this embodiment corresponds to each step in Example 1 one by one, and the specific implementation process is the same, which will not be repeated here.

[0096] Embodiment 3

[0097] This embodiment provides a computer-readable storage medium having a computer program stored thereon. When the program is executed by a processor, the steps of the graph classification method integrating high-order structure embedding and composite pooling as described in the first embodiment above are implemented.

[0098] Embodiment 4

[0099] This embodiment provides a computer device, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the program, the steps in the graph classification method integrating high-order structure embedding and composite pooling as described in the first embodiment are implemented.

[0100] Those skilled in the art will appreciate that embodiments of the present invention may be provided as methods, systems, or computer program products. Therefore, the present invention may take the form of hardware embodiments, software embodiments, or embodiments combining software and hardware. Furthermore, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage and optical storage, etc.) containing computer-usable program code.

[0101] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0102] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0103] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process in the computer or other programmable device. Figure 1A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0104] A person skilled in the art can understand that all or part of the processes in the above-mentioned embodiments can be implemented by instructing the relevant hardware through a computer program, and the program can be stored in a computer-readable storage medium, and when the program is executed, it can include the processes of the embodiments of the above-mentioned methods. The storage medium can be a disk, an optical disk, a read-only memory (ROM) or a random access memory (RAM), etc.

[0105] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. For those skilled in the art, the present invention may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.

Claims

1. A graph classification method integrating high-order structure embedding and composite pooling, characterized in that: include: Get the image to be classified; Input the graph to be classified into the graph neural network to obtain the category to which the graph belongs; The graph neural network includes a readout layer, a classifier, and multiple layers of neural network layers connected in sequence, each neural network layer is composed of a convolutional layer and a composite pooling layer connected in sequence; for each subgraph set of the graph, each convolutional layer calculates the features of each subgraph based on the subgraph set output by the previous neural network layer, and each composite pooling layer updates the subgraph set based on the features of each subgraph output by the convolutional layer. At the same time, for each subgraph in the updated subgraph set, the features of the subgraphs in the local neighborhood are fused through the attention mechanism to update the features of the subgraphs; the readout layer aggregates the features of all subgraphs in all subgraph sets output by the last neural network layer to obtain a graph representation vector, and inputs it into the classifier to obtain the category to which the graph belongs; According to the acquired graph data information, the high-order structure is aggregated by incremental convolutional layers step by step. The characteristics of the order neighbors are obtained in The feature representation of the order; The graph is a social network graph about film collaboration; the nodes in the social network graph represent actors, the edge between two nodes represents that the corresponding two actors have a collaboration relationship in the same film, and each graph structure represents an actor's self-network; the label of the graph represents the type of film style to which the self-network belongs, and the corresponding high-order structure in the graph represents a node set with specific semantics composed of different actors; a node set of size k represents that k actors constitute a k-order subgraph; if As a set, Indicates that the cardinality of the set is The set of all subsets of k The node set is defined as k Order Node Set , s i Indicates a k The first i nodes, represents the set consisting of all s in the graph, that is, ,in, represents the set of all k-order subgraphs; that is, one graph corresponds to several subgraph sets, and the same subgraph set All subgraphs s in have the same order, that is ; The graph neural network consists of several neural network layers, each of which aggregates local neighbor information around each node and then passes this aggregated information to the next layer. When high-order structures are incrementally embedded, the embedding of each order structure requires multiple layers of convolution to achieve feature aggregation. For the k-th order embedding, when the number of convolution layers t>0, at the node v Compute a new feature from the feature matrix of : in, Represents a node in a graph v In the t The feature representation obtained by layer iteration is t -1 means t The upper layer; N ( v ) represents a node v Neighborhood of; Representation Node Belongs to Node v A node in the neighborhood of and Is the size of The parameter matrix of is the number of nodes, is the number of node features; is the activation function, which is Sigmode or ReLU; during the training process, it is optimized together with the neural network parameters used for classification by the stochastic gradient descent method, and the neural network is called a single-order GNN; correspondingly, the multi-order aggregation method is k The order features are aggregated k -Incremental embedding on 1st order basis; The processed high-order embedding is used as input, and a composite pooling layer is added after each convolutional layer to select the top K sub-graphs with the final pooling score. The output of the composite pooling layer is used as the input of the next convolutional layer. The final output result is summarized in the readout layer, and the output of each readout layer is passed to the linear layer for classification; A composite pooling layer is added after each convolutional layer. The composite pooling process of each sub-graph after high-order structure aggregation includes two steps: selection of pooled sub-graphs and aggregation of pooled sub-graph features. After obtaining the output graphs of each order of the graph data of the category label to be predicted, the feature vectors obtained after aggregating the high-order structure are concatenated as the final feature representation of the graph, and the pre-trained neural network is used for classification prediction to complete the classification task.

2. The graph classification method integrating high-order structure embedding and composite pooling as claimed in claim 1, characterized in that: The graph corresponds to several subgraph sets, and all subgraphs in the same subgraph set are of the same order.

3. The graph classification method integrating high-order structure embedding and composite pooling as claimed in claim 1, characterized in that: Within a subgraph set, if there is an edge connection between the non-common nodes of two subgraphs, the two subgraphs can be added to each other's local neighborhood.

4. The graph classification method integrating high-order structure embedding and composite pooling as claimed in claim 1, characterized in that: The features of each subgraph in the first convolutional layer are calculated by aggregating the low-order features of each node in the subgraph and combining them with the initial features of the subgraph.

5. The graph classification method integrating high-order structure embedding and composite pooling as claimed in claim 1, characterized in that: Each composite pooling layer calculates the score of each sub-graph based on the features of each sub-graph output by the convolutional layer, and selects several sub-graphs according to the scores to update the sub-graph set.

6. The graph classification method integrating high-order structure embedding and composite pooling as claimed in claim 5, characterized in that: The score of each subgraph is a weighted sum of a structural information score and a feature score.

7. The graph classification method integrating high-order structure embedding and composite pooling as claimed in claim 1, characterized in that: The readout layer first accumulates and sums the features of all subgraphs of each subgraph set to obtain a vector representation corresponding to each subgraph set; then, the vector representations corresponding to all subgraph sets are concatenated to obtain a graph representation vector.

8. A graph classification system integrating high-order structure embedding and composite pooling, characterized by: include: An acquisition module is configured to: acquire a graph to be classified; A classification module is configured to: input the graph to be classified into the graph neural network to obtain the category to which the graph belongs; The graph neural network includes a readout layer, a classifier, and multiple layers of neural network layers connected in sequence, each neural network layer is composed of a convolutional layer and a composite pooling layer connected in sequence; for each subgraph set of the graph, each convolutional layer calculates the features of each subgraph based on the subgraph set output by the previous neural network layer, and each composite pooling layer updates the subgraph set based on the features of each subgraph output by the convolutional layer. At the same time, for each subgraph in the updated subgraph set, the features of the subgraphs in the local neighborhood are fused through the attention mechanism to update the features of the subgraphs; the readout layer aggregates the features of all subgraphs in all subgraph sets output by the last neural network layer to obtain a graph representation vector, and inputs it into the classifier to obtain the category to which the graph belongs; According to the acquired graph data information, the high-order structure is aggregated by incremental convolutional layers step by step. The characteristics of the order neighbors are obtained in The feature representation of the order; The graph is a social network graph about film collaboration; the nodes in the social network graph represent actors, the edge between two nodes represents that the corresponding two actors have a collaboration relationship in the same film, and each graph structure represents an actor's self-network; the label of the graph represents the type of film style to which the self-network belongs, and the corresponding high-order structure in the graph represents a node set with specific semantics composed of different actors; a node set of size k represents that k actors constitute a k-order subgraph; if As a set, Indicates that the cardinality of the set is The set of all subsets of k The node set is defined as k Order Node Set , s i Indicates a k The first i nodes, represents the set consisting of all s in the graph, that is, ,in, represents the set of all k-order subgraphs; that is, one graph corresponds to several subgraph sets, and the same subgraph set All subgraphs s in have the same order, that is ; The graph neural network consists of several neural network layers, each of which aggregates local neighbor information around each node and then passes this aggregated information to the next layer. When high-order structures are incrementally embedded, the embedding of each order structure requires multiple layers of convolution to achieve feature aggregation. For the k-th order embedding, when the number of convolution layers t>0, at the node v Compute a new feature from the feature matrix of : in, Represents a node in a graph v In the t The feature representation obtained by layer iteration is t -1 means t The upper layer; N ( v ) represents a node v Neighborhood of; Representation Node Belongs to Node v A node in the neighborhood of and Is the size of The parameter matrix of is the number of nodes, is the number of node features; is the activation function, which is Sigmode or ReLU; during the training process, it is optimized together with the neural network parameters used for classification by the stochastic gradient descent method, and the neural network is called a single-order GNN; correspondingly, the multi-order aggregation method is k The order features are aggregated k -Incremental embedding on 1st order basis; The processed high-order embedding is used as input, and a composite pooling layer is added after each convolutional layer to select the top K sub-graphs with the final pooling score. The output of the composite pooling layer is used as the input of the next convolutional layer. The final output result is summarized in the readout layer, and the output of each readout layer is passed to the linear layer for classification; A composite pooling layer is added after each convolutional layer. The composite pooling process of each sub-graph after high-order structure aggregation includes two steps: selection of pooled sub-graphs and aggregation of pooled sub-graph features. After obtaining the output graphs of each order of the graph data of the category label to be predicted, the feature vectors obtained after aggregating the high-order structure are concatenated as the final feature representation of the graph, and the pre-trained neural network is used for classification prediction to complete the classification task.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the steps of the graph classification method integrating high-order structure embedding and composite pooling as described in any one of claims 1 to 7 are implemented.

10. A computer device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the program, the steps in the graph classification method integrating high-order structure embedding and composite pooling are implemented as described in any one of claims 1-7.

Citation Information

Patent Citations

  • Subject classification method fusing multiple human brain atlases based on graph convolutional neural network

    CN111563533A

  • Symbol network link prediction method based on graph attention mechanism

    CN113050931A