This repository is the official implementation of the methods in the publication
- Alexander Nikitin, ST John, Arno Solin, and Samuel Kaski (2022). Non-separable spatio-temporal graph kernels via SPDEs. In Proceedings of the 25th International Conference on Artificial Intelligence and Statistics (AISTATS). [arXiv]
We leverage an explicit link between stochastic partial differential equations (SPDEs) and Gaussian processes on graphs and derive non-separable spatio-temporal graph kernels that capture interaction across space and time. We formulate the graph kernels for the stochastic heat equation and wave equation. We show that by providing novel tools for spatio-temporal GP modelling on graphs, we outperform pre-existing graph kernels in real-world applications that feature diffusion, oscillation, and other complicated interactions.
The repo uses git-lfs to store datasets. To fetch the data use:
git lfs fetch
The code was tested with python==3.6
and should work for python>=3.6
.
To install the required packages, run:
pip install -r requirements.txt
pip install -e .
The repository contains two sets of kernels for time-independent and temporal processes on graphs.
- Time-independent kernels are stored in
graph_kernels/kernels.py
. - Temporal kernels are stored in
graph_kernels/time_kernels.py
. - SHEK and SWEK are implemented in
graph_kernels/time_kernels.py:StochasticHeatEquation
andgraph_kernels/time_kernels.py:StochasticWaveEquationKernel
.
We provide an experimental evaluation of the proposed kernels on several datasets.
python experiments/1d_experiments.py --interpolation --dump_directory=$PATH_TO_RESULTS
python experiments/1d_experiments.py --extrapolation --dump_directory=$PATH_TO_RESULTS
python experiments/run_chicken_pox.py --num_test_weeks=2 --interpolation --dump_directory=$PATH_TO_RESULTS
python experiments/run_chicken_pox.py --num_test_weeks=2 --extrapolation --dump_directory=$PATH_TO_RESULTS
python experiments/run_covid_experiments.py --log_target --no-use_flight_graph \
--no-use_normalized_target --num_test_weeks=2 --interpolation --dump_directory=$PATH_TO_RESULTS
python experiments/run_covid_experiments.py --log_target --no-use_flight_graph \
--no-use_normalized_target --num_test_weeks=2 --interpolation --dump_directory=$PATH_TO_RESULTS
Open with jupyter-notebook:
./experiments/1d_wave_experiments.ipynb
If you use the code in this repository for your research, please cite the paper as follows:
@inproceedings{nikitin2022non,
title={Non-separable spatio-temporal graph kernels via SPDEs},
author={Nikitin, Alexander V and John, ST and Solin, Arno and Kaski, Samuel},
booktitle={International Conference on Artificial Intelligence and Statistics},
pages={10640--10660},
year={2022},
organization={PMLR}
}
For all correspondence, please contact [email protected].
This software is provided under the Apache License 2.0.