TL;DR
This paper introduces FedCampus, a real-world, privacy-preserving mobile application for smart campuses that leverages federated learning (FL) and federated analytics (FA) across both iOS and Android devices. It addresses the challenge of deploying FL/FA in a cross-platform, on-device setting with continuous model updates, demonstrating its utility through various smart campus tasks.
What Problem Does This Paper Address?
Federated Learning (FL) offers a promising approach to train machine learning models collaboratively on end devices while preserving data privacy. However, real-world applications of FL, especially those that are cross-platform and operate on-device, are scarce. Existing FL frameworks often lack the maturity for production deployment. The authors identify several key challenges: developing a practical, university-scale FL/FA application; enabling cross-platform on-device training and model aggregation; providing robust control over model deployment and updates (MLOps); and enhancing privacy through techniques like differential privacy (DP).
Methods
FedCampus is designed as a cross-platform system managed by a single backend server, supporting both Android and iOS clients.
- Cross-Platform FL/FA Pipeline: The core innovation lies in enabling FL/FA across diverse mobile operating systems. This is achieved through:
- Model Conversion: Models are converted into formats compatible with Android (TensorFlow Lite) and iOS (Core ML). This involves creating a standardized model format and using converters for each platform.
- Unified Training APIs: FedCampus provides a consistent set of APIs for model parameter retrieval, fitting, and evaluation, abstracting away platform-specific differences and leveraging hardware acceleration (GPU/NPU).
- MLOps Support: The system allows for continuous deployment of models and algorithms without requiring app updates. A "Model Request" system decouples models from clients, enabling dynamic updates. Multiple parallel training sessions are supported via an FL Server Setup, where each FL server runs as an independent Python subprocess.
- Differential Privacy (DP): To further enhance privacy, FedCampus integrates DP. For FL, noise is added to local models before aggregation. For FA, local data is de-identified and noise is applied before analysis.
Datasets
The paper describes a real-world deployment at Duke Kunshan University involving 100 volunteers. The data collected comes from smartwatches and includes metrics like average heart rate, steps, calorie expenditure, and sleep duration. This data is used for training and evaluating the smart campus tasks. No specific named datasets are mentioned as being used for pre-training or benchmarking beyond the data collected from the volunteers.
Key Insights and Ideas
- Bridging the Gap to Real-World FL: FedCampus demonstrates that cross-platform, on-device FL/FA is not just theoretical but can be successfully deployed in a practical setting like a university campus.
- MLOps for FL is Crucial: The ability to continuously deploy and update models without requiring app updates is a significant enabler for practical FL applications, allowing for rapid iteration and improvement.
- Cross-Platform Aggregation is Achievable: The paper presents a concrete solution for aggregating models trained on different mobile platforms, a key hurdle for widespread adoption.
- Privacy Enhancements are Layered: Combining FL's inherent privacy with explicit DP mechanisms provides a robust defense against various privacy attacks.
Key Results
The paper reports on a successful deployment and validation of FedCampus at Duke Kunshan University over an 11-month period. The system was used to complete several smart campus tasks:
- Sleep Tracking: Trained a sleep-efficiency prediction model.
- Physical Activity Monitoring: Trained a CNN model for activity prediction.
- Personalized Recommendations: Delivered tailored suggestions based on aggregated health data.
- Heavy Hitters: Identified prevalent step counts to evaluate physical activity quality.
The system was tested with 100 volunteers using iOS devices, Android devices, and Huawei smartwatches, communicating over LTE, 5G, and campus Wi-Fi networks.
Limitations and Future Work
The paper does not explicitly detail limitations or future work beyond the scope of the demo itself. However, implied areas for future exploration could include:
- Scaling the system to a larger, more diverse user base.
- Exploring more advanced FL and DP techniques.
- Investigating the performance impact of model conversion and unified APIs on training efficiency and accuracy.
- Further research into the security and robustness of the MLOps pipeline.
Summary updated