Towards Optimal Robustness of Network Controllability by Nested-Edge Rectiﬁcation

: When a network is attacked, the network controllability decreases and the network is at risk of collapse. A network with good controllability robustness can better maintain its own controllability while under attack to provide time for network recovery. In order to explore how to build a network with optimal controllability robustness, an exhaustive search with adding edges was executed on a given set of small-sized networks. By exhaustive search, we mean: (1) All possible ways of adding edges, except self-loops, were considered and calculated at the time of adding each edge. (2) All possible node removal sequences were taken into account. The nested ring structure (NRS) was obtained from the result of the exhaustive search. NRS has a backbone ring, and the remaining edges of each node point to the nearest nodes along the direction of the backbone ring’s edges. The NRS satisﬁes an empirically necessary condition (ENC) and has great ability to resist random attacks. Therefore, nested edge rectifcation (NER) was designed to optimize the network for controllability robustness by constructing NRS in networks. NER was compared with the random edge rectiﬁcation (RER) strategy and the unconstrained rewiring (UCR) strategy on synthetic networks and real-world networks by simulation. The simulation results show that NER can better improve the robustness of network’s controllability, and NER can also quickly improve the initial network controllability for networks with more than one driver node. In addition, as NER is executed, NRS gains more edges in the network, so the network has better controllability robustness. NER will be helpful for network model design or network optimization in future.


Introduction
Complex networks have been developed greatly in the past 20 years, and they have become a new discipline involving mathematical science, social science, biological science and other fields [1][2][3][4]. Many natural and artificial systems can be abstracted into complex networks composed of nodes and edges, such as the Internet [5], transportation networks [6] and power networks [7]. The study of network formation, topology, community [8] and synchronization [9] is conducive to understanding the structure and function of a network; and the study of cycle [10,11] is a new direction. The sizes of complex networks have increased dramatically. The graph-query problem on large networks can be solved by query optimization [12]. Deep learning provides a way to evaluate the robustness of large-scale networks [13]. As controlling networks to serve people is one purpose of studying complex networks, whether the network can be controlled is critical, so network controllability has emerged as a key point for complex networks [13][14][15][16][17][18]. Controllability is the ability to guide the network from any initial state to any desired final state in a finite amount of time with appropriate input choices. The ability of complex networks to maintain controllability under attack is called controllability robustness.
For directed networks, the structural controllability of the network can be measured by finding the maximum matching of the network to determine the minimum number of external control inputs that are driver nodes [19]. Finding maximum matching can only be applied to directed networks and is difficult to be applied to large-scale networks. Therefore, the exact controllability framework was proposed, which can be applied to all large-scale sparse networks [20].
There have been many studies on the relationship between the topology and controllability of directed networks. The underlying degree of correlation has a certain effect on network controllability. Clustering coefficient and modularity have no obvious effect on network controllability [21]. When the minimum in-degree and out-degree are both greater than two, random networks with any topology can be controlled by an infinitesimal fraction of driver nodes [14]. Based on the hierarchical structure of the directed network, a random upstream or downstream attack is designed [22]. Compared with an ordinary random attack, this attack strategy is more effective because the upstream and downstream nodes of a randomly selected node have greater chances of being the hub.
There is growing concern about random and malicious attacks on complex networks [19,23]. Random attacks refer to the uniform random selection of attack targets. Malicious attacks choose the most effective targets to attack subjectively. Malicious attacks usually achieve better results than random attacks, but random attacks take less time.
It is necessary to make networks more robust attacks, especially practical networks. For connectivity robustness, a spectral metric is taken as the objective function to optimize connectivity robustness by edge rectification, which keeps the network's degree distribution unchanged after reconnecting edges [24]. A smart rewiring strategy was used to strengthen the connections between adjacent nodes of a hub node to improve the robustness of the network against the degree attack [25]. Onion-shaped networks with better connectivity robustness were obtained through the degree-preserving edge reconnection strategy [26]. There are also studies on optimizing controllability robustness. Bridges are edges which have a significant impact on the controllability of the network after their removal, especially when the average degree of the network is low. The robustness of network controllability can be improved by backing up bridges, and adding edges to eliminate bridges can significantly improve controllability robustness [27]. An empirically necessary condition (ENC) indicates that the maximum and minimum in-degree and out-degree of the optimal network structure should be almost the same, or within a very narrow range; that is, the network should be extremely uniform [28]. Adjusting the network to meet the ENC by reconnecting edges can greatly improve the robustness of network controllability. In addition, networks with better controllability robustness can be constructed. A new complex network model, the q-snapback network, was proposed, which has gppd controllability robustness by using the feedback idea of control theory [29]. The backbone chain is beneficial to the controllability robustness of the q-snapback network, but it affects the flexibility of network construction. Thus, the superior controllability robustness of q-snapback network was improved by redirecting edges [30]. This paper explores a network structure that can enhance the robustness of network controllability against random attacks. In this paper, one edge is added to the original network, and the network with the best controllability robustness after adding the edge is used as the new original network. The nested ring structure (NRS) is obtained by exhaustive search. Then, NRS is constructed by the nested edge rectification (NER) strategy. NER constructs NRS by adjusting the edge of a node with the maximum degree to connect the node to its nearest neighboring node along the direction of the backbone ring each time. If there is no backbone, a backbone is constructed on the network first. Through NER, the heterogeneity of degree is reduced.
The main contributions of the paper are: 1.
Due to the impossibility of theoretical analysis and exhaustive searching for largesized networks, an exhaustive search was executed on feasible small-sized networks, and NRS was obtained. NRS satisfies ENC and has great controllability robustness.

