BuffGraph is an innovative model to adjust message passing of each edge in the graph, meticulously crafted to address the heterophily challenge of imbalanced node classification within graph data.
This code repository consists of several folders:
model: BuffGraph code.ablation study: Ablation study code of BuffGraph: deduct heterophily loss; deduct original graph; deduct updating message passing.parameters sensitivity: Finetuning mixup parameter alpha and heterophily loss parameter lambda code.scalability study: Scalability study code on Coauthor-Physics.
We list main requirements of this repository below. For full requirements, please refer to the provided environment.yml file
- dgl==1.1.0
- torch==2.0.0+cu117
- torch-cluster==1.6.1+pt20cu117
- torch-geometric==2.3.0
- torch-scatter==2.1.1+pt20cu117
- torch-sparse==0.6.17+pt20cu117
- torch-spline-conv==1.2.2+pt20cu117
- torchaudio==2.0.1+cu117
- torchmetrics==0.11.4
- torchvision==0.15.1+cu117
- transformers==4.30.2
For example, if you want to run BuffGraph code on the dataset Amazon-Computers, go to the model folder first, then run the following commands:
```
python pre_train.py --dataset="amazoncomputers"
python process_edges.py --dataset="amazoncomputers"
python buffgraph.py --dataset="amazoncomputers"
```
This dataset is under license CC BY-SA 4.0.