CPSO-LSTM: Chaotic Particle Swarm Optimization improved LSTM Hyperparameters for Air Pollution Prediction

Authors

  • Tri Andi Information Technology, Faculty of Engineering, University of Muhammadiyah Yogyakarta and Department of Computer Science, International Islamic University Malaysia, Malaysia
  • Andi Pranolo Department of Informatics, Universitas Ahmad Dahlan, Indonesia
  • Amelia Ritahani Ismail Department of Computer Science, International Islamic University Malaysia, Malaysia
  • Candra Juni Cahyo Kusuma Universitas PGRI Yogyakarta, Indonesia

DOI:

https://doi.org/10.15575/join.v11i1.1689

Keywords:

air pollution prediction, Chaotic Optimization, Hyperparameter Tuning, Long Short-Term Memory , Networks, Particle Swarm Optimization, Time Series Forecasting

Abstract

Accurate air pollution predictions are crucial for public health and environmental management, but achieving high prediction accuracy remains a challenge due to the complexity of temporal patterns in pollution data. This study aims to improve performance of Long Short-Term Memory (LSTM) by optimizing hyperparameters tuning based Chaotic Particle Swarm Optimization (CPSO) for air pollution predictions. Hyperparameter optimization included the number of hidden layers, neurons, activation functions, loss functions, optimizers, batch sizes, and epochs. The proposed model LSTM-CPSO compared to other models, baseline LSTM and PSO-LSTM, to predict the concentrations of PM2.5, PM10, NO2, SO2, CO, and O3 in Jakarta based on Mean Squared Error (MSE), Mean Absolute Error (MAE), Root Mean Squared Error (RMSE), and Mean Absolute Percentage Error (MAPE) metrics. The experimental results show that CPSO-LSTM achieves superior performance with MSE 0.012105, MAE 0.086356, RMSE 0.110022, and MAPE 32.31%, outperforming the baseline LSTM by 38.1% on the MSE metric and 11.9% on MAPE. Interestingly, LSTM-CPSO produces better architecture with 2 hidden layers and 91 neurons than LSTM-PSO that requires 7 hidden layers with 51 neurons. Similarly, LSTM-CPSO has shortest 5 training epochs better than LSTM-PSO with 16 epochs. This research demonstrates that chaos-based metaheuristic optimization can select the best hyperparameters to improve the performance of LSTM for air quality forecasting.

References

[1] P. Arifin, D. Muhafidin, and R. Pancasilawan, “City growth and its impact on residential problems: A case study in the city of Jakarta,” J. Community Serv. Empower., vol. 5, no. 2, pp. 272–281, 2024.

[2] S. A. Aulia, “Air pollution threatens health and climate change in Jakarta,” Hum. Error Saf., vol. 1, no. 1, pp. 36–46, 2024.

[3] B. P. Resosudarmo and L. Napitupulu, “Health and economic impact of air pollution in Jakarta,” Econ. Rec., vol. 80, pp. S65–S75, 2004.

[4] J. Muñoz and K. Castaño, “Enhancing Stock Price Predictions: Leveraging LSTM for Accurate Forecasting of Ecopetrol’s Stock Performance,” Int. J. Artif. Intell. Informatics, vol. 2, no. 2, pp. 47–55, Jul. 2024, doi: 10.33292/ijarlit.v2i2.36.

[5] C. B. Pop, V. R. Chifu, I. S. A. Cozac, M. Antal, and C. Pop, “Optimizing the Data Center Energy Consumption Using a Particle Swarm Optimization-Based Approach,” 2015, pp. 176–189. doi: 10.1007/978-3-319-43177-2_12.

[6] D. Bohovic, “Comparison of LSTM and GRU Methods for Predicting Gold Exchange Rate against US Dollar,” Int. J. Artif. Intell. Informatics, vol. 3, no. 1, pp. 24–29, Jan. 2025, doi: 10.33292/ijarlit.v3i1.43.

[7] D. Dzhumashev and M. Aybek, “Prediction of the Exchange Rate of the Russian Ruble (RUB) against the United States Dollar (USD): Performance Comparison of LSTM and CNN Models,” Int. J. Artif. Intell. Informatics, vol. 2, no. 1, pp. 25–32, Jan. 2024, doi: 10.33292/ijarlit.v2i1.33.

