Evolving-Graph Gaussian Processes (e-GGPs) model the evolution of graph nodes via a GP. The method uses a kernel that considers the neighbourhood and node attributes of the graph. The e-GGP code provided here can be used for regression tasks on dynamic graphs.
If you find this code useful, please consider citing:
@article{blancomulero2021evolvinggraph,
title={Evolving-Graph Gaussian Processes},
author={David Blanco-Mulero and Markus Heinonen and Ville Kyrki},
year={2021},
journal={arXiv preprint arXiv:2106.15127},
eprint={2106.15127},
archivePrefix={arXiv},
primaryClass={cs.LG}
}
The repository contains the following:
e_ggp/evolving_gp.py
- e-GGP model.e_ggp/kernels.py
- attributed sub-tree kernel used in e-GGP .train_eggp.py
- script for training e-GGP using one of the given datasets.
The e_ggp/kernels.py
file contains an implementation of the kernel used in the paper:
We also provide utils that are used for selecting the training points, creating the datasets as well as plot utils in the folder e_ggp/utils
.
The code is mainly based on GPyTorch and uses Python-igraph for defining the graphs.
To install the requirements you can run
pip install --user -r requirements.txt
You can run the training for the graph interaction dataset with:
python3 train_eggp.py -df datasets/graph_interaction_origin.npy
-dt datasets/graph_interaction_test/ --new_dataset
For an estimation of the training time we encourage you to have a look at the paper Supplementary material section.
We provide a Jupyter Notebook as well as more detailed instructions on how to train the given datasets using our model.
If you want to use your own dataset take a look at the GraphInteraction
and
IsolatedSubgraphs
classes which inherit from GraphDataset
in
datasets.py.
We provide the datasets of the two environments used in the paper in datasets/
.
Graph-Interaction environment | Isolated evolving sub-graphs environment |
---|---|
![]() |
![]() |
The Graph-Interaction environment is based on MuJoCo-Py.
The code for the isolated evolving sub-graphs environment can be found in
environments/water_2d.py
.
The environment is based on Taichi-MPM and Taichi-elements