TL;DR
Federated Continual Learning (FCL) requires models to learn sequentially across distributed devices without forgetting past tasks or overfitting to local data. This paper introduces C$^2$Prompt, a novel method that aligns local client data with global class distributions and smartly aggregates learned prompts based on class relevance. By reducing "knowledge conflicts" during server updates, C$^2$Prompt achieves state-of-the-art performance in retaining old knowledge and learning new tasks.
The Challenge of Federated Continual Learning
The paper tackles Federated Continual Learning (FCL), a highly practical but difficult machine learning paradigm. In FCL, a network of decentralized clients (like smartphones or hospitals) continuously receives new streams of data over time. The system must overcome two massive hurdles simultaneously:
- Temporal Forgetting: The model forgets old tasks when learning new ones, a phenomenon known as catastrophic forgetting.
- Spatial Forgetting: Clients have highly heterogeneous, non-IID (Independent and Identically Distributed) data. A model trained on Client A's data might perform terribly on Client B's data.
Recently, prompt-based learning—keeping a large pre-trained Vision Transformer frozen and only training small, task-specific vectors called "prompts"—has become a popular way to handle FCL. However, the authors identify a critical flaw in existing prompt-based FCL methods: class-wise knowledge coherence.
When the central server aggregates (averages) prompts from different clients, it often creates "knowledge conflicts." Because Client A and Client B have different local data distributions, their learned prompts for the same class might represent entirely different semantics. Furthermore, prompts can get tangled up with irrelevant classes. Blindly merging them degrades the model's ability to learn new concepts and corrupts its memory of old ones.
Introducing C$^2$Prompt
To fix these knowledge conflicts, the authors propose C$^2$Prompt (Class-aware Client Knowledge Interaction), which introduces two clever mechanisms to the standard prompt-learning FCL pipeline.
1. Local Class Distribution Compensation (LCDC)
Instead of sharing raw data, clients compute simple statistical distributions (mean and variance) of their local classes and send them to the server. The server aggregates these to form a "global class distribution." Clients then train a specific set of compensation prompts to mathematically align their local feature representations with this global standard. This effectively neutralizes the non-IID data problem before classification even happens.
2. Class-aware Prompt Aggregation (CPA)
Clients also train discriminative prompts for actual classification. During training, clients track a lightweight "histogram" that measures the affinity (similarity score) between their prompts and specific classes. When the server aggregates these prompts, it doesn't just average them blindly. It uses these histograms as attention weights. Prompts are merged based on their actual relevance to specific classes, ensuring that only semantically compatible knowledge is fused together.
Key Insights and Ideas
- Blind aggregation is harmful: The paper proves that simply averaging parameters (or prompts) across clients with highly skewed data creates "Frankenstein" representations. This is a primary driver of performance degradation in federated continual learning.
- Distribution alignment can be done privately: By only sharing the mean and variance of local features, the server can create a highly effective global target distribution. This allows clients to correct their local biases without ever exposing sensitive raw data.
- Better attention means better memory: Visualizations of the model's attention maps reveal that standard methods generate prompts that focus heavily on background noise. C$^2$Prompt's class-aware aggregation forces the prompts to focus tightly on the actual discriminative regions of the objects, making the learned knowledge much more robust over time.
Key Results
The authors evaluated their method on three standard image classification benchmarks configured for the asynchronous, non-IID nature of FCL: ImageNet-R, DomainNet, and CIFAR-100. C$^2$Prompt significantly outperforms state-of-the-art FCL methods like Powder, LoRM, and Fed-CODAP.
- Accuracy Leaps: Achieved a +2.51% Average Accuracy improvement on ImageNet-R and +2.90% on DomainNet compared to the previous best method.
- Negative Forgetting: On both ImageNet-R and DomainNet, C$^2$Prompt achieved a negative forgetting rate. This is a remarkable result meaning that as the model learned new tasks, its performance on older, previously learned tasks actually improved rather than decayed.
- Forward Transfer: Improved forward transfer by at least 3.15% on ImageNet-R, proving that aligning to a global distribution helps the model learn future, unseen tasks much faster.
- High Efficiency: Despite the added complexity, C$^2$Prompt only increases communication overhead by a negligible 0.6% compared to existing prompt-based baselines.
Limitations and Future Work
While highly effective, the method does introduce some overhead. It requires communicating class distribution statistics at the initial round, adding an extra communication step. Furthermore, the class-aware prompt aggregation process generates client-specific prompts, slightly increasing the computational and storage overhead on the server compared to simpler prompt-averaging methods (though it remains vastly more efficient than full model fine-tuning). Finally, the authors note that the additional distributional information exchange and client-wise aggregation could marginally increase energy consumption if deployed on a massive, global scale.
Summary updated