/CaNet

Code for WWW2024 Oral paper "Graph Out-of-Distribution Generalization via Causal Intervention”.

Primary LanguagePython

CaNet

The official implementation for WWW2024 Oral paper "Graph Out-of-Distribution Generalization via Causal Intervention"

Related material: [Paper], [Blog]

What's news

[2024.02.08] We release the code for the model on six datasets. More detailed info will be updated soon.

Model and Results

Our model coordinates two key components 1) an environment estimator that infers pseudo environment labels, and 2) a mixture-of-expert GNN predictor with feature propagation units conditioned on the pseudo environments.

image

Dataset

One can download the datasets Planetoid (Cora, Citeseer, Pubmed), Arxiv, Twitch, and Elliptic from the google drive link below:

https://drive.google.com/drive/folders/1FAPWghoyGp9vzr1xmnndpmLLFS1OgBDa?usp=sharing

Dependence

Python 3.8, PyTorch 1.13.0, PyTorch Geometric 2.1.0, NumPy 1.23.4

Run the codes

Please refer to the bash script run.sh in each folder for running the training and evaluation pipeline on six datasets.

Citation

If you find our code and model useful, please cite our work. Thank you!

      @inproceedings{wu2024canet,
      title = {Graph Out-of-Distribution Generalization via Causal Intervention},
      author = {Qitian Wu and Nie Fan and Chenxiao Yang and Tianyi Bao and Junchi Yan},
      booktitle = {The Web Conference},
      year = {2024}
      }