The official source code for "S-Mixup: Structural Mixup for Graph Neural Networks", accepted at CIKM 2023 (Short Paper).
Existing studies for applying the mixup technique on graphs mainly focus on graph classification tasks, while the research in node classification is still under-explored. In this paper, we propose a novel mixup augmentation for node classification called Structural Mixup (S-Mixup). The core idea is to take into account the structural information while mixing nodes. Specifically, S-Mixup obtains pseudo-labels for unlabeled nodes in a graph along with their prediction confidence via a Graph Neural Network (GNN) classifier. These serve as the criteria for the composition of the mixup pool for both inter and intra-class mixups. Furthermore, we utilize the edge gradient obtained from the GNN training and propose a gradient-based edge selection strategy for selecting edges to be attached to the nodes generated by the mixup. Through extensive experiments on real-world benchmark datasets, we demonstrate the effectiveness of S-Mixup evaluated on the node classification task. We observe that S-Mixup enhances the robustness and generalization performance of GNNs, especially in heterophilous situations.
![](https://private-user-images.githubusercontent.com/68312164/246604203-f6672775-4890-45f5-9c36-a321544bfef9.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MTkxNzYxNzUsIm5iZiI6MTcxOTE3NTg3NSwicGF0aCI6Ii82ODMxMjE2NC8yNDY2MDQyMDMtZjY2NzI3NzUtNDg5MC00NWY1LTljMzYtYTMyMTU0NGJmZWY5LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA2MjMlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwNjIzVDIwNTExNVomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWI4Yzk4OWNkNjY0MWVhMTY3ZTY0NmZkYjYyYzI1N2MwZDg1ZTNlNDg3MjU3OTQxNDU0NjEzYTcwNTMwY2YxZjYmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.Lj3_4Hm8tg0myyMvsnALVo_R7aQp9roqfqFAUJecNtE)
- python version: 3.7.11
- numpy version: 1.19.2
- pytorch version: 1.8.0
- torch-geometric version: 2.0.1
Following Options can be passed to main.py
--dataset:
Name of the dataset. cora, citeseer, pubmed, cs, physics are available.
usage example: --dataset cora
--target_ratio:
Determine upper and lower
usage example: --target_ratio 0.3
--edge_ratio:
Determine top
usage example: --edge_ratio 0.1
--eta:
Controls loss between inter-class and intra-class node mixup.
usage example: --eta 0.5
--mixup_start:
Determine when mixup starts.
usage example: --mixup_start 30
python main.py --dataset cora --target_ratio 0.3 --edge_ratio 0.1 --eta 0.5 --mixup_start 30
- If you find
S-Mixup
useful in your research, please cite the following paper:- Junghurn Kim, Sukwon Yun, and Chanyoung Park. "S-Mixup: Structural Mixup for Graph Neural Networks." CIKM 2023.
- Bibtex
@article{s-mixup,
title={S-Mixup: Structural Mixup for Graph Neural Networks},
author={Kim, Junghurn and Yun, Sukwon and Park, Chanyoung},
journal={arXiv preprint arXiv:2308.08097},
year={2023}
}