Target analysis method and system based on complex network
By coarsing nodes and converting the original view in a complex network, and embedding and fusion with a general graph transformer, the problem of difficult to capture structural information and key patterns in complex network graph classification tasks in the prior art is solved, and a more efficient and accurate target analysis effect is achieved.
Patent Information
- Application Number
- CN202510276717.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-10
- Publication Date
- 2025-06-20
AI Technical Summary
The prior art is difficult to effectively capture structural information and key patterns in the graph classification tasks of complex networks, resulting in large computing overhead, poor distribution offset and interpretability, affecting the generalization ability and reliability of the model.
By roughening the nodes in the original view, building a roughened view, and converting it into a line graph transformed view, embedding and fusion of multi-views in combination with a general graph transformer, inputting them to a classifier based on a complex network-based target analysis model for training.
It realizes more efficient and accurate target analysis in complex networks, reduces computational complexity, alleviates performance degradation caused by distribution offsets, and improves the generalization ability and interpretability of the model.
Smart Images

Figure CN120180187A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of digital data processing, and particularly to a target analysis method and system based on complex networks. Background Art
[0002] With the rapid development of information technology, complex networks, as a powerful tool, have been widely applied in multiple fields, including social network analysis, transportation, communication networks, and bioinformatics. In these fields, target analysis often requires in-depth exploration of the internal laws of each node, edge, and their interaction relationships in the network to support more accurate decision-making and prediction. The target analysis method based on complex networks emerged precisely in this context. It reveals the dynamic evolution characteristics, potential laws, and possible risks of the target system by constructing and analyzing the network structure.
[0003] Since the graph structure can effectively express entities and the relationships between them, abstracting the data of complex networks into graphs for analysis has become a common method. Graph transformers have achieved remarkable results in graph-level tasks, and their powerful modeling capabilities provide a new perspective for extracting global features of graph data. However, most existing studies regard the graph structure only as a guidance or bias for enhancing node representations, mainly focusing on the perspective of node centers, and relatively insufficient in explicitly modeling edges and the overall structure. This raises an important question: Can supernodes be used to represent specific structures to improve the performance of the model in downstream tasks?
[0004] In recent years, some researchers have begun to focus on this issue and proposed a series of methods, which are usually classified as graph compression, pooling, and coarsening. The core goal of these techniques is to generate compact representations by compressing the node set or capture the high-order features of the graph in the form of a hierarchical structure. However, despite certain progress in related research, many challenges still remain. First, current coarsening techniques are usually more suitable for tasks such as graph reconstruction and node classification, but may not be able to fully play a role in graph classification tasks. Second, for some complex tasks, the computational overhead of identifying and processing multiple potential structures in the entire graph may be unacceptable. Especially in large-scale graph data, structure identification and compression may consume a large amount of computing resources. Third, the coarsening operation may lead to data distribution shift. When there are differences in the distributions of the training set and the test set, the coarsened model often shows poor generalization ability, limiting the reliability of the model in practical applications. Deeper coarsening layers will significantly reduce the elements of the graph, making the model lack effective alignment with the original graph, resulting in worse interpretability and weakening the credibility of the model to analyze the target from the coarsened perspective. Summary of the Invention
[0005] The technical problem to be solved by the present invention is to provide a target analysis method and system based on complex networks, which effectively learn the structural information and key patterns in complex networks by applying coarsening techniques to graph classification, achieve analysis with linear complexity, and alleviate the performance degradation problem caused by distribution shift, thereby achieving more efficient and accurate target analysis in complex networks.
[0006] The present invention is realized by the following technical solutions: A target analysis method based on complex networks, which includes the following steps: S1: Save the graph data of the target to be analyzed as the original view; S2: Coarsen the nodes in the original view to construct a coarsened view; S3: Construct the coarsened view into a line graph transformation view; S4: Embed and fuse the original view, coarsened view, and line graph transformation view through a general graph transformer, and input the fused view into the classifier of the target analysis model based on complex networks; S5: The classifier performs forward propagation to obtain the classification result of the target analysis model based on complex networks, and obtains the probability distribution of the classification result through an activation function, and calculates the cross-entropy loss function using the probability distribution of the classification result and the true label; S6: The classifier then performs backward propagation, and uses the gradient descent method to repeatedly update the weights and biases of the target analysis model based on complex networks for multiple rounds until an accurate classification result of the target to be analyzed is obtained.
[0007] Preferably, in step S2, the original view is coarsened using two symmetric structures, namely cliques and loops.
[0008] Furthermore, the method for coarsening the original view using two symmetric structures, namely cliques and loops, is as follows: S21: Sort the nodes in the original view in descending order according to the degrees of the nodes; S22: Start traversing from the node with the highest degree, search for unvisited cliques. If there are no unvisited nodes in the neighborhood of the current node, proceed to the next node for traversal. If there are still unvisited nodes in the neighborhood of the current node, continue to search in the neighborhood and save the searched cliques until there are no unvisited nodes in the neighborhood of the current node, then proceed to the next node for traversal. After all nodes have been traversed, go to the next step; S23: Traverse each node in the original view, search for a loop that starts from the node and returns to the node. If the length of the loop searched during the traversal does not exceed the preset length, save the searched loop; S24: Merge the saved cliques and the saved loops to obtain the coarsened view.
[0009] Optimally, in step S3, the coarsened view is constructed as a line graph conversion view by the following method: the edges of the coarsened view are converted into new vertices, and the endpoints of two edges in the coarsened view are converted into new edges, thereby constructing a line graph conversion view.
[0010] Furthermore, in step S4, the general graph transformer embeds the original view, the coarsened view, and the line graph conversion view using the following method: For the original view: S411: Nodes in the original view The features are used as the first-step nodes of the first layer of the general graph transformer The representation vector , and calculate the node embedding of the original view according to formula (1): (1); in: Represents the original view Tier Step Node The representation vector of represents the aggregation function under the attention mechanism, Represents the original view Tier Step Node The representation vector of S412: Calculate the original view embedding according to formula (2): (2); in: For the final original view embed, Represents the original view node In the The initial raw view embedding of the layer, Represents the original view node collection; For a coarse view: S421: First, the coarsened view node features are calculated according to the original view features and the original view indicator matrix according to formula (3): (3); in: is the original view indicator matrix, To coarsen the view node features, is the original graph feature; S422: Using node features in the coarsened view as the first-layer first-step node of the general graph transformer The representation vector , and then calculate the node embedding of the coarsened view according to formula (4): (4); Wherein: represents the representation vector of the th step node of the th layer of the coarsened view, represents the representation vector of the th step node of the th layer of the coarsened view; S423: Calculate the coarsened view embedding according to Equation (5): (5); Wherein: is the final coarsened view embedding, represents the initial coarsened view embedding of node in the th layer; represents the set of coarsened view nodes; For the line graph conversion view: S431: First, calculate the line graph conversion view node features through the two endpoint features of the corresponding coarsened view and according to Equation (6): (6); Wherein: is the node feature of the line graph conversion view node converted from an edge in the coarsened view, is the node feature of endpoint Figure 1 of the two endpoints of edge in the coarsened view, is the node feature of endpoint of the two endpoints of edge Figure 1 in the coarsened view; S432: Use the line graph conversion view node features as the representation vector of the first step node of the first layer of the general graph transformer , and calculate the node embedding of the line graph conversion view according to Equation (7): (7); Wherein: represents the representation vector of the th step node of the th layer of the line graph conversion view, represents the representation vector of the th step node of the th layer of the line graph conversion view; S433: Calculate the line graph conversion view embedding according to Equation (8): (8); Wherein: is the final line graph transformation view embedding, represents a node in the layer of the initial line graph transformation view embedding, represents the set of line graph transformation view nodes.
[0011] Further, in step S4, the original view, the coarsened view, and the line graph transformation view are embedded and fused according to formula (9) to obtain a fused view embedding: (9); Wherein: represents the fused view embedding.
[0012] Further, in step S5, the classifier calculates the cross-entropy loss function by the following method: S51: The input layer of the classifier receives the fused view input signal and transmits it to the hidden layer of the classifier; S52: The hidden layer of the classifier linearly transforms the fused view input signal through a weight matrix and a bias vector, obtains the output of the hidden layer, and transmits the hidden layer to the output layer of the classifier: S53: The output layer of the classifier receives the output of the hidden layer and obtains the probability distribution of the classification result through the softmax activation function; S54: The output layer of the classifier calculates the cross-entropy loss function according to formula (10): (10); Wherein: represents the cross-entropy loss function, represents the softmax activation function, is the number of classes, is the true label of the th class, is the probability distribution of the classification result of the th class, represents the predicted value of the
[0013] Further, in step S6, using the gradient descent method to perform multiple rounds of repeated updates on the weights and biases of the target analysis model based on the complex network includes the following steps: S61: Calculate the gradient of the output layer of the classifier according to formula (11): (11); S62: Calculate the error of the hidden layer of the classifier according to formula (12): (12); Wherein: Represents the error of the th neuron, Represents the input of the th neuron in the Represents the connection weight from the th neuron in the hidden layer to the th neuron in the Represents the input of the th neuron in the hidden layer, Represents the derivative of the activation function; S63: Calculate the gradient of the weights in each layer according to Equation (13), and calculate the gradient of the biases in each layer according to Equation (14): (13); (14); Wherein: Represents the weight between the th neuron in the th layer and the th neuron in the th layer, Represents the output of the th neuron in the Represents the bias of the th neuron in the th layer; S64: Use the gradient descent method to update the weights according to Equation (15) and update the biases according to Equation (16): (15); (16); Wherein: Represents the learning rate, Represents the update direction.
[0014] A target analysis system based on complex networks, which is used to execute a target analysis method based on complex networks described in any one of the above, includes a target analysis model based on complex networks. The target analysis model based on complex networks includes a multi-view construction module, a general graph transformer, and a classifier. The multi-view construction module is used to construct an original view, a coarsened view, and a line graph conversion view, and transmit the constructed original view, coarsened view, and line graph conversion view to the general graph transformer. The general graph transformer is used to embed and fuse the original view, coarsened view, and line graph conversion view, and input the fused view embedding into the classifier. The classifier is used to process and classify the fused view embedding until an accurate classification result of the target to be analyzed is obtained.
[0015] Optimized, the classifier is provided with a multi-layer perceptron. The multi-layer perceptron includes an input layer, a hidden layer, and an output layer that are fully connected in sequence. The input layer is used to receive the fused view embedding signal transmitted by the general graph transformer and transmit the fused view embedding signal to the hidden layer. The hidden layer performs a linear transformation on the fused view embedding signal through a weight matrix and a bias vector, and then performs a non-linear transformation on the result of the linear transformation through an activation function to obtain the output data of the hidden layer, and transmits the output data of the hidden layer to the output layer. The output layer receives the output data of the hidden layer, obtains the probability distribution of the classification result through the activation function, calculates the cross-entropy loss function, and then performs backpropagation, and uses the gradient descent method to update the weights and biases of the target analysis model based on complex networks repeatedly for multiple rounds until an accurate classification result of the target to be analyzed is obtained.
[0016] Advantages of the invention: The target analysis method and system based on complex networks provided by the present invention have the following advantages: 1. Coarsening the nodes in the original view to construct a coarsened view can capture the high-level topological structure of the network, which helps to perform more effective target analysis in complex networks. Coarsening includes clique coarsening and loop coarsening, which can keep the calculation linear and has a linear complexity.
[0017] 2. On the basis of the original view and the coarsened view, a line graph conversion view is introduced to perform multi-view graph representation learning on the general graph transformer framework, making the learned structural information more comprehensive and reliable, and realizing more efficient and accurate target analysis in complex networks. Brief description of the drawings
[0018] Figure 1 It is a schematic flow chart of the present invention.
[0019] Figure 2 It is a schematic diagram of the clique coarsening process with hierarchical depth of the present invention.
[0020] Figure 3 It is a schematic diagram of the search process for the maximum-length cycle in the present invention.
[0021] Figure 4 It is a schematic diagram of the clique coarsening process with hierarchical depth in the present invention. Detailed implementation manners
[0022] A target analysis method based on complex networks, which includes the following steps, and its flowchart is as Figure 1 shown: S1: Save the graph data of the target to be analyzed as the original view; In order to enable multi-view fusion, saving the graph data of the target to be analyzed as the original view helps to ensure that the model can extract information from the most basic graph structure.
[0023] The graph data of the target to be analyzed here can be graph data in any field of social network analysis, transportation, communication networks, and bioinformatics.
[0024] S2: Coarsen the nodes in the original view to construct a coarsened view; Specifically, two symmetric structures, namely cliques and cycles, can be used to coarsen the original view, and the graph structure in the original view can be coarsened into supernodes.
[0025] The method of coarsening the original view using two symmetric structures, namely cliques and cycles, is as follows: S21: Sort the nodes in the original view in descending order according to the degrees of the nodes, so that the nodes with more connections can be processed preferentially; S22: Start traversing from the node with the highest degree, search for unvisited cliques. If there are no unvisited nodes in the neighborhood of the current node, proceed to the traversal of the next node. If there are still unvisited nodes in the neighborhood of the current node, continue to search in the neighborhood and save the found cliques until there are no unvisited nodes in the neighborhood of the current node, and then proceed to the traversal of the next node. After all nodes are traversed, go to the next step; Starting from the node with the highest degree, try to perform clique search on each node until all nodes are searched. In each round of search, for each unvisited node, first try to find an unvisited clique containing the current node and save the found clique. Mark the nodes (except the current node) in the found clique as visited. Then check whether there are unvisited nodes in the neighborhood of the current node. If there are, continue to search for cliques in these neighborhoods within the maximum hierarchical depth. Save the newly discovered cliques and mark the nodes (except the current node) in the newly discovered neighborhood cliques as visited. If no more cliques are found in the neighborhood, mark the current node as visited and continue to process the next node.
[0026] Specifically, as Figure 2 shown, Figure 2 it is a clique coarsening process with hierarchical depth, starting from the central node with the highest degree and searching for possible cliques one by one until the depth constraint is reached. Cliques exceeding the depth constraint limit will not be considered by the neighbors of the current node. Since the distance between node and node is 2 hops, exceeding the depth constraint , only the clique is coarsened, and is coarsened into , forming the partition set . After and its neighbors are processed, the central node will switch to and perform a new round of coarsening.
[0027] S23: Traverse each node in the original view to find a cycle that starts from and returns to the node. If a cycle with a length not exceeding the preset length is found during the traversal, the found cycle is saved; Specifically, as Figure 3 shown, Figure 3 it is a process of searching for the maximum length cycle, which has two 3-cycles, namely and , and the whole graph also includes a 4-cycle . When δ = 3, only the cycles with lengths less than the limit are selected, where is finally represented by , and is finally represented by .
[0028] S24: Merge the saved cliques and the saved cycles to obtain the coarsened view.
[0029] Set the hierarchical depth constraint for clique coarsening and the length constraint for cycle coarsening, and perform shallow coarse-grained clustering, which helps to amplify high-level structural information while retaining the characteristic nodes in the graph to the greatest extent.
[0030] S3: Construct the coarsened view into a line graph transformation view; Specifically, the coarsened view can be constructed into a line graph transformation view by the following method: Convert the edges of the coarsened view into new vertices, and convert the endpoints of two edges in the coarsened view into new edges, thus constructing the line graph transformation view.
[0031] As Figure 4 shown, Figure 4 it is the work flow chart of the line graph transformation. In the figure, , , , , are five sides respectively. After transformation, they form five vertices A, B, M, D, and E. , The intersecting nodes are transformed into the edge between A and B. , The intersecting nodes are transformed into the edge between B and M. , The intersecting nodes are transformed into the edge between M and D. , The intersecting nodes are transformed into the edge between M and E. , The intersecting nodes are transformed into the edge between D and E.
[0032] This transformation can reduce the difficulty of relative position modeling. The transformed line graph transformation view enriches the representation and reduces the impact of coarsening.
[0033] S4: Embed and fuse the original view, coarsened view, and line graph transformation view through a general graph transformer, and input the fused view into the classifier of the target analysis model based on complex networks. Embed the original view according to the following method: S411: Use the features of the nodes in the original view as the representation vector of the first step of the first layer of the general graph transformer for the node , and calculate the node embedding of the original view according to Equation (1): (1); Where: represents the representation vector of the th layer and the th step of the node in the original view, represents the aggregation function under the attention mechanism, represents the representation vector of the th layer and the th step of the node in the original view; For the original view, since its node features are known, directly input the original view node features into the general graph transformer as the input of the first step of the first layer of the general graph transformer, that is, its input at the first step of the first layer of the general graph transformer is the node feature from the original view.
[0034] S412: Calculate the original view embedding according to Equation (2): (2); Among them: is the final original view embedding, indicating the original view node at the layer of the initial original view embedding, indicating the set of original view nodes; For the coarsened view, the embedding is performed as follows: S421: First, calculate the coarsened view node features according to the original view features and the original view indication matrix according to Equation (3): (3); Among them: is the original view indication matrix, is the coarsened view node feature, is the original graph feature; For the coarsened view, since it is obtained by coarsening the original view, the node features of the coarsened view need to be calculated according to Equation (3).
[0035] S422: Take the node features in the coarsened view as the representation vector of the first step node of the first layer of the general graph transformer and then calculate the node embedding of the coarsened view according to Equation (4): (4); Among them: represents the representation vector of the node at the step of the layer of the coarsened view, represents the representation vector of the node at the step of the layer of the coarsened view; S423: Calculate the coarsened view embedding according to Equation (5): (5); Among them: is the final coarsened view embedding, indicating the node at the layer of the initial coarsened view embedding; indicating the set of coarsened view nodes; For the line graph conversion view, the embedding is performed as follows: S431: First, calculate the line graph conversion view node features through the two endpoint features of the corresponding coarsened view and according to Equation (6): (6); Among them: from an edge in the coarsened view to a node feature of the line graph transformed view node ; for the coarsened view Figure 1 an edge the node feature of one of the two endpoints ; for the coarsened view Figure 1 an edge the node feature of one of the two endpoints ; S432: Use the node feature of the line graph transformed view as the representation vector of the first step node of the first layer of the general graph transformer to calculate the node embedding of the line graph transformed view according to Equation (7): (7); where: represents the representation vector of the th layer and the th step node of the line graph transformed view, represents the representation vector of the th layer and the th step node of the line graph transformed view; S433: Calculate the embedding of the line graph transformed view according to Equation (8): (8); where: is the final embedding of the line graph transformed view, represents the initial embedding of node in the th layer of the line graph transformed view, represents the set of nodes of the line graph transformed view.
[0036] Furthermore, in step S4, the original view, the coarsened view, and the line graph transformed view are embedded and fused according to Equation (9) to obtain the fused view embedding: (9); where: represents the fused view embedding.
[0037] The Universal Graph Transformer (U2GNN) is an object analysis model based on the Graph Neural Network (GNN), which follows the basic aggregation and readout pooling operations. The model uses the Universal Graph Transformer as the backbone structure, generates graph embeddings for three views respectively, and obtains the final object group embedding through cross-view concatenation. In this way, the model can integrate information from different views, thus making up for the deficiencies of a single view in terms of structure, position information, etc., and then providing a more comprehensive and accurate representation for the object group.
[0038] S5: The classifier performs forward propagation to obtain the classification result of the object analysis model based on the complex network, and obtains the probability distribution of the classification result through the activation function. The cross-entropy loss function is calculated using the probability distribution of the classification result and the true label; Specifically, the classifier can calculate the cross-entropy loss function using the following method: S51: The input layer of the classifier receives the fused view input signal and transmits it to the hidden layer of the classifier; S52: The hidden layer of the classifier performs a linear transformation on the fused view input signal through the weight matrix and bias vector to obtain the output of the hidden layer and transmit the output of the hidden layer to the output layer of the classifier: S53: The output layer of the classifier receives the output of the hidden layer and obtains the probability distribution of the classification result through the softmax activation function; S54: The output layer of the classifier calculates the cross-entropy loss function according to Equation (10): (10); Where: represents the cross-entropy loss function, represents the softmax activation function, is the number of classes, is the true label of the th class, is the probability distribution of the classification result of the th class, represents the predicted value of the
[0039] Through training, the model can effectively capture the characteristics of the object group and identify its class attributes, providing profound insights into the object group. Through the established model, analysis can be carried out using the means of representation. Each dimension represents the mapping of certain attributes of the object in the latent space, so as to obtain the classification result of the object analysis model based on the complex network.
[0040] The cross-entropy loss function provides an effective loss metric. Moreover, by combining with the softmax activation function, it promotes the training and learning process of the model, helping the model converge to the optimal solution faster and more accurately. The cross-entropy loss function helps the model learn the features and class attributes of the target more effectively during training, thereby improving the accuracy and performance of the target analysis model. Through the trained model, we can analyze the target using the chart representation, where each dimension represents the mapping of certain attributes of the target in the latent space. Training the classifier using the cross-entropy loss function can improve the accuracy of the model in the target analysis task.
[0041] S6: The classifier then performs backpropagation and uses the gradient descent method to repeatedly update the weights and biases of the target analysis model based on the complex network for multiple rounds until an accurate classification result of the target to be analyzed is obtained.
[0042] Specifically, repeatedly updating the weights and biases of the target analysis model based on the complex network using the gradient descent method includes the following steps: S61: Calculate the gradient of the output layer of the classifier according to Equation (11): (11); S62: Calculate the error of the hidden layer of the classifier according to Equation (12): (12); Where: represents the error of the th neuron in the hidden layer of the classifier, represents the input of the th neuron in the th layer, represents the connection weight from the th neuron in the hidden layer th to the th neuron in the (13); (14); Where: represents the th neuron in the th The weight between neurons represents the output of the th neuron in the represents the bias of the th neuron in the S64: Use the gradient descent method to update the weights according to Equation (15) and update the bias according to Equation (16): (15); (16); where: represents the learning rate represents the update direction
[0043] The classifier performs backpropagation and uses the gradient descent method to update the weights and biases of the target analysis model based on the complex network in multiple rounds of iteration, which can make the classification result of the target to be analyzed more accurate
[0044] A target analysis system based on a complex network for executing any one of the above-mentioned target analysis methods based on a complex network, which includes a target analysis model based on a complex network. The target analysis model based on a complex network includes a multi-view construction module, a general graph transformer, and a classifier. The multi-view construction module is used to construct an original view, a coarsened view, and a line graph conversion view, and transmit the constructed original view, coarsened view, and line graph conversion view to the general graph transformer. The general graph transformer is used to embed and fuse the original view, coarsened view, and line graph conversion view, and input the fused view embedding into the classifier. The classifier is used to process and classify the fused view embedding until an accurate classification result of the target to be analyzed is obtained
[0045] Optimized, the classifier is provided with a multi-layer perceptron. The multi-layer perceptron includes an input layer, a hidden layer, and an output layer that are fully connected in sequence. The input layer is used to receive the fused view embedding signal transmitted by the general graph transformer and transmit the fused view embedding signal to the hidden layer. The hidden layer performs a linear transformation on the fused view embedding signal through a weight matrix and a bias vector, and then performs a non-linear transformation on the result of the linear transformation through an activation function to obtain the output data of the hidden layer, and transmits the output data of the hidden layer to the output layer. The output layer receives the output data of the hidden layer, obtains the probability distribution of the classification result through the activation function, calculates the cross-entropy loss function, and then performs backpropagation, and uses the gradient descent method to update the weights and biases of the target analysis model based on the complex network in multiple rounds of iteration until an accurate classification result of the target to be analyzed is obtained
[0046] The present invention validates the effectiveness of the target analysis method based on complex networks. The method of the present invention is evaluated on eight datasets provided by the TUDataset in the graph neural network library, including three social network datasets (SN): COLLAB (CO), IMDB-BINARY (IB), and IMDB-MULTI (IM); two molecular datasets (MOL): NCI1 (N1) and NCI109 (N109); and three bioinformatics datasets (BIO): D&D (DD), PTC MR (PTC), and PROTEINS (PRO).
[0047] The present invention uses accuracy as the evaluation metric for the graph classification task to evaluate the performance of the proposed method. To ensure a fair comparison between methods, the same data partitioning is used, and the performance is reported by the accuracy of 10-fold cross-validation. All experiments are trained and evaluated on an NVIDIA RTX 3050 OEM 8GB GPU. The detailed information of the specific eight datasets is shown in Table 1: Table 1
[0048] Specifically, the experiments conducted by the present invention include the following aspects: Target analysis task: 31 relevant studies were selected for comparison from 6 categories. For the general graph transformer Graph Transformer framework, 20 baseline models were selected, including: (I) 2 kernel-based methods: GW and WL; (II) 8 GNN-based methods: GCN, GAT, GraphSAGE, DGCNN, CapsGNN, GIN, GDGIN, and GraphMAE; (III) 4 contrastive learning methods: InfoGraph, JOAO, RGCL, and CGKS; (IV) 6 GT-based methods: GKAT, GraphGPS, U2GNN, SAN-SSCA, SA-GAT, and UGT. In addition, 11 models were selected from two categories to validate our graph coarsening technique. One category is (V) 7 graph pooling methods: DIFFPOOL, SAGPool, ASAP, GMT, SAEPool, MVPool, and PAS; the other category is (VI) 4 graph coarsening and compression methods: CGIPool, DosCond, KGC, and SS. To further explain the unique design of the coarsening method, 3 coarsening techniques were selected: networkx, KGC, and L19. Each technique has two variants: neighborhood-based and clique-based variants. The results show that the method of the present invention outperforms other baseline models on most datasets, with the highest average ranking of 3.25.
[0049] The specific experimental verification results are shown in Table 2 and Table 3 as follows: Table 2
[0050] Table 3
[0051] Among them, the full name of A.R is Average Ranking, which represents the average ranking and is the average value calculated after ranking the performance of each method on all datasets.
[0052] The results show that the method of the present invention is superior to other baseline models on most datasets, with the highest average ranking reaching 3.25.
[0053] In addition, component analysis experiments were conducted to evaluate the contributions of the various components in the present invention. Two sets of ablation experiments were designed, one for analyzing the effectiveness of each module in the model, and the other for discussing the impact of different coarsening strategies on the downstream classification task. The model has two variants: LCC4GCw / o LCC (removing the coarsening module) and LCC4GCw / o LGC (removing the line graph conversion module), and LCC4GCw / o both means removing both of these components simultaneously. When both of these components are removed simultaneously, LCC4GC degenerates into U2GNN, with only slight differences in the loss function and classifier.
[0054] The specific component analysis experimental results are shown in Table 4 as follows: Table 4
[0055] The results show that removing any component will lead to a performance decline. The performance decline of LCC4GCw / o LGC on the PTC dataset is the most significant, approximately 6.93%; while the decline of LCC4GCw / o LCC on the DD dataset reaches 15.80%.
[0056] In summary, a target analysis method and system based on complex networks provided by the present invention achieve analysis with linear complexity and alleviate the performance decline problem caused by distribution shift, thereby achieving more efficient and accurate target analysis in complex networks.
[0057] The above are only the preferred embodiments of the present invention and are not used to limit the present invention. For those skilled in the art, the present invention can have various changes and modifications. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principle of the present invention shall be included within the protection scope of the present invention.
Claims
1. A target analysis method based on complex networks, characterized in that: The steps include: S1: Save the graph data of the target to be analyzed as the original view; S2: Coarsen the nodes in the original view and construct a coarsened view; S3: construct the coarsened view into a line graph transformation view; S4: The original view, the coarsened view, and the line graph conversion view are embedded and fused through the general graph transformer, and the fused view embedding is input into the classifier of the target analysis model based on the complex network; S5: The classifier performs forward propagation to obtain the classification result of the target analysis model based on the complex network, and obtains the probability distribution of the classification result through the activation function. The cross entropy loss function is calculated using the probability distribution of the classification result and the true label; S6: The classifier then performs back propagation and uses the gradient descent method to repeatedly update the weights and biases of the target analysis model based on the complex network until an accurate classification result of the target to be analyzed is obtained.
2. According to claim 1, a target analysis method based on complex networks is characterized in that: In step S2, the original view is coarsened using two symmetrical structures, namely, clusters and rings.
3. The target analysis method based on complex network according to claim 2 is characterized in that: The method of coarsening the original view using the two symmetric structures of clusters and rings is as follows: S21: sort the nodes in the original view in descending order according to the degree of the nodes; S22: Start traversing from the node with the highest degree and search for unvisited clusters. If there are no unvisited nodes in the neighborhood of the current node, traverse the next node. If there are still unvisited nodes in the neighborhood of the current node, continue searching in the neighborhood and save the searched clusters until there are no unvisited nodes in the neighborhood of the current node. Then traverse the next node. When all nodes are traversed, go to the next step. S23: traverse each node in the original view, and search for a loop starting from the node and returning to the node. If the length of the loop searched during the traversal process does not exceed the length of the loop of the preset length, the searched loop is saved; S24: Merge the saved clique and the saved ring to obtain a coarsened view.
4. The target analysis method based on complex network according to claim 1, characterized in that: In step S3, the coarsened view is constructed as a line graph conversion view by the following method: the edges of the coarsened view are converted into new vertices, and the endpoints of two edges in the coarsened view are converted into new edges, thereby constructing a line graph conversion view.
5. The target analysis method based on complex network according to claim 1, characterized in that: In step S4, the general graph transformer embeds the original view, the coarsened view, and the line graph conversion view using the following method: For the original view: S411: Nodes in the original view The features are used as the first-step nodes of the first layer of the general graph transformer The representation vector , and calculate the node embedding of the original view according to formula (1): (1); in: Represents the original view Tier Step Node The representation vector of represents the aggregation function under the attention mechanism, Represents the original view Tier Step Node The representation vector of S412: Calculate the original view embedding according to formula (2): (2); in: For the final original view embed, Represents the original view node In the The initial raw view embedding of the layer, Represents the original view node collection; For a coarse view: S421: First, the coarsened view node features are calculated according to the original view features and the original view indicator matrix according to formula (3): (3); in: is the original view indicator matrix, To coarsen the view node features, is the original graph feature; S422: Using node features in the coarsened view as the first-layer first-step node of the general graph transformer The representation vector , and then calculate the node embedding of the coarsened view according to formula (4): (4); in: Represents the coarse view Tier Step Node The representation vector of Represents the coarse view Tier Step Node The representation vector of S423: Calculate the coarse view embedding according to formula (5): (5); in: is the final coarse view embedding, Representation Node In the Initial coarse view embedding of the layer; Represents a coarse view node set; For line chart conversion view: S431: First, the line graph transformation view node features are calculated by the two endpoint features of the corresponding coarsened view and according to formula (6): (6); in: For an edge in the coarsened view Convert to Line Graph Convert View Node The node characteristics of An edge for the coarsening view The middle point of the two endpoints The node characteristics of An edge for the coarsening view The middle point of the two endpoints Node characteristics of S432: Use the line graph conversion view node feature as the first layer first step node of the general graph transformer The representation vector , calculate the node embedding of the line graph transformation view according to formula (7): (7); in: Indicates the line graph conversion view Tier Step Node The representation vector of Indicates the line graph conversion view Tier Step Node The representation vector of S433: Calculate the line graph transformation view embedding according to formula (8): (8); in: Convert the view embedding for the final line graph, Representation Node In the The initial line graph of the layer is transformed into a view embedding, Represents a collection of line graph transformation view nodes.
6. The target analysis method based on complex network according to claim 5, characterized in that: In step S4, the original view, the coarsened view, and the line graph conversion view are embedded and fused according to equation (9) to obtain the fused view embedding: (9); in: represents the fused view embedding.
7. The target analysis method based on complex network according to claim 1, characterized in that: In step S5, the classifier calculates the cross entropy loss function using the following method: S51: the input layer of the classifier receives the fused view input signal and transmits it to the hidden layer of the classifier; S52: The hidden layer of the classifier performs a linear transformation on the fused view input signal through the weight matrix and the bias vector, obtains the output of the hidden layer and transmits the hidden layer to the output layer of the classifier: S53: The output layer of the classifier receives the hidden layer output and obtains the probability distribution of the classification result through the softmax activation function; S54: The output layer of the classifier calculates the cross entropy loss function according to formula (10): (10); in: represents the cross entropy loss function, represents the softmax activation function, is the number of categories, It is The true labels of the categories, It is The probability distribution of the classification results of categories, Indicates The predicted value of each category.
8. The target analysis method based on complex network according to claim 7 is characterized by: In step S6, the weights and biases of the target analysis model based on the complex network are repeatedly updated by using the gradient descent method for multiple rounds, including the following steps: S61: Calculate the classifier output layer gradient according to formula (11): (11); S62: Calculate the error of the hidden layer of the classifier according to formula (12): (12); in: Represents the hidden layer of the classifier No. The error of a neuron, express Tier The input of a neuron, Represents the hidden layer No. Neurons to Tier The connection weights of neurons, Represents the hidden layer No. The input of a neuron, represents the derivative of the activation function; S63: Calculate the gradient of the weight in each layer according to formula (13), and calculate the gradient of the bias in each layer according to formula (14): (13); (14); in: Indicates Layer The neuron and Layer The weights between neurons, Indicates Tier The output of a neuron, Indicates Layer The bias of each neuron; S64: Use the gradient descent method to update the weight according to equation (15), and update the bias according to equation (16): (15); (16); in: represents the learning rate, Indicates the update direction.
9. A target analysis system based on complex network, characterized by: Used to execute a target analysis method based on a complex network as described in any one of claims 1 to 8, which includes a target analysis model based on a complex network, and the target analysis model based on a complex network includes a multi-view construction module, a general graph transformer and a classifier, the multi-view construction module is used to construct an original view, a coarsened view and a line graph conversion view and transmit the constructed original view, coarsened view and line graph conversion view to the general graph transformer, the general graph transformer is used to embed and fuse the original view, coarsened view and line graph conversion view, and input the fused view embedding to the classifier, the classifier is used to process and classify the fused view embedding until an accurate classification result of the target to be analyzed is obtained.
10. A target analysis system based on complex network according to claim 9, characterized in that: The classifier is provided with a multilayer perceptron, which includes an input layer, a hidden layer and an output layer that are fully connected in sequence. The input layer is used to receive the fused view embedding signal transmitted by the general graph transformer and transmit the fused view embedding signal to the hidden layer. The hidden layer performs a linear transformation on the fused view embedding signal through a weight matrix and a bias vector, and then performs a nonlinear transformation on the result of the linear transformation through an activation function to obtain output data of the hidden layer, and transmits the output data of the hidden layer to the output layer. The output layer receives the output data of the hidden layer, obtains the probability distribution of the classification result through the activation function, calculates the cross entropy loss function, and then performs back propagation, and uses the gradient descent method to perform multiple rounds of repeated updates of the weights and biases of the target analysis model based on the complex network until an accurate classification result of the target to be analyzed is obtained.
Citation Information
Cited By
Intelligent logistics conveying system scheduling method based on automatic algorithm
CN121010247A