Flower Integration
syft-flwr integrates the Flower federated learning framework with the SyftBox protocol for privacy-preserving distributed training.
Architecture
Flower Client
The Flower client runs on each participant's machine:
- Trains models on local private data
- Sends model updates (not raw data) to server
- Receives global model updates
- Operates within SyftBox datasite
Flower Server
The server coordinates federated training:
- Aggregates model updates from clients
- Broadcasts updated global model
- Implements aggregation strategies
- Runs as a SyftBox application
Communication Flow
┌──────────────┐ ┌──────────────┐
│ Client 1 │ │ Client 2 │
│ (Private │ │ (Private │
│ Data) │ │ Data) │
└──────┬───────┘ └──────┬───────┘
│ │
│ Model Updates │
│ (via SyftBox) │
│ │
└────────────┬──────────────────────┘
│
┌─────▼──────┐
│ Server │
│ (Aggregator)│
└────────────┘
Core Components
Bootstrap Process
Initializes federated learning setup:
- Configures Flower server
- Registers clients
- Sets up communication channels
Aggregation Strategies
Supported strategies for combining model updates:
- FedAvg: Federated Averaging (default)
- Custom strategies can be implemented
File Mounts
Manages file synchronization for FL:
- Model checkpoints
- Training configurations
- Results and metrics
Templates
Pre-configured setups for common FL scenarios:
- Classification tasks
- Regression tasks
- Custom workflows
Key Modules
flower_client.py
Client-side training logic and model updates.
flower_server.py
Server-side aggregation and coordination.
strategy/fedavg.py
FedAvg aggregation implementation.
run_simulation.py
Local simulation for testing FL workflows.
grid.py
Distributed grid setup for production deployments.
note
Detailed API documentation and usage examples coming soon