[8] C. J. C. Kusuma and K. Khairunnisa, “Optimizing Bidirectional LSTM for Energy Consumption Prediction Using Chaotic Particle Swarm Optimization and Hyperparameter Tuning,” Int. J. Artif. Intell. Informatics, vol. 2, no. 2, pp. 57–60, Jul. 2024, doi: 10.33292/ijarlit.v2i2.37.

[9] T. L. Aníbal and R. Okanlawon, “Stock Price Prediction of ReconAfrica (RECAF) Using Gated Recurrent Unit (GRU): Analysis and Implications for Investment Decisions,” Int. J. Artif. Intell. Informatics, vol. 2, no. 2, pp. 41–46, 2025, doi: 10.33292/ijarlit.v2i2.35.

[10] F. Agustin and P. De Melin, “Comparison of GRU and CNN Methods for Predicting the Exchange Rate of Argentine Peso (ARS) against US Dollar (USD),” Int. J. Artif. Intell. Informatics, vol. 2, no. 1, pp. 9–16, 2024, doi: 10.33292/ijarlit.v2i1.31.

[11] R. Kepo and D. Okokpujie, “Performance Comparison of GRU and LSTM Methods for Predicting Bitcoin Exchange Rate against US Dollar,” Int. J. Artif. Intell. Informatics, vol. 2, no. 1, pp. 17–24, 2024, doi: 10.33292/ijarlit.v2i1.32.

[12] U. Pujianto, D. P. P. Setyadi, and M. I. Akbar, “Prediction of stock purchase decisions using artificial neural network method,” Appl. Eng. Technol., vol. 1, no. 2, pp. 23–33, Apr. 2022, doi: 10.31763/aet.v2i1.686.

[13] M. A. A. Abdalla et al., “Machine learning-based residential load demand forecasting: Evaluating ELM, XGBoost, RF, and SVM for enhanced energy system and sustainability,” Sci. Inf. Technol. Lett., vol. 6, no. 1, pp. 1–15, May 2025, doi: 10.31763/sitech.v6i1.1866.

[14] V. O. Geteloma et al., “Enhanced data augmentation for predicting consumer churn rate with monetization and retention strategies: a pilot study,” Appl. Eng. Technol., vol. 3, no. 1, pp. 35–51, Apr. 2024, doi: 10.31763/aet.v3i1.1408.

[15] G. Tzoulis, “Harnessing Convolutional Neural Networks for Accurate Stock Price Prediction: A Case Study of Hellenic Telecommunications Organization (HTO.AT),” Int. J. Artif. Intell. Informatics, vol. 2, no. 2, pp. 66–72, 2024, doi: 10.33292/ijarlit.v2i2.39.

[16] K. Rai and A. Vijayan, “Performance Comparison of Long Short-Term Memory and Convolutional Neural Network for Prediction of Exchange Rate of Indian Rupee against US Dollar,” Int. J. Artif. Intell. Informatics, vol. 3, no. 1, pp. 9–15, Jan. 2025, doi: 10.33292/ijarlit.v3i1.41.

[17] F. Al Anshori and S. Pidgeon, “Prediction of Euro to US Dollar Exchange Rate Using CNN Method with Grid Optimization,” Int. J. Artif. Intell. Informatics, vol. 3, no. 2, pp. 27–44, Jul. 2025, doi: 10.33292/ijarlit.v3i2.45.

[18] D. P. Ismi and N. Khoirunnisa, “Enhancing the performance of heart arrhythmia prediction model using Convolutional Neural Network based architectures,” Sci. Inf. Technol. Lett., vol. 5, no. 2, pp. 1–12, Nov. 2024, doi: 10.31763/sitech.v5i2.1794.

[19] A. Pranolo, Y. Mao, A. P. Wibawa, A. B. P. Utama, and F. A. Dwiyanto, “Robust LSTM With Tuned-PSO and Bifold-Attention Mechanism for Analyzing Multivariate Time-Series,” IEEE Access, vol. 10, no. July, pp. 78423–78434, 2022, doi: 10.1109/ACCESS.2022.3193643.

