RepositoryPythonJPJapan
deepkashiwa20

deepkashiwa20/MegaCRN

[AAAI23] This it the official github for AAAI23 paper "Spatio-Temporal Meta-Graph Learning for Traffic Forecasting"

151stars
27forks
7issues
2views

Featured achievements

The project's latest awards

1
TINIX TRENDING·Topic: traffic-forecasting

#1 Repository of the month

1
TINIX TRENDING·Topic: convolutional-recurrent-network

#1 Repository of the month

1
TINIX TRENDING·Topic: multivariate-time-series-prediction

#1 Repository of the month

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)

BenchmarkMAE/RMSE/MAPE@3rd stepMAE/RMSE/MAPE@6th stepMAE/RMSE/MAPE@12th step
METR-LA2.52/4.94/6.44%2.93/6.06/7.96%3.38/7.23/9.72%
PEMS-BAY1.28/2.72/2.67%1.60/3.68/3.57%1.88/4.42/4.41%
BenchmarkMAE/RMSE/MAPE@1st stepMAE/RMSE/MAPE@3rd stepMAE/RMSE/MAPE@6th step
EXPY-TKY5.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.

Similar Projects

Discover other similar projects and AI models.

Modelsentence-similarity
sentence-transformers/all-MiniLM-L6-v2

all-MiniLM-L6-v2 This is a sentence-transformers(https://www.SBERT.net) model: It maps sentences & paragraphs to a 384 dimensional dense vector space and can be used for tasks like clustering or semantic search. Usage (Sentence-Transformers) Using t...

♥0
157.6M
Jun 1, 2026
RepositoryPython
pyg-team/pytorch_geometric

Graph Neural Network Library for PyTorch

24.2k
Nov 6, 2026
RepositoryPython
benedekrozemberczki/pytorch_geometric_temporal

PyTorch Geometric Temporal: Spatiotemporal Signal Processing with Neural Machine Learning Models (CIKM 2021)

3.0k
May 30, 2026
RepositoryPython
yueliu1999/Awesome-Deep-Graph-Clustering

[IEEE T-KDE 2026] Awesome Deep Graph Clustering is a collection of SOTA, novel deep graph clustering methods (papers, codes, and datasets).

1.0k
Sep 28, 2026
RepositoryPython
wengwenchao123/DDGCRN

[Pattern Recognition] Decomposition Dynamic Graph Conolutional Recurrent Network for Traffic Forecasting

103
Sep 2, 2025
RepositoryJupyter Notebook
naganandy/graph-based-deep-learning-literature

links to conference publications in graph-based deep learning

5.1k
Oct 20, 2026
Repository
safe-graph/graph-fraud-detection-papers

A curated list of Graph/Transformer-based fraud, anomaly, and outlier detection papers & resources

1.9k
Nov 15, 2026
RepositoryTypeScript
firecrawl/firecrawl

Firecrawl is the knowledge infrastructure to make your agents smarter. It connects your agents to the web, and to Alexandria, our library of everything else.

215.1k
Dec 2, 2026
RepositoryPython
666ghj/MiroFish

A Simple and Universal Swarm Intelligence Engine, Predicting Anything. 简洁通用的群体智能引擎,预测万物

87.3k
Oct 16, 2026