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.

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

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.

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.

Learn by example

Tutorials for real workloads

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.