TL;DR
This paper introduces Source-Target Unified Knowledge Distillation (STU-KD), a novel method for adapting compact machine learning models on edge devices to new environments without compromising user privacy. STU-KD achieves this by efficiently adapting a large model to target data on the edge and then distilling its knowledge into the compact model, while also preventing "catastrophic forgetting" of source domain knowledge.
What Problem Does This Paper Address?
Edge devices, like smartphones or robots, often run compact machine learning models for local inference due to limited computational resources and latency requirements. However, when these devices encounter data from a new environment (a "domain shift"), the model's performance can degrade significantly. Adapting the model to this new "target" data is crucial. The challenge lies in doing this while respecting user privacy (target data cannot be sent to a central server) and overcoming the inherent limitations of compact models, which lack the capacity to learn effectively from unlabeled target data alone. Existing methods often require large amounts of data or computational resources, making them unsuitable for edge devices.
Methods
STU-KD tackles this problem in two main steps:
- Memory-Efficient Domain Adaptation (Lite Residual Hypothesis Transfer - LRHT): To adapt a large, pre-trained "source" model to the new target environment on the edge device, the authors propose LRHT. This method is designed to be memory-efficient by adding small "lite residual" modules to a standard feature extractor. Crucially, only these new modules are trained, while the original feature extractor and classifier are frozen. This significantly reduces memory consumption compared to retraining the entire large model, making it feasible for edge devices.
- Collaborative Knowledge Distillation (Co-KD): Once a large "target" model is adapted on the edge device, its knowledge is transferred to the compact model. To prevent the compact model from forgetting its original "source" domain knowledge (catastrophic forgetting), Co-KD unifies both target data (on the edge) and source data (on the server). This is achieved through a federated learning-like approach using an Alternating Direction Method of Multipliers (ADMM) to consolidate models trained on both data sources.
Furthermore, STU-KD integrates seamlessly with secure aggregation techniques, ensuring that even the server cannot access the actual model parameters from the edge devices, thus preserving privacy.
Datasets
The proposed method was evaluated on three standard domain adaptation datasets:
- Office-31: Contains images from three domains: Amazon, DSLR, and Webcam.
- ImageCLEF-DA: Comprises images from ImageNet ILSVRC 2012, Caltech-256, and Pascal VOC 2012.
- Office-Home: Includes images from Artistic images, Clip Art, Product images, and Real-World images.
Key Insights and Ideas
- Memory Efficiency is Key for Edge Adaptation: The core innovation of LRHT is demonstrating that effective domain adaptation on edge devices is possible by focusing on training only small, added modules rather than the entire large model. This significantly lowers the memory footprint.
- Unifying Source and Target Data Prevents Forgetting: The Co-KD method highlights the importance of retaining source domain knowledge. By collaboratively training on both source and target data, STU-KD avoids the performance degradation on previously seen data that plagues simpler knowledge distillation approaches.
- Privacy-Preserving Federated Learning for Domain Adaptation: The paper shows how to adapt federated learning principles (specifically ADMM) to a domain adaptation setting where different data sources (source vs. target) have different loss functions, a common challenge in this area.
- Secure Aggregation Doesn't Hurt Performance: A critical finding is that integrating secure aggregation for privacy doesn't negatively impact the model's inference accuracy, making STU-KD a robust solution for real-world deployment.
Key Results
- STU-KD significantly improves inference accuracy on target data, achieving gains of up to 14.7% compared to state-of-the-art methods on various tasks.
- The LRHT method reduces the peak memory footprint by nearly 67% compared to directly training a large source model on the edge device.
- STU-KD effectively mitigates catastrophic forgetting, maintaining high inference accuracy on the source data, often comparable to or even better than models trained without domain adaptation.
- The integration of secure aggregation with STU-KD did not negatively impact performance, demonstrating its practical viability.
Limitations and Future Work
- Hyperparameter Sensitivity: While STU-KD shows comparable performance across various hyperparameter settings for target accuracy, the paper notes that source data accuracy is more sensitive to hyperparameters like $\alpha$ (balancing loss terms) and $\rho$ (penalty term).
- Federated Learning Variants: The paper explores federated averaging (AVG), SGD, and SCAFFOLD as alternatives to ADMM for Co-KD. While STU-KD-AVG and STU-KD-SGD showed comparable or slightly worse performance, STU-KD-SCAFFOLD achieved better source accuracy but at a significantly higher communication cost. This suggests that ADMM remains a strong choice for this specific problem.
- Future Work: The authors suggest that incorporating STU-KD into real-world applications is an interesting avenue for future research.
Summary updated