Implementaion of ICML2022 paper
This work develops mixup for graph data. Mixup has shown superiority in improving the generalization and robustness of neural networks by interpolating features and labels between two random samples. Traditionally, Mixup can work on regular, grid-like, and Euclidean data such as image or tabular data. However, it is challenging to directly adopt Mixup to augment graph data because different graphs typically: 1) have different numbers of nodes; 2) are not readily aligned; and 3) have unique typologies in non-Euclidean space. To this end, we propose
- Requirements
pytorch==1.7.1
cudatoolkit==11.0
torch==1.7.1
torch_geometric==1.6.3
opencv-python==4.5.3.56
scikit-image==0.18.3
- to install torch-geometric==1.6.3
pip install torch_spline_conv-1.2.0-cp37-cp37m-linux_x86_64.whl
pip install torch_scatter-2.0.5-cp37-cp37m-linux_x86_64.whl
pip install torch_sparse-0.6.8-cp37-cp37m-linux_x86_64.whl
pip install torch_cluster-1.5.8-cp37-cp37m-linux_x86_64.whl
pip install torch-geometric==1.6.3
- Data
We use the dataset built in torch_geometric. The dataset will be downloaded automatically.
- Run Experiments
run the run_vinilla.sh for vinilla GIN.
run the run_gmixup.sh for g-mixup.
If you use this code in your research, please cite our paper.
@article{han2022g,
title={G-Mixup: Graph Data Augmentation for Graph Classification},
author={Han, Xiaotian and Jiang, Zhimeng and Liu, Ninghao and Hu, Xia},
journal={arXiv preprint arXiv:2202.07179},
year={2022}
}