Federated Class-Incremental Learning with Prompting

Jiale Liu, Yu-Wei Zhan, Chong-Yu Zhang, Xin Luo, Zhen-Duo Chen, Yinwei Wei, Xin-Shun Xu

TL;DR

This paper introduces FCILPT, a novel method for Federated Class-Incremental Learning (FCIL) that uses prompt learning to combat catastrophic forgetting without relying on memory buffers. By encoding task-specific, task-similar, and task-irrelevant knowledge into learnable prompts, FCILPT effectively preserves old and new knowledge in a federated setting, addressing the challenges of non-iid data and privacy concerns.

What Problem Does This Paper Address?

The paper tackles the challenging problem of Federated Class-Incremental Learning (FCIL). In real-world scenarios, data on client devices is constantly evolving, with new classes appearing over time. Traditional federated learning (FL) methods often assume static data, requiring retraining from scratch when new classes emerge, which is computationally expensive and unsustainable. Furthermore, FL inherently deals with non-independent and identically distributed (non-iid) data across clients, making model aggregation difficult. Existing class-incremental learning (CIL) methods often rely on memory buffers to store old data exemplars, which can be problematic in federated settings due to privacy concerns and memory constraints. This paper aims to develop a rehearsal-free FCIL method that can incrementally learn new classes while mitigating catastrophic forgetting and handling non-iid data distributions without compromising privacy.

Methods

The core of FCILPT is the use of prompt learning, a technique borrowed from Natural Language Processing (NLP). Instead of retraining the entire model, FCILPT freezes the pre-trained Vision Transformer (ViT) backbone and learns small, task-specific prompts. These prompts are designed to encode different types of knowledge:

  • Task-Specific Prompts: Capture unique knowledge for each new task.
  • Task-Similar Prompts: Learn shared knowledge across similar tasks.
  • Task-Irrelevant Prompts: Encode common knowledge across all tasks seen so far.

To select the appropriate prompts for each input instance without knowing the task identity, FCILPT employs an instance-wise prompt query mechanism. This involves learning "keys" for each prompt and using a query function based on the input image's features to retrieve the most relevant prompts.

To address the non-iid problem in federated learning, FCILPT introduces a prompt pool alignment strategy. Before global aggregation, each client sorts its prompt pool based on prompt selection frequency. This ensures that when prompts are aggregated on the server, they represent aligned task information across clients, mitigating issues caused by missing classes on individual clients.

The method is rehearsal-free, meaning it does not store old data samples, thus adhering to privacy constraints.

Datasets

The proposed method was evaluated on three benchmark datasets:

  • CIFAR-100: A dataset of 60,000 color images from 100 classes.
  • Mini-ImageNet: A subset of ImageNet with 100 classes, each split into training and testing samples.
  • Tiny-ImageNet: A subset of ImageNet with 200 classes.

Key Insights and Ideas

  • Prompting as a Memory-Free Solution: The paper demonstrates that prompt learning can effectively serve as a memory-efficient and privacy-preserving alternative to traditional rehearsal-based methods for CIL in a federated setting.
  • Hierarchical Knowledge Encoding: By categorizing prompts into task-specific, task-similar, and task-irrelevant, FCILPT can capture a richer and more robust representation of knowledge, leading to better generalization and reduced forgetting.
  • Instance-Wise Prompt Selection: The ability to select prompts based on individual instances, without explicit task labels, is crucial for handling the unknown task identity in CIL.
  • Prompt Alignment for Non-IID Data: The proposed prompt pool alignment strategy is a key innovation for federated learning, directly addressing the challenges posed by non-iid data distributions across clients.

Key Results

FCILPT consistently outperformed state-of-the-art federated class-incremental learning methods across all tested datasets (CIFAR-100, Mini-ImageNet, and Tiny-ImageNet). For instance, on CIFAR-100 with 10 incremental tasks and ResNet-18 backbones, FCILPT achieved an average performance gain of 73.5%, significantly higher than the strongest baseline (GLFC) which achieved 23.5%. Similar substantial improvements were observed when using ViT-B/16 backbones for both FCILPT and baselines, highlighting the effectiveness of the proposed prompt-based approach. Ablation studies confirmed the importance of both the task-relevant prompts and the prompt sorting mechanism for achieving these gains.

Limitations and Future Work

The paper acknowledges that while FCILPT shows significant improvements, there is still room for further enhancement. The authors suggest that future work could explore more advanced prompt alignment strategies to further mitigate the non-iid problem. Additionally, investigating more sophisticated prompt encoding mechanisms and exploring the application of FCILPT to other domains beyond image recognition could be promising directions. The hyperparameter tuning section also suggests that while accuracy is robust to some parameters, further optimization might yield even better results.

Summary updated

BibTeX
@article{liu2023federated,
  author = {Jiale Liu and Yu-Wei Zhan and Chong-Yu Zhang and Xin Luo and Zhen-Duo Chen and Yinwei Wei and Xin-Shun Xu},
  title = {{Federated Class-Incremental Learning with Prompting}},
  journal = {Expert Systems with Applications},
  year = {2023},
  url = {https://openreview.net/forum?id=IzB5kqs4rlx},
}
Figure