  Deep learning is a machine learning approach that produces excellent
performance in various applications, including natural language processing,
image identification, and forecasting. Deep learning network performance
depends on the hyperparameter settings. This research attempts to optimize the
deep learning architecture of Long short term memory (LSTM), Convolutional
neural network (CNN), and Multilayer perceptron (MLP) for forecasting tasks
using Particle swarm optimization (PSO), a swarm intelligence-based
metaheuristic optimization methodology: Proposed M-1 (PSO-LSTM), M-2 (PSO-CNN),
and M-3 (PSO-MLP). Beijing PM2.5 datasets was analyzed to measure the
performance of the proposed models. PM2.5 as a target variable was affected by
dew point, pressure, temperature, cumulated wind speed, hours of snow, and
hours of rain. The deep learning network inputs consist of three different
scenarios: daily, weekly, and monthly. The results show that the proposed M-1
with three hidden layers produces the best results of RMSE and MAPE compared to
the proposed M-2, M-3, and all the baselines. A recommendation for air
pollution management could be generated by using these optimized models