2.
NER is proposed to improve the robustness of the network controllability against random attacks by constructing NRS in the network. Meanwhile, NER can be applied to networks with different scales. In addition, NER constructs a backbone ring through maximum matching, which rapidly improves the initial controllability of networks.

3.
The controllability robustness can be improved on six synthetic networks and realworld networks by NER, and NER is better than other methods of edge rectification. For networks with poor controllability robustness, such as the scale-free network, NER improves controllability robustness more obviously.
The remainder of the paper is structured as follows: Section 2 reviews network controllability and the controllability robustness of complex network. Section 3 introduces the exhaustive search. Section 4 discusses the experimental results. Section 5 presents the conclusions.

Network Controllability and Its Robustness
The robustness of network controllability is mainly concerned with the change in controllability when the network is attacked. Controllability robustness can evaluate the attack effect of the attack mode on the network and the ability of the network to resist the attack. Network controllability is measured by the density of driver nodes n D .
where N D represents the number of driver nodes required to maintain network controllability and N represents the number of network nodes. The minimum value of n D is 1/N, and the maximum value is 1. A smaller value of n D indicates better network controllability, whereas a larger value of n D indicates worse network controllability. A matching is a set of edges that do not share common start nodes or common end nodes. A maximum matching is a matching that contains as many edges as possible and cannot be extended further in the network. The end node of an edge in matching is a matched node; otherwise, it is an unmatched node. According to the minimum-inputs theorem [19], N D can be obtained by the number of unmatched nodes for a directed network: where |E * | is the size of maximum matching. For node attacks, the controllability robustness of the network can be measured by the controllability curve, which is calculated as follows: where N D (i) is the number of driver nodes needed to maintain network controllability after removing i nodes. N is the size of the original network. R N records the change in network controllability after each node is removed. The overall measure of controllability robustness can be obtained by averaging controllability curves, which is calculated as follows: where n D (i) is the structural controllability of the remaining network after i nodes are removed. In addition to the controllability curve, the robustness of network controllability can also be compared by R N . A smaller R N indicates better controllability robustness, whereas a larger R N indicates worse controllability robustness.

Nested Ring Structure and Optimization Strategy
The relationship between network topology and network controllability robustness was explored by observing the adding-edge simulation and attack simulations on a series of small-sized networks. The topology with the best controllability robustness after adding edges can be obtained by exhaustive search. Then, NRS can be obtained by observing the results of the exhaustive search. The NRS has a great ability to resist random attacks and satisfies the ENC. NRS is constructed in the network to improve the controllability robustness of the network under random attacks. Therefore, NER is proposed to construct a NRS in networks.

