Personalized Federated Continual Learning via Multi-granularity Prompt

Hao Yu, Xin Yang, Xin Gao, Yan Kang, Hao Wang, Junbo Zhang, Tianrui Li · DOI

Abstract

Personalized Federated Continual Learning (PFCL) is a complex paradigm that combines decentralized training, sequential task learning, and local model customization. A primary obstacle in this field is Spatial-Temporal Catastrophic Forgetting (STCF), where models lose previously acquired knowledge due to both task transitions (temporal) and global parameter averaging (spatial). This paper introduces FedMGP (Federated Multi-Granularity Prompt), a framework inspired by human "coarse-to-fine" cognition. By decoupling knowledge into shared global prompts and private local prompts anchored to a frozen Vision Transformer (ViT) backbone, FedMGP achieves superior accuracy and knowledge retention with minimal communication overhead.

Introduction

The convergence of Federated Learning (FL), Continual Learning (CL), and Personalized FL (PFL) creates a challenging environment for deep learning models. In PFCL, clients must learn a sequence of tasks without forgetting earlier ones (temporal stability) while ensuring the model remains tailored to their specific local data distributions (spatial personalization). Traditional methods often suffer from STCF because they treat all learned features with uniform granularity. When a central server averages these diverse local models, the fine-grained local nuances are often "washed out," leading to poor personalization and rapid forgetting.

The FedMGP Framework

FedMGP addresses STCF by mimicking the human cognitive process of identifying broad categories before specific details. The architecture relies on a pre-trained, frozen Vision Transformer (ViT). Since the backbone weights remain unchanged, the model's fundamental representational power is protected from the weight drift that typically causes catastrophic forgetting.

The FedMGP architecture illustrates the flow from coarse-grained global prompts to fine-grained local prompts using a frozen ViT backbone.

The framework employs two distinct levels of prompts:

  1. Coarse-grained Global Prompts: These operate at the input embedding layer to capture task-invariant, general features. These prompts are the only components transmitted to the server for aggregation.
  2. Fine-grained Local Prompts: These interact with the ViT’s internal attention layers via prefix tuning. They capture class-specific details and remain strictly local to the client, ensuring both personalization and data privacy.

To prevent destructive interference during server-side aggregation, FedMGP utilizes Selective Prompt Fusion. Instead of simple averaging, the server uses a small proxy dataset and knowledge distillation to merge global prompts into a generalized knowledge base.

Experimental Evaluation

The framework was tested on the CIFAR-100 dataset under two distinct scenarios:

  • Synchronous FCL: Clients follow a uniform sequence of 5 tasks (20 classes each) with varying data volumes per class.
  • Asynchronous FCL: A realistic "wild" setting with randomized task sequences and a mix of public and private classes.

Key Results and Discussion

FedMGP demonstrates significant performance gains over standard baselines such as FedAvg, FedProx, and FedL2P. In synchronous settings, FedMGP reached 90.56% accuracy, a substantial lead over FedAvg’s 75.74%. In the more complex asynchronous scenario, it maintained 83.46% accuracy.

Performance metrics for spatial and temporal knowledge retention across different task sequences and learning scenarios.

The most notable achievement is in Knowledge Retention (KR). As shown in the experimental results, while traditional methods often see performance on initial tasks plummet to ~20% after subsequent tasks, FedMGP retains approximately 80-90% of its original performance. Furthermore, the system is highly efficient; by transmitting only small prompt parameters (~76,800) rather than full model weights, it drastically reduces communication costs.

Conclusion

FedMGP offers a robust solution for PFCL by leveraging multi-granularity prompts and a frozen transformer backbone. While the method currently depends on high-quality pre-trained models and a small server-side proxy dataset, it sets a new benchmark for mitigating spatial-temporal forgetting. Future research will focus on extending this approach to Vertical Federated Learning and domains lacking extensive pre-trained backbones.

Summary updated

BibTeX
@inproceedings{yu2024personalized,
  author = {Hao Yu and Xin Yang and Xin Gao and Yan Kang and Hao Wang and Junbo Zhang and Tianrui Li},
  title = {{Personalized Federated Continual Learning via Multi-granularity Prompt}},
  booktitle = {ACM SIGKDD Conference on Knowledge Discovery and Data Mining},
  year = {2024},
  doi = {10.1145/3637528.3671948},
}
Figure