Available Examples
Explore these complete, production-ready examples to learn how to build federated learning applications:Diabetes Prediction
Train a neural network for diabetes prediction using federated learning across multiple data owners.
Federated Analytics
Compute aggregated statistics and histograms on distributed datasets without centralizing data.
FedRAG
Build a Federated Retrieval Augmented Generation system for privacy-preserving question answering.
Local Simulation
Run complete federated learning workflows on your local machine for development and testing.
Deployment Options
Each example supports multiple deployment modes to fit your development and production needs:Local Simulation
Test locally with Jupyter notebooks simulating multiple parties on one machine.
Google Drive
Zero-setup federated learning using only Google Colab notebooks.
SyftBox Network
Deploy across real distributed nodes using the SyftBox client.
Quick Start
All examples follow a similar structure and workflow:1. Clone the Example
2. Install Dependencies
3. Run Locally
Start with the local notebooks to understand the workflow:- Data Owners: Open
local/do1.ipynbandlocal/do2.ipynb - Data Scientist: Open
local/ds.ipynb
4. Deploy Distributed
Once you understand the local workflow, scale to real distributed deployment:- Use Google Colab notebooks for zero-setup deployment
- Or install SyftBox client for production deployments
Key Features Demonstrated
These examples showcase the core capabilities of Syft-Flwr:- Privacy Preservation: Raw data never leaves data owner environments
- Data Governance: Data owners review and approve all computational jobs
- Flexible Aggregation: Support for both model updates (FL) and statistics (analytics)
- Production Ready: Real deployment options from local dev to distributed production
- Framework Integration: Built on standard Flower patterns with SyftBox privacy layer
Example Comparison
| Example | Use Case | Complexity | Key Technology |
|---|---|---|---|
| Diabetes Prediction | Binary classification with federated learning | Intermediate | PyTorch, SMOTE, FedAvg |
| Federated Analytics | Privacy-preserving data analysis | Beginner | Pandas, NumPy, Matplotlib |
| FedRAG | Distributed document retrieval for LLMs | Advanced | FAISS, Transformers, RAG |
Learning Path
We recommend exploring the examples in this order:- Start with Local Simulation: Understand the basics by running everything on your machine
- Try Federated Analytics: Learn federated workflows with a simpler use case
- Build Diabetes Prediction: Implement a complete federated learning pipeline
- Explore FedRAG: Advanced use case combining federated learning with RAG
- Deploy with Google Drive: Experience zero-setup distributed deployment
Next Steps
View API Reference
Explore the complete Syft-Flwr API documentation.
Join Community
Get help and share your federated learning projects.
All examples use the PIMA Indians Diabetes Database for demonstration purposes. The dataset is split across multiple data owners to simulate real-world federated scenarios.