# Federated Graph Learning
[pypi-url]: https://pypi.python.org/pypi/fedgraph
**[Documentation](https://docs.fedgraph.org)** | **[Paper](https://arxiv.org/abs/2201.12433)**
**FedGraph** *(Federated Graph)* is a library built on top of [PyTorch Geometric (PyG)](https://www.pyg.org/),
[Ray](https://docs.ray.io/), and [PyTorch](https://pytorch.org/) to easily train Graph Neural Networks
under federated or distributed settings.
It supports various federated training methods of graph neural networks under simulated and real federated environments and supports communication between clients and the central server for model update and information aggregation.
## Main Focus
- **Federated Node Classification with Cross-Client Edges**: Our library supports communicating information stored in other clients without affecting the privacy of users.
- **Federated Link Prediction on Dynamic Graphs**: Our library supports balancing temporal heterogeneity across clients with privacy preservation.
- **Federated Graph Classification**: Our library supports federated graph classification with non-IID graphs.
## Cross Platform Training
- We support federated training across Linux, macOS, and Windows operating systems.
## Library Highlights
Whether you are a federated learning researcher or a first-time user of federated learning toolkits, here are some reasons to try out FedGraph for federated learning on graph-structured data.
- **Easy-to-use and unified API**: All it takes is 10-20 lines of code to get started with training a federated GNN model. GNN models are PyTorch models provided by PyG and DGL. The federated training process is handled by Ray. We abstract away the complexity of federated graph training and provide a unified API for training and evaluating FedGraph models.
- **Various FedGraph methods**: Most of the state-of-the-art federated graph training methods have been implemented by library developers or authors of research papers and are ready to be applied.
- **Great flexibility**: Existing FedGraph models can easily be extended for conducting your research. Simply inherit the base class of trainers and implement your methods.
- **Large-scale real-world FedGraph Training**: We focus on the need for FedGraph applications in challenging real-world scenarios with privacy preservation, and support learning on large-scale graphs across multiple clients.
## Installation
```python
pip install fedgraph
```
## Quick Start
```python
from fedgraph.federated_methods import FedGCN_Train
from fedgraph.utils import federated_data_loader
import attridict
config={'dataset': 'cora',
'fedtype': 'fedgcn',
'global_rounds': 100,
'local_step': 3,
'learning_rate': 0.5,
'n_trainer': 2,
'num_layers': 2,
'num_hops': 2,
'gpu': False,
'iid_beta': 10000,
'logdir': './runs'}
config = attridict(config)
data = federated_data_loader(config)
FedGCN_Train(config, data)
```
## Cite
Please cite [our paper](https://arxiv.org/abs/2201.12433) (and the respective papers of the methods used) if you use this code in your own work:
```
@article{yao2023fedgcn,
title={FedGCN: Convergence-Communication Tradeoffs in Federated Training of Graph Convolutional Networks},
author={Yao, Yuhang and Jin, Weizhao and Ravi, Srivatsan and Joe-Wong, Carlee},
journal={Advances in Neural Information Processing Systems (NeurIPS)},
year={2023}
}
```
Feel free to [email us](mailto:yuhangya@andrew.cmu.edu) if you wish your work to be listed in the [external resources]().
If you notice anything unexpected, please open an [issue]() and let us know.
If you have any questions or are missing a specific feature, feel free [to discuss them with us]().
We are motivated to constantly make FedGraph even better.
Raw data
{
"_id": null,
"home_page": "https://github.com/FedGraph/fedgraph",
"name": "fedgraph",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.9",
"maintainer_email": null,
"keywords": "Graph Neural Networks, Federated Learning",
"author": "Yuhang Yao, Jiayu Chang",
"author_email": "yuhangya@andrew.cmu.edu, jiayuc@andrew.cmu.edu",
"download_url": "https://files.pythonhosted.org/packages/97/4b/425c0cc03d29901a31ad59cbf88cbfa82bf76c7ecb1c1e32b49015f1b6f7/fedgraph-0.1.2.tar.gz",
"platform": null,
"description": "# Federated Graph Learning\n\n[pypi-url]: https://pypi.python.org/pypi/fedgraph\n\n**[Documentation](https://docs.fedgraph.org)** | **[Paper](https://arxiv.org/abs/2201.12433)**\n\n**FedGraph** *(Federated Graph)* is a library built on top of [PyTorch Geometric (PyG)](https://www.pyg.org/),\n[Ray](https://docs.ray.io/), and [PyTorch](https://pytorch.org/) to easily train Graph Neural Networks\nunder federated or distributed settings.\n\nIt supports various federated training methods of graph neural networks under simulated and real federated environments and supports communication between clients and the central server for model update and information aggregation.\n\n## Main Focus\n- **Federated Node Classification with Cross-Client Edges**: Our library supports communicating information stored in other clients without affecting the privacy of users.\n- **Federated Link Prediction on Dynamic Graphs**: Our library supports balancing temporal heterogeneity across clients with privacy preservation.\n- **Federated Graph Classification**: Our library supports federated graph classification with non-IID graphs.\n\n\n\n\n## Cross Platform Training\n\n- We support federated training across Linux, macOS, and Windows operating systems.\n\n## Library Highlights\n\nWhether you are a federated learning researcher or a first-time user of federated learning toolkits, here are some reasons to try out FedGraph for federated learning on graph-structured data.\n\n- **Easy-to-use and unified API**: All it takes is 10-20 lines of code to get started with training a federated GNN model. GNN models are PyTorch models provided by PyG and DGL. The federated training process is handled by Ray. We abstract away the complexity of federated graph training and provide a unified API for training and evaluating FedGraph models.\n\n- **Various FedGraph methods**: Most of the state-of-the-art federated graph training methods have been implemented by library developers or authors of research papers and are ready to be applied.\n\n- **Great flexibility**: Existing FedGraph models can easily be extended for conducting your research. Simply inherit the base class of trainers and implement your methods.\n\n- **Large-scale real-world FedGraph Training**: We focus on the need for FedGraph applications in challenging real-world scenarios with privacy preservation, and support learning on large-scale graphs across multiple clients.\n\n## Installation\n```python\npip install fedgraph\n```\n\n## Quick Start\n```python\nfrom fedgraph.federated_methods import FedGCN_Train\nfrom fedgraph.utils import federated_data_loader\nimport attridict\n\nconfig={'dataset': 'cora',\n 'fedtype': 'fedgcn',\n 'global_rounds': 100,\n 'local_step': 3,\n 'learning_rate': 0.5,\n 'n_trainer': 2,\n 'num_layers': 2,\n 'num_hops': 2,\n 'gpu': False,\n 'iid_beta': 10000,\n 'logdir': './runs'}\n\nconfig = attridict(config)\n\ndata = federated_data_loader(config)\nFedGCN_Train(config, data)\n```\n\n## Cite\n\nPlease cite [our paper](https://arxiv.org/abs/2201.12433) (and the respective papers of the methods used) if you use this code in your own work:\n\n```\n@article{yao2023fedgcn,\n title={FedGCN: Convergence-Communication Tradeoffs in Federated Training of Graph Convolutional Networks},\n author={Yao, Yuhang and Jin, Weizhao and Ravi, Srivatsan and Joe-Wong, Carlee},\n journal={Advances in Neural Information Processing Systems (NeurIPS)},\n year={2023}\n}\n```\n\nFeel free to [email us](mailto:yuhangya@andrew.cmu.edu) if you wish your work to be listed in the [external resources]().\nIf you notice anything unexpected, please open an [issue]() and let us know.\nIf you have any questions or are missing a specific feature, feel free [to discuss them with us]().\nWe are motivated to constantly make FedGraph even better.\n",
"bugtrack_url": null,
"license": null,
"summary": "Federated Graph Learning",
"version": "0.1.2",
"project_urls": {
"Homepage": "https://github.com/FedGraph/fedgraph"
},
"split_keywords": [
"graph neural networks",
" federated learning"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "98ca5286a601b0f8175b19cad4b5ff1465386c2cff1b40118f3161418a63a5b3",
"md5": "1402b324e61247453fb43ae8f77f13e5",
"sha256": "5621e3c37dde2cf4b4b538f131730f1aff3a61b26f4672dee5fc751f37850df8"
},
"downloads": -1,
"filename": "fedgraph-0.1.2-py3-none-any.whl",
"has_sig": false,
"md5_digest": "1402b324e61247453fb43ae8f77f13e5",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.9",
"size": 45580,
"upload_time": "2024-06-26T22:38:35",
"upload_time_iso_8601": "2024-06-26T22:38:35.813235Z",
"url": "https://files.pythonhosted.org/packages/98/ca/5286a601b0f8175b19cad4b5ff1465386c2cff1b40118f3161418a63a5b3/fedgraph-0.1.2-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "974b425c0cc03d29901a31ad59cbf88cbfa82bf76c7ecb1c1e32b49015f1b6f7",
"md5": "d73c8105ba005a6a809ec90c5038e4d8",
"sha256": "2c7c717198e5773338b944d53c53f251075b9dc467a70502b79098bf64d793c3"
},
"downloads": -1,
"filename": "fedgraph-0.1.2.tar.gz",
"has_sig": false,
"md5_digest": "d73c8105ba005a6a809ec90c5038e4d8",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.9",
"size": 43379,
"upload_time": "2024-06-26T22:38:37",
"upload_time_iso_8601": "2024-06-26T22:38:37.786435Z",
"url": "https://files.pythonhosted.org/packages/97/4b/425c0cc03d29901a31ad59cbf88cbfa82bf76c7ecb1c1e32b49015f1b6f7/fedgraph-0.1.2.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-06-26 22:38:37",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "FedGraph",
"github_project": "fedgraph",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "fedgraph"
}