TY - EJOU AU - Van, Le Thi Hong AU - Thuan, Le Duc AU - Huong, Pham Van AU - Minh, Nguyen Hieu TI - An Overall Optimization Model Using Metaheuristic Algorithms for the CNN-Based IoT Attack Detection Problem T2 - Computers, Materials \& Continua PY - 2026 VL - 87 IS - 1 SN - 1546-2226 AB - Optimizing convolutional neural networks (CNNs) for IoT attack detection remains a critical yet challenging task due to the need to balance multiple performance metrics beyond mere accuracy. This study proposes a unified and flexible optimization framework that leverages metaheuristic algorithms to automatically optimize CNN configurations for IoT attack detection. Unlike conventional single-objective approaches, the proposed method formulates a global multi-objective fitness function that integrates accuracy, precision, recall, and model size (speed/model complexity penalty) with adjustable weights. This design enables both single-objective and weighted-sum multi-objective optimization, allowing adaptive selection of optimal CNN configurations for diverse deployment requirements. Two representative metaheuristic algorithms, Genetic Algorithm (GA) and Particle Swarm Optimization (PSO), are employed to optimize CNN hyperparameters and structure. At each generation/iteration, the best configuration is selected as the most balanced solution across optimization objectives, i.e., the one achieving the maximum value of the global objective function. Experimental validation on two benchmark datasets, Edge-IIoT and CIC-IoT2023, demonstrates that the proposed GA- and PSO-based models significantly enhance detection accuracy (94.8%–98.3%) and generalization compared with manually tuned CNN configurations, while maintaining compact architectures. The results confirm that the multi-objective framework effectively balances predictive performance and computational efficiency. This work establishes a generalizable and adaptive optimization strategy for deep learning-based IoT attack detection and provides a foundation for future hybrid metaheuristic extensions in broader IoT security applications. KW - Genetic algorithm (GA); particle swarm optimization (PSO); multi-objective optimization; convolutional neural network—CNN; IoT attack detection; metaheuristic optimization; CNN configuration DO - 10.32604/cmc.2025.075027