Abstract
Particle swarm optimization (PSO) as a successful optimization algorithm is widely used in many practical applications due to its advantages in fast convergence speed and convenient implementation. As a population optimization algorithm, the quality of initial population plays an important role in the performance of PSO. However, random initialization is used in population initialization for PSO. Using the solution of the solved problem as prior knowledge will help to improve the quality of the initial population solution. In this paper, we use homotopy analysis method (HAM) to build a bridge between the solved problems and the problems to be solved. Therefore, an improved PSO framework based on HAM, called HAM-PSO, is proposed. The framework of HAM-PSO includes four main processes. It contains obtaining the prior knowledge, constructing homotopy function, generating initial solution and solving the to be solved by PSO. In fact, the framework does not change the PSO, but replaces the random population initialization. The basic PSO algorithm and three others typical PSO algorithms are used to verify the feasibility and effectiveness of this framework. The experimental results show that the four PSO using this framework are better than those without this framework.
Introduction
Swarm intelligent algorithms (SI) have been widely favored by scholars since these techniques simulate various swarm behaviors of natural animals and can achieve superior performances. The core idea of SI is to solve more complicated problems by studying cooperation among individuals with simple actions.
Compared with traditional optimization methods, such as linear programming [1] and dynamic programming [2, 3], SI does not need the gradient information of the objective function, only needs to calculate the value of the objective function, and is easy to implement, which makes it a better choice facing optimization problems. Besides this, SI has also been widely accepted in various fields, including system control [4, 5], system prediction [6, 7] and image detection [8].
Generally speaking, classical SI includes particle swarm optimization (PSO) [9], ant colony optimization [10], artificial bee colony optimization [11], etc. These algorithms have strong robustness and search capabilities, and meanwhile, they are easy to combine with other algorithms to achieve better performance.
As a typical SI optimization method, PSO is proposed by Kennedy and Eberhart based on the group behavior of birds. PSO has the advantages of fewer initial parameters, fast convergence speed, simple algorithm principle and easy implementation. Therefore, it has been widely used in many fields, such as function optimization [12, 13], neural network training [14, 15], and image processing [16], etc. However, the PSO is still far from perfect due to problems like premature convergence, dimensionality disaster, and prone to fall into local optimum. Therefore, many scholars have made substantial contributions to improve PSO after its first proposal in 1995, mainly focus on three perspectives, including parameters and model improvements, combine with other algorithms and topological improvement.
In the line of improvement in parameters and models, Shi [17] introduced a novel variable, namely inertia weight denoted as ω, to balance the search abilities globally and locally. Meanwhile, how to choose values for this parameter is also discussed to get better results. And then, Li [18] proposed a multi-information fusion “triple variables with iteration” inertia weight PSO algorithm (MFTIWPSO). It combines the multi-dimensional information of particle’s time, particle and dimension. Xia [19] transplanted the multi-exemplar and forgetting ability to PSO, and proposed an expanded PSO, called XPSO.
Hybriding PSO with other population-based optimization algorithms also is a popular and useful method. In [20], genetic evolution is used for breeding promising exemplars for PSO, and a novel algorithm termed genetic learning PSO (GL-PSO) is proposed. To solve the problem of real-parameter optimization, ensemble particle swarm optimizer (EPSO) is first addressed [21]. During each iteration, a self-adaptive scheme is employed to identify the top algorithm based on their previous experiences. Introduce tabu detecting, shrinking, and local learning strategies into PSO, DSLPSO is proposed in [22], which combines three strategies simultaneously.
Another type of improved PSO focuses on particle topology modification. In [23], a series of topologies are analyzed and discussed to provide the optimum choice of topology structure for PSO modification. A novel particle communication method for PSO is proposed, and it is termed dynamic topology [24]. In this approach, probabilistic methods are used to choose which particles will communicate and update in every iteration loop. A local optimum topology (LOT) is employed to refine a comprehensive learning particle swarm optimizer (CLPSO), namely, CLPSO-LOT [25]. LOT comprises the local optima that enlarge the particle searching space and increasees the convergence speed with a certain probability.
For PSO algorithms, the choice of the initial population plays an essential role in final optimization performances, since the quality of the initial population will directly affect the optimization speed and the precision of the optimal solution. Generally, there are two main initialization methods for PSO algorithms, including random initialization and prior knowledge-based initialization [26]. Although random initialization is convenient to carry out, but this method has great uncertainty. Therefore, it is difficult to obtain a high-quality initial population, which makes the algorithm easy to converge to a local extremum. Motivated by these drawbacks of random initialization, many scholars have contributed to many approaches to better population initialization. Orthogonal initialization is proposed in [27], which guarantees the diversity of the population. However, its lack of generalization capacity prohibits itself from further applications. To get a more dispersed initial population, a centroidal Voronoi tessellations (CVTs) method is introduced in [28]. In [29], the initial population is divided into two unrelated subpopulations, and each subpopulation solves different optimization problems.
On the other hand, prior knowledge-based initialization usually generates a population with higher quality, resulting in improved performances. However, most of the existing optimization algorithms could not fully use prior knowledge. And therefore, a promising direction is now clear, and it is how to make the most of previous beneficial experience to generate useful initial population, and finally improve existing PSO algorithms.
In the early 1990 s, Liao [30] proposed a homotopy analysis method (HAM) from the perspective of topological homotopy transformation. Inspired by this idea, this paper proposes an improved framework, that is, through HAM learning prior knowledge to help PSO generate a high-quality initial population. Due to the basic PSO and most of the PSO variants use random initialization methods to generate the initial population. Therefore, this improved framework can not only be combined with the basic PSO, but also can be nested with other PSO variants to improve the performance of the algorithm. This paper focuses on analysing the improvement effect of HAM on basic PSO through HAM-PSO, and then verifies the effectiveness of HAM as an improvement framework through the combination of HAM and other PSO variants.
The remains of this paper are organized as follows. In Section 2, background knowledge of basic PSO and HAM are briefly reviewed. In Section 3, the proposed HAM based basic PSO algorithm, namely HAM-PSO, is adequately addressed. The Section 4 is experimental comparison and analysis of experimental results. The conclusion is drawn in Section 5.
Background
Basic PSO
Basic PSO is proposed by imitating group behaviors of birds’ swarm in predation. In the search space of basic PSO, each solution searcher termed a particle is just like a bird looking for food, and each particle has a fitness value, which is determined by the function to be optimized. Moreover, particles also have independent velocity and position information, which could determine their search direction and distance in each iteration.
Generally, at first, basic PSO initializes a group of particles with random, and then during each iteration, particles will update themselves by two information, which are the personal historical best position and the global historical best position, termed pbest and gbest, respectively.
The particle with index i has velocity information and position information of its own, denoted as D-dimensional vector v i = (vi1, vi2, ⋯ , v iD ) T and x i = (xi1, xi2, ⋯ , x iD ) T, accordingly, which could be updated through formulas below
Each particle will have a position limit [Xmin, Xmax] and a speed limit [Vmin, Vmax], which means particles will be forced back to these boundaries if their positions or speeds go beyond limits after updating.
The basic PSO pseudocode is listed in Algorithm 1.
HAM, as a powerful tool of modern mathematics, could be depicted through a homotopy function H (x, s) defined as follows
It can be found from Equation (3) that H (x, 0) = F (x) and H (x, 1) = G (x), which means function H (x, s) connects the two homotopy mapping functions F(x) and G(x) via a changing s. Therefore, based on the theory of homotopy, F(x) and G(x) are homotopy.
When s changes in [0,1], H (x, s) constitutes a group of homotopy functions, and the solution of each homotopy function constitutes a homotopy curve. In this way, starting from the initial model F(x), the solution of the target function G(x) can be obtained along the homotopy curve. That is, as s changes from 0 to 1, H (x, s) gradually transitions from F(x) to G(x). Therefore, the solution of the function F(x) needs to be known or easy to solve. Start with a simpler function F(x), first find the solution to this problem, then proceed from it step by step, and finally get the solution of G(x). In this paper, the problem with good PSO optimization effect is taken as F(x), the purpose is to find the solution to the complex problem G(x).
In this section, taking basic PSO as example, the framework of HAM-PSO is proposed to solve global numerical optimization. Using the HAM, solutions to unknown problems may be found through the information on the solved ones. With the help of prior knowledge, HAM will provide PSO with a better initial population. The main procedures of HAM-PSO can be described step by step as follows.
Step 1. Obtain the prior knowledge of G(x) based on solved problem of F(x).
Employ the PSO and find the optimal solution population XN×D of N solutions with D dimensions after the optimal solution to the starting function F(x) is found. XN×D can be provided as prior knowledge to find solutions to G(x) as long as G(x) and F(x) share the same dimension.
Step 2. Constructing the homotopy function.
Based on Equation (3), the relationship between the two functions F(x) and G(x) is established. Here, different F(x) can be selected according to the type of function to be solved to provide a prior knowledge. The function G(x) to be solved can also be determined according to the type of F(x).
Step 3. Generating new initial population for G(x) through the homotopy process.
Feeding XN×D to H (x, s), a new homotopy solution population matrix YN×D for G(x) is generated after N times iterations. However, there is no guarantee that solution after each iteration is better than that of the last round due to lack of gradient information, which motivates us to employ beetle antennae search (BAS) [31] to keep the more accurate solution while abandoning others. BAS is a state-of-the-art intelligent optimization algorithm, which simulate the foraging behavior of a beetle to search the optimal solutions of a function. Each solution in XN×D could be regarded as a beetle, and BAS will push XN×D towards the optimal solutions of H (x, s) through each iteration. When s reaches 1 in the last iteration, i.e. H (x, s) = G (x), YN×D is finally decided through updating of XN×D.
It should be noted in Step 3 that since F(x) and G(x)may have different search spaces, the definition domain needs to be normalized in the homotopy process.
Step 3 could be described in pseudo code as Algorithm 2.
The homotopy solution population YN×D will be used as the starting point for the optimization of the target function G(x) for subsequent optimi-zation.
Step 4. Using the homotopy solution population to optimize the target function G(x).
Unlike PSO, in this step, the initial population for G(x) is not decided randomly but based on the homotopy solution population YN×D. In HAM-PSO, with zero change to the updating strategies for velocity and position, which means that the operation of generating the initial population can be performed offline. With YN×D preserved for later usage, this can save the running time of the algorithm.
It is worth noting that, compared with the basic PSO, the framework of HAM-PSO only replaced the random initial population with new initial population based on HAM. Therefore, we also can use other classical PSO variants in this framework and get a novel PSO algorithm correspondingly.
Step 4 could be described in pseudo code as Algorithm 3.
Algorithm 3 is different from Algorithm 1 in that the initial population of PSO in Algorithm 3 comes from the homotopy solution produced by Algorithm 2, and the purpose is to optimize the target function G(x). Therefore, the Algorithm 3 needs to calculate the fitness value of G(x) and record the position of the global-best solution.
Experimental results and discussion
Experimental grouping
Firstly, we take basic PSO as an example to verify the feasibility and effectiveness of the proposed framework of HAM-PSO. Then, we also use three others PSO algorithms, such as CLPSO, unified particle swarm optimization scheme (UPSO) [33] and XPSO, to this framework, corresponding to the three improved algorithms, HAM-CLPSO, HAM-UPSO and HAM-XPSO.
In the HAM-PSO, F(x) is a solved problem, which is used to provide prior knowledge while G(x) is the target function to be solved. Since both functions may have different dimensions, discussion will be carried out under the same dimensional condition. To avoid repeated optimization, once a benchmark function is chosen as F(x), it would not be considered as a potential candidate for G(x). In each group of experiments below, once a F(x) function is fixed, five different G(x) functions will be optimized and the grouping information could be found in Table 1.
Experimental grouping
Experimental grouping
To study the impact on solution accuracy by different types of functions, different benchmark functions are employed, including unimodal functions and multimodal functions of different dimensions. With only one global optimum, unimodal functions could be used to verify the convergence speed and solution accuracy, while multimodal functions could introduce more challenges to the test since they come with multiple local optimums. In the following experiments, different cases are discussed in groups.
(1) Groups A and B
F1(x) is set to Bohachevsky1 as a low-dimensional unimodal function, while G(x) will be chosen from 10 low-dimensional functions below, first five as unimodal and last five as multimodal. Check Table 2 for details.
Group information of A and B groups
Group information of A and B groups
(2) Groups C and D
F2(x) is set to Solomon as a low-dimensional multimodal function, while G(x) will be chosen from 10 low-dimensional functions below, first five as unimodal and last five as multimodal. Check Table 3 for details.
Group information of C and D groups
(3) Groups E and F
F3(x) is set to Sphere as a high-dimensional unimodal function, while G(x) will be chosen from 10 high-dimensional functions below, first five as unimodal and last five as multimodal. Check Table 4 for details.
Group information of E and F groups
(4) Groups G and H
F4(x) is set to Griewank as a high-dimensional multimodal function, while G(x) will be chosen from 10 high-dimensional functions below, first five as unimodal and last five as multimodal. Check Table 5 for details.
Group information of G and H groups
Details of the different benchmark functions can be found in Table 6. It includes the name of each function, the mathematical expression, the optimal solution x* and its corresponding function value F (x *), and the search space of each function. Among them, functions F1 to F4 are solved problems, and G1 to G20 are functions to be solved.
Detailed functions
In order to verify the effectiveness of the improvement and ensure the fairness of the experiment, the parameter setting should be the same before and after the algorithm is improved. The parameter setting of HAM-PSO and basic PSO in this paper refers to the paper [17]. The relevant parameters of PSO such as c1, c2 and ω remain unchanged. Because there is no high-dimensional experiment in the original paper. Therefore, we uniformly set the population number N and the maximum number of iterations tmax according to the problem size. The parameters are set as follows. c1 = c2 = 2 and ω = 0 . 95. For low dimension, D = 2, N = 10 and tmax = 300. While for high dimension, D = 30 or 100, N = 40 and tmax = 3000. Besides, the relevant parameter settings of BAS refer to [31]. Since this paper only uses BAS to ensure the quality of homotopy solutions, only a larger step size is needed, and there is no need for too many iterations M, and other parameters remain unchanged. The parameters are set as follows. Δs = 0.1, d0 = 2, step = 0.95, and M = 10.
In addition, in the newly added experiment, CLPSO and HAM-CLPSO parameters setting reference paper [32]. Similarly, the unique parameters in CLPSO, such as the learning probability P c , are also consistent with the original paper. UPSO and HAM-UPSO parameters setting reference paper [33], XPSO and HAM-XPSO parameters setting reference paper [19]. Since the low-dimensional situation has been fully discussed in the basic PSO, only higher-dimensional experiments are carried out for the above six algorithms. In all experiments, except for the population size N and the maximum number of iterations tmax to be adjusted according to the problem size, other parameters remain consistent with the original paper. When D = 30 or 100, it is uniformly set as N = 40 and tmax = 3000. Each of the above experiments was independently run 30 times.
Although the combination of parameter adjustment may achieve better optimization results, this is not the focus of this paper. The purpose of this paper is to provide a general framework that can quickly and effectively improve other algorithms. In future work, we will consider adjusting the algorithm parameters to achieve better optimization results.
Results and analysis
The measures include the maximum, minimum, mean, and variance. The comparative experimental results of HAM-PSO and PSO are shown in Tables 7 14. Within these tables, bold figures indicate the best results among all competitors.
Group A results
Group A results
(1) Group A
Table 7 shows the experimental results of group A. From Table 7, it can be found that HAM-PSO has better performances than PSO for five test functions and optimal solution for each test G(x) function could be obtained through HAM-PSO. Particularly, the performances in solution stability of HAM-PSO is much better for functions G4 and G5.
(2) Group B
The experimental results of group B are shown in Table 8.
Group B results
As can be seen from Table 8, HAM-PSO outperforms PSO for test functions G6, G7, G8 and G10, but falls slightly behind PSO in performance for G9. Due to the low-dimensional condition, PSO could achieve reasonable results, leaving little room for HAM-PSO to improve.
(3) Group C
Replacing the solved function F(x) in Group A and keeping all five test functions G(x), it could be found in Table 9 that the proposed HAM-PSO still exhibits better performances in all experimental conditions. Compared with Group A, Group C achieves better results for G1, G2 and similar results for G3, while Group A wins for G4 and G5.
Group C results
(4) Group D
The experimental results of group D are shown in Table 10. From Table 10, HAM-PSO shows slight advantages over PSO for all five test functions. Since both F(x) and G(x) share the same type, the performances of HAM-PSO in Group D are better than those in Group B for G6, G8 and G9 and both groups are similar for G10. However, Group B wins in the case of G7.
Group D results
Based on the results from above four groups, it can be found that for nine test functions out of ten in total, HAM-PSO exhibits superior performances, but slight inferior for G9. Although HAM-PSO has achieved improvements in general, there is not much room for improvement due to its low dimensions. More details about the performance improvement by HAM-PSO could refer to the following experiments, Group E to Group H.
(5) Group E
In this group, both F(x) and G(x) are high-dimensional unimodal functions. From Table 11, it is evident that HAM-PSO achieves better performances compared with PSO and the improvement is obvious.
Group E results
(6) Group F
Compared with last group, G(x) are replaced by high-dimensional multimodal functions, and from Table 12, HAM-PSO gets better results for all five test functions G16 to G20 even when F(x) and G(x) have different types.
Group F results
(7) Group G
As can be seen from Table 13, HAM-PSO exhibit superior performances for all the test functions except G12. In addition, results in Group E are better than results in Group G. This means that the improvement of the same type function is better in the problems of high-dimensional unimodal.
Group G results
(8) Group H
The experimental results of group H are shown in Table 14. Because there are many local optimal solutions, multimodal function optimization is often considered more difficult than unimodal condition. Therefore, optimization gets harder when in this group, both F(x) and G(x) are high-dimensional multimodal functions.
Group H results
Table 14 shows that for the cases of G16, G19 and G20, HAM-PSO exhibits better performances than PSO. Meanwhile, for functions G17 and G18, HAM-PSO can be closer to its optimal solution than the PSO, but it is worse than the PSO in stability for multiple runs. Besides, compared with this group, Group F have better results in general. It shows that for multimodal functions, the effect of the function type on the optimization result is not so significant.
(9) 100-dimensional experiments
To further study the improvement for higher-dimensional function by the proposed HAM-PSO, the dimensions of functions are increased to 100 in this subsection. The F(x) is set to the Sphere function, a high-dimensional unimodal function, and details about ten test functions, G11 to G20 could be found in Table 6. The results are show in Table 15.
Results when D = 100
Results for 30-D problems
Table 15 shows that HAM-PSO exhibits better results in all test functions in general except G12, when the dimension increases to 100, which verifies that HAM improves PSO significantly even if the dimension is high.
Statistics on the experimental results of the above nine groups for a total of 50 times, HAM-PSO achieves better results in 44 out of 50 times of experiments and one similar result. For the rest 5 times, PSO performs better.
(10) The improvement effect of other PSO variants
In the above experiments, this paper discusses the experimental results of HAM-PSO and basic PSO. In order to further verify the effectiveness of the framework of HAM-PSO, CLPSO, UPSO and XPSO are also used in the framework. Then three corresponding improved algorithms can be obtained, HAM-CLPSO, HAM-UPSO and HAM-XPSO. In this group of experiments, the Sphere function is still selected as F(x), and the selection of the function to be solved G(x) is G11 to G20 in Table 6. The experimental results of D = 30 and D = 100 are shown in Table 16 and Table 17, respectively.
Results for 100-D problems
It can be seen from Table 16 and Table 17 that whether it is 30-dimensional or 100-dimensional, the HAM has a good improvement effect on the three PSO variants of CLPSO, UPSO and XPSO. From the general rule, these three algorithms all have better optimization results after improvement than before. Since different algorithms have different optimization effects on the same problem, the optimization results of these three algorithms for the same function may be quite different. However, it can be seen from the experimental results that after using the HAM framework to improve the algorithm, the gap between the optimization results of the three algorithms for the same problem has been greatly reduced, and the stability of the algorithm has also been improved. For different problems, this framework also has different improvement effects on the three algorithms. For example, in the case of G18 in 30-dimensions, HAM’s improvements to CLPSO and XPSO are obvious. Although there are improvements for UPSO, the improvements are small. But for other problems such as G11 in 30-dimensions, HAM has made the most obvious improvement to UPSO. In a word, whether it’s 30-dimensional or 100-dimensional, on the basis of the three PSO variants, using HAM to improve the initial population can achieve better optimization results. It can be seen that using HAM as an improved framework and nesting with other algorithms (or improved algorithms) can further improve the optimization ability of the algorithm.
A t-test is commonly used to determine whether the mean of a population significantly differs from a specific value (called the hypothesized mean) or from the mean of another population. A t-test is performed with a significance level at 5% to statistically compare the data of proposed HAM-PSO with the PSO. A null hypothesis states that there is “no difference in performance between algorithms” and alternate hypothesis states that there is “performance difference between algorithms” that are established for hypothesis testing. The samples are taken from test functions after 30 runs of basic PSO and HAM-PSO.
When the p-value is less than 0.05, it is considered that there is a significant difference between the samples, and the original hypothesis is questioned. Under this situation, win rate is utilized to evaluate algorithms.
In this section, t-test is introduced to the data in each group and results are given in Tale Table 22 individually.
p-values of statistical t-test for benchmark functions (Group A and B)
p-values of statistical t-test for benchmark functions (Group A and B)
p-values of statistical t-test for benchmark functions (Group C and D)
p-values of statistical t-test for benchmark functions (Group E and F)
p-values of statistical t-test for benchmark functions (Group G and H)
p-values of statistical t-test for benchmark functions (D = 100)
In these five tables, symbol 0 indicates that there is no significant difference in sample data, and 1 indicates that there is a significant difference. Meanwhile, symbol + denotes that HAM-PSO is superior, –for PSO. Besides, / means that there is no significant difference and win rate will not be discussed.
From the results of t-test it can be found that when low-dimensional, the PSO already achieves acceptable results, leaving little space for HAM-PSO to improve. Therefore, for most test functions, there was no significant statistical difference between the two samples.
When the dimension increases to 30 and 100, it can be found that from Tables 20 22, HAM-PSO shows superiority over PSO in most cases. Moreover, the conclusion obtained by the t-test is basically consistent with the previous analysis.
This paper proposes a framework HAM-PSO, which aims to use the information of solved problem to solve an unknown problem. Through the study to the prior knowledge by HAM, an initial population of high quality could be generated and used to improve the performances of the PSO or other PSO variants. According to the experimental results and t-test analysis of multiple groups, the following conclusions can be drawn. HAM could effectively use prior knowledge and better the performances. When the function dimension is low, the improvement space is limited, but HAM-PSO still exhibits superiority over PSO in general. When the dimension increases to 30 and 100, the improvement of HAM-PSO is unneglectable in most cases. Given the same type of benchmark functions or not for the functions F(x) and G(x), HAM-PSO shows improvement compared with PSO in general. When chosen benchmark functions are unimodal, the improvement by HAM-PSO is distinguishable. However, due to the complexity of multimodal problems, the effect of function types on the optimization results is not so significant. As a framework, the HAM-PSO not only improves the basic PSO, but also has better improvement effects for other variants of PSO.
This framework HAM-PSO only provides a high-quality initial population for algorithms, so it can inherit the parameter settings of the original algorithms without discussing the algorithm parameters. Therefore, through this framework, the workload of parameter setting can be greatly reduced.
The other advantage is that HAM-PSO does not introduce more complex operations to PSO and maintains the updating strategies for velocity and position. In addition, all operations before the initial population replacement can be performed offline, and therefore, there will be no more calculation complexity added compared with PSO.
Although this paper discusses the improvement effect of HAM on basic PSO and other variants of the PSO, it still needs to be combined with the latest algorithm, such as the dragonfly algorithm [34], for further research. Moreover, lack of diversity is one drawback caused by the framework. And therefore, in the future work, HAM will be combined with other algorithms and the results will be studied. And try to modify the parameters and particle update strategy to ensure population diversity.
Footnotes
Acknowledgments
This study was supported by the National Natural Science Foundation of China (61801197), Jiangsu Natural Science Foundation (BK20181004) and Natural Science Foundation of the Jiangsu Higher Education Institutions of China (18KJB510012).
