A production-grade distributed federated learning framework that enables privacy-preserving image classification across multiple clients without sharing raw data.
Interactive showcase with architecture diagrams, performance benchmarks, and deployment guides
This system implements a coordinator-client architecture where clients train CNN models locally on their private data and only share model updates (not raw data) with a central coordinator. The coordinator aggregates these updates using the FedAvg algorithm and distributes the improved global model back to clients.
- Privacy-First: Raw data never leaves client devices
- Differential Privacy: Configurable noise injection to protect individual data points
- Scalable Architecture: Support for 50+ concurrent clients with horizontal scaling
- Production Ready: Containerized deployment with monitoring and fault tolerance
- High Performance: Optimized communication protocols and model compression
- Standard ML Frameworks: Built on PyTorch with support for standard datasets
- Coordinator Service: Manages federated learning rounds and model aggregation
- Client Service: Handles local training and privacy-preserving model updates
- Aggregation Service: Implements FedAvg algorithm and model compression
- gRPC: High-performance model update transmission
- Flask REST API: Management and monitoring endpoints
- Redis: Caching and session management
- PostgreSQL: Persistent storage for training metadata
📖 For detailed setup guides and interactive documentation, visit our Project Website
- Python 3.8+
- Docker and Docker Compose
- CUDA-capable GPU (recommended)
# Clone the repository
git clone https://github.com/Prashant-ambati/Federated-Learning-for-Privacy-Preserving-Image-Classification.git
cd Federated-Learning-for-Privacy-Preserving-Image-Classification
# Install dependencies
pip install -r requirements.txt
# Install the package
pip install -e .# Start infrastructure services
docker-compose up -d redis postgres
# Run coordinator service
fl-coordinator --config config/coordinator.yaml
# Run client (in separate terminal)
fl-client --config config/client.yaml --client-id client-001- Epsilon (ε): Controls privacy-utility tradeoff (lower = more private)
- Delta (δ): Probability of privacy breach (typically 1e-5)
- Max Gradient Norm: Gradient clipping threshold for bounded sensitivity
- Local Epochs: Number of training epochs per client per round
- Batch Size: Training batch size (adaptive based on client capabilities)
- Learning Rate: Configurable per client based on computational power
- Accuracy: Maintains 91%+ accuracy on MNIST dataset with differential privacy
- Latency: 25%+ reduction compared to centralized training approaches
- Scalability: Tested with up to 50 concurrent clients
- Privacy: Configurable ε-differential privacy guarantees
# Build and push Docker images
docker build -t fl-coordinator:latest -f docker/Coordinator.dockerfile .
docker build -t fl-client:latest -f docker/Client.dockerfile .
# Deploy using Terraform
cd infrastructure/aws
terraform init
terraform apply# Apply Kubernetes manifests
kubectl apply -f k8s/namespace.yaml
kubectl apply -f k8s/coordinator/
kubectl apply -f k8s/client/- Training Progress: Real-time metrics via REST API
- System Health: Prometheus metrics and Grafana dashboards
- Privacy Budget: Tracking and alerting for privacy parameter consumption
- Performance: Latency, throughput, and resource utilization monitoring
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
Built with ❤️ by Prashant Ambati
Passionate about privacy-preserving machine learning and distributed systems. This project represents a comprehensive implementation of federated learning principles with production-grade engineering practices.
This project is licensed under the MIT License - see the LICENSE file for details.
- McMahan, B., et al. "Communication-Efficient Learning of Deep Networks from Decentralized Data." AISTATS 2017.
- Abadi, M., et al. "Deep Learning with Differential Privacy." CCS 2016.
- Li, T., et al. "Federated Learning: Challenges, Methods, and Future Directions." IEEE Signal Processing Magazine 2020.
For questions and support, please open an issue on GitHub or contact the development team.