{"id":27748828,"url":"https://apple.github.io/pfl-research/","last_synced_at":"2025-04-28T23:02:23.314Z","repository":{"id":225208145,"uuid":"732198873","full_name":"apple/pfl-research","owner":"apple","description":"Simulation framework for accelerating research in Private Federated Learning","archived":false,"fork":false,"pushed_at":"2025-01-31T17:27:49.000Z","size":3841,"stargazers_count":320,"open_issues_count":14,"forks_count":37,"subscribers_count":22,"default_branch":"develop","last_synced_at":"2025-04-12T05:32:21.292Z","etag":null,"topics":["differential-privacy","federated-learning","federated-learning-framework","machine-learning","privacy"],"latest_commit_sha":null,"homepage":"http://apple.github.io/pfl-research/","language":"Jupyter Notebook","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/apple.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":"CITATION.cff","codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2023-12-15T22:39:21.000Z","updated_at":"2025-04-11T14:22:41.000Z","dependencies_parsed_at":"2024-07-09T17:47:56.518Z","dependency_job_id":"360d97cc-bb69-4dfd-9c7b-fc7a89174eff","html_url":"https://github.com/apple/pfl-research","commit_stats":null,"previous_names":["apple/pfl-research"],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/apple%2Fpfl-research","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/apple%2Fpfl-research/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/apple%2Fpfl-research/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/apple%2Fpfl-research/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/apple","download_url":"https://codeload.github.com/apple/pfl-research/tar.gz/refs/heads/develop","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251403294,"owners_count":21583892,"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":["differential-privacy","federated-learning","federated-learning-framework","machine-learning","privacy"],"created_at":"2025-04-28T23:01:46.364Z","updated_at":"2025-04-28T23:02:23.294Z","avatar_url":"https://github.com/apple.png","language":"Jupyter Notebook","funding_links":[],"categories":["Privacy-Preserving Federated Learning"],"sub_categories":["Open-Source Tools"],"readme":"# `pfl`: Python framework for Private Federated Learning simulations\n\n[![GitHub License](https://img.shields.io/github/license/apple/pfl-research)](https://github.com/apple/pfl-research/blob/main/LICENSE)\n[![CircleCI](https://dl.circleci.com/status-badge/img/gh/apple/pfl-research/tree/main.svg?style=shield)](https://dl.circleci.com/status-badge/redirect/gh/apple/pfl-research/tree/main)\n[![PyPI - Python Version](https://img.shields.io/pypi/pyversions/pfl)](https://github.com/apple/pfl-research/blob/main/pyproject.toml#L18)\n\n**Documentation website:** https://apple.github.io/pfl-research\n\n`pfl` is a Python framework developed at Apple to empower researchers to run efficient simulations with privacy-preserving federated learning (FL) and disseminate the results of their research in FL. We are a team comprising engineering and research expertise, and we encourage researchers to publish their papers, with this code, with confidence.\n\nThe framework is `not` intended to be used for third-party FL deployments but the results of the simulations can be tremendously useful in actual FL deployments.\nWe hope that `pfl` will promote open research in FL and its effective dissemination.\n\n``pfl`` provides several useful features, including the following:\n\n* Get started quickly trying out PFL for your use case with your existing model and data.\n* Iterate quickly with fast simulations utilizing multiple levels of distributed training (multiple processes, GPUs and machines).\n* Flexibility and expressiveness - when a researcher has a PFL idea to try, ``pfl`` has flexible APIs to express these ideas.\n* Scalable simulations for large experiments with state-of-the-art algorithms and models.\n* Support both PyTorch and TensorFlow.\n* Unified benchmarks for datasets that have been vetted for both PyTorch and TensorFlow.\n* Support other models in addition to neural networks, e.g. GBDTs. Switching between types of models is seamless.\n* Tight integration with privacy features, including common mechanisms for local and central differential privacy.\n\nResults from benchmarks are maintained in [this Weights \u0026 Biases report](https://api.wandb.ai/links/pfl/5scd5f66).\n\n## Installation\n\nInstallation instructions can be found [here](http://apple.github.io/pfl-research/installation.html).\n`pfl` is available on PyPI and a full installation be done with pip:\n\n```\npip install 'pfl[tf,pytorch,trees]'\n```\n\n## Getting started - tutorial notebooks\n\nTo try out `pfl` immediately without installation, we provide several colab notebooks for learning the different components in `pfl` hands-on.\n\n* [![](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/apple/pfl-research/blob/develop/tutorials/Introduction%20to%20Federated%20Learning%20with%20CIFAR10%20and%20TensorFlow.ipynb) Introduction to Federated Learning with CIFAR10 and TensorFlow.\n* [![](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/apple/pfl-research/blob/develop/tutorials/Introduction%20to%20PFL%20research%20with%20FLAIR.ipynb) Introduction to PFL research with FLAIR and PyTorch.\n* [![](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/apple/pfl-research/blob/develop/tutorials/Introduction%20to%20Differential%20Privacy%20with%20Federated%20Learning.ipynb) Introduction to Differential Privacy (DP) with Federated Learning.\n* [![](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/apple/pfl-research/blob/develop/tutorials/Creating%20Federated%20Dataset%20for%20PFL%20Experiment.ipynb) Creating Federated Dataset for PFL Experiment.\n\nWe also support MLX!\n* ([Jupyter notebook](https://github.com/apple/pfl-research/blob/develop/tutorials/Introduction%20to%20Federated%20Learning%20with%20CIFAR10%20and%20MLX.ipynb)) Introduction to Federated Learning with CIFAR10 and MLX.\n\nBut you have to run this notebook locally on your Apple silicon, see all Jupyter notebooks available [here](https://github.com/apple/pfl-research/tree/develop/tutorials).\n\n## Getting started - benchmarks\n\n`pfl` aims to streamline the benchmarking process of testing hypotheses in the Federated Learning paradigm. The official benchmarks are available in the [benchmarks](./benchmarks) directory, using a variety of realistic dataset-model combinations with and without differential privacy (yes, we do also have CIFAR10).\n\n**Copying these examples is a great starting point for doing your own research.**\n[See the quickstart](./benchmarks#quickstart) on how to start converging a model on the simplest benchmark (CIFAR10) in just a few minutes.\n\n## Contributing\n\nResearchers are invited to contribute to the framework. Please, see [here](http://apple.github.io/pfl-research/support/contributing.html) for more details.\n\n## Citing pfl-research\n\n```\n@article{granqvist2024pfl,\n  title={pfl-research: simulation framework for accelerating research in Private Federated Learning},\n  author={Granqvist, Filip and Song, Congzheng and Cahill, {\\'A}ine and van Dalen, Rogier and Pelikan, Martin and Chan, Yi Sheng and Feng, Xiaojun and Krishnaswami, Natarajan and Jina, Vojta and Chitnis, Mona},\n  journal={arXiv preprint arXiv:2404.06430},\n  year={2024},\n}\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/apple.github.io%2Fpfl-research%2F","html_url":"https://awesome.ecosyste.ms/projects/apple.github.io%2Fpfl-research%2F","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/apple.github.io%2Fpfl-research%2F/lists"}