Nested Ring Structure
An exhaustive search is where all the cases of adding one edge are searched and all the node-removal sequences are considered when calculating the controllability robustness.
(a) Exhaustive adding edge. The ring structure is the network structure that may be built by N nodes and N edges that have the best controllability robustness for directed graphs, as shown in Figure 1a. With the ring structure as the initial network for adding an edge, one edge at a time, then for a network with N nodes and M edges, there are a total of N(N − 1) − M ways to add an edge, without considering the self-loop. Compared to all networks after adding edges, the network with the best controllability robustness is chosen as the next place to add the edge.
(b) Exhaustive attack. For each network, the controllability changes under all conceivable node-removal sequences are taken into account while determining the network controllability robustness. That is, for a network with N nodes, the number of all the node-removal sequences is N!. Each sequence has N − 1 nodes, so there are N! permutations of the controllability curves.

and its robustness is calculated as
The overall controllability robustness is obtained by averaging the N! robustness values: An exhaustive search looks at all node-removal sequences equally. Therefore, when the random attack is repeated enough times, the average result of the exhaustive attacks is equal to the result of the random attacks. The exhaustive method is impossibly applied on the large-sized classical synthetic networks and the real-world networks, so random attacks should be used instead.
In this study, an exhaustive search was performed for networks with N = 5, 6, 7, 8, 9. When N = 8, there are N(N − 1) − N = 48 ways to add one edge based on the ring structure in Figure 1a, without considering the self-loop. Only one equivalent structure was kept, and the final network structure is shown in Figure 1b-g. Among all the network structures, the network structure in Figure 1c has the optimal controllability robustness, and then the next adding edge is based on this network structure. The optimal way to add edges from the exhaustive search is shown in Figure 2. According to the ring structure, for all nodes i = 1, 2, 3, . . . , N, an edge is added from node i to node j, j = (i + r) mod N, where r ∈ [2, N − 1). However, this rule only exists when the average degree of the network is low, so the value of r is far less than N − 1. The finally obtained network structure is named the nested ring structure (NRS). In addition, the structure has strong controllability robustness, since it satisfies ENC. The network structure satisfying ENC is extremely uniform, which states that the maximum and minimum out-degree (in-degree) should be equal or have a difference of 1.  As shown in Figure 3, the network has a NRS after adding a certain number of edges, which requires only one driver node to control the whole network, and the number of driver nodes does not increase immediately when the network suffers from random attacks. It can be seen that the more edges are contained in NRS, the stronger network's controllability robustness under random attacks and the more nodes need to be removed before the number of driver nodes increases from 1 to 2. In NRS, each node has an edge leading from its predecessor node to its successor node, which makes the network have a larger average distance, but at the same time, it makes the network can maintain the backbone ring structure after the node is removed. In Figure 3a, if node 2 is removed, there is still an edge A 13 from its predecessor node 1 to its successor node 3. It implies that the NRS can increase its ability to maintain the backbone ring by having more edges.

