Dynamical Recovery of Complex Networks under a Localised Attack

: In real systems, some damaged nodes can spontaneously become active again when recovered from themselves or their active neighbours. However, the spontaneous dynamical recovery of complex networks that suffer a local failure has not yet been taken into consideration. To model this recovery process, we develop a framework to study the resilience behaviours of the network under a localised attack (LA). Since the nodes’ state within the network affects the subsequent dynamic evolution, we study the dynamic behaviours of local failure propagation and node recoveries based on this memory characteristic. It can be found that the fraction of active nodes switches back and forth between high network activity and low network activity, which leads to the spontaneous emergence of phase-ﬂipping phenomena. These behaviours can be found in a random regular network, Erd˝os-R´ e nyi network and Scale-free network, which shows that these three types of networks have the same or different resilience behaviours under an LA and random attack. These results will be helpful for studying the spontaneous recovery real systems under an LA. Our work provides insight into understanding the recovery process and a protection strategy of various complex systems from the perspective of damaged memory. phase-ﬂipping phenomena and the proportion of the active nodes that switch back and forth between high network activity and low network activity. We also ﬁnd that a strong hysteresis behaviour exists analogous to phase transitions near a critical point for these networks. Additionally, the results also imply that the system resilience mainly depends on the proportion of internally failed nodes for both attacking strategies. These ﬁndings show a potential application for repairing damaged real systems. The code has been shared in GitHub, and the link is accessed on 1 August 2021.


Introduction
Network science has attracted a lot of attention, and it can map the actual system into a network by treating individuals/entities as nodes and the relationship between individuals as edges [1][2][3]. There is much interest in the question of how to keep the resilience of a system after node or link failures. Previous studies mainly focused on the network structures [3][4][5][6][7], network dynamics [8][9][10][11], and failure mechanisms [12][13][14][15]. Most research on the network assumes that the network is static, while many real systems dynamically evolve. For example, traffic networks with flow changes over time [16], while friendship networks decreased in size with time increasing [17]. For some systems in real-world scenarios, after the collapse, they can spontaneously recover. For example, the transportation network returned to normal after a period of congestion. Additionally, the financial network may recover after most of its components fail from a financial crisis. To model these actual phenomena, Majdandzic et al. [12] developed a framework for understanding dynamic networks based on the node recovery process and found that they can lead to the spontaneous emergence of macroscopic phase-flipping phenomena. Based on this, the model is developed for interacting dynamical networks and shows a very rich phase diagram [14]. After that, the research on recovery networks became an important research topic and has been paid extensive close attention [18][19][20]. For example, Shang proposed the recovery strategy for complex networks under random failures by considering that a fraction of the failed nodes are localised and recovered [21].
However, most researches did not consider the dynamical recovery impact of different failure mechanisms and only studied the network under random failures. In real life, some natural disasters, such as earthquakes, floods, or military attacks on infrastructure networks, often spread from one node to the surroundings in turn [22]. This failure mechanism is named a localised attack (LA) [22,23]. The main difference between an LA and random failure (RA) is that the former is only limited to a local area, while the latter is distributed throughout the whole network. This localised attack on some networks is more destructive than random failure [24,25] because a cluster of nodes failing can trigger an avalanche. Previous studies mainly focused on static networks and did not consider dynamic networks under such failure. However, in real scenarios, such transient dynamics, such as failure propagation, and the recovery process take place by turn after suffering initial failure. Therefore, it is interesting and of practical application to study how to enhance the resilience of dynamic networks against localised attacks based on dynamical recovery.
In this paper, the recovery model is based on three fundamental assumptions: (i) internal failure is independent of the neighbourhood, (ii) external failure is induced by failed neighbouring nodes if their number exceeds a threshold, and (iii) the implementation of spontaneous recovery after a period of time. Here, we mainly focus on the resilience behaviours through the above local failure propagation and recovery strategy.