[20] S. Hochreiter and J. Schmidhuber, “Long short-term memory,” Neural Comput., vol. 9, no. 8, pp. 1735–1780, 1997.

[21] S. Dhakal, Y. Gautam, and A. Bhattarai, “Exploring a deep LSTM neural network to forecast daily PM2.5 concentration using meteorological parameters in Kathmandu Valley, Nepal,” Air Qual. Atmos. Heal., vol. 14, no. 1, pp. 83–96, 2021, doi: 10.1007/s11869-020-00915-6.

[22] E. Mussumeci and F. Codeço Coelho, “Large-scale multivariate forecasting models for Dengue - LSTM versus random forest regression,” Spat. Spatiotemporal. Epidemiol., vol. 35, p. 100372, 2020, doi: 10.1016/j.sste.2020.100372.

[23] J. Zhang, Y. Zhu, X. Zhang, M. Ye, and J. Yang, “Developing a Long Short-Term Memory (LSTM) based model for predicting water table depth in agricultural areas,” J. Hydrol., vol. 561, pp. 918–929, 2018, doi: 10.1016/j.jhydrol.2018.04.065.

[24] S. Srivastava and S. Lessmann, “A comparative study of LSTM neural networks in forecasting day-ahead global horizontal irradiance with satellite data,” Sol. Energy, vol. 162, no. December 2017, pp. 232–247, 2018, doi: 10.1016/j.solener.2018.01.005.

[25] A. G. Salman, Y. Heryadi, E. Abdurahman, and W. Suparta, “Single Layer & Multi-layer Long Short-Term Memory (LSTM) Model with Intermediate Variables for Weather Forecasting,” Procedia Comput. Sci., vol. 135, pp. 89–98, 2018, doi: 10.1016/j.procs.2018.08.153.

[26] V. K. R. Chimmula and L. Zhang, “Time series forecasting of COVID-19 transmission in Canada using LSTM networks,” Chaos, Solitons and Fractals, vol. 135, 2020, doi: 10.1016/j.chaos.2020.109864.

[27] J. Tulensalo, J. Seppänen, and A. Ilin, “An LSTM model for power grid loss prediction,” Electr. Power Syst. Res., vol. 189, no. March, p. 106823, 2020, doi: 10.1016/j.epsr.2020.106823.

[28] Y. S. Chang, H. T. Chiao, S. Abimannan, Y. P. Huang, Y. T. Tsai, and K. M. Lin, “An LSTM-based aggregated model for air pollution forecasting,” Atmos. Pollut. Res., vol. 11, no. 8, pp. 1451–1463, 2020, doi: 10.1016/j.apr.2020.05.015.

[29] B. Mokona and N. Shipo, “Comparative Analysis of LSTM and Grid Search Optimized LSTM for Stock Prediction: Case Study of Africa Energy Corp. (AFE.V),” Int. J. Artif. Intell. Informatics, vol. 2, no. 1, pp. 1–8, 2025, doi: https://doi.org/10.33292/ijarlit.v2i1.30.

[30] S. Sanhatham, “Stock Price Prediction of Thai Oil Public Company Limited (TOP.BK) Using LSTM Model with Grid Search Hyperparameter optimization,” Int. J. Artif. Intell. Informatics, vol. 2, no. 1, pp. 33–40, 2024, doi: 10.33292/ijarlit.v2i1.34.

[31] R. Das, A. I. Middya, and S. Roy, High granular and short term time series forecasting of PM 2.5 air pollutant - a comparative review, vol. 55, no. 2. Springer Netherlands, 2022. doi: 10.1007/s10462-021-09991-1.

[32] I. V Pustokhina, D. A. Pustokhin, E. L. Lydia, P. Garg, A. Kadian, and K. Shankar, “Hyperparameter search based convolution neural network with Bi-LSTM model for intrusion detection system in multimedia big data environment,” Multimed. Tools Appl., vol. 81, no. 24, pp. 34951–34968, 2022.

[33] Y. Li, Z. Tong, S. Tong, and D. Westerdahl, “A data-driven interval forecasting model for building energy prediction using attention-based LSTM and fuzzy information granulation,” Sustain. Cities Soc., vol. 76, no. August 2021, p. 103481, 2022, doi: 10.1016/j.scs.2021.103481.

