APPFLΒΆ
Privacy-preserving federated learning, from simulation to deployment.
APPFL (Advanced Privacy-Preserving Federated Learning) is an open-source framework for prototyping FL algorithms on a laptop, simulating them at scale on HPC clusters, and deploying them across real institutions, with differential privacy, secure communication, and plug-and-play components.
# Install APPFL from source $ git clone https://github.com/APPFL/APPFL.git $ cd APPFL && pip install -e ".[mpi,examples]" $ cd examples # Simulate FedAvg with 5 clients, serially $ python serial/run_serial.py --num_clients 5 \ --server_config resources/configs/mnist/server_fedavg.yaml \ --client_config resources/configs/mnist/client_1.yaml # Run asynchronous FedCompass over MPI $ mpiexec -n 6 python mpi/run_mpi.py \ --server_config resources/configs/mnist/server_fedcompass.yaml \ --client_config resources/configs/mnist/client_1.yaml
Built together with researchers across national labs and universities
Simulate at scale
Prototype on a laptop, then simulate hundreds or thousands of clients on GPU clusters with serial, MPI, or batched-MPI runs.
Deploy for real
Train across institutions over gRPC with SSL and authentication, on Globus Compute endpoints, or with Ray in the cloud.
Customize everything
Swap aggregators, schedulers, trainers, privacy mechanisms, and compressors from a YAML file, or plug in your own.
Architecture
Six composable building blocks
A server agent and client agents are assembled from independent components. Pick one of each in your configuration, or extend the base classes.
Aggregator
Combines one or more client models into the global model.
Scheduler
Decides when to aggregate as client updates arrive at different times.
Trainer
Runs local training and evaluation on each client's private data.
Privacy
Adds protection against data leakage on the client and server sides.
Communicator
Moves models and metadata between the server and clients.
Compressor
Shrinks model updates with error-bounded lossy compression.
Install
Up and running in a minute
APPFL requires Python 3.8 or later. We recommend installing it in a fresh conda environment.
pip install "appfl[examples]"
pip install "appfl[mpi,examples]"
git clone --single-branch --branch main https://github.com/APPFL/APPFL.git
cd APPFL
pip install -e ".[dev,mpi,examples]"
pip install appfl
Need CUDA, compressors, or help with MPI? See the installation guide.
Run anywhere
One codebase, from laptop to federation
The same server and client agents run on every backend, so moving from simulation to deployment only changes the communicator.
Serial
All clients in one process. The fastest way to debug synchronous algorithms.
SimulationMPI
One process per client (or batch of clients) on a workstation or HPC cluster.
DeploymentgRPC
Cross-site training with SSL, token or Globus authentication, polling, and model chunking.
DeploymentGlobus Compute
Server-driven runs on HPC and cloud endpoints, with S3 or ProxyStore for large models.
DeploymentRay
Spin up clusters of clients on AWS, GCP, or Azure.
Learn by example
Tutorials for real workloads
Quickstart
Serial, MPI, and gRPC runs on MNIST.
Fine-tune a ViT
Exchange only the head layer across clients.
Medical imaging
3D spleen segmentation with MONAI Bundles.
GPU clusters
Simulations on Polaris and Delta, multi-GPU training.
Server on AWS
Host a gRPC server on EC2 for remote clients.
Secure gRPC
SSL certificates and token authentication.
Data readiness
Detect and fix data issues before training.
All tutorials →
Weights & Biases, custom actions, scaling tests, and more.
Community
Built in the open
Questions, ideas, and contributions are welcome.
Citation
Cite APPFL
If you find APPFL useful for your research or development, please cite the following papers.
@inproceedings{li2025advances,
title={Advances in appfl: A comprehensive and extensible federated learning framework},
author={Li, Zilinghan and He, Shilan and Yang, Ze and Ryu, Minseok and Kim, Kibaek and Madduri, Ravi},
booktitle={2025 IEEE 25th International Symposium on Cluster, Cloud and Internet Computing (CCGrid)},
pages={01--11},
year={2025},
organization={IEEE}
}
@inproceedings{ryu2022appfl,
title={APPFL: open-source software framework for privacy-preserving federated learning},
author={Ryu, Minseok and Kim, Youngdae and Kim, Kibaek and Madduri, Ravi K},
booktitle={2022 IEEE International Parallel and Distributed Processing Symposium Workshops (IPDPSW)},
pages={1074--1083},
year={2022},
organization={IEEE}
}
This material is based upon work supported by the U.S. Department of Energy, Office of Science, under contract number DE-AC02-06CH11357.