{"id":13767518,"url":"https://github.com/shaoxiongji/federated-learning","last_synced_at":"2025-04-08T00:37:24.886Z","repository":{"id":41061945,"uuid":"127416920","full_name":"shaoxiongji/federated-learning","owner":"shaoxiongji","description":"A PyTorch Implementation of Federated Learning http://doi.org/10.5281/zenodo.4321561","archived":false,"fork":false,"pushed_at":"2024-07-25T10:13:30.000Z","size":31,"stargazers_count":1362,"open_issues_count":17,"forks_count":380,"subscribers_count":14,"default_branch":"master","last_synced_at":"2025-03-31T23:33:52.674Z","etag":null,"topics":["deep-learning","federated-learning","pytorch"],"latest_commit_sha":null,"homepage":"http://doi.org/10.5281/zenodo.4321561","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/shaoxiongji.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-03-30T10:44:46.000Z","updated_at":"2025-03-30T16:12:49.000Z","dependencies_parsed_at":"2024-11-10T15:31:55.227Z","dependency_job_id":null,"html_url":"https://github.com/shaoxiongji/federated-learning","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shaoxiongji%2Ffederated-learning","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shaoxiongji%2Ffederated-learning/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shaoxiongji%2Ffederated-learning/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shaoxiongji%2Ffederated-learning/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/shaoxiongji","download_url":"https://codeload.github.com/shaoxiongji/federated-learning/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247755560,"owners_count":20990620,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["deep-learning","federated-learning","pytorch"],"created_at":"2024-08-03T16:01:09.305Z","updated_at":"2025-04-08T00:37:24.867Z","avatar_url":"https://github.com/shaoxiongji.png","language":"Python","funding_links":[],"categories":["Libraries/Frameworks","Projects"],"sub_categories":["2015","2022"],"readme":"# Federated Learning [![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.4321561.svg)](https://doi.org/10.5281/zenodo.4321561)\n\nThis is partly the reproduction of the paper of [Communication-Efficient Learning of Deep Networks from Decentralized Data](https://arxiv.org/abs/1602.05629)   \nOnly experiments on MNIST and CIFAR10 (both IID and non-IID) is produced by far.\n\nNote: The scripts will be slow without the implementation of parallel computing. \n\n## Requirements\npython\u003e=3.6  \npytorch\u003e=0.4\n\n## Run\n\nThe MLP and CNN models are produced by:\n\u003e python [main_nn.py](main_nn.py)\n\nFederated learning with MLP and CNN is produced by:\n\u003e python [main_fed.py](main_fed.py)\n\nSee the arguments in [options.py](utils/options.py). \n\nFor example:\n\u003e python main_fed.py --dataset mnist --iid --num_channels 1 --model cnn --epochs 50 --gpu 0  \n\n`--all_clients` for averaging over all client models\n\nNB: for CIFAR-10, `num_channels` must be 3.\n\n## Results\n### MNIST\nResults are shown in Table 1 and Table 2, with the parameters C=0.1, B=10, E=5.\n\nTable 1. results of 10 epochs training with the learning rate of 0.01\n\n| Model     | Acc. of IID | Acc. of Non-IID|\n| -----     | -----       | ----           |\n| FedAVG-MLP|  94.57%     | 70.44%         |\n| FedAVG-CNN|  96.59%     | 77.72%         |\n\nTable 2. results of 50 epochs training with the learning rate of 0.01\n\n| Model     | Acc. of IID | Acc. of Non-IID|\n| -----     | -----       | ----           |\n| FedAVG-MLP| 97.21%      | 93.03%         |\n| FedAVG-CNN| 98.60%      | 93.81%         |\n\n\n## Ackonwledgements\nAcknowledgements give to [youkaichao](https://github.com/youkaichao).\n\n## References\nMcMahan, Brendan, Eider Moore, Daniel Ramage, Seth Hampson, and Blaise Aguera y Arcas. Communication-Efficient Learning of Deep Networks from Decentralized Data. In Artificial Intelligence and Statistics (AISTATS), 2017.\n\n## Cite As\nShaoxiong Ji. (2018, March 30). A PyTorch Implementation of Federated Learning. Zenodo. http://doi.org/10.5281/zenodo.4321561\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshaoxiongji%2Ffederated-learning","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fshaoxiongji%2Ffederated-learning","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshaoxiongji%2Ffederated-learning/lists"}