Skip to content

Latest commit

 

History

History
75 lines (60 loc) · 4.82 KB

README.md

File metadata and controls

75 lines (60 loc) · 4.82 KB

MegaCRN: Meta-Graph Convolutional Recurrent Network

[AAAI23] R. Jiang*, Z. Wang*, J. Yong, P. Jeph, Q. Chen, Y. Kobayashi, X. Song, S. Fukushima, T. Suzumura, "Spatio-Temporal Meta-Graph Learning for Traffic Forecasting", Proc. of Thirty-Seventh AAAI Conference on Artificial Intelligence (AAAI), 2023. (*Corresponding and equally contributed)

Code and data are now available.

@inproceedings{jiang2023spatio,
  title={Spatio-temporal meta-graph learning for traffic forecasting},
  author={Jiang, Renhe and Wang, Zhaonan and Yong, Jiawei and Jeph, Puneet and Chen, Quanjun and Kobayashi, Yasumasa and Song, Xuan and Fukushima, Shintaro and Suzumura, Toyotaro},
  booktitle={Proceedings of the AAAI Conference on Artificial Intelligence},
  volume={37},
  number={7},
  pages={8078--8086},
  year={2023}
}

Preprints

Arxiv link

Performance on Traffic Speed Benchmarks

PWC PWC PWC

Updated Results (arXiv and camera-ready papers will be revised accordingly very soon)

Benchmark MAE/RMSE/MAPE@3rd step MAE/RMSE/MAPE@6th step MAE/RMSE/MAPE@12th step
METR-LA 2.52/4.94/6.44% 2.93/6.06/7.96% 3.38/7.23/9.72%
PEMS-BAY 1.28/2.72/2.67% 1.60/3.68/3.57% 1.88/4.42/4.41%
Benchmark MAE/RMSE/MAPE@1st step MAE/RMSE/MAPE@3rd step MAE/RMSE/MAPE@6th step
EXPY-TKY 5.81/9.20/24.49% 6.44/10.33/28.92% 6.83/11.04/31.02%

Requirements

  • Python 3.8.8 -> Anaconda Distribution
  • pytorch 1.9.1 -> py3.8_cuda11.1_cudnn8.0.5_0
  • pandas 1.2.4
  • numpy 1.20.1
  • torch-summary 1.4.5 -> pip install torch-summary https://pypi.org/project/torch-summary/ (must necessary)
  • jpholiday -> pip install jpholiday (not must, but if you want onehottime)

General Description

  • The directory is structured in a flat style and only with two levels.
  • The datasets are stored in DATA directories, and the model codes are put in model_DATA directories.
  • The training and testing function is merged into one file, we can just run "python traintest_MegaCRN.py" under each model directory.
  • Also we can run "python MegaCRN.py" to simply check the model architecture without feeding the data.
  • Also under model directory, metrics.py file contains the metric functions and utils.py file contains a set of supporting functions.
How to run our model (general command)?
  • python generate_training_data.py --dataset=DATA
  • cd model
  • python traintest_MegaCRN.py --dataset=DATA --gpu=GPU_DEVICE_ID
  • DATA = {METRLA, PEMSBAY}
  • For PEMSBAY dataset, please first upzip ./PEMSBAY/pems-bay.zip to get ./PEMSBAY/pems-bay.h5 file.
  • You can also run GTS as a baseline model in a similary way.
How to run our model on EXPY-TKY?
  • cd model_EXPYTKY
  • python traintest_MegaCRN.py --dataset=DATA --gpu=GPU_DEVICE_ID
  • DATA = {EXPYTKY, EXPYTKY*}
  • EXPYTKY with 1843 links is the data used in our paper; EXPYTKY* is a superset of EXPYTKY that contains all 2841 expy-tky links.
Arguments (METR-LA and PEMS-BAY)

The default hyperparameters used in our paper are written in model/traintest_MegaCRN.py as follows. The ratio for train:valid:test is roughly 7:1:2, generated by generate_training_data.py. Please check the codes from parser = argparse.ArgumentParser().

Arguments (EXPY-TKY)

The hyperparameters for EXPY-TKY are in model_EXPYTKY/traintest_MegaCRN.py. Note EXPY-TKY data is structured by month, where '202110' and '202111' used as training and validation and '202112' used as testing. By further setting val_ratio as 0.25 (that meas 25% data of '202110' and '202111' as valid data), the ratio for train:valid:test is roughly 3:1:2. The time interval for EXPY-TKY is 10 minutes, thus observation/prediction horizon are both set to 6, to perform 1-hour-to-1-hour forecasting.

Acknowledgment to GTS, DCRNN, and AGCRN.