Coder Social home page Coder Social logo

hkuds / stexplainer Goto Github PK

View Code? Open in Web Editor NEW
30.0 3.0 2.0 48.39 MB

[CIKM'2023] "STExplainer: Explainable Spatio-Temporal Graph Neural Networks"

Home Page: https://dl.acm.org/doi/10.1145/3583780.3614871

License: Apache License 2.0

Python 100.00%
explainable-ai explainable-machine-learning graph-neural-networks spatio-temporal-data traffic-prediction

stexplainer's Introduction

Explainable Spatio-Temporal Graph Neural Networks

This is the PyTorch implementation by @Jiabin Tang for STExplainer model proposed in this paper:

Explainable Spatio-Temporal Graph Neural Networks
Jiabin Tang, Lianghao Xia, Chao Huang*
CIKM 2023

* denotes corresponding author

STExplainer

In this paper, we propose an Explainable Spatio-Temporal Graph Neural Networks (STExplainer) framework that enhances STGNNs with inherent explainability, enabling them to provide accurate predictions and faithful explanations simultaneously. Our framework integrates a unified spatio-temporal graph attention network with a positional information fusion layer as the STG encoder and decoder, respectively. Furthermore, we propose a structure distillation approach based on the Graph Information Bottleneck (GIB) principle with an explainable objective, which is instantiated by the STG encoder and decoder.

Environment

Please first clone the repo and install the required environment, which can be done by running the following commands:

conda env create -n stexplainer python=3.8

conda activate stexplainer

# Torch with CUDA 11.6
pip install torch==1.12.0+cu116 torchvision==0.13.0+cu116 torchaudio==0.12.0 --extra-index-url https://download.pytorch.org/whl/cu116
# Clone our STExplainer
git clone https://github.com/HKUDS/STExplainer.git
cd STExplainer
# Install required libraries
pip install -r requirements.txt

Dataset

We utilized three traffic datasets and two crime datasets to evaluate STExplainer: PEMS4, 7, 8 (Traffic), NYC, CHI crime (Crime).

Examples to run the codes

We could modify configuration at ./config to train or test our model on different datasets. There is an example on PEMS04:

  • train PEMS4 (note that the "testonly" in configuration file should be 0)
python train.py --config ./config/STExplainer_pems4.yaml
  • test PEMS4 (note that the "testonly" in configuration file should be 1, and there is a corresponding checkpoints at ./results/model)
python train.py --config ./config/STExplainer_pems4.yaml

Reference

If you find this work is helpful to your research, please consider citing our paper:

@inproceedings{10.1145/3583780.3614871,
author = {Tang, Jiabin and Xia, Lianghao and Huang, Chao},
title = {Explainable Spatio-Temporal Graph Neural Networks},
year = {2023},
isbn = {9798400701245},
publisher = {Association for Computing Machinery},
address = {New York, NY, USA},
url = {https://doi.org/10.1145/3583780.3614871},
doi = {10.1145/3583780.3614871},
booktitle = {Proceedings of the 32nd ACM International Conference on Information and Knowledge Management},
pages = {2432โ€“2441},
numpages = {10},
location = {Birmingham, United Kingdom},
series = {CIKM '23}
}

Acknowledgements

The structure of our code is based on GSAT, BasicTS and GIB. Thank for their work.

stexplainer's People

Contributors

eltociear avatar tjb-tech avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

stexplainer's Issues

How to conduct the Crime Data (NYC, CHI) experiment

Now we can only reproduce the experiment of PEMS4 data set, how to analyze the crime data?
If convenient, could you tell me how to obtain the raw data (NYC, CHI) and conduct the experiment using your method.
In addition, whether your project must run in Ubuntu environment. It is difficult to configure dependency packages in Windows 10.

Data Missing Experimental Setting

Hello, very great works!
Could you provide more details and codes for how to conduct data missing robustness experiments?
Thank you for consideration!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.