Application of stacked Transformer-XGBoost model and SHAP interpretability in air quality index prediction in Linfen City.
Journal:
iScience
Published Date:
Aug 11, 2026
Abstract
This study proposes a stacked Transformer-XGBoost framework with Shapley Additive Explanations (SHAP) interpretability to improve Air Quality Index prediction in Linfen City, a heavily industrialized region characterized by complex pollution dynamics and strong seasonal variability. The model combines Transformer-based temporal feature extraction with XGBoost nonlinear regression through a temporally consistent out-of-fold stacking strategy, enabling effective learning of sequential dependencies and pollutant-meteorology interactions. Using historical air quality and meteorological data from 2013 to 2024, the proposed framework achieved superior predictive performance (R2 = 0.955, RMSE = 9.05, MAE = 2.91), outperforming conventional machine learning and deep learning models. SHAP analysis revealed that PM2.5, NO2, lagged AQI, and seasonal temporal factors were the dominant drivers of AQI variation, highlighting the importance of pollution persistence and meteorological stagnation. The findings provide both an accurate forecasting framework and interpretable insights to support early warning systems, adaptive emission control, and sustainable urban air-quality management.
Authors
Keywords
No keywords available for this article.