A complex network edge expansion method based on deep reinforcement learning
By combining deep reinforcement learning methods such as MPNN and DQN, the agent learns the topology in complex networks and generates optimal edge expansion decisions, solving the robustness problem of complex networks under cascading failures and achieving rapid expansion and improved generalization performance.
Patent Information
- Application Number
- CN202311692690.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-12-11
- Publication Date
- 2026-11-27
- Estimated Expiration
- 2043-12-11
AI Technical Summary
Existing technologies struggle to effectively extend edges in complex networks to improve robustness and prevent large-scale collapses caused by cascading failures. Furthermore, traditional methods require repeated training on different networks, resulting in insufficient generalization performance.
By combining message passing neural networks (MPNN) and deep Q-learning (DQN), and using deep reinforcement learning methods, the agent learns the topology in complex networks, generates optimal edge expansion decisions, uses MPNN to learn network features, and uses DQN for reward feedback and policy updates, thereby achieving rapid network expansion and improved robustness.
It effectively improves the robustness of complex networks under cascading failures, can adapt to various application scenarios, has good generalization performance, reduces the need for repeated training, and improves training stability.
Smart Images

Figure CN117914722B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of complex networks, specifically relating to a method for edge expansion of complex networks based on deep reinforcement learning. Background Technology
[0002] With the development of modern society, the operation of human society largely depends on various infrastructure systems, such as the Internet, power grids, and transportation networks. Devices in these networks are abstracted as nodes, and the connections between them are considered edges. These edges and nodes represent corresponding functions. In short-path networks, information propagation often follows the shortest path, such as the amount of information on the Internet, the water flow in a water supply network, and the traffic flow in a transportation network. This information is transmitted between two points in the network according to the shortest path, inevitably leading to some nodes becoming hubs for others; these hubs are called critical nodes. However, these critical network nodes often have a certain carrying capacity. When a node cannot forward the corresponding traffic, it causes node failure, leading to network system malfunction. Due to the interconnectedness of the network structure and the coupling of network functions, the network traffic after the failure is redistributed; traffic that should have passed through some nodes passes through other nodes instead. This process is called load redistribution. If a new network, such as a maximum connected subgraph, still has failed nodes or edges after load redistribution, the above steps will repeat until the network is balanced and there are no failed edges or nodes. This propagation phenomenon, from local to global, is called cascading failure. Cascading failures can lead to large-scale collapses and severe economic consequences; for example, a local power outage can lead to a widespread power outage. Due to the needs of social development, the scale of infrastructure networks is constantly expanding, and their topologies are becoming more complex. The consequences of deliberate attacks and random failures on expanded networks may be more severe; that is, damage to some nodes in the network may lead to larger-scale network collapses and worse economic losses. Therefore, it is now crucial to propose a network expansion strategy that is robust to network attacks.
[0003] Current methods for analyzing the robustness of complex networks mainly focus on load distribution and network structure. However, the robustness of a network can change as the number of nodes and edges increases. Since many real-world networks inevitably experience continuous growth, it is crucial to ensure network robustness from the outset, rather than modifying it afterward. Therefore, we investigate robustness expansion of networks using deep reinforcement learning. By adding edges to the network, we alter its topology, thereby distributing traffic across less stressed nodes and preventing excessive traffic congestion at those nodes. This protects critical nodes and reduces the likelihood of network failure. However, effectively expanding the edges in a network is a very challenging problem. Summary of the Invention
[0004] To address the aforementioned problems, the present invention aims to provide a method for edge extension of complex networks based on deep reinforcement learning, which enhances the robustness of complex networks against cascading failures, enables rapid learning of the optimal strategy in practical application scenarios, improves training stability, and achieves effective extension of complex networks.
[0005] The specific technical solution for achieving the objective of this invention is as follows:
[0006] A method for edge expansion of complex networks based on deep reinforcement learning includes the following steps:
[0007] Step 1: Initialize the complex network model, the cascading fault model, and the agent;
[0008] Step 2: The agent acquires node characteristics in a complex network environment;
[0009] Step 3: The agent generates initial action decisions based on the target policy network;
[0010] Step 4: The complex network environment changes based on the action decisions made in Step 3, and the reward is returned to the agent;
[0011] Step 5: Save the motion trajectory to the experience pool. If the network update conditions are not met after the current time slot ends, return to step 2; otherwise, proceed to step 6.
[0012] Step 6: Sample trajectories from the experience pool and update the target policy network and policy generation network using stochastic gradient descent. If the time limit has not been reached, return to step 2; otherwise, proceed to step 7.
[0013] Step 7: Generate a network based on the updated policy, the agent generates the optimal decision, and expands the complex network edges based on the decision.
[0014] Compared with the prior art, the beneficial effects of the present invention are as follows:
[0015] (1) The solution of the present invention effectively combines MPNN and DQN in the edge expansion problem of the network, so that the agent can learn the topology of the network more effectively, make excellent edge expansion decisions, and effectively improve the robustness of complex networks under cascading failures.
[0016] (2) Compared with traditional DQN, this invention does not require repeated training on different networks, so it can be applied to more application scenarios and has good generalization performance.
[0017] The present invention will be further described below with reference to specific embodiments. Attached Figure Description
[0018] Figure 1 This is a schematic diagram of the process of the complex network edge expansion method based on deep reinforcement learning of the present invention.
[0019] Figure 2 This is a schematic diagram of a complex network topology in an embodiment of the present invention.
[0020] Figure 3 This is a comparison chart of the robustness of different extension methods under different fault tolerance parameters in the embodiments of the present invention.
[0021] Figure 4 This is a comparison diagram of the robustness of different expansion methods under different numbers of expansion edges in the embodiments of the present invention.
[0022] Figure 5 This is a comparison chart showing the robustness of different extension methods in different networks according to embodiments of the present invention. Detailed Implementation
[0023] Combination Figure 1 A method for edge expansion of complex networks based on deep reinforcement learning includes the following steps:
[0024] Step 1: Initialize the complex network model, the cascading fault model, and the agent, specifically:
[0025] Given a network G = (V, E), where V represents the set of nodes and E represents the set of edges, with the total number of nodes and edges being N and M respectively, to illustrate the impact of network topology on cascading failures, it is assumed that data packets are transmitted along the shortest path at each time step. Therefore, the load on nodes at the initial time step is estimated using the betweenness centrality of the nodes. Then:
[0026]
[0027] The capacity of a node is the maximum load it can handle; the node's capacity C... i and the load L of the node at the initial timei (0) Proportional:
[0028] C i = (1+α)×L i (0)
[0029] In the model, considering the relationship between network topology and network robustness, a local flow redistribution principle is adopted, and the worst-case scenario is taken into account. This means that if the highest-loaded node, representing a certain proportion r (0≤r≤1), fails initially, the load of the failed node is redirected to its non-faulty neighbors:
[0030]
[0031] in, θ represents the number of shortest paths between nodes s and t, passing through node i. st C represents the number of shortest paths between nodes s and t. i L represents the capacity of node i, α is the fault tolerance parameter, and the larger the value of the fault tolerance parameter α is set, the stronger the network's ability to resist interference. i (0) represents the load of the node at the initial time, α≥0, Δ j This indicates that the load migration received by neighbor node j from the damaged node i, L i (t) represents the load of the faulty node i at time t, Ω i (t) represents the neighboring nodes of node i at time t;
[0032] The cascading fault model is as follows:
[0033] First, initialize the network by calculating the load and capacity of the nodes based on betweenness centrality.
[0034] Then, the set of points with the highest load in the network, where the proportion is r and 0≤r≤1, is selected as the set of fault nodes;
[0035] Remove nodes from the fault set in sequence, update the network topology, distribute the load of the faulty nodes to the non-faulty nodes in the neighbors, recalculate the load distribution of the network, and if the load of any node in the network exceeds the capacity, add the node to the faulty node set. Repeat the above steps until no new faults occur.
[0036] Meanwhile, the robustness of complex networks under cascading failures is demonstrated using a relative size δ. n To conduct an evaluation.
[0037] δ n =N ′ / N
[0038] Where N′ represents the maximum connected component in the entire network after cascading failures; N represents the maximum connected component size in the initial state of the network.
[0039] Step 2: The agent acquires node features in a complex network environment.
[0040] The characteristics of each node in a complex network are: L represents the state of node i during period t, where L i C represents the load of this node in the current period. i D represents the capacity of a node. i This represents the degree of a node.
[0041] An intelligent agent obtains the features s = {h1, h2, ..., h} of all nodes in a complex network topology. N}, which serves as the input information for MPNN.
[0042] MPNN uses graph convolution as a message-passing process, directly generating information between nodes. The forward pass in MPNN has two phases: message passing and readout. In the message passing phase, the message function is defined as m, the node update function is defined as u, and t is the time step.
[0043] During message passing, the characteristics of all neighboring nodes of node v are first aggregated through the message aggregation function m.
[0044]
[0045] Where N(v) represents the set of neighboring nodes of node v. This represents an intermediate state, and then the state of node v is updated using the update function u.
[0046]
[0047] Through k-theory message passing and state updates, each node aggregates the feature information of its k-order neighbor nodes.
[0048] Finally, during the readout phase, the feature vector of the entire image after information aggregation is calculated using the R function.
[0049]
[0050] Where V represents the set of nodes along the route, and the calculated result y is the value of the current action predicted by MPNN. The agent makes routing decisions based on this information.
[0051] Step 3: The agent generates initial action decisions based on the target policy network.
[0052] At time t, the agent observes the environmental state s. t The adversarial network will score all possible actions, and the agent will select action a from these scores using the ∈-greedy selection method. t The ∈-greedy strategy can fully explore unknown actions and utilize the optimal actions that have already been learned.
[0053] Step 4: The complex network environment changes based on the action decisions made in Step 3, and a reward is returned to the agent.
[0054] At time step t, the agent takes action a. t Afterwards, complex network environments from s t Evolved into S t+1 Using r t To evaluate action a t In the effect of edge expansion, r t The magnitude of this value reflects the extent to which the decision alters the network's robustness, and also plays a crucial role in preventing routing loops.
[0055]
[0056] Among them G t This indicates that the agent takes action a. t =e i Afterwards, the maximum connected component size of the network after cascading failures, if e i If ∈E, it indicates the presence of a loop; the reward value is set to the minimum value -1 to reduce the probability of the loop occurring. Given a normal reward value, the agent's goal is to maximize the cumulative reward. Where T is the upper limit of the number of training steps.
[0057] Step 5: Save the motion trajectory to the experience pool. If the network update conditions are not met after the current time slot ends, return to step 2; otherwise, proceed to step 6.
[0058] The action trajectory is defined as follows: after time step t, the trajectory (s) obtained by the agent is... t ,a t ,r t ,s t+1 Store it in experience pool D.
[0059] Step 6: Sample trajectories from the experience pool and update the target policy network and policy generation network using stochastic gradient descent. If the time limit has not been reached, return to step 2; otherwise, proceed to step 7.
[0060] By using stochastic gradient descent, the loss function is minimized using mini-batch samples extracted from the experience pool, thereby updating the target policy network and the policy generation network.
[0061] If the probability distribution of samples drawn from the experience pool D is uniformly U(D), then the loss function obtained in the t-th iteration during training is as follows:
[0062]
[0063] y t =r t +γmaxQ(s t ,a t ;θ - )
[0064] Among them, y t Represents the target value, θ - Let θ be the parameters of the target policy network and θ be the parameters of the policy generation network. While updating the policy generation network parameters via gradient descent, the parameters of the target policy network are temporarily frozen.
[0065] Using experience pools and Double-DQN techniques effectively improves the stability and performance of the DQN algorithm.
[0066] Step 7: Generate a network based on the updated policy, the agent generates the optimal decision, and expands the complex network edges based on the decision.
[0067] A complex network edge extension system based on deep reinforcement learning includes the following modules:
[0068] Initialization module: Used to initialize complex network models, cascading fault models, and intelligent agents;
[0069] Feature acquisition module: used by the agent to acquire node features in complex network environments;
[0070] Decision generation module: The agent generates action decisions based on the target policy network;
[0071] Network update module: When the complex network environment changes based on action decisions, it returns rewards to the agent and iteratively updates the target policy network and policy generation network;
[0072] Edge extension module: Used to generate the network based on the updated policy, the agent generates the optimal decision, and performs complex network edge extension based on the decision.
[0073] A computer device includes a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor, when executing the computer program, performs the following steps:
[0074] Step 1: Initialize the complex network model, the cascading fault model, and the agent;
[0075] Step 2: The agent acquires node characteristics in a complex network environment;
[0076] Step 3: The agent generates initial action decisions based on the target policy network;
[0077] Step 4: The complex network environment changes based on the action decisions made in Step 3, and the reward is returned to the agent;
[0078] Step 5: Save the motion trajectory to the experience pool. If the network update conditions are not met after the current time slot ends, return to step 2; otherwise, proceed to step 6.
[0079] Step 6: Sample trajectories from the experience pool and update the target policy network and policy generation network using stochastic gradient descent. If the time limit has not been reached, return to step 2; otherwise, proceed to step 7.
[0080] Step 7: Generate a network based on the updated policy, the agent generates the optimal decision, and expands the complex network edges based on the decision.
[0081] A computer-storable medium having a computer program stored thereon, the computer program performing the following steps when executed by a processor:
[0082] Step 1: Initialize the complex network model, the cascading fault model, and the agent;
[0083] Step 2: The agent acquires node characteristics in a complex network environment;
[0084] Step 3: The agent generates initial action decisions based on the target policy network;
[0085] Step 4: The complex network environment changes based on the action decisions made in Step 3, and the reward is returned to the agent;
[0086] Step 5: Save the motion trajectory to the experience pool. If the network update conditions are not met after the current time slot ends, return to step 2; otherwise, proceed to step 6.
[0087] Step 6: Sample trajectories from the experience pool and update the target policy network and policy generation network using stochastic gradient descent. If the time limit has not been reached, return to step 2; otherwise, proceed to step 7.
[0088] Step 7: Generate a network based on the updated policy, the agent generates the optimal decision, and expands the complex network edges based on the decision.
[0089] Example
[0090] The simulation platform in this embodiment runs on the Windows 10 operating system, and the algorithm is implemented using Python 3.7. The main parameters set by MPNN-DQN during the experiment are shown in Table 1.
[0091] To test the performance of MPNN-DQN, this embodiment was tested on a BA network with 100 nodes, and the network topology is as follows: Figure 2 As shown.
[0092] Based on the network topology, calculate all shortest paths for each type of undirected weighted graph. Then, calculate the initial load and processing capacity of each node i based on these shortest paths. The processing capacity of node i is C i = (1+α)×L i (0), where α is the tolerance parameter used to control the processing capacity of the node.
[0093] The attack targets the node with the highest load in the network, causing a cascading failure. A relative size δ is used. n =N′ / N is used to measure the robustness of complex networks under cascading failures.
[0094] Table 1 Main parameters of MPNN-DQN
[0095] parameter Value k-order neighbors 3 Learning rate α 0.0001 Reward decay factor γ 0.9 MemorySize 4000 BatchSize 32
[0096] like Figure 3 As shown, edge expansion is performed on the BA network, with 10 edges added. The network is then explored and trained until convergence. The robustness of the expansion between MPNN-DQN and traditional DQN is compared under different fault tolerance parameters α. Experimental results show that with a small fault tolerance parameter α, the entire network is fragile, and failure of key nodes can lead to network paralysis. As the fault tolerance parameter α increases, the robustness of the entire network under cascading failures also increases.
[0097] The MPNN-DQN method outperforms the DQN method in robustness to cascading failures across the entire network under different fault tolerance parameters. This is because MPNN effectively learns the dynamically changing network topology and utilizes DQN for decision generation, making appropriate decisions and thus better learning the network topology structure. In contrast, the DQN method employs a purely data-driven approach without any prior knowledge, requiring extensive experimentation and error training to achieve better decision-making.
[0098] Figure 4 , Figure 5This demonstrates the performance of MPNN-DQN and traditional DQN trained on a BA network, and shows their effectiveness tested on both the original BA network and the novel BA network. In each graph, the horizontal axis represents the number of edges in the network expansion, and the vertical axis represents the robustness to load attacks under the current attack ratio.
[0099] from Figure 4 As can be seen, the overall expansion trend is that the robustness of the network improves compared to the initial time step as the number of expanded edges increases. In most cases, the robustness of the network expanded by MPNN-DQN is significantly better than that of the traditional DQN method.
[0100] Figure 5 This paper demonstrates the performance of MPNN-DQN and DQN methods trained on a BA network and tested on a novel BA network. Experimental results show that on the new network topology, the traditional DQN method experiences some performance degradation compared to the original topology, but the MPNN-DQN method still performs excellently. This demonstrates that MPNN can fully learn the network topology and make effective decisions even when the network topology changes dynamically, thereby improving the network's robustness.
[0101] In summary, this invention effectively combines MPNN and DQN. MPNN is used to effectively learn dynamically changing network topologies, while DQN makes appropriate edge expansion decisions. This significantly improves the robustness of complex networks under cascading failures and allows for adaptation to dynamically changing network structures. Therefore, this invention is suitable for edge expansion tasks in complex networks.
[0102] The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are relatively specific and detailed, they should not be construed as limiting the scope of the invention patent. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this patent application should be determined by the appended claims.
Claims
1. A method for edge expansion of complex networks based on deep reinforcement learning, characterized in that, Includes the following steps: Step 1: Initialize the complex network model, the cascading fault model, and the agent; Step 2: The agent acquires node characteristics in a complex network environment; Step 3: The agent generates initial action decisions based on the target policy network; Step 4: The complex network environment changes based on the action decisions made in Step 3, and a reward is returned to the agent: At time step t, the agent takes an action. Subsequently, complex network environments from Evolved into ,use To evaluate the action The effect of edge expansion, The magnitude reflects the degree to which this decision alters the network's robustness: ; in This indicates that the agent takes an action. Afterwards, the maximum connected component size of the network after cascading failures, if If this indicates a loop has occurred, the reward value is set to the minimum value -1 to reduce the probability of the loop occurring; if Given a normal reward value, the agent's goal is to maximize the cumulative reward. Where T is the upper limit of the number of training steps, Indicates the reward decay factor; Step 5: Save the motion trajectory to the experience pool. If the network update conditions are not met after the current time slot ends, return to step 2; otherwise, proceed to step 6. The trajectory of the action is as follows: After time step t, the trajectory obtained by the agent Store in experience pool D; Step 6: Sample trajectories from the experience pool and update the target policy network and policy generation network using stochastic gradient descent. If the time limit has not been reached, return to step 2; otherwise, proceed to step 7. By using stochastic gradient descent, the loss function is minimized using mini-batch samples extracted from the experience pool, thereby updating the target policy network and the policy generation network. From the experience pool If the probability distribution of the samples drawn from the dataset is a uniform U(D), then the loss function obtained in the t-th iteration during training is as follows: ; ; in, Indicates the target value. For the parameters of the target policy network, Generate network parameters for the strategy; Step 7: Generate a network based on the updated policy, the agent generates the optimal decision, and expands the complex network edges based on the decision.
2. The method for edge expansion of complex networks based on deep reinforcement learning according to claim 1, characterized in that, The complex network model and cascading fault model in step 1 are as follows: Given a network , Represents a set of nodes. Let the set of edges represent the total number of nodes and edges. and ,but: ; ; ; in, Indicates at node and Between them, through nodes The number of shortest paths, Represents a node and The number of shortest paths between them. Represents a node capacity, It is a fault tolerance parameter. This represents the load of the node at the initial moment. , Representing neighboring nodes Received from the damaged node Load migration, Let represent the load of the faulty node i at time t. This represents the neighboring nodes of node i at time t; The cascading fault model is as follows: First, initialize the network by calculating the load and capacity of the nodes using betweenness centrality. Next, select the proportion in the network. The set of points with the highest load is set as the fault node set; Remove nodes from the fault set in sequence, update the network topology, distribute the load of the faulty nodes to the non-faulty nodes in the neighbors, recalculate the load distribution of the network, and if the load of any node in the network exceeds the capacity, add the node to the faulty node set. Repeat the above steps until no new faults occur. Meanwhile, the robustness of complex networks under cascading failures is assessed using relative size. To conduct an assessment: ; in This represents the largest connected component in the entire network after a cascading failure. This represents the maximum size of the connected components in the initial state of the network.
3. The method for edge expansion of complex networks based on deep reinforcement learning according to claim 1, characterized in that, The agent initialization in step 1 specifically involves: Initial capacity is The experience pool D uses random weights. Initialize the policy generation network and the target policy network, and set their weights. This completes the initialization of the agent.
4. The method for edge expansion of complex networks based on deep reinforcement learning according to claim 1, characterized in that, The step 2 of obtaining node features in the environment specifically involves: The characteristics of each node in a complex network are: , representing the state of node i in period t, where, This indicates the load of the node during the current period. Indicates the capacity of the node. Indicates the degree of a node; An intelligent agent acquires the features of all nodes in a complex network topology. .
5. A complex network edge extension system based on deep reinforcement learning, used to execute the method of claim 1, characterized in that, Includes the following modules: Initialization module: Used to initialize complex network models, cascading fault models, and intelligent agents; Feature acquisition module: used by the agent to acquire node features in complex network environments; Decision generation module: The agent generates action decisions based on the target policy network; Network update module: When the complex network environment changes based on action decisions, it returns rewards to the agent and iteratively updates the target policy network and policy generation network; Edge extension module: Used to generate the network based on the updated policy, the agent generates the optimal decision, and performs complex network edge extension based on the decision.
6. A computer device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1-4.
7. A computer-storable medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1-4.
