Regrouping Particle Swarm Optimization: A New Global Optimization Algorithm with Improved Performance Consistency Across Benchmarks George I. Evers Advisor: Dr. Mounir Ben Ghalia Electrical Engineering Department The University of Texas – Pan American 1 Outline I. II. From Physics to PSO Visual Illustration of Stagnation & the Regrouping Method III. RegPSO Formulation IV. Graph of Solution Quality V. Statistical Comparison with Basic PSO VI. Summary VII. Future Work 2 How PSO Derives from Standard Physics Equations I. From Physics to PSO 3 From Physics to PSO Displacement Formula of Physics: 1 2 x x0 v0t at 2 assuming constant acceleration over the time period 4 From Physics to PSO Iterative Version: 1 x (k 1) x (k ) v (k ) a (k ) 2 Using 1 time unit between iterations: • t = (k + 1) – k = 1 iteration per update • t2 = 1 iteration2 per update • For practical purposes, t drops out of the equation. 5 From Physics to PSO Subscript “i” Used for Particle Index: 1 x i (k 1) x i (k ) v i (k ) a i (k ). 2 (All particles follow the same rule.) 6 From Physics to PSO Particles are physical conceptualizations accelerating according to social and cognitive influences. 7 From Physics to PSO Cognitive Acceleration The cognitive acceleration is proportional to (i) the distance, p i (k ) x i (k ) , of a particle from its personal best, and (ii) the cognitive acceleration coefficient, c1. 8 From Physics to PSO Social Acceleration The social acceleration is proportional to (i) the distance, g (k ) x i (k ) , of a particle from its global best, and (ii) the social acceleration coefficient, c2. 9 From Physics to PSO Total Acceleration The overall acceleration can therefore be written as a i (k ) c1 p i (k ) x i (k ) c2 g (k ) x i (k ) . Substitution then leads from 1 x i (k 1) x i (k ) v i (k ) a i (k ) 2 to 1 1 x i (k 1) x i (k ) v i (k ) c1 p i (k ) x i (k ) c 2 g (k ) x i (k ) . 2 2 10 From Physics to PSO Total Acceleration 1 In place of constant 2 , a pseudo-random 1 number with an expected value of 2 is generated per dimension to add an element of stochasm to the algorithm. In this manner 1 1 x i (k 1) x i (k ) v i (k ) c1 p i (k ) x i (k ) c 2 g (k ) x i (k ) 2 2 becomes x i (k 1) x i (k ) v i (k ) r1i c1 p i (k ) x i (k ) r2i c2 g (k ) x i (k ) . 11 From Physics to PSO Simulating Friction To prevent velocities from growing out of control, only a fraction of the velocity is carried over to the next iteration. This is accomplished by introducing an inertia weight, , which is set less than 1. In this manner 1 1 x i (k 1) x i (k ) v i (k ) c1 p i ( k ) x i ( k ) c 2 g ( k ) x i ( k ) 2 2 becomes x i (k 1) x i (k ) v i (k ) r1i c1 p i (k ) x i (k ) r2i c2 g (k ) x i (k ) . 12 From Physics to PSO Velocity and Position Updates The previous equation is separated into two more succinct equations, allowing velocities and positions to be recorded and analyzed separately. Velocity UpdateEquation v i (k 1) v i (k ) c1r1i (k ) p i (k ) x i (k ) c 2r2i ( k ) g (k ) x i (k ) Position UpdateEquation x i (k 1) x i (k ) v i (k 1). 13 The Main Obstacle: Premature Convergence/ Stagnation II. Visual Example of Stagnation & The Regrouping Method 14 Rastrigin Benchmark Used to Illustrate Stagnation 15 Swarm Initialization Particles 1 and 3 are selected to visually illustrate how velocities and positions are updated. 16 First Velocity Updates 17 First Position Updates Particle 1 found a new personal best, but particle 3 did not. 18 Second Velocity Updates 19 Second Position Updates Particle 3 found a new personal best, while particle 1 did not. 20 Swarm Snapshots Having seen how particles iteratively update their positions, the following slides show the swarm state each 10 iterations to track the progression from initialization to eventual solution. 21 Swarm Initialization at Iteration 0 Particles are randomly initialized within the original initialization space. 22 Swarm Collapsing at Iteration 10 Particles are converging to a local minimizer near [2,0] via their attraction to the global best in that vicinity. 23 Exploratory Momenta at Iteration 20 Momenta and cognitive accelerations keep particles searching prior to settling down. 24 Convergence in Progress at Iteration 30 Personal bests move closer to the global best and momenta wane as no better global best is found. Particles continue converging to the local minimizer near [2,0]. 25 Momenta Waning at Iteration 40 Momenta continue to wane as particles are repeatedly pulled toward (a) the global best very near [2,0] and (b) their own personal bests in the same vicinity. 26 Mostly Converged at Iteration 50 Most particles are improving their approximation of the local minimizer found, while two particles still have some momenta. 27 Momenta Waning at Iteration 60 The final two particles are collapsing upon the global best while the remaining particles are refining the solution. 28 Momenta Waning at Iteration 70 All particles are in the same general vicinity. 29 Cognitive Acceleration at Iteration 80 At least one particle still has some exploratory momentum. 30 Premature Convergence Detected at Iteration 102 All particles have converged to within 0.011% of the diameter of the initialization space. It is important to allow particles to refine each solution before regrouping since they have no prior knowledge of which solution is the global minimizer. 31 Options for Dealing with Stagnation • Terminate the search rather than wasting computations while stagnated. • Allow the search to continue and hope for solution refinement. • Restart particles from new positions and look for a better solution. • Somehow flag solutions already found so that each restart finds new solutions, and continue restarting until no better solutions are found. • Reinvigorate the swarm with diversity to continue the current search for the global minimizer. 32 “Regrouping” Definition Regroup: “to reorganize (as after a setback) for renewed activity” – Merriam Webster’s online dictionary 33 Regrouping at Iteration 103 Regrouping is more efficient than restarting on the original initialization space. 34 Exploration at Iteration 113 “Gbest” PSO continues as usual within the new regrouping space. Particles move toward the global best with new momenta, personal bests, and positions/perspectives. 35 Swarm Migration at Iteration 123 The swarm is migrating toward a better region discovered by an exploring particle near [1,0]. 36 Differences of Opinion at Iteration 133 Some particles are refining a local minimizer near [1,0] while others continue exploring in the vicinity. 37 Solution Comparison at Iteration 143 Cognition pulls some particles back to the local well containing a local minimizer near [1, 0]. 38 Solution Comparison at Iteration 153 Cognition and momenta keep particles moving as momenta wane. 39 Unconvinced of Optimality on Horizontal Dimension at Iteration 163 There is still some uncertainty on the horizontal dimension. 40 New Well Agreed Upon at Iteration 173 All particles agree that the new well is better than the previous. 41 Waning Momenta at Iteration 183 Momenta wane. 42 Premature Convergence Detected Again at Iteration 219 Regrouping improved the function value from approximately 4 to approximately 1, and premature convergence is detected again. 43 Swarm Regrouped Again at Iteration 220 The swarm is regrouped a second time. 44 Best Well Found at Iteration 230 The well containing the global minimizer is discovered. 45 Swarm Migration at Iteration 240 The swarm migrates to the newly found well. 46 Convergence at Iteration 250 Particles swarm to the newly found well due to its higher quality minimizer. 47 Cognition at Iteration 260 Momenta carry particles beyond the well. 48 Convergence at Iteration 270 Solution refinement of the global minimizer is in progress. 49 Regrouping PSO (RegPSO) Formulation III. RegPSO Formula 50 Regrouping PSO (RegPSO) Detection of Premature Convergence Range of theSearch Space range r range1 r , range2 r ,..., ranged r r represents Diameter of theSearch Space the search space for r r diam range regrouping index r. Maximum Euclidean Distance from Global Best (k ) max xi (k ) g (k ) i1, , s Terminate When Maximum Distance from Global Best is Less Than a User - Specified Percentage of the Diameter of the Search Space norm (k ) diam( ) r 51 Regrouping PSO (RegPSO) Regrouping the Swarm Uncertainty per Dimension j max xi , j k g j k i1, , s Range of New Search Space range j ( r ) min range j ( 0 ), j range r range1 r , range2 r ,..., ranged r New Search Space Centered at Global Best 1 xi k 1 g k ri range( ) range( r ) 2 where ri r1i , r2i ,..., rdi r with each rji U (0,1) randomly selected. 52 Regrouping PSO (RegPSO) High-Level Pseudo Code Do Run Gbest PSO until premature convergence. Regroup the swarm. Re-calculate the velocity clamping value based on the range of the new initialization space. Re-initialize velocities. Re-initialize personal bests. Remember the global best. Until Search Termination 53 Effectiveness of RegPSO Demonstrated Graphically IV. Graphical Comparison of Mean Function Values 54 Mean Behavior on 30D Rastrigin A swarm size of 20 suffices for RegPSO to approximate the global minimizer of the 30-D Rastrigin and reduce the cost function to approximately true minimum across all 50 trials. 55 Effectiveness of RegPSO Demonstrated Statistically V. Statistical Comparison 56 Regrouping PSO (RegPSO) Compared to Gbest, Lbest PSO RegPSO Compared to Gbest PSO & Lbest PSO of neighborhood size 2 s = 20, c1 = c2 = 1.49618, 50 trial sets, 800,000 function evaluations RegPSO used 1.1104 ; 1.2 1; 100,000 evaluations max per grouping. Benchmark d 30 Gbest PSO 0.5, 0.72984 Mean: 3.6524 Gbest PSO 0.15, 0.9 to 0.4 1.1191e-014 Lbest PSO 0.5, 0.72984 0.046206 Ackley Lbest PSO RegPSO 0.5, 0.15, 0.9 to 0.4 0.72984 1.0623e-014 5.2345e-007 Griewangk 30 Mean: 0.055008 0.022023 9.1051e-003 0.012538 Quadric 30 Mean: 4.1822e-75 2.3189e-014 3.4340e-012 5.9577e-022 3.1351e-010 Quartic with noise 30 Mean: 0.0039438 0.0015241 1.2630e-002 0.0025417 0.00064366 Rastrigin 30 Mean: 71.63686 25.252 52.812 31.2746 2.6824e-011 Rosenbrock 30 Mean: 2.06915 18.859 2.6106 1.0713 0.0039351 Schaffer’s f6 2 Mean: 0.0033034 0 1.2025e-003 0 Sphere 30 Mean: 2.4703e-323 1.0834e-094 2.0146e-160 2.1967e-215 9.2696e-015 Weighted Sphere 30 Mean: 1.0869e-321 4.4182e-093 6.5519e-158 1.2102e-225 9.8177e-014 0.013861 0 57 Summary By regrouping the swarm within an efficiently sized regrouping space when premature convergence is detected, RegPSO considerably improves performance consistency, as demonstrated with a suite of popular benchmarks. 58 Future Work Theoretical Improvements • Give the algorithm the ability to progress from regrouping to a solution refinement phase. Testing • NP hard problems • Applications to real-world problems 59