Federated Learning on a Live Network with SyftBox
Welcome to our Federated Learning (FL) tutorial! In this tutorial, we'll create a full-fledged FL workflow using the MNIST handwritten digits dataset. You'll learn to coordinate multiple datasites training neural networks locally, aggregate their model updates, and maintain data privacy throughout the process — all on the live SyftBox network. While we use MNIST for demonstration, the principles and APIs you'll learn apply to any dataset.
Learning Objectives
By completing this tutorial, you will:
- Build and deploy a complete FL system, from setting up the aggregator to training models with the MNIST dataset
- Experience real-world FL by collaborating with other participants on the live SyftBox network
- Gain hands-on experience keeping data private while training machine learning models in a distributed setting
- Master the workflow of coordinating multiple participants in a federated learning experiment
Prerequisites
- Basic understanding of Python and PyTorch
- Familiarity with machine learning concepts, especially neural networks
- Some knowledge of Federated Learning is helpful but not required
- SyftBox installed on your computer
Expected Time to Complete
15-30 minutes, depending on your familiarity with the prerequisites.
Tutorial Structure
📄️ Federated Learning Primer
Core FL concepts and overview of the SyftBox FL workflow
📄️ Setup: Join the SyftBox Network
Connecting to the Live datasites network on SyftBox
📄️ Part 1. Launch the FL Experiment
Configuring and launching your federated learning project
📄️ Part 2. Federated Training
Train models locally and take part in the federated computation
📄️ Part 3. Monitoring
Train models locally and take part in the federated computation
📄️ Aggregator API Specs
Implementation guide of the FL Aggregator API
📄️ Client API Specs
Implementation guide of the FL Client API
🚀 Ready to start your federated learning journey?
Head to the Federated Learning Primer section to learn (or refresh) both the core concepts of federated learning, and how these map to SyftBox's computational flow.