Nested Edge Rectification
NRS is a structure with great controllability robustness. NRS is constructed in networks by NER to optimize networks. When NRS is constructed in networks, a backbone is firstly constructed through maximum matching. The subsequent operations to build the NRS are performed on the backbone.
The NER is as follows: Step 1: Whether a backbone ring exists should be determined in the original network G. If so, go to Step 2. If not, look for a kind of maximum matching in network. Delete the edge A ij (node i is the node with the largest out-degree in the network, node j is the node with the largest in-degree among the successors of node i and A ij is not in the maximum matching). Add edge A kl (node k is only the end node of the edge in the maximum matching, and node l is only the start node of the edge in the maximum matching) and run the command N D times.
Step 2: Find the backbone ring in the network G and label the nodes as 1, 2, . . . , N.
Step 3: For node m (m belongs to [1, N]), check whether there is an edge A (m(m+r)) (r belongs to [2, M/N − 1); if not, a backbone is constructed through maximum matching, as shown in Figure 4. Delete edge A ij (node i is the node with the largest out-degree in the network, node j is the node with the largest in-degree in the successor nodes of node i and node j is not i + 1, i + 2, . . . , i + r). Add an edge A (m(m+r)) . Record the number of adding edges and judge whether the number of added edges reaches the preset value; if so, stop, and if not, repeat step 3.
The details of NER execution process are shown in Algorithm 1: for i ← 1 to |STARTNODE| do i ← node with the largest out-degree j ← node with the largest in-degree among the successors of node i delete edge A (i,j) add edge A (STARTNODE(i),STARTNODE(mod(i+1,N))) t ← t + 1 end for Number nodes as 1, 2, . . . N through backbone; end if for r ← 2 to M/N do for m ← 1 to N do if do not exist edge A (m,m+r) then i ← node with the largest out-degree j ← The node with the largest outdegree among the successors of node i is except

Computational Complexity
It is mainly through the Hopcroft-Karp algorithm that the maximum matching is found to determine the starting nodes and ending nodes that are only used as the maximum matching edges. The computational complexity is O(M · √ N), where N is the number of nodes and M is the number of edges. The computational complexity of constructing a backbone is O(N). The computational complexity of constructing a NRS is O(N · M 2 − 2 · N 2 ) by rectifying edges after constructing backbone.

Simulation Results
NER was applied to six synthetic networks and two real-world networks to optimize the controllability robustness of these networks. In order to verify the effectiveness of NER, it is compared with the random edge rectification (RER) strategy and the unconstrained-rewiring (UCR) strategy. This paper mainly explores the influence of NER on the controllability robustness and the changes in network features.

Results on Synthetic Networks
For directed networks, the network size was set to 500, 1000 or 1500. This paper mainly discusses the networks with 1000 nodes. The average degree of the network was set <k> = 4. In order to reduce the influence of randomness, 30 instances were generated for each network, and the values of the controllability robustness of 30 random attacks for each instance were averaged.
As shown in Figure 5, six synthetic networks were used as the initial networks for optimization. For each network, the network optimized by building a NRS in the network through NER had the best controllability robustness compared with UCR-and RER-treated networks. The controllability robustness is shown in Table 1 after performing different types of edge rectification. RER and NER can improve the robustness of the network's controllability more than UCR, and the effect of NER is better than that of RER, especially on SF and QS. Figures A1 and A2 and Tables A1 and A2 in Appendix A show similar effects for networks with 500 and 1500 nodes. Networks had the best controllability robustness after optimization by NER on the six synthetic networks with 500 and 1500 nodes. NER can be applied to networks of different scales, which shows that NER has good scalability.  In Figure 6, each boxplot shows the proportion of nodes that needed to be removed to make the number of driver nodes changed from 1 to 2 when a network obtained by NER or RER on six synthetic networks was subjected to random attacks. For SF and QS, networks obtained by NER obviously needed to remove more nodes than networks obtained by RER to increase the number of driver nodes. After performing the same number of operations, the fewest nodes needed to be removed in SF, and the most nodes needed to be removed in SW, which is also related to the robustness of the original network controllability. The SF needs a considerable number of edge rectification operations to construct the backbone ring. Therefore, when the same number of edge rectification operations is performed, the number of edges of the NRS in the network is much less than those of other networks. QS has a backbone structure, so NRS produced more edges in QS with the same number of operations, which makes QS have a strong ability to resist random attacks.  Figure 6. Ratio of nodes to be removed when the number of driver nodes changes from 1 to 2 on six synthetic networks after 2N NER operations. The blue represents networks after NER, and the red represents networks after RER. "network" represents the types of original networks. P N represents the ratio of nodes to be removed.
In Figure 7, the variation in heterogeneity of out-degree (HO) and that in the heterogeneity of in-degree (HI) during the attack are shown. It can be seen that the heterogeneity of degree gradually increases as the attack goes on. SF has the largest HO and HI of the original networks, and SW has the smallest HO and HI. As the number of NER operations increased, the differences in HI and HO of different networks became smaller. This suggests that networks with lower HO and HI have better controllability robustness. More features of networks are shown in Table 2. In addition to QS, the network obtained by NER had the largest average, the shortest path and the largest medium number. It had the largest clustering coefficient of all networks. RER and NER both reduced the heterogeneity of degree.

Results of Real-World Networks
The real-world networks used by NER were Roget network and ia-email-univ network, and their information is shown in Table 3: Table 3. Parameters of the two real-world networks.

N M
Roget 1022 5075 ia-email-univ 1133 5451 As shown in Figure 8, similarly to the synthetic networks, the controllability robustness of the two networks was improved after NER. Compared with RER and UCR, NER had the best effect on the robustness of network controllability. At the same time, the number of driver nodes of Roget network and ia-email-univ network is not 1. Both NER and RER greatly improved the initial controllability of the networks after 2N operations.

Discussion
RER can adjust the networks to satisfy ENC, so that the networks gradually approach the optimal controllability robustness. NER can build a NRS in networks, and NRS also satisfies the ENC. Take ER with N = 1000 and M = 4000 as an example. As shown in Figure 9, NER is similar to RER: the out-degree distribution is concentrated around M/N with the increase in the number of operations. Unlimited NER and RER operations will make the ER extremely homogeneous. Figure 9. The changes in out-degree distribution under different numbers of iterations for NER and RER. k out represents the out-degree of nodes. P k out represents the proportion of nodes with k out out-degree of all nodes.
NRS is a fixed structure that satisfies ENC. The NRS is shown in Figure 10a, where the edges point to the nearest nodes along the backbone ring direction for each node. The structure satisfying ENC obtained by RER is shown in Figure 10c. Compared with NRS, the edges of each node do not point to a specific node. It can be seen that the NRS constructed by NER is fixed, and the network satisfying ENC by RER may be different. That is because RER randomly selects nodes that make the network not meet ENC and executes edge rectification, and NER selects certain targets. NRS has a backbone ring. For a network which does not have a backbone ring, NER first builds a backbone ring in the network during the execution process. Therefore, NER can make the number of driver nodes of the network become one quickly. For when NER and RER were executed for ER, SF, RT, RR, Roget network and ia-email-univ network, the numbers of executions required to make the number of driver nodes become one are shown in Figure 11. NER requires a much smaller number of executions than RER. NER builds the backbone ring through maximum matching. It only needs to execute N D times to build the backbone ring. The original controllability of networks determines the speed of constructing the backbone in networks through NER during execution. A network with good initial controllability, such as RR, only needs a few operations for the building of a backbone. SF needs more operations for the building of a backbone. Thus, the scale of NRS built by NER in the network is affected. Other effects of network topology on NER need to be further studied.  Figure 11. The number of operations required for NER and RER to make the number of driver nodes one. The times axis represents the number of NER and RER.

Conclusions
This paper explores how to obtain networks with optimal controllability robustness. Based on the exhaustive search results on small-sized networks, the nested ring structure (NRS) was obtained. The NRS satisfies ENC, which means the degree distribution is extremely uniform. NRS has great ability to resist random attacks, and it is easy to be built in networks. Then, the NER was proposed to construct NRS in networks to improve the robustness of network controllability under random attacks. At the same time, the initial controllability of networks is rapidly improved because of the construction of a backbone. However, the topology of networks is changed greatly after NER optimization, and the number of NER operations can be limited in order to make the network have a NRS completely. In addition, the NRS in networks enhances the local connections and increases the clustering coefficient of the network, and reduces the heterogeneity of degree. NRS can provide a reference for the future designing of network models such as power grids, where the unexpected failure of a substation will not affect the transmission of other circuits.
Author Contributions: Z.Y., conceptualization, formal analysis, investigation, methodology, writingoriginal draft preparation; J.N., formal analysis, visualization; J.L., investigation, project administration, supervision. All authors have read and agreed to the published version of the manuscript.