Official PyTorch implementation of the paper Subgraph Aggregation for Out-of-Distribution Generalization on Graphs(SuGAr) in AAAI 2025.
run the following command to install environment:
pip install -r requirement.txtplus the DrugOOD benchmark repo and config.
The data used in the paper can be obtained following these instructions.
Train
python main.py -c_in 'feat' -c_rep 'feat' --seed '[1,2,3,4,5,6,7,8,9,10]' --num_layers 3 --dataset 'SUMotif' --bias 0.6 --r 0.25 --contrast 2 --spu_coe 0 --model 'gcn' --dropout 0 --epoch 40 --init 1 --penalty 1 --sample_rate 95 --save_modelEnsemble
python ens.py -c_in 'feat' -c_rep 'feat' --num_layers 3 --dataset 'SUMotif' --bias 0.6 --r 0.25 --contrast 2 --spu_coe 0 --model 'gcn' --dropout 0 --init 1 --penalty 1 --sample_rate 95 --divpIf you find our paper and repo useful, please cite our paper:
@article{Liu_2025_sugar,
title={Subgraph Aggregation for Out-of-Distribution Generalization on Graphs}, volume={39},
url={https://ojs.aaai.org/index.php/AAAI/article/view/34065},
DOI={10.1609/aaai.v39i18.34065},
number={18},
journal={Proceedings of the AAAI Conference on Artificial Intelligence},
author={Liu, Bowen and Li, Haoyang and Wang, Shuning and Nie, Shuo and Zhang, Shanghang},
year={2025},
month={Apr.},
pages={18763-18771}
}We would like to acknowledge the contribution from CIGA to the base codes.
