/CG-ODE

Primary LanguagePython

CG-ODE

CG-ODE is an overall framework for learning the co-evolutioin of nodes and edges in multi-agent dynamical systems.

You can see our KDD 2021 paper Coupled Graph ODE for Learning Interacting System Dynamics for more details.

This implementation of CG-ODE is based on Pytorch Geometric API.

Data Preparation

Covid-19 Dataset

The daily trendy data is obtained from JHU CSSE. The mobility data is obtained from SafeGraph where you need to register first and request the data. The script for generating the mobility data matrix from raw data is available upon request.

Social Network Dataset

Generate the simulated social opinion dynamic dataset by running:

cd data/social
python generate_socialNetwork.py 

The original generation process can be found at Co-Evolve KDD17

Setup

This implementation is based on pytorch_geometric. To run the code, you need the following dependencies:

Usage

Execute the following script to train on the social network dataset:

python run_models_social.py

Execute the following script to train on the covid-19 dataset:

python run_models_covid.py

There are some key options of this scrips:

  • --pred_length: The number of days you want to predict.

  • --condition_length: The number of days you want to condition on.

  • --solver : This is for choosing your ODE Solver.

The details of other optional hyperparameters can be found in run_models_social.py, run_models_covid.py, respectively.

Citation

Please consider citing the following paper when using our code for your application.

@inproceedings{CG-ODE,
  title={Coupled Graph ODE for Learning Interacting System Dynamics},
  author={Zijie Huang and Yizhou Sun and Wei Wang},
  booktitle={Proceedings of the 27th ACM SIGKDD Conference on Knowledge Discovery & Data Mining},
  year={2021}
}