Improved Prediction of Hourly PM2.5 Concentrations with a Long Short-Term Memory Optimized by Stacking Ensemble Learning and Ant Colony Optimization
Abstract
1. Introduction
2. Materials and Methods
2.1. Data Source
2.2. Long Short-Term Memory Network
2.3. Ant Colony Optimization
2.4. Stacking Ensemble Learning
- ➀
- The first stage. Each base learner (m = 1, 2, …, M) is trained on the training set D to obtain the model (D). Where, different base learners can be based on different algorithms. For example, model L1 can be obtained by training on decision tree algorithm and model L2 can be obtained by training on support vector machine algorithm.
- ➁
- The second stage. Construct a new training set , where ,, …, ). In this step, the prediction results of each base learner for each sample obtained are combined to form a new feature vector that contains the combined learning information of the different base learners for the sample.
3. Experiment and Results
3.1. Evaluation Metrics
3.2. Parameter Settings
3.3. Prediction Methods
3.4. Results
| City | Model | MSE | MAE | R2 |
|---|---|---|---|---|
| Nanchang | LSTM | 47.586 | 5.206 | 0.920 |
| Stacking-LSTM | 36.516 | 4.480 | 0.939 | |
| ACO-LSTM | 36.602 | 4.590 | 0.938 | |
| Stacking-BP | 36.085 | 4.154 | 0.939 | |
| Stacking-ACO-LSTM | 0.058 | 0.178 | 0.942 | |
| Ganzhou | LSTM | 49.411 | 4.976 | 0.894 |
| Stacking-LSTM | 45.176 | 4.790 | 0.904 | |
| ACO-LSTM | 41.869 | 4.659 | 0.911 | |
| Stacking-BP | 46.058 | 4.881 | 0.902 | |
| Stacking-ACO-LSTM | 0.089 | 0.215 | 0.920 | |
| Jiujiang | LSTM | 204.332 | 10.221 | 0.709 |
| Stacking-LSTM | 189.219 | 9.864 | 0731 | |
| ACO-LSTM | 193.934 | 9.804 | 0.724 | |
| Stacking-BP | 196.889 | 9.845 | 0.720 | |
| Stacking-ACO-LSTM | 0.248 | 0.357 | 0.741 |
4. Conclusions
Author Contributions
Funding
Institutional Review Board Statement
Informed Consent Statement
Data Availability Statement
Conflicts of Interest
References
- Zhao, M.Y.; Wang, K. Short-term effects of PM2.5 components on the respiratory infectious disease: A global perspective. Environ. Geochem. Health 2024, 46, 293. [Google Scholar] [CrossRef] [Scilit] [PubMed]
- Chanda, F.; Lin, K.X.; Chaurembo, A.I.; Huang, J.Y.; Zhang, H.J.; Deng, W.H.; Xu, Y.J.; Li, Y.; Fu, L.D.; Cui, H.D.; et al. PM2.5-mediated cardiovascular disease in aging: Cardiometabolic risks, molecular mechanisms and potential interventions. Sci. Total Environ. 2024, 954, 176255. [Google Scholar] [CrossRef] [Scilit] [PubMed]
- Duan, W.J.; Wang, X.Q.; Cheng, S.Y.; Wang, R.P. A new scheme of PM2.5 and O3 control strategies with the integration of SOM, GA and WRF-CAMx. J. Environ. Sci. 2024, 138, 249–265. [Google Scholar] [CrossRef] [Scilit] [PubMed]
- Cao, Q.F.; Shen, L.; Chen, S.C.; Pui, D.Y. WRF modeling of PM2.5 remediation by SALSCS and its clean air flow over Beijing terrain. Sci. Total Environ. 2018, 626, 134–146. [Google Scholar] [CrossRef] [Scilit]
- Shao, T.; Wang, P.; Yu, W.X.; Gao, Y.Q.; Zhu, S.Q.; Zhang, Y.; Hu, D.H.; Zhang, B.J.; Zhang, H.L. Drivers of alleviated PM2.5 and O3 concentrations in China from 2013 to 2020. Resour. Conserv. Recycl. 2023, 197, 107110. [Google Scholar] [CrossRef] [Scilit]
- Sulaymon, I.D.; Zhang, Y.; Hopke, P.K.; Ye, F.; Gong, K.; Mao, J.; Hu, J. Modeling PM2.5 during severe atmospheric pollution episode in Lagos, Nigeria: Spatiotemporal variations, source apportionment, and meteorological influences. J. Geophys. Res.-Atmos. 2023, 128, e2022JD038360. [Google Scholar] [CrossRef] [Scilit]
- Yuan, Z.Y.; Gao, S.C.; Wang, Y.R.; Li, J.Y.; Hou, C.Z.; Guo, L.J. Prediction of PM2.5 time series by seasonal trend decomposition-based dendritic neuron model. Neural Comput. Appl. 2023, 35, 15397–15413. [Google Scholar] [CrossRef] [Scilit]
- Wu, F.M.; Min, P.F.; Jin, Y.; Zhang, K.N.; Liu, H.Y.; Zhao, J.M.; Li, D.A. A novel hybrid model for hourly PM2.5 prediction considering air pollution factors, meteorological parameters and GNSS-ZTD. Environ. Model. Softw. 2023, 167, 105780. [Google Scholar] [CrossRef] [Scilit]
- Zhang, J.P.; Chen, Z.G.; Fu, J.; Liu, P. PM2.5 collection efficiency of wire-plate electrostatic precipitator: Prediction of temperature effects using support vector machine model combined with particle swarm optimization algorithm. Environ. Eng. Sci. 2024, 41, 140–148. [Google Scholar] [CrossRef] [Scilit]
- Li, L.; Fu, Y.F.; Fung, J.C.H.; Tse, K.T.; Lau, A.K. Development of a back-propagation neural network combined with an adaptive multi-objective particle swarm optimizer algorithm for predicting and optimizing indoor CO2 and PM2.5 concentrations. J. Build. Eng. 2022, 54, 104600. [Google Scholar] [CrossRef] [Scilit]
- Masood, A.; Hameed, M.M.; Srivastava, A.; Pham, Q.B.; Ahmad, K.; Razali, S.F.M.; Baowidan, S.A. Improving PM2.5 prediction in New Delhi using a hybrid extreme learning machine coupled with snake optimization algorithm. Sci. Rep. 2023, 13, 21057. [Google Scholar] [CrossRef] [Scilit] [PubMed]
- Yin, S.; Liu, H.; Duan, Z. Hourly PM2.5 concentration multi-step forecasting method based on extreme learning machine, boosting algorithm and error correction model. Digit. Signal Process. 2021, 118, 103221. [Google Scholar] [CrossRef] [Scilit]
- Logothetis, S.A.; Kosmopoulos, G.; Panagopoulos, O.; Salamalikis, V.; Kazantzidis, A. Forecasting the Exceedances of PM2.5 in an Urban Area. Atmosphere 2024, 15, 594. [Google Scholar] [CrossRef] [Scilit]
- Bedi, S.; Katiyar, A.; Krishnan, N.A.; Kota, S.H. Utilizing LSTM models to predict PM2.5 levels during critical episodes in Delhi, the world’s most polluted capital city. Urban Clim. 2024, 53, 101835. [Google Scholar] [CrossRef] [Scilit]
- Gao, Z.H.; Mo, X.Y.; Li, H. Prediction of PM2.5 concentration based on deep learning, multi-objective optimization, and ensemble forecast. Sustainability 2024, 16, 4643. [Google Scholar] [CrossRef] [Scilit]
- Ho, C.H.; Park, I.; Kim, J.; Lee, J.B. PM2.5 forecast in Korea using the Long Short-Term Memory (LSTM) model. Asia-Pac. J. Atmos. Sci. 2023, 59, 563–576. [Google Scholar] [CrossRef] [Scilit]
- Lin, M.D.; Liu, P.Y.; Huang, C.W.; Lin, Y.H. The application of strategy based on LSTM for the short-term prediction of PM2.5 in city. Sci. Total Environ. 2024, 906, 167892. [Google Scholar] [CrossRef] [Scilit]
- Yu, Q.; Yuan, H.W.; Liu, Z.L.; Xu, G.M. Spatial weighting EMD-LSTM based approach for short-term PM2.5 prediction research. Atmos. Pollut. Res. 2024, 15, 102256. [Google Scholar] [CrossRef] [Scilit]
- Bai, X.S.; Zhang, N.; Cao, X.Y.; Chen, W.Q. Prediction of PM2.5 concentration based on a CNN-LSTM neural network algorithm. PeerJ 2024, 12, e17811. [Google Scholar] [CrossRef] [Scilit]
- Cho, E.; Yoon, H.; Cho, Y. Evaluation of the impact of intensive PM2.5 reduction policy in Seoul, South Korea using machine learning. Urban Clim. 2024, 53, 101778. [Google Scholar] [CrossRef] [Scilit]
- Kumar, S.; Kumar, V. Multi-view Stacked CNN-BiLSTM (MvS CNN-BiLSTM) for urban PM2.5 concentration prediction of India’s polluted cities. J. Clean. Prod. 2024, 444, 141259. [Google Scholar] [CrossRef] [Scilit]
- Wu, X.X.; Zhu, J.; Wen, Q. Short-term prediction of PM2.5 concentration by hybrid neural network based on sequence decomposition. PLoS ONE 2024, 19, e0299603. [Google Scholar] [CrossRef] [Scilit] [PubMed]
- Pak, U.; Son, Y.; Kim, K.; Kim, J.; Jang, M.; Kim, K.; Pak, G. Novel particulate matter (PM2.5) forecasting method based on deep learning with suitable spatiotemporal correlation analysis. J. Atmos. Sol.-Terr. Phys. 2024, 264, 106336. [Google Scholar] [CrossRef] [Scilit]
- Shen, J.X.; Liu, Q.X.; Feng, X.J. Hourly PM2.5 concentration prediction for dry bulk port clusters considering spatiotemporal correlation: A novel deep learning blending ensemble model. J. Environ. Manag. 2024, 370, 122703. [Google Scholar] [CrossRef] [Scilit]
- Fu, M.L.; Le, C.W.; Fan, T.C.; Prakapovich, R.; Manko, D.; Dmytrenko, O.; Lande, D.; Shahid, S.; Yaseen, Z.M. Integration of complete ensemble empirical mode decomposition with deep long short-term memory model for particulate matter concentration prediction. Environ. Sci. Pollut. Res. 2021, 28, 64818–64829. [Google Scholar] [CrossRef] [Scilit]
- Liu, Z.H.; Ji, D.; Wang, L.L. PM2.5 concentration prediction based on EEMD-ALSTM. Sci. Rep. 2024, 14, 12636. [Google Scholar] [CrossRef] [Scilit]
- Zhu, J.M.; Niu, L.L.; Zheng, P.; Chen, H.Y.; Liu, J.P. A hybrid PM2.5 interval concentration prediction framework based on multi-factor interval decomposition reconstruction strategy and attention mechanism. Atmos. Environ. 2024, 335, 120730. [Google Scholar] [CrossRef] [Scilit]
- Pranolo, A.; Zhou, X.F.; Mao, Y.C. A novel bifold-attention-LSTM for analyzing PM2.5 concentration-based multi-station data time series. Int. J. Data Sci. Anal. 2024, 1–18. [Google Scholar] [CrossRef] [Scilit]
- Saminathan, S.; Malathy, C. PM2.5 concentration estimation using Bi-LSTM with osprey optimization method. Nat. Environ. Pollut. Technol. 2024, 23, 1631–1638. [Google Scholar] [CrossRef] [Scilit]
- Liu, J.R.; Hou, Z.W.; Yin, T.X. Short-term power load forecast using OOA optimized bidirectional long short-term memory network with spectral attention for the frequency domain. Energy Rep. 2024, 12, 4891–4908. [Google Scholar] [CrossRef] [Scilit]
- Zhao, L.X.; Li, Z.Y.; Qu, L.L. A novel machine learning-based artificial intelligence method for predicting the air pollution index PM2.5. J. Clean. Prod. 2024, 468, 143042. [Google Scholar] [CrossRef] [Scilit]
- Zhang, L.; Xu, L.; Jiang, M.; He, P. A novel hybrid ensemble model for hourly PM2.5 concentration forecasting. Int. J. Environ. Sci. Technol. 2023, 20, 219–230. [Google Scholar] [CrossRef] [Scilit]
- Jiang, F.X.; Zhang, C.Y.; Sun, S.L.; Sun, J.Y. Forecasting hourly PM2.5 based on deep temporal convolutional neural network and decomposition method. Appl. Soft Comput. 2021, 113, 107988. [Google Scholar] [CrossRef] [Scilit]
- Ren, Y.; Wang, S.Y.; Xia, B.S. Deep learning coupled model based on TCN-LSTM for particulate matter concentration prediction. Atmos. Pollut. Res. 2023, 14, 101703. [Google Scholar] [CrossRef] [Scilit]
- Zou, R.K.; Huang, H.Y.; Lu, X.M.; Zeng, F.M.; Ren, C.; Wang, W.Q.; Zhou, L.G.; Dai, X.Y. PD-LL-Transformer: An hourly PM2.5 forecasting method over the Yangtze River Delta Urban Agglomeration, China. Remote Sens. 2024, 16, 1915. [Google Scholar] [CrossRef] [Scilit]
- Yu, M.Z.; Masrur, A.; Blaszczak-Boxe, C. Predicting hourly PM2.5 concentrations in wildfire-prone areas using a SpatioTemporal Transformer model. Sci. Total Environ. 2023, 860, 160446. [Google Scholar] [CrossRef] [Scilit]
- Cui, B.W.; Liu, M.Y.; Li, S.Q.; Jin, Z.F.; Zeng, Y.; Lin, X.Y. Deep learning methods for atmospheric PM2.5 prediction: A comparative study of transformer and CNN-LSTM-attention. Atmos. Pollut. Res. 2023, 14, 101833. [Google Scholar] [CrossRef] [Scilit]
- Liu, X.; Li, W. MGC-LSTM: A deep learning model based on graph convolution of multiple graphs for PM2.5 prediction. Int. J. Environ. Sci. Technol. 2023, 20, 10297–10312. [Google Scholar] [CrossRef] [Scilit]
- Zeng, Q.L.; Li, Y.M.; Tao, J.H.; Fan, M.; Chen, L.F.; Wang, L.; Wang, Y.H. Full-coverage estimation of PM2.5 in the Beijing- Tianjin-Hebei region by using a two-stage model. Atmos. Environ. 2023, 309, 119956. [Google Scholar] [CrossRef] [Scilit]
- Tong, W.T.; Li, L.X.; Zhou, X.L.; Hamilton, A.; Zhang, K. Deep learning PM2.5 concentrations with bidirectional LSTM RNN. Air Qual. Atmos. Health 2019, 12, 411–423. [Google Scholar] [CrossRef] [Scilit]
- Kristiani, E.; Lin, H.; Lin, J.R.; Chuang, Y.H.; Huang, C.Y.; Yang, C.T. Short-term prediction of PM2.5 using LSTM deep learning methods. Sustainability 2022, 14, 2068. [Google Scholar] [CrossRef] [Scilit]
- Wang, J.Y.; Wang, D.S.; Zhang, F.S.; Yoo, C.K.; Liu, H.B. Soft sensor for predicting indoor PM2.5 concentration in subway with adaptive boosting deep learning model. J. Hazard. Mater. 2024, 465, 133074. [Google Scholar] [CrossRef] [Scilit] [PubMed]
- Li, Z.F.; Gan, K.; Sun, S.L.; Wang, S.Y. A new PM2.5 concentration forecasting system based on AdaBoost-ensemble system with deep learning approach. J. Forecast. 2023, 42, 154–175. [Google Scholar] [CrossRef] [Scilit]
- Zaini, N.; Ahmed, A.N.; Ean, L.W.; Chow, M.F.; Malek, M.A. Forecasting of fine particulate matter based on LSTM and optimization algorithm. J. Clean. Prod. 2023, 427, 139233. [Google Scholar] [CrossRef] [Scilit]
- Erden, C. Genetic algorithm-based hyperparameter optimization of deep learning models for PM2.5 time-series prediction. Int. J. Environ. Sci. Technol. 2023, 20, 2959–2982. [Google Scholar] [CrossRef] [Scilit]
- Utku, A.; Can, Ü.; Kamal, M.; Das, N.; Cifuentes-Faura, J.; Barut, A. A long short-term memory-based hybrid model optimized using a genetic algorithm for particulate matter 2.5 prediction. Atmos. Pollut. Res. 2023, 14, 101836. [Google Scholar] [CrossRef] [Scilit]
- Vignesh, P.P.; Jiang, J.H.; Kishore, P. Predicting PM2.5 concentrations across USA using machine learning. Earth Space Sci. 2023, 10, e2023EA002911. [Google Scholar] [CrossRef] [Scilit]
- Lee, Y.S.; Choi, E.; Park, M.; Jo, H.; Park, M.; Nam, E.; Kim, D.G.; Yi, S.M.; Kim, J.Y. Feature extraction and prediction of fine particulate matter (PM2.5) chemical constituents using four machine learning models. Expert Syst. Appl. 2023, 221, 119696. [Google Scholar] [CrossRef] [Scilit]
- Chen, Y.C.; Li, D.C. Selection of key features for PM2.5 prediction using a wavelet model and RBF-LSTM. Appl. Intell. 2021, 51, 2534–2555. [Google Scholar] [CrossRef] [Scilit]
- Wang, S.W.; Li, P.; Ji, H.; Zhan, Y.L.; Li, H.H. Prediction of air particulate matter in Beijing, China, based on the improved particle swarm optimization algorithm and long short-term memory neural network. J. Intell. Fuzzy Syst. 2021, 41, 1869–1885. [Google Scholar] [CrossRef] [Scilit]
- Zhang, L.; Liu, J.L.; Feng, Y.H.; Wu, P.; He, P.K. PM2.5 concentration prediction using weighted CEEMDAN and improved LSTM neural network. Environ. Sci. Pollut. Res. 2023, 30, 75104–75115. [Google Scholar] [CrossRef] [Scilit] [PubMed]
- Che, Z.Y.; Peng, C.; Yue, C.X. Optimizing LSTM with multi-strategy improved WOA for robust prediction of high-speed machine tests data. Chaos Solitons Fractals 2024, 178, 114394. [Google Scholar] [CrossRef] [Scilit]
- Kumar, K.; Haider, M.T.U. Enhanced prediction of intra-day stock market using metaheuristic optimization on RNN-LSTM network. New Gener. Comput. 2021, 39, 231–272. [Google Scholar] [CrossRef] [Scilit]
- Merkle, D.; Middendorf, M.; Schmeck, H. Ant colony optimization for resource-constrained project scheduling. IEEE Trans. Evolut. Comput. 2002, 6, 333–346. [Google Scholar] [CrossRef] [Scilit]
- Aghelpour, P.; Graf, R.; Tomaszewski, E. Coupling ANFIS with ant colony optimization (ACO) algorithm for 1-, 2-, and 3-days ahead forecasting of daily streamflow, a case study in Poland. Environ. Sci. Pollut. Res. 2023, 30, 56440–56463. [Google Scholar] [CrossRef] [Scilit]
- Ribeiro, M.H.D.M.; dos Santos Coelho, L. Ensemble approach based on bagging, boosting and stacking for short-term prediction in agribusiness time series. Appl. Soft Comput. 2020, 86, 105837. [Google Scholar] [CrossRef] [Scilit]
- Feng, L.W.; Li, Y.Y.; Wang, Y.M.; Du, Q.Y. Estimating hourly and continuous ground-level PM2.5 concentrations using an ensemble learning algorithm: The ST-stacking model. Atmos. Environ. 2020, 223, 117242. [Google Scholar] [CrossRef] [Scilit]





