The official implementation for WWW2024 Oral paper "Graph Out-of-Distribution Generalization via Causal Intervention"
Related material: [Paper], [Blog (Chinese)], [Blog (English)], [Slides]
[2024.02.08] We release the code for the model on six datasets. More detailed info will be updated soon.
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](https://private-user-images.githubusercontent.com/89764090/303587999-04603d2b-4d1d-4a1b-a2c0-6110c325e84d.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzk2MjQ0MzQsIm5iZiI6MTczOTYyNDEzNCwicGF0aCI6Ii84OTc2NDA5MC8zMDM1ODc5OTktMDQ2MDNkMmItNGQxZC00YTFiLWEyYzAtNjExMGMzMjVlODRkLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMTUlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjE1VDEyNTUzNFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTZlNDRjN2Q2MTgxMTI1NGI2NjcyZDczZDdhYmI2ZWQzYTFjYTRjMjUzYzNlZjJlMWI1MmIyMzMxMzY2ZjM0NmImWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.MT-7vX-_AnmIGHZZuIHGINBzIORCmahe1z-bneou-OQ)
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
Python 3.8, PyTorch 1.13.0, PyTorch Geometric 2.1.0, NumPy 1.23.4
Please refer to the bash script run.sh
in each folder for running the training and evaluation pipeline on six datasets.
The implementation of training pipeline and evaluation is based on EERM.
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}
}