DMGENet forecasts multi-station PM2.5 by modeling station relations with
four complementary graphs — distance (D), neighborhood (N), distribution
similarity (S), and functional similarity (F) — and dynamically combining
the four graph-wise predictions through a reinforcement-learning integrator
(RLMC).
The animation above uses a representative high-pollution interval from
Beijing_12 to show how PM2.5 varies across stations while the four graph
views provide complementary station-relation structures.
Four datasets are supported:
| Dataset | Stations | Period |
|---|---|---|
Beijing_12 |
12 | 2013.03–2017.02 |
Beijing_Recent_12 |
12 | 2020–2023 |
Chengdu_10 |
8 | 2020–2023 |
Delhi_NCT_Meteo |
12 | 2017.09–2020.07 |
Four baselines are bundled and share the same benchmark protocol as DMGENet:
iTransformerSTAEformerPM2.5-GNNMSTGAN
| Item | Setting |
|---|---|
| Input length | 72 hours |
| Forecast horizon | 1, 6, 12, 24 hours |
| Target | PM2.5 |
| Metrics | MAE, RMSE, IA |
| Model selection | Validation-set early stopping |
.
├── baselines/ Baseline implementations and the unified runner
├── data/ Dataset preparation utilities and dataloaders
├── dataset/ Dataset files, graph assets, and split manifests
├── graphs/ D / N / S / F graph construction
├── models/ DMGENet model components
├── pipelines/ End-to-end experiment scripts
├── rlmc/ Graph-integration inputs and the RL-guided integrator
├── utils/ Metrics and shared utilities
├── train_base.py Train graph-specific DMGENet base predictors
├── train_rlmc.py Train the graph-level integration module
└── setup_env.sh Environment bootstrap script
bash setup_env.shThis creates a local .venv/ with all required dependencies
(PyTorch, NumPy, pandas, scikit-learn, GeoPandas, NetworkX, and the Overpass
client used by the functional-graph builder). A CUDA-capable GPU is required
for baseline training; DMGENet itself can be run on CPU for small datasets.
.venv/bin/python data/compact_dataset.py --dataset all.venv/bin/python graphs/build_graphs.py --dataset Beijing_12
.venv/bin/python graphs/build_graphs.py --dataset Beijing_Recent_12
.venv/bin/python graphs/build_graphs.py --dataset Chengdu_10
.venv/bin/python graphs/build_graphs.py --dataset Delhi_NCT_Meteo.venv/bin/python train_base.py --dataset Beijing_12 --pred-lens 1 6 12 24.venv/bin/python rlmc/prepare_data.py --dataset Beijing_12
.venv/bin/python rlmc/errors.py --dataset Beijing_12.venv/bin/python train_rlmc.py --dataset Beijing_12 --pred-lens 1 6 12 24.venv/bin/python baselines/run_baseline.py --model itransformer --dataset Beijing_12 --horizon 1 6 12 24
.venv/bin/python baselines/run_baseline.py --model staeformer --dataset Beijing_12 --horizon 1 6 12 24
.venv/bin/python baselines/run_baseline.py --model pm25_gnn --dataset Beijing_12 --horizon 1 6 12 24
.venv/bin/python baselines/run_baseline.py --model mstgan --dataset Beijing_12 --horizon 1 6 12 24bash pipelines/run_unified_pipeline.shSee pipelines/README.md for the pipeline details.
| Component | Path |
|---|---|
| DMGENet graph-specific predictors | results/base_models/{dataset}/{graph}/72/{horizon}/ |
| RL-guided graph integration | results/rlmc/{dataset}/proposed/72/{horizon}/ |
| Baselines | results/baselines/{model}/{dataset}/72/{horizon}/ |
Each result directory contains the trained checkpoint, the training log,
validation/test metrics (val_metrics.csv, test_metrics.csv), inverse-
transformed predictions, and the full run configuration.
If you use this repository, please cite the associated paper.
A Reinforcement Learning-Based Spatiotemporal Dynamic Multi-Graph Ensemble
Framework for Multi-Station Air Quality Prediction.
Accepted by Engineering Applications of Artificial Intelligence (EAAI).
Full bibliographic metadata will be added after the DOI, volume, issue, and
page/article number are assigned.