| Parameter | Range of Variation |
|---|---|
| The number of ant | [10, 20, 30, 40, 50] |
| The number of neurons of the LSTM | [16, 32, 64, 128] |
| Dropout | [0.2, 0.3, 0.4, 0.5] |
| The number of epochs in model training | [20, 30, 40, 50, 60] |
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content. |
© 2025 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https://creativecommons.org/licenses/by/4.0/).
Share and Cite
Liu, Z.; Hong, X. Improved Prediction of Hourly PM2.5 Concentrations with a Long Short-Term Memory Optimized by Stacking Ensemble Learning and Ant Colony Optimization. Toxics 2025, 13, 327. https://doi.org/10.3390/toxics13050327
Liu Z, Hong X. Improved Prediction of Hourly PM2.5 Concentrations with a Long Short-Term Memory Optimized by Stacking Ensemble Learning and Ant Colony Optimization. Toxics. 2025; 13(5):327. https://doi.org/10.3390/toxics13050327
Chicago/Turabian StyleLiu, Zuhan, and Xianping Hong. 2025. "Improved Prediction of Hourly PM2.5 Concentrations with a Long Short-Term Memory Optimized by Stacking Ensemble Learning and Ant Colony Optimization" Toxics 13, no. 5: 327. https://doi.org/10.3390/toxics13050327
APA StyleLiu, Z., & Hong, X. (2025). Improved Prediction of Hourly PM2.5 Concentrations with a Long Short-Term Memory Optimized by Stacking Ensemble Learning and Ant Colony Optimization. Toxics, 13(5), 327. https://doi.org/10.3390/toxics13050327

