Skip to content

About

benchmark

Resources

Stars

14 stars

Watchers

0 watching

Forks

Latest commit

 

History

13 Commits

Folders and files

Repository files navigation

AirQualityBench

Global air quality forecasting
3,720 monitoring stations · 6 pollutants · 2021–2025

Project website

Air quality stations measure different pollutants and often report at different times. In the five-year OpenAQ record used here, just 25.34% of all possible station–hour–pollutant readings are available. Models use the preceding 24 hours to forecast PM₂.₅, PM₁₀, NO₂, O₃, SO₂ and CO. Only recorded targets contribute to the evaluation.

Locations of 3,720 monitoring stations and the share of station-hours with a valid reading for each pollutant, 2021–2025.

News

  • November 30, 2026 · Added results for 10 new baselines, bringing the benchmark to 22 models. BigST, HimNet, MSTHG, PatchSTG, RPMixer, SOFTS, STBP, STDN, STPGNN and STSGNN now have scores at 6, 12, 18 and 24 hours. Their hourly predictions can also be compared on the project website.
  • May 26, 2026 · Added a Hugging Face download for the processed dataset.
  • April 30, 2026 · Released the original benchmark code on GitHub.

Leaderboard

2025 test set · Macro NMAE (lower is better)

Each column scores forecast hours 1 through the stated horizon. Superscripts show the rank within each column. Rows are ordered by the 24 h result.

Model 6 h 12 h 18 h 24 h
Graph WaveNet 0.16054 4 0.19394 3 0.19386 3 0.18130 1
DCRNN 0.15723 1 0.19720 4 0.19775 4 0.19415 2
STGCN 0.17685 6 0.20838 9 0.20088 6 0.20406 3
D2STGNN 0.15732 2 0.18908 2 0.18532 2 0.20911 4
PDFormer 0.18772 7 0.19753 5 0.20751 7 0.20942 5
STTN 0.15817 3 0.18472 1 0.18196 1 0.21053 6
STPGNN 0.19211 8 0.20505 7 0.21085 8 0.21350 7
STBP 0.19763 10 0.21085 10 0.21532 10 0.21815 8
SOFTS 0.19298 9 0.20787 8 0.21466 9 0.21915 9
MAGE 0.16666 5 0.19998 6 0.19894 5 0.22194 10
STSGNN 0.20160 11 0.21911 12 0.22229 11 0.22223 11
RPMixer 0.20573 13 0.21799 11 0.22393 12 0.22572 12
STDN 0.22191 16 0.22743 13 0.22870 13 0.22928 13
AGCRN 0.21785 14 0.23078 14 0.23541 14 0.23525 14
PatchSTG 0.22000 15 0.23259 15 0.23752 15 0.23782 15
BigST 0.22662 17 0.23915 17 0.24178 16 0.24255 16
DSTAGNN 0.20479 12 0.23367 16 0.25322 17 0.27296 17
ASTGCN 0.28424 19 0.33537 18 0.30137 18 0.30121 18
HimNet 0.39574 21 0.37750 20 0.36950 20 0.36312 19
MSTHG 0.34498 20 0.34992 19 0.35742 19 0.36383 20
BiST 0.27373 18 0.38968 21 0.41865 21 0.42287 21
IGSTGNN 0.42341 22 0.50359 22 0.50235 22 0.50393 22

Macro NMAE gives each pollutant equal weight. For each pollutant, its MAE is divided by its published standard deviation plus 1e-5 before the six values are averaged. All published 24 h scores use the same 8,713 hourly forecast origins. At shorter horizons, the number of origins varies by model.

Dataset

Download the processed benchmark on Hugging Face and place the files in ./data/. The release contains hourly OpenAQ observations, the masks that identify valid readings, station metadata and the spatial graph.

Split Calendar years Hourly time steps
Training 2021–2023 26,280
Validation 2024 8,784
Test 2025 8,760
File layout and pollutant order
data/
├── aq_compact_2021.h5
├── aq_compact_2022.h5
├── aq_compact_2023.h5
├── aq_compact_2024.h5
├── aq_compact_2025.h5
├── adj_mx_10.pkl
├── scaler.csv
└── selected_nodes_metadata.csv

Each yearly HDF5 file contains values (float32) and masks (boolean), both shaped (hours, 3720, 6). The station_ids array gives the station order. The params array lists the channels in the order pm25, pm10, no2, o3, so2, co.

Station coordinates are in selected_nodes_metadata.csv. The spatial graph uses haversine distance to find each station’s ten nearest neighbors and applies Gaussian weights to the edges.

Normalization statistics

The released scaler.csv provides a mean and standard deviation for each pollutant. The table rounds the values to two decimal places. Observations retain the numerical scales of the source records, whose units can vary within a pollutant.

Pollutant Mean Standard deviation
PM₂.₅ 11.66 20.87
PM₁₀ 22.08 26.47
NO₂ 13.26 16.06
O₃ 22.48 31.81
SO₂ 4.08 8.72
CO 228.46 416.08
Mirror and raw hourly archive
Download Years Contents Extraction code
Processed dataset mirror 2021–2025 Yearly HDF5 files, graph and normalization statistics m457
Raw hourly archive 2017–2025 Daily archives of station-level CSV files yqda

Quick start

With the processed data in ./data/, run the following from the repository root to train STGCN on 24 hours of history and forecast the next 24 hours.

python -m pip install torch numpy pandas h5py tqdm
python main.py --model stgcn --w_in 24 --w_out 24 --batch_size 1 --epochs 50

The reference trainer supports 12 baseline architectures. It writes per-epoch metrics to results.csv and saves the weights with the lowest validation Global_MAE in the run directory under outputs/.

Available models and example runs

Choose a model with --model. The available identifiers are stgcn, dcrnn, gwn (Graph WaveNet), agcrn, astgcn, sttn, pdformer, dstagnn, d2stgnn, mage, bist and igstgnn. Each model takes inputs and returns predictions shaped (batch, hours, stations, pollutants).

The runner directory contains 48 shell scripts covering the 12 models at four output lengths. For example, this script trains Graph WaveNet for a 24-hour forecast.

bash runner/run_gwn_24_24.sh
Command-line reference
Option Default Purpose
--model stgcn Baseline architecture
--data_dir ./data Directory containing yearly HDF5 files
--adj_path ./data/adj_mx_10.pkl Station graph
--scaler_path ./data/scaler.csv Pollutant normalization statistics
--w_in / --w_out 24 / 24 Hours of history and hours to forecast
--step 1 Hours between consecutive window starts in each split
--batch_size / --epochs 64 / 100 Windows per batch and training epochs
--lr / --weight_decay 0.001 / 1e-5 Adam learning rate and weight decay
--gpu 0 CUDA device index when CUDA is available
--output_dir ./outputs Parent directory for training runs
--resume_dir Empty Existing run directory containing saved weights and logs
Training and evaluation in the reference trainer

Training minimizes masked MAE on standardized values with Adam. The learning-rate scheduler monitors validation Global_MAE with a patience of five epochs and a reduction factor of 0.5.

At each epoch the trainer computes MAE, MSE, RMSE and MAPE on the validation and test splits after inverse normalization. Each batch produces one set of metrics across all valid observations and one set per pollutant. The CSV records the mean of the batch metrics. MAPE uses abs(target) + 0.1 in its denominator.

To continue a run, pass its directory through --resume_dir. The trainer loads the saved best weights and continues from the epoch following that checkpoint with a fresh optimizer and scheduler.

License

MIT

About

benchmark

Resources

Stars

14 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages