The code for the paper "Subgraph Federated Learning with Global Graph Reconstruction"
The Implementation of our code is based on FederatedScope V0.2.0 https://github.com/alibaba/FederatedScope
This is an easy-to-use and feature-rich federated learning framework, and we are very grateful for the outstanding work of the developers of this framework
First of all, users need to clone the source code and install the required packages (we suggest python version >= 3.9).
git clone https://github.com/poipoipoi233/FedGGR.git
cd FederatedScope
We recommend using a new virtual environment to install FederatedScope:
conda create -n fs python=3.9
conda activate fs
# Install pytorch
conda install -y pytorch=1.10.1 torchvision=0.11.2 torchaudio=0.10.1 torchtext=0.11.1 cudatoolkit=11.3 -c pytorch -c conda-forge
# Install graph-related dependencies
conda install -y pyg==2.0.4 -c pyg
conda install -y rdkit=2021.09.4=py39hccf6a74_0 -c conda-forge
conda install -y nltk
Next, after the backend is installed, you can install FederatedScope from source
:
pip install .
cd federatedscope/FedGSL
# /bin/sh run_fedgsl.sh {cuda_id} {dataset}
# example:
/bin/sh run_fedgsl.sh 0 citeseer
sh run_fedgsl.sh 0 citeseer