ShadowFed is a privacy-preserving Federated Learning (FL) framework enhanced with Differential Privacy (DP).
It enables multiple clients (e.g., hospitals, banks, or smart devices) to collaboratively train machine learning models without sharing raw data, ensuring security, anonymity, and compliance with data protection standards.
- 🤝 Federated Training – Clients train locally and share only model updates.
- 🔒 Differential Privacy – Adds calibrated noise to updates to protect sensitive data.
- 📡 Scalable Architecture – Supports multiple distributed clients.
- 🧩 Modular Design – Easy to extend for healthcare, finance, or IoT domains.
- 📊 Analytics & Monitoring – Logs performance and privacy metrics during training.
ShadowFed’s architecture balances collaboration with strong privacy guarantees.
- Client Nodes – Hold private datasets, perform local training, and add DP noise.
- Privacy Layer – Implements Differential Privacy before sending updates.
- Server Aggregator – Combines client updates using Federated Averaging (FedAvg).
- Global Model – A privacy-preserving, collaboratively trained model is shared back to clients.
Client Nodes → Local training on private data
Privacy Layer → DP noise addition to gradients/weights
Server Aggregator → Federated Averaging of model updates
Global Model → Shared, privacy-preserving model for all clients
ShadowFed/
│── data/ # Sample datasets for simulation
│── src/ # Core source code
│ ├── client.py # Client-side training logic
│ ├── server.py # Aggregation logic (FedAvg)
│ ├── dp\_mechanism.py # Differential Privacy algorithms
│ └── main.py # Entry point for running simulations
│── requirements.txt # Python dependencies
│── .gitignore # Ignored files and directories
│── README.md # Project documentation
git clone https://github.com/Aryankr31/ShadowFed.git
cd ShadowFedpip install -r requirements.txtpython src/main.py- Python – Core language
- PyTorch – Model training & inference
- Flower (FLwr) – Federated learning framework
- Opacus – Differential Privacy library for PyTorch
- NumPy & Pandas – Data handling
- Matplotlib – Training & privacy visualization
- 🏥 Healthcare – Hospitals train models collaboratively without sharing patient data.
- 💰 Finance – Banks detect fraud patterns without exposing customer records.
- 🌆 Smart Cities – Federated video analysis with privacy guarantees.
- 📱 IoT Devices – Edge devices contribute to training without leaking sensitive usage data.
- 🔐 Add Homomorphic Encryption for stronger privacy.
- 🌐 Cross-silo Federated Learning between organizations.
- ☁️ Cloud & Edge Deployment with Kubernetes/Docker.
- 📡 Real-time FL for streaming data.
Thanks to the open-source community that made ShadowFed possible:
- PyTorch
- Flower (FLwr)
- Opacus
- NumPy / Pandas
- Matplotlib