Abstract
Network structure is an important component of analysis in many parts of the natural and social sciences. Optimization of network structure in order to achieve specific goals has been a major research focus. The small-world network is known to have a high average clustering coefficient and a low average path length. Previous studies have introduced a series of models to generate small-world networks, but few focus on how to improve the efficiency of the generating process. In this paper, we propose a genetic simulated annealing (GSA) algorithm to improve the efficiency of transforming other kinds of networks into small-world networks by adding edges, and we apply this algorithm to some experimental systems. In the process of using the GSA algorithm, the existence of hubs and disassortative structure is revealed.
1. Introduction
The small-world phenomenon is receiving much attention in the study of complex systems. Milgram first pointed out the small-world phenomenon by verifying the six-degree separation hypothesis in 1967 [1]. Subsequently, activities such as the game “Six Degrees of Kevin Bacon” [2] or the baseball players’ social network [3] have shown that social networks can have small-world characteristics. Watts and Strögatz proposed a dynamic network model (WS model) to demonstrate the small-world phenomenon [4], namely, in networks with higher average clustering coefficient (ACC) and lower average path length (APL). Since then, a substantial volume of research related to small-world network models has been produced. Since the rewired edges introduced into the dynamic model by the WS model may lead to isolated nodes [4], a model that added shortcut edges was proposed by Watts and Newman [5]. They replaced random reconnection by adding edges randomly, thus avoiding the possibility of generating isolated nodes. Monasson [6] studied the Laplacian operator on “small-world” lattices, which plays an important role in the diffusion of information. In order to solve the problem of redundancy and low efficiency of the network, a direct small-world network model (DSW) was proposed to optimize the network, which could be applied effectively to study dissemination of community information and epidemiological transmission [7]. In these models, the small-world phenomenon lies between the regular network structure and random network structure, and the dynamics that lead to evolution of small-world networks have been explored.
In many real-world fields, including computer science [8], propagation and control of disease [9], transport networks [10], biology [11], brain neurons [12, 13], and sociology [14], small-world networks emerge. The dynamic system model with the small-world property can accelerate the speed of signal transmission and improve computing capacity and computational synchronization. Rumors and epidemics spread more easily in small-world networks than in regular networks. Many well-known biological networks exhibit interconnectedness of small-world network nodes, and this network model can simulate some important properties of neural networks [15]. Li Nan et al. [16] used small-world theory to change the structure of a game network and found that the small-world network had the fastest cooperative convergence and greatest information transmission efficiency. Cowan and Jonard [17] stated that a network structure with lower average path length and higher clustering coefficient is beneficial to knowledge diffusion, which can improve the frequency of knowledge transfer and promote cluster development. These networks have been shown to strongly diffuse information, which has prompted research on how to create small-world networks. Kleinberg [18] proposed a decentralized search model for small-world networks and gave an optimized network description. Inspired by Kleinberg's research [18] on small-world networks, Yang and Wang [19] formulated a decentralized small-world optimization strategy, which has excellent search performance and efficiency. Walsh [20] studied the search problem by a new strategy of randomization and restarts to reduce the cost of solving the problem using graph theory. Schleich et al. [21] focused on vehicular ad hoc networks (VANETs) and proposed a multiobjective algorithm to create the small-world property in unconnected networks, which could find a high-quality solution to a multiobjective optimization problem. Cavalcanti et al. [22] introduced shortcuts in wireless ad hoc networks, analyzed the system from a percolation perspective, and were able to significantly improve connectivity. These studies have improved the efficiency of the generating process to some extent, but the optimization problem in terms of improving the efficiency of transforming other kinds of networks into small-world networks by adding edges has still not been resolved. An efficient optimizing algorithm for improving the small-world property has also not yet been proposed.
In this paper, in order to improve the efficiency of the generating process, we design an optimization model to improve the efficiency of generating networks that have a strong small-world property. This is useful as it correlates with a set of important targets such as improving diffusion efficiency. The rest of the paper is organized as follows. In Section 2, we review previous studies related to constructing or transforming small-world networks and define a synthesized small-world property as our objective function. In Section 3, we propose a genetic algorithm based on simulated annealing to optimize the small-world property. In Section 4, we test the performance of our proposed algorithm in regular networks and random networks. Our conclusions and ideas for further work are presented in Section 5.
2. Related Background
2.1. Evaluation of Optimization Methods
The small-world network structure is intermediate between regular network structure and random network structure. Watts and Strögatz first proposed a dynamic model of small-world network (WS model) [4], in which they randomly reconnected existing edges in a regular network with probability p (0 < p < 1), as shown in Figure 1. This construction generated a graph between regular (p = 0) and random (p = 1). In the process of reconnecting edges, they found an intermediate status that has high ACC, like regular graphs, and low APL, like random graphs, which became known as the “small-world property.” The WS model not only introduces randomness but also introduces long-range connections into the regular network, which can reduce APL and maintain relatively high ACC compared with the original network. However, this model may lead to an unconnected network.

