Introduction
In pervasive computing environments, such as those involving smartphones and wearables, machine learning models must adapt to new data streams in real-time. While Federated Learning (FL) enables collaborative learning without sharing raw data, it typically assumes that devices can store historical data for retraining. However, mobile devices face significant storage constraints. When a device learns a new task using only new data, it often experiences catastrophic forgetting, where previously acquired skills are lost. This paper introduces a Federated Continual Learning (FCL) framework designed to mitigate this issue using a "two-teacher" distillation approach.
Methods: Federated Learning without Forgetting (FLwF)
The authors propose FLwF, a distillation-based method to preserve knowledge during incremental learning. Two variants were evaluated:
- FLwF-1 (One Teacher): The client uses its previous local model as a teacher. A distillation loss ensures the new model's outputs remain consistent with the old model's predictions on new data.
- FLwF-2 (Two Teachers): This core innovation utilizes two teachers: the client's previous local model (preserving personal history) and the current global server model (incorporating general knowledge from the federation).
The final objective function combines standard classification loss with weighted distillation losses from both teachers. Additionally, the researchers introduced a "Smart Strategy" where distillation is applied only to clients with unbalanced data (specializing in specific tasks), while standard fine-tuning is used for clients with balanced data. They also explored the use of exemplars, storing a minimal set (e.g., 10 samples) of old data to further stabilize the model.
Experimental Setup
The framework was evaluated using the UCI Human Activity Recognition (HAR) dataset, which contains accelerometer and gyroscope data for six activities. The simulation involved a network of 5 clients. To induce forgetting, one "specialized" client was fed data sequentially (Task A then Task B), while other "generalized" clients received balanced data.
Key Insights
- The Generality vs. Specificity Trade-off: FLwF-2 outperforms FLwF-1 because the global server model provides a broader perspective, acting as a "sanity check" for the individual device's local history.
- Selective Distillation: Distillation can hinder performance for clients with already balanced data. The "Smart Strategy" of selective application yielded the best overall network performance.
- Efficiency of Exemplars: Storing as few as 10 exemplar samples per task significantly stabilizes the model, demonstrating that massive on-device datasets are not required to prevent forgetting.
Key Results
The performance was measured using Average Accuracy ($A_2^1$) and a Forgetting Measure ($F_2^1$).
As shown in the results, standard fine-tuning in FL suffered from complete forgetting (a measure of 1.0). The FLwF-2 approach reduced this to 0.418. The "Smart Strategy" (FLwF-2 & Fine Tuning) further improved performance, reducing forgetting to 0.212 and increasing average accuracy to 0.760.
The accuracy for the specialized client ($A_{gen}^1$) improved significantly from 47.8% with standard fine-tuning to over 75% using the Smart Strategy. The inclusion of exemplars ("& ex") maintained high performance while providing additional stability.
Conclusion and Future Work
The proposed FCL framework effectively addresses catastrophic forgetting in pervasive computing. By combining two-teacher distillation with a selective application strategy and minimal exemplars, the system achieves a balance between learning new tasks and retaining old ones. Future research will focus on more complex class-incremental scenarios and the automatic optimization of hyper-parameters for the distillation process.
Summary updated