[34] E. Yilmaz and E. Tcrol, “Comparison of LSTM and LSTM with Grid Search Optimization for Stock Price Prediction of Saudi Arabian Oil Company (Aramco),” Int. J. Artif. Intell. Informatics, vol. 3, no. 2, pp. 52–59, Jul. 2025, doi: 10.33292/ijarlit.v3i2.47.

[35] A. Flavia and C. Mio, “Performance Comparison of Standard LSTM and LSTM with Random Search Optimization for Spark New Zealand Limited Stock Price Prediction,” Int. J. Artif. Intell. Informatics, vol. 3, no. 2, pp. 60–66, Jul. 2025, doi: 10.33292/ijarlit.v3i2.48.

[36] H. Abbasimehr, M. Shabani, and M. Yousefi, “An optimized model using LSTM network for demand forecasting,” Comput. Ind. Eng., vol. 143, no. March, p. 106435, 2020, doi: 10.1016/j.cie.2020.106435.

[37] W. Elmasry, A. Akbulut, and A. H. Zaim, “Evolving deep learning architectures for network intrusion detection using a double PSO metaheuristic,” Comput. Networks, vol. 168, p. 107042, 2020, doi: 10.1016/j.comnet.2019.107042.

[38] M. Munem, T. M. Rubaith Bashar, M. H. Roni, M. Shahriar, T. B. Shawkat, and H. Rahaman, “Electric power load forecasting based on multivariate LSTM neural network using bayesian optimization,” 2020 IEEE Electr. Power Energy Conf. EPEC 2020, vol. 3, 2020, doi: 10.1109/EPEC48502.2020.9320123.

[39] N. Buslim, I. L. Rahmatullah, B. A. Setyawan, and A. Alamsyah, “Comparing bitcoin’s prediction model using GRU, RNN, and LSTM by hyperparameter optimization grid search and random search,” in 2021 9th International Conference on Cyber and IT Service Management (CITSM), 2021, pp. 1–6.

[40] S. Zhou, L. Zhou, M. Mao, H.-M. Tai, and Y. Wan, “An optimized heterogeneous structure LSTM network for electricity price forecasting,” Ieee Access, vol. 7, pp. 108161–108173, 2019.

[41] N. Gorgolis, I. Hatzilygeroudis, Z. Istenes, and L. N. G. Gyenne, “Hyperparameter Optimization of LSTM Network Models through Genetic Algorithm,” 10th Int. Conf. Information, Intell. Syst. Appl. IISA 2019, vol. 00, no. c, pp. 1–4, 2019, doi: 10.1109/IISA.2019.8900675.

[42] A. Indrawati and I. N. Wahyuni, “Enhancing machine learning models through hyperparameter optimization with particle swarm optimization,” in 2023 International Conference on Computer, Control, Informatics and its Applications (IC3INA), 2023, pp. 244–249.

[43] D. Freitas, L. G. Lopes, and F. Morgado-Dias, “Particle swarm optimisation: a historical review up to the current developments,” Entropy, vol. 22, no. 3, p. 362, 2020.

[44] S. Chourasia, H. Sharma, M. Singh, and J. C. Bansal, “Global and local neighborhood based particle swarm optimization,” in Harmony Search and Nature Inspired Optimization Algorithms: Theory and Applications, ICHSA 2018, 2019, pp. 449–460.

[45] D. Tian, X. Zhao, and Z. Shi, “Chaotic particle swarm optimization with sigmoid-based acceleration coefficients for numerical function optimization,” Swarm Evol. Comput., vol. 51, p. 100573, 2019.

[46] A. B. Putra Utama, A. P. Wibawa, M. Muladi, L. Hernandez, H. Haviluddin, and M. F. Teng, “E-Journal visitor analysis using particle swarm optimization-long short-term memory (PSO LSTM),” Sci. Inf. Technol. Lett., vol. 6, no. 1, pp. 55–65, May 2025, doi: 10.31763/sitech.v5i2.2347.

[47] J. Kennedy and R. Eberhart, “Particle swarm optimization,” in Proceedings of ICNN’95-international conference on neural networks, 1995, vol. 4, pp. 1942–1948.

