| The complexity of cybersecurity threats is growing,making traditional intrusion detection techniques insufficient.Convolutional Neural Networks(CNN)based intrusion detection systems are effective,but they require extensive adjustments.The Particle Swarm Optimization(PSO)can optimize CNNs,but it has issues like falling into local optima and low solution accuracy.This paper presents a new algorithm,the Multi-Group Multi-Strategy Competitive Particle Swarm Optimization(MMCPSO).It sorts particles in each generation based on fitness,dividing them into superior,ordinary,and inferior subgroups,each with different update strategies.This balances the algorithm’s global search and local development capabilities,accelerating convergence.The effectiveness of the algorithm is proven through various experiments,demonstrating superiority in escaping local optima,stability,and optimization accuracy compared to other PSO algorithms.To improve the accuracy of intrusion detection models and solve the issue of suboptimal initial hyperparameter values in CNNs,this paper designs a flexible convolutional layer for CNNs to dynamically adjust the number of convolution kernels.The MMCPSO algorithm is used for setting CNN hyperparameters,with the CNN model’s cross-entropy loss function serving as the fitness function for the MMCPSO algorithm.The optimized CNN model is then compared with other intrusion detection models on the preprocessed NSL-KDD dataset. |