OpenFGL is a comprehensive, user-friendly algorithm library, complemented by an integrated evaluation platform, designed specifically for researchers in the field of federated graph learning (FGL).
Paper • Highlights • Installation • Docs • Citation
- 2 FGL Scenarios: Graph-FL and Subgraph-FL
- 10+ FGL Algorithms
- 34 FGL Datasets
- 12 GNN Models
- 5 Downstream Tasks
- Comprehensive FGL Data Property Analysis
import openfgl.config as config
from openfgl.flcore.trainer import FGLTrainer
args = config.args
args.root = "your_data_root"
args.dataset = ["Cora"]
args.simulation_mode = "subgraph_fl_louvain"
args.num_clients = 10
if True:
args.fl_algorithm = "fedavg"
args.model = ["gcn"]
else:
args.fl_algorithm = "fedproto"
args.model = ["gcn", "gat", "sgc", "mlp", "graphsage"] # choose multiple gnn models for model heterogeneity setting.
args.metrics = ["accuracy"]
trainer = FGLTrainer(args)
trainer.train()
Please cite our paper (and the respective papers of the methods used) if you use this code in your own work:
@misc{li2024openfglcomprehensivebenchmarksfederated,
title={OpenFGL: A Comprehensive Benchmarks for Federated Graph Learning},
author={Xunkai Li and Yinlin Zhu and Boyang Pang and Guochen Yan and Yeyu Yan and Zening Li and Zhengyu Wu and Wentao Zhang and Rong-Hua Li and Guoren Wang},
year={2024},
eprint={2408.16288},
archivePrefix={arXiv},
primaryClass={cs.LG},
url={https://arxiv.org/abs/2408.16288},
}