In fact, optimizing the efficiency of the small-world-network-generated involved maximizing the ACC and minimizing the APL. In order to avoid the problem of isolated nodes in the process of rewiring edges, Newman and Watts focused on the dynamic small-world model by adding edges (NW model) [5]. This method takes less time and is linearly related to the number of added edges, but it cannot guarantee the effectiveness of the resulting small-world network when the number of edges is limited. Moreover, the process of adding edges in this model has a random component, and the optimization result is usually unstable.
The greedy algorithm, which adds edges one by one, can be efficient in optimizing the small-world property. In real life, this method has been applied to the optimization of wind [23] and tidal stream resources [24] in order to improve power generation efficiency. The strategy of the greedy algorithm is to add k edges one by one, with each of the added edges giving the maximum small-world property. Compared with the NW model, the greedy algorithm can obtain stable results and improve the efficiency of the generating process. However, some deficiencies of the greedy algorithm need to be acknowledged. First, it traverses the search space for each edge to be added. If k edges are added to a network of size N, the time complexity of the greedy algorithm is O(kN5), which means that maximizing the small-world property suffers from a combinatorial explosion problem. For a network defined as a graph with nodes and the initial number of edges, where represents the set of nodes, there can be ways to add k edges to the network. So if we want to traverse all the solutions, the complexity can be frustrating even for a small network. Second, the greedy algorithm fails to find the global extremum and may have a high probability of falling into a local extremum.
In order to solve these problems, we propose a genetic simulated annealing (GSA) algorithm, which has been widely used and has proved to be effective in solving such combinatorial explosion problems. Simulated annealing (SA) is integrated into a genetic algorithm (GA), which can guarantee the diversity of the population and improve the global search. Combining SA with GA, Sirag et al. used a model of genetic activity based on the Boltzmann distribution to control the rate of population convergence [25]. Boseniuk et al. also combined the two algorithms to solve relevant optimization problems [26]. Some other problems, such as SaaS optimization placement [27], geometric constraint problems [28], and the resource-constrained project scheduling problem (RCPSP) [29] have also been solved by this method.
2.2. The Ideology of the New Algorithm
Watts and Strögatz pointed out that small-world network has the characteristic of relatively low APL, like a random lattice, and relatively high average ACC, like a regular lattice [4]. In this paper, we focus on APL and the average ACC as the main targets to measure the small-world property.
APL is the average shortest distance between all pairs of nodes in the network. For an undirected graph , where represents the number of nodes, represents the initial number of edges, and represents the distance between nodes , is the number of paths of all pairs of nodes in the network. APL can be written as . On the other hand, indicates the level of node aggregation in a graph; of node with neighbors is , where is the number of edges in the relational neighborhood of , and is the number of possible edges in the relational neighborhood of node . is the mean value of the for all nodes in the network; i.e., . Then SW is defined as
We use SW to maximize the small-world property that is defined in (1). It is clear that a greater SW corresponds to a better small-world property. Therefore, SW can be regarded as a standard for evaluating the effectiveness of optimizing methods; i.e., the greater the SW of the optimized network, the better the algorithm performs.
In this paper, we maximize SW by adjusting edges. Generally, a network can be defined as an undirected graph with nodes, the initial number of edges, and the set of nodes. We add k edges to produce a network that gives the maximum SW. The objective function can be formulated asIn (2), SW is the small-world property, and represents the number of edges in the optimal network. To maximize SW, we propose the GSA algorithm in the next section.
3. Algorithm
3.1. Framework
Algorithm 1 gives the framework of the GSA algorithm. We first set the necessary parameters and input the initial network to be optimized. We then start a series of iteration loops. Before the iteration number i reaches Imax, we repeat a process for finding the best solution. In this repeated process, we first calculate the score of population by the objective function in (2); we then select the parent population via seed selection and roulette selection; next, we generate the offspring population by Monte Carlo sampling. When the iteration number i reaches Imax, we output the group of added edges and the optimized network.
|
3.2. Representation and Initialization
The solution can be encoded as a chromosome consisting of sequential numbers and represents the unconnected pairs of nodes. We encrypt all the unconnected edges in the order of the sequential numbers, and the length of a chromosome is equal to the number of added edges in an optimization. Figure 2 shows an illustration of the representation. The second gene of the chromosome changes from 2 to 3, which entails dropping the edge between nodes 1 and 4 and adding a shortcut between nodes 1 and 5. Initially, we generate a population and randomly assign a set of numbers to each gene in the population.

