Large Language Model Enhanced Particle Swarm Optimization for Hyperparameter Tuning for Deep Learning Models
Open Access
- 25 April 2025
- journal article
- Published by Institute of Electrical and Electronics Engineers (IEEE) in IEEE Open Journal of the Computer Society
- Vol. 6, 574-585
Abstract
Determining the ideal architecture for deep learning models, such as the number of layers and neurons, is a difficult and resource-intensive process that frequently relies on human tuning or computationally costly optimization approaches. While Particle Swarm Optimization (PSO) and Large Language Models (LLMs) have been individually applied in optimization and deep learning, their combined use for enhancing convergence in numerical optimization tasks remains underexplored. Our work addresses this gap by integrating LLMs into PSO to reduce model evaluations and improve convergence for deep learning hyperparameter tuning. The proposed LLM-enhanced PSO method addresses the difficulties of efficiency and convergence by using LLMs (particularly ChatGPT-3.5 and Llama3) to improve PSO performance, allowing for faster achievement of target objectives. Our method speeds up search space exploration by substituting underperforming particle placements with best suggestions offered by LLMs. Comprehensive experiments across three scenarios—(1) optimizing the Rastrigin function, (2) using Long Short-Term Memory (LSTM) networks for time series regression, and (3) using Convolutional Neural Networks (CNNs) for material classification—show that the method significantly improves convergence rates and lowers computational costs. Depending on the application, computational complexity is lowered by 20% to 60% compared to traditional PSO methods. Llama3 achieved a 20% to 40% reduction in model calls for regression tasks, whereas ChatGPT-3.5 reduced model calls by 60% for both regression and classification tasks, all while preserving accuracy and error rates. This groundbreaking methodology offers a very efficient and effective solution for optimizing deep learning models, leading to substantial computational performance improvements across a wide range of applications.Keywords
Funding Information
- Qatar National Library
- Qatar Foundation
This publication has 24 references indexed in Scilit:
- Enhancing personalized learning with explainable AI: A chaotic particle swarm optimization based decision support systemApplied Soft Computing, 2024
- Deep learning based multimodal urban air quality prediction and traffic analyticsScientific Reports, 2023
- ChatGPT for good? On opportunities and challenges of large language models for educationLearning and Individual Differences, 2023
- Deep Neural Networks Hyperparameter Optimization Using Particle Swarm Optimization for Detecting Frauds Transactions2021
- Grid search in hyperparameter optimization of machine learning models for prediction of HIV/AIDS test resultsInternational Journal of Computers and Applications, 2021
- A Review of Metaheuristic Techniques for Optimal Integration of Electrical Units in Distribution NetworksIEEE Access, 2020
- An efficient optimization approach for designing machine learning models based on genetic algorithmNeural Computing and Applications, 2020
- A Comparison of Extremal Optimization, Differential Evolution and Particle Swarm Optimization Methods for Well Placement Design in Groundwater ManagementMathematical Geosciences, 2020
- SVM Hyper-Parameters Optimization using Multi-PSO for Intrusion Detection2020
- Genetic algorithms in wireless networking: techniques, applications, and issuesSoft Computing, 2016