[48] J. Wang, “CPSO: chaotic particle swarm optimization for cluster analysis,” J. Artif. Intell. Technol., vol. 3, no. 2, pp. 46–52, 2023.

[49] J.-D. Wang and C. Oktomy Noto Susanto, “Traffic Flow Prediction with Heterogenous Data Using a Hybrid CNN-LSTM Model,” Comput. Mater. Contin., vol. 76, no. 3, pp. 3097–3112, 2023, doi: 10.32604/cmc.2023.040914.

[50] S. Riyadi, C. Damarjati, S. Khotimah, and A. J. Ishak, “Optimization of the VGG Deep Learning Model Performance for Covid-19 Detection Using CT-Scan Images,” Regist. J. Ilm. Teknol. Sist. Inf., vol. 10, no. 1, pp. 91–101, Jun. 2024, doi: 10.26594/register.v10i1.3598.

[51] S. Riyadi, A. Divayu Andriyani, and S. Noraini Sulaiman, “Improving Hate Speech Detection Using Double-Layers Hybrid CNN-RNN Model on Imbalanced Dataset,” IEEE Access, vol. 12, pp. 159660–159668, 2024, doi: 10.1109/ACCESS.2024.3487433.

[52] S. Riyadi, M. A. P. Suradi, C. Damarjati, H.-C. Chen, R. Al-Hamdi, and A. M. Masyhur, “Classification of Political Party Conflicts and Their Mediation Using Modified Recurrent Convolutional Neural Network,” J. Appl. Data Sci., vol. 6, no. 1, pp. 416–425, 2025.

[53] S. Riyadi, N. Audita, and F. A. Abidin, “Movie Recommendation Using Collaborative Filtering Method and K-Nearest Neighbours: A Case Study on Netflix,” in Lecture Notes in Networks and Systems, 2024, vol. 1120 LNNS, pp. 428–436. doi: 10.1007/978-3-031-70518-2_38.

[54] N. A. Utama, W. I. Triyani, S. Riyadi, and C. Damarjati, “Discrete Curvelet Transform Feature Extraction for Mangosteen Fruit Surface Damage Detection,” Emerg. Inf. Sci. Technol., vol. 5, no. 1, pp. 46–51, 2024, doi: 10.18196/eist.v5i1.22602.

[55] A. Kurnianti, P. Pahlevi, and I. Mufidah, “Recommendation System for Prospective Bride and Groom Using Cosine Similarity Algorithm,” Emerg. Inf. Sci. Technol., vol. 4, no. 1, pp. 8–15, 2023, doi: 10.18196/eist.v4i1.18683.

[56] I. Prabasari, A. Zuhri, S. Riyadi, T. K. Hariadi, and N. A. Utama, “Analysis of Cross Validation on Classification of Mangosteen Maturity Stages using Support Vector Machine,” Emerg. Inf. Sci. Technol., vol. 5, no. 1, pp. 24–29, 2024, doi: 10.18196/eist.v5i1.22359.

[57] L. I. Berlina, U. S. Aesyi, and K. Kharisma, “Community perspective analysis of Yogyakarta special region using K-means algorithm,” Emerg. Inf. Sci. Technol., vol. 5, no. 2, pp. 66–73, 2024, doi: 10.18196/eist.v5i2.24729.

[58] A. Rakhmadi and N. D. Rahmawati, “Implementation of Simple Additive Weighting to Decide a Fund Proposal,” Emerg. Inf. Sci. Technol., vol. 4, no. 2, pp. 67–74, 2023, doi: 10.18196/eist.v4i2.20741.

[59] R. Y. Hartanta, A. Asroni, S. Riyadi, and J. Jeckson, “Analysis and Visualization of High School Student Achievement Data Using Decision Tree and Cross-Validation in Rapidminer,” Emerg. Inf. Sci. Technol., vol. 4, no. 2, pp. 62–66, 2023, doi: 10.18196/eist.v4i2.20731.

Downloads

Published

2026-04-30

Issue

Section

Article

Citation Check

Similar Articles

1 2 3 4 5 6 7 8 9 10 > >> 

You may also start an advanced similarity search for this article.