3.3. Natural Selection
Natural selection is divided into seed selection and roulette selection. Seed selection ensures that the best chromosome is selected at each selection event. All population scores are sorted and the best 5% are selected as the seed at each selection. The remaining part is by roulette selection, which is based on the principle of “survival of the fittest”. The higher the chromosome's score, the higher the probability of being selected. This ensures some diversity in the population.
3.4. Genetic Mutation and Simulated Annealing
As shown in Algorithm 2, each gene in the chromosome is mutated at rate Pm. If mutation happens, a new number is selected randomly from encryption to replace the original number. Whether the original number will be replaced or not is decided by the Monte Carlo method: we calculate the score of the original () and the mutant (). If the mutant’s score is higher than the original, then the mutant is accepted instantly; otherwise the mutant is accepted with probability Pa produced according to (3). The temperature will then fall by multiplying the cooling coefficient ( is initialized as 0.98), and this completes one iteration. T is the initial temperature of simulated annealing, which should be 10 times , where = . Here i is the number of the iterations.
|
The advantage of adding simulated annealing to the genetic algorithm is that it may not only prevent the population from falling into a local optimal solution, but also increase the diversity of the population. In addition, without the simulated annealing, the optimization due to the genetic algorithm will be unstable due to the randomness of gene mutation.
3.5. Iteration Loop
The iteration loop in the GSA algorithm is shown in Figure 3. First, we evaluate the population’s fitness with SW. Second, we choose the population by natural selection. Finally, we execute gene mutation, which contains the mechanism of simulated annealing. The annealing temperature is adjusted after each iteration.

4. Experimental Analysis
4.1. Experiment Overview
The experiment was executed on a quad-core laptop (CPU: Intel(R) Core (TM) i7-3537U, 2.50GHz, Memory: 8.00 GB) installed with Windows 10 operating system. We used Python 3.6.3 as our programming language combined with NetworkX. The experiments for each optimization were carried out six times, and we selected the best results and the average results for the different methods. Table 1 shows the parameters used in the experiments.
4.2. Optimization Results on Regular Network and Random Network
4.2.1. Optimization Results for the Small-World Property
In this section, we execute the NW model, the greedy algorithm, and the GSA algorithm in a regular network (the network size is 50 and the average node degree is 4) and a random network (the network size is 50 and the probability of edge creation is 0.1), respectively, to test its performance on different network structures. The SW, assortativity coefficient r, and topological rules are used to measure the performance of different algorithms in the experiments.
The assortativity coefficient r can be formulated [30] aswhere ji, ki are the degrees of the vertices at the ends of the edge. From the analysis, if , the network has assortative structure, which means that large-degree nodes tend to connect with large-degree nodes. If , the network has disassortative structure, which means large-degree nodes tend to connect with small-degree nodes. means there is no correlation between node connectivity properties.
Figure 4 shows the optimization results for three algorithms on the regular network and the random network. The results of the six runs of the greedy algorithm are all the same, so the average and maximum values are the same and their curves overlap in Figure 4. Figure 4(a) also shows a curve labeled “corresponding network,” which is a random network corresponding to the results of conventional network optimization on the regular network. We randomly reconnected all the edges (including both original edges and added edges) of the optimal regular network and the value SW of this reconnected network is represented by the curve. From Figure 4(a), both the regular network and the random network show the same tendency for SW, namely, to increase as the number of added edges k increases. Among the three algorithms, both the mean and the maximum values of the optimal results show that the GSA algorithm performs best and has greater growth than the other two algorithms, while the NW model shows lower efficiency in optimizing SW. In Figure 4(a), the greedy algorithm and the GSA algorithm show relatively steady growth. When the number of added edges , the maximum value of GSA algorithm performs better than the greedy algorithm, while when , the maximum value of GSA algorithm shows stable and significant growth. Similarly, when the number of added edges , the mean value of GSA algorithm has greater growth than the greedy algorithm. Figure 4(b) shows similar results to the regular network for the random network; namely, the NW model shows slow growth, while when , the maximum value of GSA algorithm has faster growth than the greedy algorithm. When , the maximum value of GSA algorithm has a huge increase and when , the mean value of GSA algorithm performs better than the greedy algorithm.

(a)

(b)
4.2.2. The Principle of Hubs
In this section, we explore the topological structures of added edges generated by the three algorithms on the optimized regular network. In Figures 5–7 we see that the NW model, the greedy algorithm, and the GSA algorithm have obvious topological rules, like the Matthew effect [31]. Figure 5 shows the NW model has no rules for adding edges. Figures 6 and 7 show the existence of hubs in the process of adding edges via the greedy algorithm and the GSA algorithm, respectively. Figure 7 shows that all the added edges were connected to the same node via the GSA algorithm when the added edges k is smaller than the network size. Not all the added edges are connected to the same node by the greedy algorithm as shown in Figure 6. Thus, in the process of adding edges the phenomenon of hubs with the GSA algorithm is more apparent than for the greedy algorithm.

