Complex network disentangling method based on graph contrastive learning and multi-hop aggregation

By combining graph contrast learning and multi-hop aggregation methods with multi-view representation and multi-hop neighbor information, the network decomposition model is optimized, which solves the problem that existing technologies fail to fully utilize the interaction between graph representations and multi-hop information, and achieves more efficient network decomposition and key node identification.

CN118036671BActive Publication Date: 2026-07-10NAT UNIV OF DEFENSE TECH

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
NAT UNIV OF DEFENSE TECH
Filing Date
2023-12-26
Publication Date
2026-07-10

AI Technical Summary

Technical Problem

Existing technologies fail to fully utilize the interactions and multi-hop information between graph representations in the decomposition of complex networks, resulting in inaccurate assessment of node importance and difficulty in efficiently identifying key nodes.

Method used

We employ a graph-based contrastive learning and multi-hop aggregation approach. By combining role graph generation, multi-view representation learning, and node importance scoring modules with multi-hop neighbor information, we optimize the joint loss function, train the network decomposition model, and identify key nodes.

Benefits of technology

It improves the accuracy and efficiency of network breakdown, enabling more accurate identification and assessment of node importance, and achieving high-performance network breakdown.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118036671B_ABST
    Figure CN118036671B_ABST
Patent Text Reader

Abstract

This invention discloses a method for decomposing complex networks based on graph contrastive learning and multi-hop aggregation, comprising the following steps: collecting the number of neighbor nodes, connecting edges, and average clustering coefficients of a complex traffic network to construct a network decomposition model; inputting the original graph into a role graph generation module to obtain a role graph; inputting the original graph and the role graph into a multi-view representation learning module to obtain multi-angle graph representations of the role graph and the original graph; obtaining an importance score for each node; calculating and optimizing the joint loss function to train the network decomposition model; decomposing the traffic network to obtain the importance values ​​of traffic nodes in the traffic network, and setting stronger security measures for traffic nodes with high importance and weaker security measures for nodes with low importance. This invention uses intra-graph contrastive learning and cross-contrast learning to improve graph representation performance and proposes a multi-hop aggregation mechanism to predict node importance by combining multi-hop neighbor information, achieving high-performance network decomposition.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the fields of deep learning and network parsing, and in particular to a method for decomposing complex networks based on graph contrastive learning and multi-hop aggregation. Background Technology

[0002] In the physical world, a system can be represented as a complex network by a set of nodes and a set of edges. The damage or failure of a few nodes can cause a complex network to become unstable or collapse. For example, an internet service provider might be unable to provide internet service due to the failure of a single server. Network dismantling (ND) refers to finding critical nodes and launching targeted attacks to dismantle the network. Researchers have discovered cascading failure effects and network seepage by studying network dynamics and characteristics. These studies show that damaging a node can cause its neighbors to fail, thereby disrupting the global topology of the network. These studies have spurred research into identifying and attacking critical nodes.

[0003] To address the network decomposition problem, scholars have proposed numerous heuristic algorithms. Most researchers measure and evaluate nodes based on their impact on network topology stability, selecting the highest-ranking node to join the Target Attack Set (TAS) until a Giant Connected Component (GCC) threshold is reached. While centrality-based methods such as degree centrality and betweenness centrality evaluate node importance from multiple perspectives, they face high computational complexity when dealing with large-scale networks. Furthermore, they are susceptible to interference from local structures; for example, a node's importance may be dominated by the number of its neighbors, neglecting its global importance.

[0004] With the development of graph representation learning technology, deep neural networks have been widely used to learn node representations, rank nodes by importance, and decompose networks. Studies have shown that these ND-oriented neural network models can learn graph structures with high accuracy and low complexity by leveraging the powerful representation capabilities of neural networks. These algorithms typically include two key stages: graph representation learning and node scoring. In the graph representation learning stage, existing methods use graph neural networks such as graph convolutional networks (GCN) and graph attention networks (GAT) to encode the graph structure and generate node representations. In addition, DCRS constructs a role graph to learn the importance of nodes and embedded roles, supplementing the original graph. In terms of node scoring, some methods directly use multilayer perceptrons (MLP) based on representations to estimate node importance, while some methods aggregate first-order neighbors to assist in score prediction. However, there are still some noteworthy problems in the current work: (1) In terms of node representation, current research has failed to fully utilize the interactions between graph representations learned from various views and encoders. (2) In terms of scoring, existing algorithms only consider multi-hop neighbors in the representation process and do not fully utilize multi-hop information when calculating scores. Summary of the Invention

[0005] This invention aims to address at least one of the technical problems existing in the prior art. To this end, this invention discloses a method for decomposing complex networks based on graph contrastive learning and multi-hop aggregation. This method can decompose complex networks. Compared with existing methods, this method uses intra-graph contrastive learning and cross-contrast learning to improve graph representation performance, and proposes a multi-hop aggregation mechanism to predict node importance by combining multi-hop neighbor information, achieving high-performance network decomposition.

[0006] The objective of this invention is achieved through the following technical solution: a complex network decomposition method based on graph contrastive learning and multi-hop aggregation, the method comprising:

[0007] Step 1: Collect the number of neighboring nodes, connecting edges, and average clustering coefficient of the complex transportation network. , A network decomposition model is constructed, which includes a role graph generation module, a multi-view representation learning module, and a node importance scoring module;

[0008] Step 2: Input the original image into the character image generation module to obtain the character image;

[0009] Step 3: Input the original image and the character image into the multi-view representation learning module to obtain multi-angle representations of the character image and the original image;

[0010] Step 4: Input the multi-angle representations of the character diagram and the original diagram into the node importance scoring module to obtain the importance score for each node;

[0011] Step 5: Calculate and optimize the joint loss function, and train the network decomposition model;

[0012] Step 6: Using the trained network decomposition model, decompose the traffic network to obtain the importance values ​​of traffic nodes in the traffic network, and set stronger security measures for traffic nodes with high importance, and set weaker security measures for nodes with low importance.

[0013] The process of inputting the original image into the character image generation module to obtain the character image includes the following steps:

