Nonlinear optimization of recurrent neural networks in the prediction of air quality
摘要
Accurate short-term PM2.5 forecasting is challenging in low-resource sensing environments due to noisy and incomplete data. This study proposes a nonlinear optimization guided long short-term memory (LSTM) model using the Uganda AirQo dataset, comprising 759,480 hourly observations from 68 monitoring sites. The method integrates an attention-enhanced LSTM with a constrained optimization step based on Karush–Kuhn–Tucker (KKT) conditions, where parameters are updated with Adam and then corrected to enforce feasibility constraints during training. Forecasting is formulated as a one-hour-ahead task using a 72-hour input window and evaluated on 90,638 test predictions across 53 sites. The proposed model achieves RMSE = 14.5667, MAE = 8.7063, and R² = 0.6820, performing comparably to the strongest baseline, HistGradientBoosting (RMSE = 14.5608). It also shows improved performance on high-concentration events and maintains competitive accuracy under station-holdout validation. These results indicate that nonlinear optimization can stabilize recurrent training and reduce overfitting while preserving predictive performance in noisy air-quality datasets.