(a)

(b)

(c)

(d)

(e)

(f)

(a)

(b)

(c)

(d)

(e)

(f)

(a)

(b)

(c)

(d)

(e)

(f)
From Figures 6 and 7, we see that edges can be added with hubs to obtain the topological structure of the small-world phenomenon in a regular network. This method produces a structure with a higher SW quickly and efficiently. A regular network can be defined as a graph with nodes and initial number of edges, represents the set of nodes. is the original degree of each node. If we add k edges to produce a network with the maximum SW, the function can be formulated as (5) via the GSA algorithm.
4.2.3. Assortativity
In order to determine the structural effect of different algorithms for optimizing SW, we use the assortativity coefficient r [30], which measures the extent of assortative (or disassortative) mixing.
Figure 8 shows the assortativity coefficient r of the optimized regular network and a random network. Both networks show a similar trend. The NW model shows assortative structures while the greedy algorithm and the GSA algorithm show disassortative structure. That is, large-degree nodes tend to connect with small-degree nodes in optimizing the small-world property by the GSA algorithm and the greedy algorithm. Compared with the greedy algorithm, the GSA algorithm shows disassortative structure more clearly. Figure 8(a) shows that the GSA algorithm is more disassortative than the greedy algorithm when k > 2 edges are added to the regular network. Figure 8(b) shows that GSA performs much better when k > 10 on a random network. Especially when k > 36, the GSA algorithm decreases r sharply, leading to significant growth in SW. This also means that the GSA algorithm shows the same principle of hubs as for the regular network when the structure of the random network reaches a certain scale.

(a)

(b)
4.3. Experimental Results on Benchmark Network
In this section, we discuss simulations run on a new computer-generated network, which is an improved network based on the simulation network proposed by Newman [32]. The simulation network is divided into 4 communities and consists of 128 nodes with an average degree of 16. We introduce a parameter to represent the probability of links between different communities; represents the probability of links lying within the same communities.
We use Newman’s modularity Q [32], which measures community structure, to determine whether there is a small-world phenomenon in the network. Q can be formulated asfor a particular division of the network into two communities. The coefficient if node i belongs to community 1, and the coefficient if node j belongs to community 2. Observe that the quantity is 1 if node i and node j are in the same community and 0 otherwise. The coefficient equals 1 if there is a relationship between node i and node j; otherwise, . The sum indicates the degree of node i, and represents the sum of the degrees in the network. Therefore, the larger the modularity Q, the closer the connections within the community, which means the network has more community structure. From Table 2, the original benchmark network has obvious community structure and shows a small-world phenomenon.
In order to measure the topological rules of added edges, we use the formula , where k is the number of added edges and kout is the sum of added edges between communities. From Table 2, the GSA algorithm performs better than the NW model on small-world property SW and modularity Q. Pk shows that GSA tends to connect nodes within the community and has few edges between communities, while the NW model tends to connect randomly, based on the proportion of unconnected edges in the network. This is because the increase in ACC is greater than the decrease in APL when adding edges inside a community, compared with adding edges between communities. Figure 9(c) shows that when the number of added edges is , the sum of added edges between communities equals 1 via the GSA algorithm. It also shows that the GSA algorithm can clearly enhance the small-world phenomenon on benchmark networks.

(a)

(b)

(c)
5. Conclusion
In this paper, we propose a synthesized target SW, which concisely indicates the small-world property. In order to optimize the small-world property, the GSA algorithm is shown to be effective. We explore network topologies to find a principle of adding edges by topological analysis. We exhibit disassortative structure and the clear existence of hubs in the process of adding edges. We also test and verify the efficiency of our algorithm on benchmark networks to explore community structure. Our algorithm performs well in enhancing the small-world status of the original benchmark network. We optimize only one indicator, SW, in this paper, but in many cases, it would be preferred to minimize APL and maximize ACC at the same time. This multiobjective structural optimization should be explored in future work.
Data Availability
The data supporting our results comes from our designed procedure. The procedure code and the final results are included within the Supplementary Material files.
Conflicts of Interest
The authors declare that there are no conflicts of interest regarding the publication of this article.
Acknowledgments
The research was supported by the Key Project from the National Science Foundation of China (Grant No. 12AZD110), the Humanities and Social Science Talent Plan, and the Morrison Institute for Population and Resource Studies at Stanford.
Supplementary Materials
A concise description of each supplementary material file is listed in Table 1. The folder “code” contains the source code of three algorithms used in the paper. The folder “results of data” contains all the results of running the program. Specifically, it includes experimental results from running on regular networks, random networks, and benchmark networks, as well as all the topological graphs from running the regular networks via three algorithms. (Supplementary Materials)