Model and Results
Here, we assume that the p fraction of nodes subject to localised failure at each time, which means that these inactive p · N nodes are independent of other inactive nodes. This is assumed as the internal failure, and the external failure is dependent on nodes' active neighbours. For the case of external failure, we assume that if a node i has no more than m active neighbours, it will fail with probability r. Meanwhile, different from the normal dynamics, the inactive nodes suffering internal or external failure will spontaneously conduct internal or external recovery after a period of time τ or τ . For example, an ecological network is damaged by extreme weather (internal failure) and influences deterioration of the surrounding environment (external failure). Additionally, the inactive nodes triggered by different failure mechanisms will have different internal and external recovery times. Imagining that on each failed node, a small clock is activated to measure the time l passed since the last failure of the node. As the time l reaches value τ or τ , the node completely internally or externally recovers. The schematic illustration is shown in Figure 1, and for simplicity, we set that there will be two nodes internally failing, and m = 1, r = 1, τ = 2, and τ = 1. The network system will go through four procedures, in turn, at each step: internal failure, external failure, internal recover, and external recover. As shown in Figure 1, a blue node represents an active node. A red (Purple) node is in an internal (external) failure state, and the lighter the colour, the larger the l.
We perform numerical simulations for random regular (RR) networks with a Kronecker delta degree distribution (P(k) = δ k,<k> ), Erdős-Rényi (ER) networks with a Poissonian degree distribution (P(k) = e −<k> <k> k k! ) [26], and Scale-Free (SF) networks with a power law degree distribution (P(k) ∼ k −λ ) [27]. Here, < k > is the average degree of the network, and λ is the power law index of SF network. In simulations, without a loss of generality, we adopt the recovery times τ = 100 and τ = 1. In view of the relationship between p and τ in ref. [12], we define the parameter p * = 1 − e −pτ as representing the internally failed nodes. Figure 2 shows a fraction z(t) of the average active nodes for the RR network with an average degree < k >= 10 as a function of t at the same p * but a different dynamic process. We set m = 4, r = 0.78, and a fraction p = 0.3 of nodes are initially localised failure.
Since the system dynamically alternates between localised failure and spontaneous recovery at every step, this dynamic process with memory means the previous stable state will affect the next system state. p * denotes the the average fraction of internally failed nodes, and it can change from 0 to 1 and then turn to change from 0 to 1. Since the initial state under each p * depends on the final stable state of the previous p * , the same p * at a different direction may have a different result. As shown in Figure 2, we simulated the results of the RR network for all p * with a step size of 0.01. In Figure 2a, p * = 0.3 (p * changes from 0 to 1) depends on the final stable state of p * = 0.29, but the second p * = 0.3 (p * changes from 1 to 0) shown in Figure 2b depends on the final stable state of p * = 0.31. The result in this figure shows that the active nodes changed over time in the increasing direction, and the eventually stable fraction is close to 0.69. However, for the decreasing direction, z(t) tends to be stable at around 0.17, and it is very different from the previous one. Due to the memory nature during system failure and recovery, the same p * value at different directions leads to different states, respectively. At time t − 1, after these four steps, the network changed into the fourth network in the first row. Nodes 1 and 3 are suffering internal failure, but node 3 has recovered one time (l = 1), while node 1 just internally failed the last time (l = 0). Additionally, node 2 is suffering an external failure (l = 0). At time t, nodes 4 and 5 are chosen to internally fail, and then nodes 7 and 8 only have one active neighbour, so they externally fail. Node 1, which internally fails at time t − 1, can recover one time (l = 1), and node 3 has achieved l = 2 = τ, so it can be active again, and the edge between nodes 3 and 6 can also be active. Finally, node 2 reaches the time required for external recovery, and it becomes active (l = 1 = τ ). Next time, two nodes will be locally chosen again, and the node still belonging to the internal failure state can fail again, such as node 1 in the first network in the third row since its l changed to 0 again. Then, the process occurs repeatedly. These results highlight that the fraction of active nodes at different failure stages displays a diver's steady state even though all the parameters are the same due to system's damaged memory. In Figure 3a, we show the fraction of the average active nodes z in a steady state as a function of p * at three different r values for the RR network with < k >= 10 and m = 4 under a localised attack. As r = 0.4, the system has weak external failures, and the fraction of average active nodes z shows continuous phase behaviours for the increasing or decreasing directions of p * . As r equals 0.78 or 0.9 with strong external failures, the system z both shows dis-continuous phase behaviours for the increasing or decreasing directions of p * , in which the jump thresholds are different values. The hysteresis shown in Figure 3a is the characteristic feature of a first-order phase transition. Comparing the dynamics under RA (light symbols) and LA (dark symbols), it can easily be found that the critical point of LA is a bit larger than RA, which means that the RR network is more resilient under LA than RA. It is easy to explain because, for LA, only the internal failure nodes on the outer shell of the attacked hole will affect the external failure of nodes, but for RA, all internal failure nodes will affect the remaining active nodes. These results are also consistent with the results of a single static RR network [22]. In order to reduce the impact of the number of nodes, we also compare the average fraction of active nodes z when r = 0.78 under LA, which is shown in Figure 3b. The results imply that the impact of the network's finite size on the RR network is almost negligible, and the jump points are almost the same for different N = 10 3 , 10 4 , 10 5 when r = 0.78. By repeating this procedure for different r values, we obtain the two-parameter (r, p * ) phase diagram shown in Figure 3c. The jump points split the phase diagram into three regions: one is the high-activity region (purple), which means there are more active nodes, the other one is the low-activity region (pink), and the hysteresis region (green) is between the other two regions. One can observe that the initial condition (fraction of failed nodes) determines the final stable state, and if the fraction of failed nodes is smaller than one in the unstable state, the dynamic will reach the high-activity region. However, if there are more failed nodes, it will be easier to reach the low-activity region. Figure 3d compares the dynamic behaviours under RA and LA, and the critical value of an LA is always larger than the one under an RA. Under the same conditions, whether it is a static or a dynamic recovery for the RR network, an LA always makes the network more robust compared to an RA. We also study the resilience of RR with different parameters, as shown in Figure 3d. The system shows more resilience under the LA (dark points) in contrast to RA (light points). In addition, the average degree < k > and the number of active neighbours m both affect the width of the hysteresis region. The larger average degree, the wider the hysteresis region displayed by the system. These results will be helpful for studying the spontaneous recovery in real systems under LA.
Next, the dynamic recovery network in an ER network is studied. Figure 4a shows z as a function of p * , and the results imply that these two simulated results under RA (light symbol) and LA (dark symbol) almost overlap. Similar to the RR network, there also exists discontinuous phase transitions, and the probability of external failure not only affects the value of the critical point but also affects the hysteresis region. We also compare the influence of the size of the ER network in Figure 4b. The fractions of active nodes as r = 0.78 for different N are almost same. As the parameters (r, p * ) change, the different initial node states can evolve into the hysteresis region, as shown in Figure 4c. Not surprisingly, the phase diagrams of the ER network under these two failure mechanisms almost show the same behaviours. This phenomena can also be found in a single static ER network [22].  Scale-free networks also have similar phase transition behaviours, which are shown in Figure 5a-c. However, when the power index is λ = 2.5, the results both show second-order continuous phase transition behaviours under RA and LA. The proportion of internally failed nodes under different failure modes affects the proportion of average active nodes z. As the internally failed nodes become smaller, the network system shows strong resilience under RA (light symbols) than LA (dark symbols). However, as p * increases, the network system under LA shows more resilience than RA. With the increase of λ, there is a firstorder jump phenomenon for larger r values. To compare the influence of the network size, we simulate the SF network with λ = 4.5 and r = 0.78 in Figure 5d. It can be found that there is almost no effect on the jump point. Figure 5e shows the two regions for different λ values. When λ = 2.5, there are no jump points. However, when λ = 3.5, 4.5, they have similar results with RR and ER networks and show the phase-flipping phenomena.

Conclusions
Here, we study the dynamical behaviours of network systems, including RR, ER, and SF networks, by considering the dynamic spontaneous recovery after a more realistic localised attack. After the internal failure, the node also has a probability to become inactive if it does not have enough active neighbours, which is the external failure mechanism. We assume that each node can be active after a certain period of time, if it has failed internally or externally. From comparing with the network under an internally random attack, we found that the RR network was more resilient under an LA than an RA. This is because, under LA, only the outer shell of the attacked hole will affect the external failure rather than the all of the internally failed nodes under RA. For the ER network, it has the same dynamic resilience for both attacking strategies, and this result is the same as the static ER network under these two types of failures [22]. However, for the SF network, it has more resilience under RA and LA for a larger power index. The dynamics of these three networks show both the phase-flipping phenomena and the proportion of the active nodes that switch back and forth between high network activity and low network activity. We also find that a strong hysteresis behaviour exists analogous to phase transitions near a critical point for these networks. Additionally, the results also imply that the system resilience mainly depends on the proportion of internally failed nodes for both attacking strategies. These findings show a potential application for repairing damaged real systems. The code has been shared in GitHub, and the link is https://github.com/wwwfanang/Local-Recovery-Network.git accessed on 1 August 2021.