:hide-toc: .. APPFL documentation master file, created by sphinx-quickstart on Fri Oct 29 15:16:47 2021. The landing page layout is built from raw HTML blocks styled by the ``.appfl-landing`` rules in ``_static/css/custom.css``. ===== APPFL ===== .. container:: appfl-landing .. raw:: html

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.

PyPI version GitHub stars Python 3.8+ Discord
quickstart.sh
# 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

Argonne National Laboratory University of Chicago Oak Ridge National Laboratory Los Alamos National Laboratory Lawrence Livermore National Laboratory Lawrence Berkeley National Laboratory Sandia National Laboratories University of Illinois Urbana-Champaign New York University Iowa State University Arizona State University Ohio State University Georgia Institute of Technology UC Santa Cruz UC Merced University of Washington University of Cambridge Broad Institute MONAI

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.

FedAvgFedAdamFedYogiFedAsyncFedBuffFedCompass+ more

Scheduler

Decides when to aggregate as client updates arrive at different times.

SynchronousAsynchronousCompass

Trainer

Runs local training and evaluation on each client's private data.

VanillaFedProxICEADMMIIADMMMONAILightning

Privacy

Adds protection against data leakage on the client and server sides.

Differential privacyOpacusSecure aggregation

Communicator

Moves models and metadata between the server and clients.

gRPCMPIGlobus ComputeRay

Compressor

Shrinks model updates with error-bounded lossy compression.

SZ2SZ3SZxZFP

Install

Up and running in a minute

APPFL requires Python 3.8 or later. We recommend installing it in a fresh conda environment.

.. tab-set:: :class: al-install .. tab-item:: pip .. code-block:: bash pip install "appfl[examples]" .. tab-item:: pip + MPI .. code-block:: bash pip install "appfl[mpi,examples]" .. tab-item:: From source .. code-block:: bash git clone --single-branch --branch main https://github.com/APPFL/APPFL.git cd APPFL pip install -e ".[dev,mpi,examples]" .. tab-item:: Minimal .. code-block:: bash pip install appfl .. raw:: html

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.

Simulation

Serial

All clients in one process. The fastest way to debug synchronous algorithms.

Simulation

MPI

One process per client (or batch of clients) on a workstation or HPC cluster.

Deployment

gRPC

Cross-site training with SSL, token or Globus authentication, polling, and model chunking.

Deployment

Globus Compute

Server-driven runs on HPC and cloud endpoints, with S3 or ProxyStore for large models.

Deployment

Ray

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.

.. code-block:: latex @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} } .. raw:: html

This material is based upon work supported by the U.S. Department of Energy, Office of Science, under contract number DE-AC02-06CH11357.

.. toctree:: :hidden: :maxdepth: 1 install/index tutorials/index users/index community/index contribution/index publication/index changelog/index