[0014] Step 201: Calculate the confusion membership probability matrix; use the RoIX algorithm to divide the nodes into different roles and build a role graph; This is the node feature matrix of the original graph, where N is the number of nodes, f is the node feature dimension, and X is the i-th row. Represents the i-th node v i The eigenvectors are calculated using nonnegative matrix factorization (NMF). And F, make The expression is:

[0015]

[0016] in,‖·‖ fro For the Frobenius norm, It is the node feature matrix of the original graph. It is a confusing membership probability matrix, describing the confusing membership probability of each node to a predefined role, where d is the dimension of the confusing membership probability. This indicates the correlation between each role and the regional structural features;

[0017] Step 202: Connect nodes according to the confusion membership probability matrix to obtain the role graph; based on the confusion membership probability matrix output by the RoIX algorithm... A role graph is constructed to capture the impact of roles on network topology stability. Nodes with similar regional topological characteristics are connected to generate the role graph. Node pair (v i ,v j The similarity calculation expression for () is:

[0018]

[0019] Where, α i,j Represents a pair of nodes (v i ,v j The similarity of v i Let v represent the i-th node. j Let represent the j-th node, <·,·> represent the dot product of vectors, and ∥·∥ represent the Euclidean norm. The probability of confusion membership of the i-th node is denoted as . The i-th row, The probability of confusion membership of the j-th node is denoted as . In the j-th row, for each node, select the n nodes with similar roles to connect them, where n is a hyperparameter.

[0020] The process of inputting the original image and the character image into the multi-view representation learning module to obtain multi-angle representations of the character image and the original image includes the following steps:

[0021] Step 301: Encode the original graph and the character graph using a graph convolutional network, with the following expression:

[0022] Z = GCN(X)

[0023]

[0024] Wherein, GCN represents Graph Convolutional Network. It is the node feature matrix of the original graph. It is a confusion membership probability matrix. Represents the graph convolutional coding features of the original graph. The graph convolutional encoding features of the character graph are represented by N, where N is the number of nodes and l is the dimension of the graph convolutional output layer.

[0025] Step 302: Encode the original graph and the role graph using a graph isomorphic network, expressed as:

[0026] H = GIN(X)

[0027]

[0028] Wherein, GIN represents a graph isomorphic network. It is the node feature matrix of the original graph. It is a confusion membership probability matrix. This represents the graph isomorphic coding features of the original graph. The graph isomorphic encoding features of the character graph are represented by N, where N is the number of nodes and l is the dimension of the graph isomorphic output layer.

[0029] Step 303: Fuse the graph convolutional coding features and graph isomorphic coding features of the original graph and the character graph to obtain the fused coding features of the original graph and the character graph, expressed as:

[0030] R = β1Z + (1 - β1)H

[0031]

[0032] in, Represents the graph convolutional coding features of the original graph. The graph convolutional encoding features representing the character graph, This represents the graph isomorphic coding features of the original graph. The graph isomorphic encoding features representing the character graph. This represents the fusion coding features of the original image. The fusion encoding features of the character graph are represented by β1,β2∈[0,1], which are hyperparameters. and It is a multi-angle representation of the original image. and It is a multi-angle representation of a character image.

[0033] The module that uses multi-angle graph representations of the role graph and the original graph to input node importance scoring to obtain an importance score for each node includes the following steps:

[0034] Step 401, calculate the multi-hop aggregation score on the original graph; v i This represents the i-th node, for v i The expression for calculating the multi-hop aggregation score on the original graph is:

[0035]

[0036] in, Indicates v i Multi-hop aggregated scores on the original graph For v i The degree of normalization, d max The maximum degree in the input network is represented by <·,·>, which indicates the dot product of two vectors. In the original graph, v represents i eigenvectors, r i It is the i-th row element of the fusion coding feature R of the original graph. In the original graph, v represents j eigenvectors, r j It is the j-th row element of the fusion coding feature R of the original graph. In the original graph, v represents k eigenvectors, r k It is the k-th row element of the fusion coding feature R of the original graph. and They represent v respectively i The set of one-hop and two-hop neighbors, where |·| represents the number of neighbors;

[0037] Calculate the multi-hop aggregation score on the original graph for all nodes;

[0038] Step 402, calculate the multi-jump aggregation score on the character graph; v iThis represents the i-th node, for v i The expression for calculating the multi-jump aggregate score on the character map is:

[0039]

[0040] in, Indicates v i Multi-jump aggregation score on the character diagram, P proj These are learnable projection vectors, where <·,·> represent the dot product of two vectors. v represents the character in the image. j eigenvectors, It is the fusion encoding feature of the character graph. The element in the j-th row, v represents the character in the image. k eigenvectors, It is the fusion encoding feature of the character graph. The element in the k-th row, and They represent v respectively i The set of one-hop and two-hop neighbors, where |·| represents the number of neighbors;

[0041] Calculate the multi-hop aggregation score on the role graph for all nodes;

[0042] Step 403, calculate the supplementary score; use a fully connected layer to map the features of the nodes in the original graph and the role graph, and calculate the supplementary score, expressed as:

[0043]

[0044]

[0045] Among them, v i This represents the i-th node. It is v i The original graph supplements the score. It is v i The character illustrations supplement the score. In the original graph, v represents i eigenvectors, v represents the character in the diagram. i The feature vectors are defined by Relu(), which is the activation function, and W and b are learnable parameters.

[0046] Calculate supplementary scores for all nodes;

[0047] Step 404, merge scores; v i This represents the i-th node, for v i The expression for the fusion fraction is:

[0048]

[0049]

[0050]

[0051] Among them, s i It is v i The final score, It is v i Original image rating It is v i Character illustration rating, Indicates v i Multi-hop aggregated scores on the original graph Indicates v i The multi-jump aggregate score on the character diagram It is v i The original graph supplements the score. It is v i The role diagram supplements the score, σ(·) is the sigmoid function that normalizes the score, and λ1,λ2,ω[0,1] are hyperparameters;

[0052] Calculate the final score for all nodes.

[0053] The calculation and optimization of the joint loss function and the training of the network decomposition model include the following steps:

[0054] Step 501, calculate the graph contrast loss function, including the following steps;

[0055] The original image contrast loss function is calculated as follows:

[0056]

[0057] in, This represents the original graph contrast loss function, where N is the number of nodes and v i Let z represent the i-th node. i Indicates v i The original graph convolutional coding features, z i h is the element in the i-th row of the graph convolutional coding feature Z of the original graph. i Indicates v i The original graph isomorphic coding features, h i It is the i-th row element of the graph isomorphic coding feature H of the original graph, and δ(·,·) is the scoring function for calculating the similarity between the two representations. [·] It is an indicator function that returns 1 if the parameter in parentheses is true, and 0 otherwise.

[0058] The character-image contrast loss function is calculated as follows:

[0059]

[0060] in, This represents the character graph contrast loss function, where N is the number of nodes and v i This represents the i-th node. Indicates v i Character graph convolutional encoding features The graph convolutional coding features of the character graph are described above. The element in the i-th row, Indicates v i The isomorphic encoding features of the character graph. It is the graph isomorphic encoding feature of the character graph. The element in the i-th row, δ(·,·) is the scoring function for calculating the similarity between the two representations, 1 [·] It is an indicator function that returns 1 if the parameter in parentheses is true, and 0 otherwise.

[0061] The inter-graph contrast loss function is calculated as follows:

[0062]

[0063] in, This represents the inter-graph contrast loss function, where N is the number of nodes, and v i Let r represent the i-th node. i Indicates v i The original fusion coding features, r i It is the i-th row element of the fusion coding feature R of the original graph. Indicates v i Role fusion coding features It is the fusion encoding feature of the character graph. The element in the i-th row, δ(·,·) is the scoring function for calculating the similarity between the two representations, 1 [·] It is an indicator function that returns 1 if the parameter in parentheses is true, and 0 otherwise.

[0064] The graph contrast loss function is calculated, and its expression is:

[0065]

[0066] Among them, L c The graph contrast loss function is represented. This represents the original graph contrast loss function. This represents the character graph contrast loss function. Let γ1, γ2, γ3 ∈ [0, 1] be the graph contrast loss function, where γ1, γ2, γ3 ∈ [0, 1] are hyperparameters.

[0067] Step 502, calculate the node importance score, the expression is:

[0068]

[0069] in, It is the node importance score, representing the expected number of nodes that will not be affected after a node is removed, s j It is v j The final rating, v j It is the j-th node;

[0070] Step 503, calculate the sum of node scores, the expression is:

[0071]

[0072] in, It is the node score sum, used to represent the number of attacking nodes, s i It is v i The final rating, v i It is the i-th node;

[0073] Step 504, calculate the joint loss function, the expression of which is:

[0074]

[0075] Where L is the joint loss function, L c The graph contrast loss function is represented. It is the node importance score. ε1,ε2∈[0,1] are the node scores and hyperparameters.

[0076] Step 505: Optimize the joint loss function and train the network decomposition model.

[0077] The method of using the trained network decomposition model to perform network decomposition includes the following steps:

[0078] The trained network decomposition model is used to calculate the final score of all nodes. The K nodes with the highest final scores are selected to form the target attack node set. According to the order of the nodes in the target attack node set, the nodes in the network are deleted in sequence and iterated until the maximum connected component is less than the set threshold.

[0079] Using the trained network decomposition model, the traffic network is decomposed to obtain the importance values ​​of traffic nodes in the traffic network. The node importance value includes the node importance score and the sum of node scores. Stronger security measures are set for traffic nodes with high importance, and weaker security measures are set for nodes with low importance.

[0080] Compared with existing methods, the advantages of the present invention are as follows: This technology provides a complex network decomposition method based on graph contrastive learning and multi-hop aggregation. This method utilizes multi-view contrastive learning and multi-hop aggregation to enhance key node identification, uses intra-graph contrastive learning and cross-contrast learning to improve graph representation performance, and proposes a multi-hop aggregation mechanism to predict node importance by combining multi-hop neighbor information, thereby achieving high-performance network decomposition. Attached Figure Description

[0081] Figure 1 A flowchart illustrating an embodiment of the present invention is shown. Detailed Implementation

[0082] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to the accompanying drawings. Obviously, the described embodiments are merely some embodiments of this invention, and not all embodiments. Based on the embodiments of this invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this invention.

[0083] It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.

[0084] In this embodiment, it is assumed that security measures should be set for different nodes in the transportation network. Stronger security measures should be set for nodes of high importance, and weaker security measures should be set for nodes of low importance. The assessment of node importance uses a complex network decomposition method based on graph contrastive learning and multi-hop aggregation.

[0085] Therefore, as Figure 1 As shown, a complex network decomposition method based on graph contrastive learning and multi-hop aggregation is described, the method comprising:

[0086] Step 1: Construct a network decomposition model, including a role graph generation module, a multi-view representation learning module, and a node importance scoring module;

[0087] Step 2: Input the original image into the character image generation module to obtain the character image;

[0088] Step 3: Input the original image and the character image into the multi-view representation learning module to obtain multi-angle representations of the character image and the original image;

[0089] Step 4: Input the multi-angle representations of the character diagram and the original diagram into the node importance scoring module to obtain the importance score for each node;

[0090] Step 5: Calculate and optimize the joint loss function, and train the network decomposition model;

[0091] Step 6: Use the trained network decomposition model to decompose the network.

[0092] The process of inputting the original image into the character image generation module to obtain the character image includes the following steps:

[0093] Step 201: Calculate the confusion membership probability matrix; use the RoIX algorithm to divide the nodes into different roles and build a role graph; This is the node feature matrix of the original graph, where N is the number of nodes, f is the node feature dimension, and X is the i-th row. Represents the i-th node v i The eigenvectors are calculated using nonnegative matrix factorization (NMF). And F, make The expression is:

[0094]

[0095] in,‖·‖ fro For the Frobenius norm, It is the node feature matrix of the original graph. It is a confusing membership probability matrix, describing the confusing membership probability of each node to a predefined role, where d is the dimension of the confusing membership probability. This indicates the correlation between each role and the regional structural features;

[0096] Step 202: Connect nodes according to the confusion membership probability matrix to obtain the role graph; based on the confusion membership probability matrix output by the RoIX algorithm... A role graph is constructed to capture the impact of roles on network topology stability. Nodes with similar regional topological characteristics are connected to generate the role graph. Node pair (v i ,v j The similarity calculation expression for () is:

[0097]

[0098] Where, α i,j Represents a pair of nodes (v i ,v j The similarity of v i Let v represent the i-th node. j Let represent the j-th node, <·,·> represent the dot product of vectors, and ∥·∥ represent the Euclidean norm. Let represent the confusion probability of the i-th node. The i-th row, Let represent the confusion probability of the j-th node. In the j-th row, for each node, select the n nodes with similar roles to connect them, where n is a hyperparameter.

[0099] The process of inputting the original image and the character image into the multi-view representation learning module to obtain multi-angle representations of the character image and the original image includes the following steps:

[0100] Step 301: Encode the original graph and the character graph using a graph convolutional network, with the following expression:

[0101] Z = GCN(X)

[0102]

[0103] Wherein, GCN represents Graph Convolutional Network. It is the node feature matrix of the original graph. It is a confusion membership probability matrix. Represents the graph convolutional coding features of the original graph. The graph convolutional encoding features of the character graph are represented by N, where N is the number of nodes and l is the dimension of the graph convolutional output layer.

[0104] Graph Convolutional Networks (GCNs) are deep learning models used to process graph-structured data. They learn node representations by defining convolution operations on the graph, thereby enabling feature extraction and prediction of graph data.

[0105] The basic idea of ​​GCN is to update the node representation using information from the node and its neighbors. Specifically, GCN defines a node's representation as a weighted sum of its own feature vector and the feature vectors of its neighbors. The weights of this sum are determined by a learnable parameter matrix, which is shared across each layer. Through stacking multiple layers, GCN can gradually aggregate global graph structure information and generate richer node representations.

[0106] In GCN, node representations can be passed as input to the next layer for further processing, or applied to other tasks such as node classification and link prediction. Furthermore, GCN can enhance the model's expressive power and generalization ability by introducing residual connections or attention mechanisms.

[0107] GCN performs the following operations at each layer:

[0108]

[0109] Among them, Z (l) Let W represent the features of nodes in layer l, and W be the learnable parameters. I is the identity matrix, D is the degree matrix, A is the adjacency matrix, and σ(·) represents the activation function.

[0110] Step 302: Encode the original graph and the role graph using a graph isomorphic network, expressed as:

[0111] H = GIN(X)

[0112]

[0113] Wherein, GIN represents a graph isomorphic network. It is the node feature matrix of the original graph. It is a confusion membership probability matrix. This represents the graph isomorphic coding features of the original graph. The graph isomorphic encoding features of the character graph are represented by N, where N is the number of nodes and l is the dimension of the graph isomorphic output layer.

[0114] Graph Isomorphism Network (GIN) is a deep learning model for processing graph-structured data. It can learn feature representations of nodes and graphs.

[0115] Compared to traditional Graph Convolutional Networks (GCNs), GIN focuses more on the connections between nodes, rather than just considering neighbor relationships. Specifically, GIN transforms the feature vector of each node through a fully connected neural network and fuses the transformed feature vector with the original feature vector of the node. Then, by performing aggregation operations (such as summation or averaging) on ​​the fused feature vector, the updated representation of the node is obtained.

[0116] In addition to updating node representations, GIN introduces a self-attention mechanism to further enhance the model's expressive power. The self-attention mechanism assigns different weights to nodes during the aggregation process based on their own features, thereby better capturing the dependencies between nodes.

[0117] In terms of form, the propagation layers of GIN are:

[0118]

[0119] in This represents the node v obtained through l-level iterations. i The feature representation, ε, is a learnable parameter, and the final concatenation yields the graph representation H:

[0120]

[0121] The input to GIN is a representation of the original image or a character image, i.e., H. (0) =X or

[0122] Step 303: Fuse the graph convolutional coding features and graph isomorphic coding features of the original graph and the character graph to obtain the fused coding features of the original graph and the character graph, expressed as:

[0123] R = β1Z + (1 - β1)H

[0124]

[0125] in, Represents the graph convolutional coding features of the original graph. The graph convolutional encoding features representing the character graph, This represents the graph isomorphic coding features of the original graph. The graph isomorphic encoding features representing the character graph. This represents the fusion coding features of the original image. The fusion encoding features of the character graph are represented by β1,β2∈[0,1], which are hyperparameters. and It is a multi-angle representation of the original image. and It is a multi-angle representation of a character image.

[0126] The module that uses multi-angle graph representations of the role graph and the original graph to input node importance scoring to obtain an importance score for each node includes the following steps:

[0127] Step 401, calculate the multi-hop aggregation score on the original graph; v i This represents the i-th node, for v i The expression for calculating the multi-hop aggregation score on the original graph is:

[0128]

[0129] in, Indicates v i Multi-hop aggregated scores on the original graph For v i The degree of normalization, d max The maximum degree in the input network is represented by <·,·>, which indicates the dot product of two vectors. In the original graph, v represents i eigenvectors, r i It is the i-th row element of the fusion coding feature R of the original graph. In the original graph, v represents j eigenvectors, r j It is the j-th row element of the fusion coding feature R of the original graph. In the original graph, v represents k eigenvectors, r kIt is the k-th row element of the fusion coding feature R of the original graph. and They represent v respectively i The set of one-hop and two-hop neighbors, where |·| represents the number of neighbors;

[0130] Calculate the multi-hop aggregation score on the original graph for all nodes;

[0131] Step 402, calculate the multi-jump aggregate score on the character graph; v i This represents the i-th node, for v i The expression for calculating the multi-jump aggregate score on the character map is:

[0132]

[0133] in, Indicates v i Multi-jump aggregation score on the character diagram, P proj These are learnable projection vectors, where <·,·> represent the dot product of two vectors. v represents the character in the image. j eigenvectors, It is the fusion encoding feature of the character graph. The element in the j-th row, v represents the character in the image. k eigenvectors, It is the fusion encoding feature of the character graph. The element in the k-th row, and They represent v respectively i The set of one-hop and two-hop neighbors, where |·| represents the number of neighbors;

[0134] Calculate the multi-hop aggregation score on the role graph for all nodes;

[0135] Step 403, calculate the supplementary score; use a fully connected layer to map the features of the nodes in the original graph and the role graph, and calculate the supplementary score, expressed as:

[0136]

[0137]

[0138] Among them, v i This represents the i-th node. It is v i The original graph supplements the score. It is v i The character illustrations supplement the score. In the original diagram, v represents i eigenvectors, v represents the character in the diagram. i The feature vectors are defined by Relu(), which is the activation function, and W and b are learnable parameters.

[0139] Calculate supplementary scores for all nodes;

[0140] Step 404, merge scores; v i This represents the i-th node, for v i The expression for the fusion fraction is:

[0141]

[0142]

[0143]

[0144] Among them, s i It is v i The final score, It is v i Original image rating It is v i Character illustration rating, Indicates v i Multi-hop aggregated scores on the original graph Indicates v i The multi-jump aggregate score on the character diagram It is v i The original graph supplements the score. It is v i The role diagram supplements the score, σ(·) is the sigmoid function that normalizes the score, and λ1,λ2,ω[0,1] are hyperparameters;

[0145] Calculate the final score for all nodes.

[0146] The calculation and optimization of the joint loss function and the training of the network decomposition model include the following steps:

[0147] Step 501, calculate the graph contrast loss function, including the following steps;

[0148] The original image contrast loss function is calculated as follows:

[0149]

[0150] in, This represents the original graph contrast loss function, where N is the number of nodes and v i Let z represent the i-th node. i Indicates v i The original graph convolutional coding features, z ih is the element in the i-th row of the graph convolutional coding feature Z of the original graph. i Indicates v i The original graph isomorphic encoding features, h i It is the i-th row element of the graph isomorphic coding feature H of the original graph, and δ(·,·) is the scoring function for calculating the similarity between the two representations. [·] It is an indicator function that returns 1 if the parameter in parentheses is true, and 0 otherwise.

[0151] The character-image contrast loss function is calculated as follows:

[0152]

[0153] in, This represents the character graph contrast loss function, where N is the number of nodes and v i This represents the i-th node. Indicates v i Character graph convolutional encoding features The graph convolutional coding features of the character graph are described above. The element in the i-th row, Indicates v i The isomorphic encoding features of the character graph. The graph isomorphic encoding feature of the character graph is described above. The element in the i-th row, δ(·,·) is the scoring function for calculating the similarity between the two representations, 1 [·] It is an indicator function that returns 1 if the parameter in parentheses is true, and 0 otherwise.

[0154] The inter-graph contrast loss function is calculated as follows:

[0155]

[0156] in, This represents the inter-graph contrast loss function, where N is the number of nodes, and v i Let r represent the i-th node. i Indicates v i The original fusion coding features, r i It is the i-th row element of the fusion coding feature R of the original graph. Indicates v i Role fusion coding features It is the i-th row element of the fusion encoding feature R of the character graph, and δ(·,·) is the scoring function for calculating the similarity between the two representations. [·] It is an indicator function that returns 1 if the parameter in parentheses is true, and 0 otherwise.

[0157] The graph contrast loss function is calculated, and its expression is:

[0158]

[0159] Among them, L c The graph contrast loss function is represented. This represents the original graph contrast loss function. This represents the character graph contrast loss function. Let γ1, γ2, γ3 ∈ [0, 1] be the graph contrast loss function, where γ1, γ2, γ3 ∈ [0, 1] are hyperparameters.

[0160] Contrastive learning is a supervised learning method used to learn the similarity between samples. It is commonly used to solve problems such as classification, retrieval, and validation. Its core idea is to learn a similarity measure between sample pairs, thereby enabling generalized inferences on new, unseen samples.

[0161] The basic framework of contrastive learning consists of two main parts: the Siamese network structure and the loss function design. A Siamese network comprises two identical sub-networks that share parameters and accept two input samples to extract feature representations. In contrastive learning, these two inputs can be pairs of samples or different views of a single sample. By sharing parameters, the Siamese network can learn robust representations of the input samples.

[0162] The key to contrastive learning lies in designing a suitable loss function to guide the network's learning. Commonly used loss functions include triplet loss and metric learning loss. During training, contrastive learning encourages the network to learn feature representations with good generalization ability by maximizing the similarity measure of similar sample pairs and minimizing the similarity measure of dissimilar sample pairs.

[0163] Contrastive learning is widely used in face verification, object tracking, and recommender systems, where it is necessary to measure the similarity or distance between samples. Through contrastive learning, more discriminative feature representations can be learned, thereby improving the model's performance on similarity measurement tasks.

[0164] Step 502, calculate the node importance score, the expression is:

[0165]

[0166] in, It is the node importance score, representing the expected number of nodes that will not be affected after a node is removed, s j It is v j The final rating, v j It is the j-th node;

[0167] Step 503, calculate the sum of node scores, the expression is:

[0168]

[0169] in, It is the node score sum, used to represent the number of attacking nodes, s i It is v i The final rating, v i It is the i-th node;

[0170] Step 504, calculate the joint loss function, the expression of which is:

[0171]

[0172] Where L is the joint loss function, L c The graph contrast loss function is represented. It is the node importance score. ε1,ε2∈[0,1] are the node scores and hyperparameters.

[0173] Step 505: Optimize the joint loss function and train the network decomposition model.

[0174] The method of using the trained network decomposition model to perform network decomposition includes the following steps:

[0175] The trained network decomposition model is used to calculate the final score of all nodes. The K nodes with the highest final scores are selected to form the target attack node set. According to the order of the nodes in the target attack node set, the nodes in the network are deleted in sequence and iterated until the maximum connected component is less than the set threshold.

[0176] Using a trained network decomposition model, a traffic network is decomposed to obtain the importance values ​​of traffic nodes. The node importance value includes a node importance score and a sum of node scores. Stronger security measures are implemented for highly important traffic nodes, while weaker security measures are implemented for less important nodes. Specific security measures are existing technologies, such as adding cameras, and will not be elaborated upon in this application.

[0177] For example, in the specific implementation process, the implementation method is as follows:

[0178] The real-world network AirTraffic was evaluated, and its statistics are summarized in Table 1.

[0179] Table 1 Real-world network datasets

[0180]

[0181] This invention uses a synthetic network created from three standard generative models to evaluate CLMA (Complex Network Decomposition Method Based on Graph Contrast Learning and Multi-hop Aggregation): Both Barabási-Albert (BA) and Watt-Strogatz (WS) have a network size of 1000. Specifically, the graph generated by ER has Poisson strength and a low clustering coefficient. BA generates a power-law graph that satisfies preferred dependency relations, connecting a few key nodes to many nodes. The graph generated by WS exhibits local clustering properties, assuming that the endpoints of an edge are fixed nodes v. i If any node in the network is randomly selected as the other endpoint of the edge, the probability is p.

[0182] Evaluation Metrics: Nodes are sorted in descending order of their importance scores. This invention uses two evaluation metrics to assess effectiveness: Normalized Attack Set (TAS) and Giant Connected Component (GCC). Normalized TAS measures the percentage of nodes in the target attack set relative to all nodes in the network. A smaller Normalized TAS indicates more efficient network dismantling because it requires fewer node removals to reach the desired dismantling threshold. NGCC represents the percentage of a giant connected component in the entire network after removing one node. A giant connected component is the connected subgraph with the largest number of nodes in the network. A smaller NGCC indicates a more efficient dismantling process because it means that the size of the remaining giant connected components in the network decreases after removing some nodes. Therefore, the network is decomposed into smaller subnetworks. The goal of the network dismantling task is to identify the TAS with the fewest nodes, ensuring that the remaining GCC in the network meets the predetermined threshold.

[0183] Experimental Setup: During the multi-view graph representation learning phase, the number of GCN and GIN layers was set to 3. The learning decay rate was set to 0.4, and the node embedding dimension was set to 32. During training, the experimental patience was set to 12. Dropout with probabilities of 0.1 and 0.3 was used to enhance regularization. The negative slope of the LeakyReLU activation function was set to 0.2. The maximum epoch was set to 200. Furthermore, the Manhattan distance metric was used to aggregate multi-hop neighbor scores. Each hyperparameter was tuned on the validation set of each dataset, including γ1, γ2, γ3, ω, ε1, ε2, λ1, λ2, β1, β2.

[0184] All experiments were implemented on a Linux operating system, using an NVIDIA GeForce RTX 3090, 24GB of memory, and based on PyTorch version 1.13.1, CUDA 11.7, and Python 3.8.

[0185] Baseline Method: This invention compares CLMA with representative state-of-the-art decomposition methods that sort nodes by importance and select the top n nodes to construct the target attack node set. These methods fall into two categories: node-centric and graph neural network-based methods.

[0186] Methods based on node centrality include:

[0187] Degree centrality (DC) measures the influence of a node based on its degree.

[0188] Betweenness Centrality (BC) evaluates nodes by determining how frequently a node is on the shortest path.

[0189] Closeness centrality (CC) is evaluated based on the average shortest path length from a node to other nodes.

[0190] Eigenvector centrality (EC) is evaluated by assessing the connectivity and correlation between a node and its surrounding nodes.

[0191] Harmonic centrality (HC) is evaluated based on the harmonic mean distance from a node to other nodes.

[0192] Collective influence (CI) assesses collective influence based on dissemination potential and relevance. PageRank (PR) estimates influence based on the number and quality of connecting edges.

[0193] Methods based on graph neural networks include:

[0194] DeepWalk (DW) learns low-dimensional vector representations of nodes by randomly walking on a graph.

[0195] Node2Vec (NV) introduces a second-order random walk method for neighboring nodes, balancing depth-first and width-first sampling.

[0196] Role2Vec (RV) learns low-dimensional representations of nodes by analyzing the overlap of nodes across various functional roles. GCN uses inter-layer message passing and aggregation to transform the input matrix into a node representation matrix.

[0197] GAT assumes that the contributions of neighboring nodes are uncertain and uses an attention mechanism to learn relative weights. NIRM is trained in a miniature synthetic network, combining GAT with the mining of local and global structure.

[0198] NEES performs hierarchical merging to extract the basic structure of its own network in order to learn and integrate the importance of nodes at different scales.

[0199] DCRS measures node topological and functional importance, coding diffusion capability, and role importance.

[0200] Apart from NIRM, NEES, and DCRS, all other models are based on network representation learning. To apply this to network decomposition tasks, this invention trains an MLP to convert node representations of DW, NW, and RV into scores. Linear layers are then used to convert node representations of GCN and GAT into node scores.

[0201] Table 2 presents the percentage of normalized TAS size for real-world network decomposition by comparing the baseline method and CLMA with a threshold of 0.01. The best solution is indicated in bold, and the second-best solution is indicated in underline. Note that a lower percentage of normalized TAS indicates that the model requires fewer node removals to reach the predetermined threshold, highlighting superior results in network decomposition. It is well known that achieving optimal performance across all networks is difficult due to significant differences in statistical data and characteristics observed across different domains.

[0202] Table 2 compares the normalized TAS size of the real network at a decomposition threshold of 0.01.

[0203]

[0204]

[0205] As can be seen from the table, CLMA achieves the best performance in real-world networks. Due to the limited number of nodes and edges in the Genefusion dataset, it is less sensitive to scoring. However, on this dataset, CLMA still achieves the same performance as the current best-performing model. Furthermore, by comparing graph centrality-based algorithms with graph neural network-based models (such as NIRM, NEES, and DCRS), the latter can be observed to achieve better results. This is because the former only considers the degree and isocentrality metrics between nodes, while graph neural networks can learn the complex relationships between nodes and the structural features of the network, enabling them to better capture the global information and local patterns of the network.

[0206] To verify the effectiveness of each module in CLMA, ablation experiments were conducted. Specifically, this invention extracts features only from the original graph of the input data, without using the role graph (w / o role). Furthermore, node encoding experiments were performed using GCN (w / o GIN) and GIN (w / o GCN), respectively. To evaluate the effectiveness of multi-view contrastive learning (w / o CL), the loss of contrastive learning was excluded during training, aiming to eliminate any potential impact of CL on the results. Experiments were conducted on three scoring components: MO (multi-hop aggregate score on the original graph), MR (multi-hop aggregate score on the role graph), and SS (supplementary score) to evaluate the effectiveness of each module individually. This invention uses only the MR and SS modules (w / o MO) for scoring. Similarly, CLMA uses only the MO and SS modules (w / o MR), and only the MO and MR modules (w / o SS).

[0207] Table 3 shows that CLMA achieves the highest performance, surpassing each of its variants. The results demonstrate that the various components of CLMA are practically applicable to network disassembly tasks.

[0208] Table 3 Ablation Experiment

[0209]

[0210]

[0211] For the scoring module, removing the SS component is generally less effective than removing only the MO and MR components. This is likely because by removing the SS component, scoring relies solely on local information, disregarding global information. GIN is expected to have a greater impact in networks with a high degree of homogeneity. Without GIN, results may be affected, exhibiting poor performance in homogeneous networks.

[0212] To evaluate the impact of intra-graph contrastive learning and inter-graph contrastive learning modules on network decomposition, this invention selectively removes different components of multi-view contrastive learning. Specifically, this invention conducts experiments by excluding cross-graph contrastive learning (w / o cross), using only intra-graph contrastive learning in a single original graph (w / o CL in role) or a single role graph (w / o CL inorigin). These changes allow this invention to evaluate the effectiveness of each module in model performance. To further extend the experiments of this invention, an intra-graph cross-contrast experiment (i.e., intra-cross) is performed. Features are extracted from the original graph and role graph using GCN and GCN respectively. These features extracted from different networks are then contrastively learned using different encoders. The impact of these variables on network decomposition is evaluated and reported in Table 4.

[0213] Table 4 Performance evaluation of the in-figure and cross-comparison learning modules under different variables.

[0214] AirTraffic CLMA 22.51 without cross 23.41 without CL in role 24.88 without CL in origin 22.59 intra-cross 24.88

[0215] Based on the results, it can be concluded that the combination of intra-graph and cross-contrast learning methods used in CLMA achieves the highest performance in network dismantling. It outperforms either of the two contrastive learning methods used alone.

[0216] This invention also evaluated the effectiveness of the multi-hop aggregation scoring module, and the results are shown in Table 5. This invention uses three methods to evaluate the network teardown effect: scoring the global origin and role graph without considering all neighbors, considering only one-hop neighbors, and considering only two-hop neighbors. This invention extends the evaluation by applying the same method, i.e., further scoring using only the role graph and the origin graph.

[0217] Table 5 Performance Evaluation of Multi-Hop Aggregation Module

[0218]

[0219] Because each network has a different structure and characteristics, one-hop and two-hop neighbors have different saliencies, indicating that the removal of different parts has different effects on the network dismantling effect. Generally, using only one-hop neighbors (without two-hop) yields a better score than using only two-hop neighbors (without one-hop). This further highlights that CLMA can comprehensively identify important nodes in different networks and make more accurate score estimates.

[0220] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

Claims

1. A method for decomposing complex networks based on graph contrastive learning and multi-hop aggregation, characterized in that, The method includes: Step 1: Collect the number of neighbor nodes, connecting edges, and average clustering coefficients of complex traffic networks, and construct a network decomposition model. The model includes a role graph generation module, a multi-view representation learning module, and a node importance scoring module. Step 2: Input the original image into the character image generation module to obtain the character image; Step 3: Input the original image and the character image into the multi-view representation learning module to obtain multi-angle representations of the character image and the original image; Step 4: Input the multi-angle representations of the character diagram and the original diagram into the node importance scoring module to obtain the importance score for each node; Step 5: Calculate and optimize the joint loss function, and train the network decomposition model; Step 6: Using the trained network decomposition model, decompose the traffic network to obtain the importance values ​​of traffic nodes in the traffic network, and set stronger security measures for traffic nodes with high importance, and set weaker security measures for nodes with low importance. The step of inputting the multi-angle graph representation of the role graph and the original graph into the node importance scoring module to obtain the importance score of each node includes the following steps: Step 401: Calculate the multi-hop aggregation score on the original graph; Indicates the first Each node, for The expression for calculating the multi-hop aggregation score on the original graph is: in, express Multi-hop aggregated scores on the original graph for The degree of normalization, The maximum degree in the input network. This represents the dot product of two vectors. Represents the original diagram eigenvectors, It is the fusion coding feature of the original image. The row element, Represents the original diagram eigenvectors, It is the fusion coding feature of the original image. The row element, Represents the original diagram eigenvectors, It is the fusion coding feature of the original image. The row element, and They represent The set of one-hop and two-hop neighbors, Indicates the number of neighbors; Calculate the multi-hop aggregation score on the original graph for all nodes; Step 402: Calculate the multi-jump aggregate score on the character map; Indicates the first Each node, for The expression for calculating the multi-jump aggregate score on the character map is: in, express The multi-jump aggregate score on the character diagram It is a learnable projection vector. This represents the dot product of two vectors. Character illustration eigenvectors, It is the fusion encoding feature of the character graph. The row element, Character illustration eigenvectors, It is the fusion encoding feature of the character graph. The row element, and They represent The set of one-hop and two-hop neighbors, Indicates the number of neighbors; Calculate the multi-hop aggregation score on the role graph for all nodes; Step 403, calculate the supplementary score; use a fully connected layer to map the features of the nodes in the original graph and the role graph, and calculate the supplementary score, expressed as: in, Indicates the first 1 node yes The original graph supplements the score. yes The character illustrations supplement the score. The original diagram represents the aforementioned figure. eigenvectors, The character diagram represents the aforementioned role. eigenvectors, It is an activation function. and These are learnable parameters; Calculate supplementary scores for all nodes; Step 404, merge scores; Indicates the first Each node, for The expression for the fusion fraction is: in, yes The final score, yes Original image rating yes Character illustration rating, express Multi-hop aggregated scores on the original graph express The multi-jump aggregate score on the character diagram yes The original graph supplements the score. yes The character illustrations supplement the score. The sigmoid function is used to normalize the score. It's a hyperparameter; Calculate the final score for all nodes.

2. The complex network decomposition method based on graph contrastive learning and multi-hop aggregation according to claim 1, characterized in that, The process of inputting the original image into the character image generation module to obtain the character image includes the following steps: Step 201: Calculate the confusion membership probability matrix; use the RoIX algorithm to divide the nodes into different roles and build a role graph; It is the node feature matrix of the original graph. It is the number of nodes. It is the node feature dimension. The OK Indicates the first Nodes The eigenvectors are calculated using nonnegative matrix factorization (NMF). and ,make The expression is: in, For the Frobenius norm, It is a confusing membership probability matrix, which describes the mixed membership probability of each node to a predefined role. It is a mixed membership probability dimension. This indicates the correlation between each role and the regional structural features; Step 202: Connect nodes according to the confusion membership probability matrix to obtain the role graph; based on the confusion membership probability matrix output by the RoIX algorithm... To capture the impact of roles on network topology stability, a role graph is constructed by connecting nodes with similar regional topological characteristics. Node pairs The similarity calculation expression is: in, Represents node pairs similarity, Indicates the first 1 node Indicates the first 1 node Let ||·|| denote the dot product of vectors, and let ||·|| be the Euclidean norm. Indicates the first The confusion membership probability of each node is The OK, Indicates the first The confusion membership probability of each node is The For each node, select the top n nodes with similar roles to connect them, where n is a hyperparameter.

3. The complex network decomposition method based on graph contrastive learning and multi-hop aggregation according to claim 2, characterized in that, The process of inputting the original image and the character image into the multi-view representation learning module to obtain multi-angle representations of the character image and the original image includes the following steps: Step 301: Encode the original graph and the character graph using a graph convolutional network, with the following expression: in, This represents a graph convolutional network. It is the node feature matrix of the original graph. It is a confusion membership probability matrix. Represents the graph convolutional coding features of the original graph. The graph convolutional encoding features representing the character graph, It is the number of nodes. It is the dimension of the graph convolution output layer; Step 302: Encode the original graph and the role graph using a graph isomorphic network, expressed as: in, Represents a graph isomorphic network. It is the node feature matrix of the original graph. It is a confusion membership probability matrix. This represents the graph isomorphic coding features of the original graph. The graph isomorphic encoding features representing the character graph. It is the number of nodes. It is the output layer dimension of the graph isomorphism; Step 303: Fuse the graph convolutional coding features and graph isomorphic coding features of the original graph and the character graph to obtain the fused coding features of the original graph and the character graph, expressed as: in, Represents the graph convolutional coding features of the original graph. The graph convolutional encoding features representing the character graph, This represents the graph isomorphic coding features of the original graph. The graph isomorphic encoding features representing the character graph. This represents the fusion coding features of the original image. This represents the fusion coding features of the character graph. For hyperparameters, , and It is a multi-angle representation of the original image. , and It is a multi-angle representation of a character image.

4. The complex network decomposition method based on graph contrastive learning and multi-hop aggregation according to claim 3, characterized in that, The calculation and optimization of the joint loss function and the training of the network decomposition model include the following steps: Step 501, calculate the graph contrast loss function, including the following steps; The original image contrast loss function is calculated as follows: in, This represents the original graph contrast loss function. It is the number of nodes. Indicates the first 1 node express The original graph convolutional coding features, It is the graph convolutional coding feature of the original graph. The row element, express The original graph isomorphic coding features, The graph isomorphic coding feature of the original graph is described above. The row element, A scoring function for calculating the similarity between two representations, It is an indicator function that returns 1 if the parameter in parentheses is true, and 0 otherwise. The character-image contrast loss function is calculated as follows: in, This represents the character graph contrast loss function. It is the number of nodes. Indicates the first 1 node express Character graph convolutional encoding features The graph convolutional coding features of the character graph are described above. The row element, express The isomorphic encoding features of the character graph. It is the graph isomorphic encoding feature of the character graph. The row element, A scoring function for calculating the similarity between two representations, It is an indicator function that returns 1 if the parameter in parentheses is true, and 0 otherwise. The inter-graph contrast loss function is calculated as follows: in, This represents the inter-graph contrast loss function. It is the number of nodes. Indicates the first 1 node express The original fusion coding features, It is the fusion coding feature of the original image. The row element, express Role fusion coding features It is the fusion encoding feature of the character graph. The row element, A scoring function for calculating the similarity between two representations, It is an indicator function that returns 1 if the parameter in parentheses is true, and 0 otherwise. The graph contrast loss function is calculated, and its expression is: in, The graph contrast loss function is represented. This represents the original graph contrast loss function. This represents the character graph contrast loss function. This represents the inter-graph contrast loss function. It's a hyperparameter; Step 502, calculate the node importance score, the expression is: in, This is the node importance score, representing the expected number of nodes that will not be affected after a node is removed. yes The final score, It is the first One node; Step 503, calculate the sum of node scores, the expression is: in, It is the node score sum, used to represent the number of attacking nodes. yes The final score, It is the first One node; Step 504, calculate the joint loss function, the expression of which is: in, It is a joint loss function. The graph contrast loss function is represented. It is the node importance score. It is the sum of node scores. It's a hyperparameter; Step 505: Optimize the joint loss function and train the network decomposition model.

5. The complex network decomposition method based on graph contrastive learning and multi-hop aggregation according to claim 4, characterized in that, The method of using the trained network decomposition model to perform network decomposition includes the following steps: The trained network decomposition model is used to calculate the final score of all nodes. The K nodes with the highest final scores are selected to form the target attack node set. According to the order of the nodes in the target attack node set, the nodes in the network are deleted in sequence and iterated until the maximum connected component is less than the set threshold.