Graph pooling method based on graph residual attention and aggregation network
By introducing the graph residual attention and aggregation network in the graph pooling method, combining graph convolution and residual connection, and dynamically building the graph structure, the problem of information loss and insufficient information binding capabilities in the existing technology is solved, and the graph data is improved Feature extraction and classification accuracy.
Patent Information
- Application Number
- CN202410990337.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-23
- Publication Date
- 2024-11-08
AI Technical Summary
Existing graph pooling methods tend to lose structural information when processing large or complex graph structures, resulting in a decrease in the accuracy of graph classification and regression tasks, and lack the ability to effectively combine local and global information.
Using a method based on graph residual attention and aggregation network, the graph convolution layer, aggregation layer and pooling layer are combined, and feature transformation and iteration is performed using normalized adjacency matrix and trainable parameter matrix to calculate the node importance score and dynamically construct it. Graph structure, introducing residual connections and multi-layer graph convolutions for feature extraction.
It significantly improves the global understanding ability and feature richness of graph data, improves the accuracy and stability of node classification and graph embedding tasks, and is suitable for a variety of graph data scenarios.
Smart Images

Figure CN118916674A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of graph pooling technology, and in particular, to a graph pooling method based on graph residual attention and aggregation network. Background Art
[0002] In graph classification tasks, we hope to predict the category label of the entire graph based on the graph structure. However, the structure of the graph is disordered, and the size and node types may be different. Traditional machine learning algorithms cannot directly process such structural data. Graph neural networks can process this structural information by propagating information on the graph structure and learning the representation of the graph.
[0003] In the prior art, it mainly involves graph attention networks and graph pooling methods in graph neural networks. The graph attention mechanism calculates the attention weights between pairs of nodes in the graph through the self-attention mechanism. Through this mechanism, GAT can automatically capture important nodes and their relationships. In the feature aggregation stage, the graph neural network uses the calculated attention coefficient to weighted sum the features of neighbor nodes. In the graph pooling method, Top-K Pooling is used to select the K most important nodes in the graph for retention. The importance is usually calculated based on some scoring function, such as the projection score of the node feature. Calculate the score of each node. Sort by score and select the k nodes with the highest scores. And introduce SAGPool into the self-attention mechanism to select nodes based on the correlation between the node and its neighbor nodes. It also sorts the nodes according to the scores and retains the k nodes with the highest scores.
[0004] However, in traditional graph pooling methods, such as Top-K pooling or simple global average pooling, they often only rely on local or global node information to achieve dimensionality reduction. This method may cause important structural information and node features to be lost during the pooling process, especially when the graph is large or the structure is complex. This loss of information may have a negative impact on subsequent graph analysis tasks, such as graph classification and graph regression. In the graph attention mechanism, although existing graph attention models (such as GAT) introduce attention mechanisms into the model to better capture the dependencies between nodes, these models usually do not effectively fuse information from different layers. In deep graph networks, this may lead to a lack of direct observation of the input layer information at the top layer of the network, which in turn affects the model's ability to understand the graph data globally. In terms of integrating global and local information, existing technologies often focus on the processing of local neighborhood information, or overemphasize the importance of global information, without achieving an effective combination of the two. This limits the richness of graph representation, because an ideal graph representation should contain both local structural details and a global structural overview.
[0005] In view of this, the present invention provides a graph pooling method based on graph residual attention and aggregation network, and proposes a method combining graph attention mechanism and residual connection to improve the information fusion problem, while optimizing the calculation and handling the scalability problem through an efficient pooling strategy. Summary of the invention
[0006] According to the above-mentioned deficiencies, a graph pooling method based on graph residual attention and aggregation network is provided. The present invention mainly utilizes the graph convolution layer to perform feature transformation according to the first normalized adjacency matrix, the normalized matrix of the node and the trainable parameter matrix to obtain the node feature matrix; the aggregation layer iterates according to the node feature matrix and the second normalized adjacency matrix to obtain the node feature information; the pooling layer calculates the importance scores of all node feature information respectively, and arranges the importance scores in order from high to low, and selects the nodes corresponding to the first k importance scores to form a node matrix; the pooling layer extracts features from the second normalized adjacency matrix to obtain a new adjacency matrix; the pooling layer constructs a graph structure according to the node matrix and the new adjacency matrix to achieve multi-level feature extraction and dynamic pooling.
[0007] The technical means adopted by the present invention are as follows:
[0008] On the one hand, the present invention provides a graph pooling method based on graph residual attention and aggregation network, comprising:
[0009] Calculate the first normalized adjacency matrix and the symmetric normalized matrix of all nodes according to the input graph;
[0010] Build a graph size reduction model;
[0011] Inputting the first normalized adjacency matrix and the normalized matrices of all the nodes into the graph scale reduction model to obtain a graph structure, including:
[0012] The graph convolution layer of the graph scale reduction model performs feature transformation according to the first normalized adjacency matrix, the normalized matrix of the node and the trainable parameter matrix to obtain a node feature matrix;
[0013] The aggregation layer of the graph scale reduction model iterates according to the node feature matrix and the second normalized adjacency matrix to obtain node feature information;
[0014] The pooling layer of the graph scale reduction model calculates the importance scores for all the node feature information respectively, arranges the importance scores in descending order, and selects the nodes corresponding to the first k importance scores to form a node matrix; the pooling layer performs feature extraction on the second normalized adjacency matrix to obtain a new adjacency matrix; the pooling layer constructs the graph structure according to the node matrix and the new adjacency matrix.
[0015] Preferably, the step of inputting the first normalized adjacency matrix and the normalized matrices of all the nodes into the graph scale reduction model to obtain a graph structure further includes:
[0016] The graph convolution layer obtains a new node feature matrix according to the node feature matrix, the weight matrix, the second normalized adjacency matrix and the nonlinear activation function;
[0017] The residual attention layer of the graph size reduction model determines the iterative weight gradient of the aggregation layer according to the new node feature matrix.
[0018] Preferably, the graph convolution layer obtains a new node feature matrix according to the node feature matrix, the weight matrix, the second normalized adjacency matrix and the nonlinear activation function, including:
[0019] The graph convolution layer multiplies the node feature matrix with the weight matrix to obtain a new feature matrix, multiplies the new feature matrix with the second normalized adjacency matrix to obtain a convolved node feature matrix, and applies the nonlinear activation function to the convolved node feature matrix to obtain a new node feature matrix.
[0020] Preferably, the residual attention layer of the graph scale reduction model determines the iterative weight gradient of the aggregation layer according to the new node feature matrix, including:
[0021] The residual attention layer determines the adjacent nodes according to the input graph, calculates the dot product attention scores and additive attention scores of the adjacent nodes, combines the dot product attention scores and additive attention scores of the adjacent nodes and performs normalization processing, assigns an attention weight to each node according to the processing result, and the sum of the attention weights of all the nodes is 1;
[0022] When the aggregation layer calculates the node feature information of the i-th node, the residual attention layer weightedly sums the attention weight of the i-th node and the new node feature matrix of its neighboring nodes to obtain the attention-weighted features, and uses the residual connection to obtain the weight gradient by connecting the symmetric normalized matrix of the i-th node and the attention-weighted features of the i-th node.
[0023] Preferably, the calculation of the dot product attention scores of the adjacent nodes is calculated in the following manner:
[0024] e ij =(H i W)·(H j W) T
[0025] Among them, e ijis the dot product attention score of the i-th node and the j-th node, W is the linear transformation weight matrix, H i is the new node feature matrix of the i-th node, H j is the new node feature matrix of the j-th node.
[0026] Preferably, the calculation of the additive attention scores of the adjacent nodes is calculated in the following manner:
[0027] e ij ′=a T LeakyReLU(W′[H i |H j ])
[0028] Among them, e ij ′ is the additive attention score of the i-th node and the j-th node, a is the first learning parameter vector, W′ is the second learning parameter vector, | is the concatenation operation of the feature, H i is the new node feature matrix of the i-th node, H j is the new node feature matrix of the j-th node.
[0029] Preferably, the attention weight is assigned to each node according to the processing result, and is calculated in the following manner:
[0030]
[0031] Among them, α is the attention weight, e ij is the dot product attention score of the i-th node and the j-th node, e ik is the dot product attention score of the i-th node and the k-th node, and N(i) is the set of neighbor nodes of the i-th node.
[0032] Preferably, the residual attention layer performs weighted summation of the attention weight of the i-th node and the new node feature matrix of its neighboring nodes to obtain the attention-weighted features, which are calculated in the following manner:
[0033]
[0034] Among them, H i ′ is the attention-weighted feature of the i-th node, H j is the new node feature matrix of the j-th node, α ij is the attention weight of the i-th node.
[0035] Preferably, the aggregation layer of the graph scale reduction model iterates according to the node feature matrix and the second normalized adjacency matrix to obtain node feature information, including:
[0036] During the first layer iteration, the first layer graph convolution of the aggregation layer applies the weights of the first layer iteration to the node feature matrix to perform feature transformation to obtain the first transformed features, and multiplies the first transformed features with the second normalized adjacency matrix and then applies an activation function to obtain the first node features;
[0037] In the Nth iteration, N is an integer and N≥2, the Nth graph convolution of the aggregation layer applies the weight of the Nth iteration to the N-1th node feature obtained by the N-1th iteration to perform feature transformation to obtain the Nth transformed feature, multiply the Nth transformed feature with the second normalized adjacency matrix, and then apply the activation function to obtain the Nth node feature;
[0038] When the N-th layer iteration is completed and the iteration stop condition is reached, the N-th node feature is output as the node feature information.
[0039] Compared with the prior art, the present invention has the following advantages:
[0040] 1. The present invention provides a graph pooling method based on graph residual attention and aggregation network, which introduces a residual attention mechanism after the graph convolution layer, dynamically adjusts the aggregation weight of node features through the attention mechanism, retains the original features through residual connections, and then uses multi-layer graph convolution to perform feature aggregation, and extracts higher-level node features in a hierarchical manner.
[0041] 2. The present invention provides a graph pooling method based on graph residual attention and aggregation network, which calculates the importance scores of nodes through linear layers and selects the top k important nodes for pooling. It effectively combines graph convolution, residual attention, multi-layer aggregation and dynamic pooling to form a unified model framework. Through multi-level feature extraction and dynamic pooling, it performs well in node classification and graph embedding tasks, and significantly improves accuracy and stability.
[0042] 3. The present invention provides a graph pooling method based on graph residual attention and aggregation network. The graph scale reduction model provided by the present invention has strong versatility and scalability, and is suitable for a variety of graph data and character scenes. BRIEF DESCRIPTION OF THE DRAWINGS
[0043] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.
[0044] Figure 1A schematic flow chart of a graph pooling method based on graph residual attention and aggregation network provided by the present invention.
[0045] Figure 2 A flowchart of the graph convolutional layer.
[0046] Figure 3 A flow chart of the aggregation layer.
[0047] Figure 4 A flow chart of the pooling layer.
[0048] Figure 5 A flow chart of the residual attention layer. DETAILED DESCRIPTION
[0049] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.
[0050] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0051] Combination Figures 1 to 4 , Figure 1 A schematic diagram of a flow chart of a graph pooling method based on graph residual attention and aggregation network provided by the present invention, Figure 2 It is a flow chart of the graph convolution layer. Figure 3 A schematic diagram of the process of the aggregation layer. Figure 4 A flow chart of a pooling layer is provided to illustrate a graph pooling method based on graph residual attention and aggregation network provided by the present invention, including:
[0052] Calculate the first normalized adjacency matrix and the symmetric normalized matrix of all nodes according to the input graph;
[0053] Build a graph size reduction model;
[0054] The first normalized adjacency matrix and the normalized matrices of all nodes are input into the graph size reduction model to obtain the graph structure, including:
[0055] The graph convolution layer of the graph scale reduction model performs feature transformation according to the first normalized adjacency matrix, the normalized matrix of the node, and the trainable parameter matrix to obtain a node feature matrix;
[0056] The aggregation layer of the graph scale reduction model iterates based on the node feature matrix and the second normalized adjacency matrix to obtain node feature information;
[0057] The pooling layer of the graph scale reduction model calculates the importance scores of all node feature information respectively, and arranges the importance scores in descending order, and selects the nodes corresponding to the first k importance scores to form a node matrix; the pooling layer extracts features from the second normalized adjacency matrix to obtain a new adjacency matrix; the pooling layer constructs the graph structure based on the node matrix and the new adjacency matrix.
[0058] It should be noted that the symmetric normalized matrix N of all input nodes F , N is the number of nodes, F is the number of features of each node. The first normalized adjacency matrix N N , used to represent the connection relationship between nodes. F’ The trainable parameter matrix F' is the dimension of the output feature. This matrix is used to linearly transform the input features. The node feature information and the second normalized adjacency matrix enter the pooling layer. The importance score of each node, that is, the score vector score, is calculated using the defined scoring function. The nodes are sorted according to the score vector score, and the top k nodes with the highest importance scores are selected to form an important node set S. Then the features of the important nodes are extracted from the original node feature information matrix to form a new node feature matrix information matrix. The connection relationship between important nodes is extracted from the second normalized adjacency matrix to form a new adjacency matrix. Finally, the pooled graph, the new node feature matrix and the new adjacency matrix are output for subsequent operations.
[0059] It can be understood that by calculating the importance scores of nodes through linear layers and selecting the top k important nodes for pooling, graph convolution, residual attention, multi-layer aggregation and dynamic pooling are effectively combined to form a unified graph scale reduction model. The graph scale reduction model has strong versatility and scalability, and is suitable for a variety of graph data and character scenes. Through multi-level feature extraction and dynamic pooling, it performs well in node classification and graph embedding tasks, and its accuracy and stability are significantly improved.
[0060] In some optional embodiments, referring to Figure 1 and Figure 5 , Figure 5 A flow chart of the residual attention layer is shown in FIG. The first normalized adjacency matrix and the normalized matrices of all nodes are input into the graph size reduction model to obtain the graph structure, and also includes:
[0061] The graph convolution layer obtains a new node feature matrix based on the node feature matrix, weight matrix, second normalized adjacency matrix and nonlinear activation function;
[0062] The residual attention layer of the graph size reduction model determines the iterative weight gradients of the aggregation layer according to the new node feature matrix.
[0063] In some optional embodiments, continue to refer to Figure 2 , the graph convolution layer obtains a new node feature matrix based on the node feature matrix, weight matrix, second normalized adjacency matrix and nonlinear activation function, including:
[0064] The graph convolution layer multiplies the node feature matrix with the weight matrix to obtain a new feature matrix, multiplies the new feature matrix with the second normalized adjacency matrix to obtain the convolved node feature matrix, and applies a nonlinear activation function to the convolved node feature matrix to obtain a new node feature matrix.
[0065] It can be understood that multiplying the node feature matrix H with the weight matrix results in a new feature matrix H′, which maps the input features to a new feature space through a linear transformation. Then the second normalized adjacency matrix Multiply it with the new feature matrix H′ to get the convolutional node feature matrix This operation aggregates the features of each node with the features of neighboring nodes to achieve the purpose of updating node features. A nonlinear activation function is applied to the node feature matrix after convolution to make the features have nonlinear expression capabilities. The node feature update formula is Finally, a new node feature matrix H is obtained. (l+1) .
[0066] In some optional embodiments, continue to refer to Figure 1 and Figure 5 , the residual attention layer of the graph scale reduction model determines the iterative weight gradient of the aggregation layer according to the new node feature matrix, including:
[0067] The residual attention layer determines the adjacent nodes according to the input graph, calculates the dot product attention scores and additive attention scores of the adjacent nodes, merges the dot product attention scores and additive attention scores of the adjacent nodes, and normalizes them. An attention weight is assigned to each node according to the processing result, and the sum of the attention weights of all nodes is 1.
[0068] When the aggregation layer calculates the node feature information of the i-th node, the residual attention layer performs weighted summation on the attention weight of the i-th node and the new node feature matrix of its neighboring nodes to obtain the attention-weighted features, and uses the residual connection to connect the symmetric normalized matrix of the i-th node and the attention-weighted features of the i-th node to obtain the weight gradient.
[0069] It can be understood that by introducing the residual attention mechanism after the graph convolution layer, the aggregation weights of the node features are dynamically adjusted through the attention mechanism, and the original features are retained through the residual connection. Then, multi-layer graph convolution is used for feature aggregation, and higher-level node features are extracted in a hierarchical manner.
[0070] In some optional embodiments, the dot product attention scores of adjacent nodes are calculated as follows:
[0071] e ij =(H i W)·(H j W) T
[0072] Among them, e ij is the dot product attention score of the i-th node and the j-th node, W is the linear transformation weight matrix, H i is the new node feature matrix of the i-th node, H j is the new node feature matrix of the jth node.
[0073] In some optional embodiments, the additive attention scores of adjacent nodes are calculated as follows:
[0074] e ij ′=a T LeakyReLU(W′[H i |H j ])
[0075] Among them, e ij ′ is the additive attention score of the i-th node and the j-th node, a is the first learning parameter vector, W′ is the second learning parameter vector, | is the concatenation operation of the feature, H i is the new node feature matrix of the i-th node, H j is the new node feature matrix of the jth node.
[0076] In some optional embodiments, an attention weight is assigned to each node according to the processing result, and is calculated as follows:
[0077]
[0078] Among them, α is the attention weight, e ijis the dot product attention score of the i-th node and the j-th node, e ik is the dot product attention score of the i-th node and the k-th node, and N(i) is the set of neighbor nodes of the i-th node.
[0079] In some optional embodiments, the residual attention layer performs a weighted summation of the attention weight of the i-th node and the new node feature matrix of its neighboring nodes to obtain the attention-weighted feature, which is calculated as follows:
[0080]
[0081] Among them, H i ′ is the attention-weighted feature of the i-th node, H j is the new node feature matrix of the jth node, α ij is the attention weight of the ith node.
[0082] In some optional embodiments, continue to refer to Figure 1 and Figure 3 , the aggregation layer of the graph scale reduction model iterates according to the node feature matrix and the second normalized adjacency matrix to obtain node feature information, including:
[0083] During the first layer iteration, the first layer graph convolution of the aggregation layer applies the weights of the first layer iteration to the node feature matrix to perform feature transformation to obtain the first transformed features, and then multiplies the first transformed features with the second normalized adjacency matrix and applies the activation function to obtain the first node features;
[0084] In the Nth iteration, N is an integer and N ≥ 2. The Nth graph convolution of the aggregation layer applies the weight of the Nth iteration to the N-1th node feature obtained by the N-1th iteration to perform feature transformation to obtain the Nth transformed feature. The Nth transformed feature is multiplied by the second normalized adjacency matrix and then an activation function is applied to obtain the Nth node feature.
[0085] When the Nth layer iteration is completed, the iteration stop condition is reached and the Nth node feature is output as the node feature information.
[0086] It is understandable that, referring to Figure 3 , Figure 3 Only the case of N=2 is shown. Of course, it is not limited to this. The iteration stop condition can be to reach the preset iteration layer requirement or the node to be iterated reaches the preset expectation. Of course, it is not limited to this. The aggregation layer gradually extracts more advanced node features through multi-layer graph convolution. Taking two-layer iteration as an example, first the node feature matrix and the second normalized adjacency matrix are Input to the first layer of graph convolution, where the weight W of the first layer iteration is applied to the node feature matrix (1)Perform feature transformation, and then transform the first transformed feature H' (1) With the second normalized adjacency matrix Multiply and apply the activation function σ to get the first node feature H (1) The second layer of graph convolution is used to generate the first node feature H output by the first layer of graph convolution. (1) Apply the weights W of the second layer iteration (2) Perform feature transformation, and then transform the second transformed feature H' (2) With the second normalized adjacency matrix Multiply and apply the activation function σ to get the second node feature H (2) .
[0087] Of course, if N>2, more layers of graph convolution are added in this way, and each layer repeats the steps of feature transformation and feature aggregation, and the output of each layer serves as the input of the next layer. The output of the last layer of graph convolution H (L) As the final node feature, the final output feature matrix contains the node feature information after multi-layer aggregation.
[0088] In some optional embodiments, training and testing a graph size reduction model includes:
[0089] Step 1: Use the Planetoid class in the PyTorch Geometric library to download and load the Cora dataset. This dataset contains node feature matrices and adjacency matrices, which are convenient for model training and testing. First, determine the model's hyperparameters such as input node feature dimensions, hidden layer dimensions, output dimensions, number of layers, and number of pooling nodes. Then use the Adam optimizer for gradient descent optimization and use the cross entropy loss function to measure the difference between the model output and the true label.
[0090] Step 2: First, input the test data into the model to obtain the model's prediction output. Determine the prediction label of each node based on the classification probability output by the model. Then count the number of correct predictions of the model on the test set, divide the number of correctly predicted nodes by the total number of nodes, and get the classification accuracy of the model. Finally, record and output the accuracy of the model on the test data to evaluate the generalization performance of the model.
[0091] The serial numbers of the above embodiments of the present invention are only for description and do not represent the advantages or disadvantages of the embodiments.
[0092] In the above embodiments of the present invention, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0093] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or replace some or all of the technical features therein with equivalents. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present invention.
Claims
1. A graph pooling method based on graph residual attention and aggregation network, It is characterized in that include: Calculate the first normalized adjacency matrix and the symmetric normalized matrix of all nodes according to the input graph; Build a graph size reduction model; Inputting the first normalized adjacency matrix and the normalized matrices of all the nodes into the graph scale reduction model to obtain a graph structure, including: The graph convolution layer of the graph scale reduction model performs feature transformation according to the first normalized adjacency matrix, the normalized matrix of the node and the trainable parameter matrix to obtain a node feature matrix; The aggregation layer of the graph scale reduction model iterates according to the node feature matrix and the second normalized adjacency matrix to obtain node feature information; The pooling layer of the graph scale reduction model calculates the importance scores for all the node feature information respectively, arranges the importance scores in descending order, and selects the nodes corresponding to the first k importance scores to form a node matrix; the pooling layer performs feature extraction on the second normalized adjacency matrix to obtain a new adjacency matrix; the pooling layer constructs the graph structure according to the node matrix and the new adjacency matrix.
2. According to claim 1, a graph pooling method based on graph residual attention and aggregation network, It is characterized in that The step of inputting the first normalized adjacency matrix and the normalized matrices of all the nodes into the graph scale reduction model to obtain a graph structure further includes: The graph convolution layer obtains a new node feature matrix according to the node feature matrix, the weight matrix, the second normalized adjacency matrix and the nonlinear activation function; The residual attention layer of the graph size reduction model determines the iterative weight gradient of the aggregation layer according to the new node feature matrix.
3. According to claim 2, a graph pooling method based on graph residual attention and aggregation network, It is characterized in that The graph convolution layer obtains a new node feature matrix according to the node feature matrix, the weight matrix, the second normalized adjacency matrix and the nonlinear activation function, including: The graph convolution layer multiplies the node feature matrix with the weight matrix to obtain a new feature matrix, multiplies the new feature matrix with the second normalized adjacency matrix to obtain a convolved node feature matrix, and applies the nonlinear activation function to the convolved node feature matrix to obtain a new node feature matrix.
4. According to claim 2, a graph pooling method based on graph residual attention and aggregation network, It is characterized in that The residual attention layer of the graph scale reduction model determines the iterative weight gradient of the aggregation layer according to the new node feature matrix, including: The residual attention layer determines the adjacent nodes according to the input graph, calculates the dot product attention scores and additive attention scores of the adjacent nodes, combines the dot product attention scores and additive attention scores of the adjacent nodes and performs normalization processing, assigns an attention weight to each node according to the processing result, and the sum of the attention weights of all the nodes is 1; When the aggregation layer calculates the node feature information of the i-th node, the residual attention layer weightedly sums the attention weight of the i-th node and the new node feature matrix of its neighboring nodes to obtain the attention-weighted features, and uses the residual connection to obtain the weight gradient by connecting the symmetric normalized matrix of the i-th node and the attention-weighted features of the i-th node.
5. According to claim 4, a graph pooling method based on graph residual attention and aggregation network, It is characterized in that The calculation of the dot product attention scores of the adjacent nodes is calculated in the following manner: have been ij =(H i W)·(H j w) T Among them, e ij is the dot product attention score of the i-th node and the j-th node, W is the linear transformation weight matrix, H i is the new node feature matrix of the i-th node, H j is the new node feature matrix of the j-th node.
6. According to claim 4, a graph pooling method based on graph residual attention and aggregation network, It is characterized in that The calculation of the additive attention scores of the adjacent nodes is calculated in the following manner: and ij ′ =a T LeakyReLU(W ′ [H i |H j ]) Among them, e ij ′ is the additive attention score of the i-th node and the j-th node, a is the first learning parameter vector, W ′ is the second learning parameter vector, | is the concatenation operation of the features, H i is the new node feature matrix of the i-th node, H j is the new node feature matrix of the j-th node.
7. According to claim 4, a graph pooling method based on graph residual attention and aggregation network, It is characterized in that The attention weight is assigned to each node according to the processing result, and is calculated in the following way: Among them, α is the attention weight, e ij is the dot product attention score of the i-th node and the j-th node, e ik is the dot product attention score of the i-th node and the k-th node, and N(i) is the set of neighbor nodes of the i-th node.
8. According to claim 4, a graph pooling method based on graph residual attention and aggregation network, It is characterized in that The residual attention layer performs weighted summation of the attention weight of the i-th node and the new node feature matrix of its neighboring nodes to obtain the attention-weighted features, which are calculated as follows: Among them, H i ′ is the attention-weighted feature of the i-th node, H j is the new node feature matrix of the jth node, α ij is the attention weight of the i-th node.
9. A graph pooling method based on graph residual attention and aggregation network according to claim 1 or 2, It is characterized in that The aggregation layer of the graph scale reduction model iterates according to the node feature matrix and the second normalized adjacency matrix to obtain node feature information, including: During the first layer iteration, the first layer graph convolution of the aggregation layer applies the weights of the first layer iteration to the node feature matrix to perform feature transformation to obtain the first transformed features, and multiplies the first transformed features with the second normalized adjacency matrix and then applies an activation function to obtain the first node features; In the Nth iteration, N is an integer and N≥2, the Nth graph convolution of the aggregation layer applies the weight of the Nth iteration to the N-1th node feature obtained by the N-1th iteration to perform feature transformation to obtain the Nth transformed feature, multiply the Nth transformed feature with the second normalized adjacency matrix, and then apply the activation function to obtain the Nth node feature; When the N-th layer iteration is completed and the iteration stop condition is reached, the N-th node feature is output as the node feature information.
Citation Information
Cited By
ADHD brain function connection dynamic representation system and method based on space-time diagram
CN121687549A
ADHD brain function connection dynamic characterization system and method based on space-time diagram
CN121687549B
