Preliminary version of code: https://arxiv.org/html/2401.15203v1.
The framework of FedGT. We use a case with three clients for illustration and omit the model details of Client 2 for simplicity. The node colors indicate the node labels.- Python 3.9.16
- PyTorch 2.0.1
- PyTorch Geometric 2.3.0
- METIS (for data generation), https://github.com/james77777778/metis_python
Following command lines automatically generate the dataset.
$ cd data/generators
$ python disjoint.py
$ python overlap.py
Following command lines run the experiments for both FedAvg and our FED-PUB.
$ sh ./scripts/disjoint.sh [gpus] [num_workers]
$ sh ./scripts/overlapping.sh [gpus] [num_workers]
gpus
: specify gpus to usenum workers
: specify the number of workers on gpus (e.g. if your experiment uses 10 clients for every round then use less than or equal to 10 workers). The actual number of workers will benum_workers
+ 1 (one additional worker for a server).
Example
$ sh ./scripts/disjoint.sh 0,1 10
$ sh ./scripts/overlapping.sh 0,1 10
If you found the paper and code useful to you, you can kindly cite our paper. Thanks!
@article{zhang2024fedgt,
title={FedGT: Federated Node Classification with Scalable Graph Transformer},
author={Zhang, Zaixi and Hu, Qingyong and Yu, Yang and Gao, Weibo and Liu, Qi},
journal={arXiv preprint arXiv:2401.15203},
year={2024}
}
This project draws in part from FED-PUB. Thanks for their great work and code!