A Federated Learning Approach for Real-Time Air Quality Index Prediction
Abstract
Air pollution is among the most pressing environmental and public-health challenges of the twenty-first century, contributing significantly to respiratory and cardiovascular disease burden worldwide. Accurate and timely prediction of the Air Quality Index (AQI) is essential for early-warning systems, urban planning, and individual health protection. Conventional AQI prediction systems rely on centralized machine learning pipelines that require raw sensor data to be transmitted to and stored on a single server, which raises serious concerns regarding data privacy, network bandwidth consumption, and single points of failure. This paper proposes a Federated Learning (FL) based framework for real-time AQI prediction that enables multiple distributed monitoring stations to collaboratively train a shared Long Short-Term Memory (LSTM) prediction model without ever exchanging raw pollutant readings. Each client node performs local model training on its own historical and streaming sensor data, and only model parameter updates are communicated to a central aggregation server, which combines them using the Federated Averaging (FedAvg) algorithm to produce an improved global model. The resulting global model is redistributed to all participating nodes for real-time inference. We evaluate the proposed framework using multi-station air quality datasets containing PM2.5, PM10, CO, NO2, SO2 and O3 concentrations together with meteorological covariates such as temperature, humidity and wind speed. Experimental results indicate that the federated model achieves prediction accuracy comparable to, and in several configurations exceeding, a centralized baseline, while reducing raw data transmission by over ninety percent and preserving station-level data privacy. The proposed system achieved a Root Mean Squared Error (RMSE) of 9.6 µg/m3, a Mean Absolute Error (MAE) of 6.8 µg/m3, and an R2 score of 0.91, outperforming both a local-only training baseline and a centralized LSTM baseline on the evaluated non-IID data distribution. These findings demonstrate that federated learning is a practical and scalable paradigm for building privacy-aware, real-time air-quality forecasting systems suitable for smart-city deployment












