Remind of the Past: Incremental Learning with Analogical Prompts

Zhiheng Ma, Xiaopeng Hong, Beinan Liu, Yabin Wang, Pinyue Guo, Huiyun LiarXiv 2023 · DOI

Abstract

Incremental Learning (IL) faces the significant challenge of catastrophic forgetting, where models lose performance on old tasks while learning new ones. This paper introduces a novel "data-free" IL method that leverages human-like analogy to bridge the gap between past and present knowledge. By utilizing Analogical Prompts (A-prompts), the model generates "analogical samples" that allow it to estimate and counteract representation shift in the feature space without storing original data. Experimental results across multiple benchmarks demonstrate that this approach achieves state-of-the-art performance with high inference efficiency.

Introduction

Teaching AI new tasks sequentially often leads to "catastrophically forgetting" previously acquired knowledge. While traditional methods rely on "replaying" a small buffer of old images, such practices are frequently prohibited by privacy regulations (e.g., GDPR) or memory constraints. "Data-free" methods avoid saving images but struggle with representation shift: as a model's parameters update for a new task, the internal feature space changes, rendering old class prototypes obsolete. This paper addresses the challenge of accurately updating these prototypes without access to the original training data.

Methodology: Analogical Prompts (A-prompts)

The proposed approach is inspired by the human ability to use analogies to relate new concepts to known ones. The framework consists of three primary stages:

  1. Analogy-Making Mechanism: The system uses "A-prompts" to transform samples from a new task into "analogical samples" that resemble old classes within the frozen feature space of the previous model. For instance, a "zebra" from a new task can be prompted to appear as a "car" to the old model.
  2. Analogical Shift Counteraction: By processing these analogical samples through both the frozen old model and the updated new model, the system can measure the discrepancy in their representations. This difference provides an estimate of the feature drift, allowing the model to move old prototypes to their correct positions in the new feature space.
  3. New Task Finetuning with Shift Consistency: During training on the new task, a Shift Consistency Loss is applied to ensure that feature movements are predictable and local, enhancing the accuracy of the shift estimation.
The three-stage process of A-prompts: (a) Analogy Making, (b) Shift Estimation, and (c) Shift Counteraction.

Unlike other prompt-based methods, A-prompts are only utilized during the training phase to update prototypes and are discarded before inference, ensuring high deployment speed.

Experimental Setup

The method was evaluated on several challenging benchmarks:

  • Split CIFAR-100: 100 classes across 10 sequential sessions.
  • Split ImageNet-R: 200 classes featuring diverse artistic renditions.
  • Sequential 5-Datasets: Testing cross-domain performance across five distinct datasets (CIFAR-10, MNIST, etc.).
  • Core50: A benchmark for Domain Incremental Learning focusing on environmental and lighting variations.

Results and Discussion

The proposed method consistently outperformed existing state-of-the-art (SOTA) techniques, including both data-free and data-replay methods.

Comparison of the proposed method against various incremental learning baselines on ImageNet-R.

Key findings include:

  • Superior Accuracy: On Split CIFAR-100, the model achieved 87.87% accuracy. On ImageNet-R, it reached 72.82%, significantly surpassing the previous best data-free method, DualP (68.13%).
  • Efficiency: By avoiding multi-pass prompt matching at test time, the method is roughly twice as fast as competing prompt-based models, with an inference time of ~316ms for a batch of 128.
  • Memory Conservation: The approach only requires saving a few feature vectors (prototypes) per class, making it highly suitable for edge devices with limited storage.

Conclusion

This work demonstrates that "imagining" the past through analogies is a powerful alternative to storing raw data in incremental learning. By effectively counteracting representation shift through A-prompts, the model maintains high performance on old tasks while rapidly adapting to new ones. Future research may focus on extending this mechanism to task-free or blurred-boundary learning scenarios, further bridging the gap between artificial and human-like learning.

Summary updated

BibTeX
@misc{ma2023remind,
  author = {Zhiheng Ma and Xiaopeng Hong and Beinan Liu and Yabin Wang and Pinyue Guo and Huiyun Li},
  title = {{Remind of the Past: Incremental Learning with Analogical Prompts}},
  year = {2023},
  eprint = {2303.13898},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2303.13898},
}
Figure