A Random Particle Swarm Optimization Based on Cosine Similarity for Global Optimization and Classification Problems

Biomimetics (Basel). 2024 Mar 28;9(4):204. doi: 10.3390/biomimetics9040204.

Abstract

In today's fast-paced and ever-changing environment, the need for algorithms with enhanced global optimization capability has become increasingly crucial due to the emergence of a wide range of optimization problems. To tackle this issue, we present a new algorithm called Random Particle Swarm Optimization (RPSO) based on cosine similarity. RPSO is evaluated using both the IEEE Congress on Evolutionary Computation (CEC) 2022 test dataset and Convolutional Neural Network (CNN) classification experiments. The RPSO algorithm builds upon the traditional PSO algorithm by incorporating several key enhancements. Firstly, the parameter selection is adapted and a mechanism called Random Contrastive Interaction (RCI) is introduced. This mechanism fosters information exchange among particles, thereby improving the ability of the algorithm to explore the search space more effectively. Secondly, quadratic interpolation (QI) is incorporated to boost the local search efficiency of the algorithm. RPSO utilizes cosine similarity for the selection of both QI and RCI, dynamically updating population information to steer the algorithm towards optimal solutions. In the evaluation using the CEC 2022 test dataset, RPSO is compared with recent variations of Particle Swarm Optimization (PSO) and top algorithms in the CEC community. The results highlight the strong competitiveness and advantages of RPSO, validating its effectiveness in tackling global optimization tasks. Additionally, in the classification experiments with optimizing CNNs for medical images, RPSO demonstrated stability and accuracy comparable to other algorithms and variants. This further confirms the value and utility of RPSO in improving the performance of CNN classification tasks.

Keywords: classification; cosine similarity; global optimization; particle swarm optimization.