Prototype-Sample Relation Distillation: Towards Replay-Free Continual Learning

Nader Asadi, MohammadReza Davari, Sudhir Mudur, Rahaf Aljundi, Eugene Belilovsky

Continual learning (CL) requires artificial intelligence models to learn a continuous stream of tasks over time. The central challenge in this domain is balancing stability (retaining knowledge of past tasks) with plasticity (the ability to effectively learn new tasks). Currently, the most successful CL methods rely on a "replay buffer"—a memory bank of stored data from previous tasks used to periodically rehearse the model.

However, storing historical data is often unfeasible due to privacy regulations (e.g., in healthcare), proprietary restrictions, or strict memory constraints on edge devices. Existing replay-free methods, such as Elastic Weight Consolidation (EWC) or Learning without Forgetting (LwF), typically struggle to match the performance of replay-based models, especially over long task sequences. To bridge this gap, researchers have introduced Prototype-Sample Relation Distillation (PRD), a novel method that achieves state-of-the-art replay-free continual learning.

The PRD Methodology

PRD eliminates the need to store past images by combining robust representation learning with a unique distillation loss. The architecture is built on three foundational pillars:

  1. Supervised Contrastive Learning (SupCon): Rather than relying on standard cross-entropy loss, PRD utilizes SupCon to learn feature representations. Contrastive learning naturally generates mathematical embeddings that are more robust and resistant to catastrophic forgetting.
  2. Interference-Free Prototype Learning: For each class, the model maintains a "prototype"—a central vector within the embedding space. A tightness loss pulls samples toward their corresponding class prototype. To prevent the learning of new prototypes from distorting the representations of older ones, PRD employs a crucial "stop-gradient" operation.
  3. Relation Distillation: As the model's encoder adapts to new tasks, its internal feature space inevitably shifts. Traditional distillation attempts to freeze absolute features, which severely limits plasticity. PRD instead focuses on relative relations. It calculates the similarity between new data samples and old class prototypes, then uses Kullback-Leibler (KL) divergence to force the model to maintain these relative similarity distributions. Even as the embedding space evolves, the relative distances between the "landmarks" (prototypes) and new data points remain consistent.

Key Insights

The success of PRD stems from prioritizing relative relationships over absolute feature retention. By preserving the ranking of how similar a new image is to various old prototypes, the model successfully adapts its features to new tasks while keeping old class boundaries intact.

Surprisingly, PRD demonstrates plasticity levels nearly identical to naive fine-tuning (where past data is entirely ignored). This proves that the model does not "stiffen" to prevent forgetting; it remains a highly capable and fast learner throughout its lifecycle.

Experimental Validation

The researchers subjected PRD to rigorous testing across several high-stress benchmarks, including Split-CIFAR100, Split-MiniImageNet, and a massive 200-task ImageNet32 sequence.

  • Outperforming Replay: In task-incremental settings on CIFAR100, PRD—despite storing zero images—outperformed Experience Replay (ER) models that utilized a buffer of 50 samples per class.
  • Class-Incremental Success: In the highly challenging class-incremental setting (where task identity is unknown at test time), PRD achieved 27.8% accuracy on CIFAR100 without replay. This comfortably beat ER with 5 samples per class (15.2%) and nearly matched ER with 20 samples per class (29.6%).
  • Long-Term Stability: During the 200-task ImageNet32 stress test, competing replay-free methods experienced severe performance collapse. In contrast, PRD maintained stable accuracy, occasionally even improving as it built a more generalized feature representation.
  • Real-World Domain Adaptation: Tested on CLAD-C, a dataset featuring dashcam footage with severe class imbalances and lighting shifts, PRD achieved an Average Mean Class Accuracy (AMCA) of 65.1%, outperforming established baselines like LwF (63.7%) and EWC (62.5%).

Limitations and Future Directions

While PRD is strictly "replay-free" regarding raw images, it does require storing class prototype vectors. Although these vectors are exceptionally lightweight compared to image data, scaling to systems with millions of classes could eventually introduce memory constraints.

Furthermore, current experiments focus primarily on offline continual learning (allowing multiple passes over the training data). Adapting PRD for online settings—where the model sees each image only once—remains a logical next step. Finally, while PRD performs well independently, it benefits significantly from a strong initial pre-training phase. Future work may explore how to build this initial robustness more efficiently from scratch.

Summary updated

BibTeX
@inproceedings{asadi2023prototype,
  author = {Nader Asadi and MohammadReza Davari and Sudhir Mudur and Rahaf Aljundi and Eugene Belilovsky},
  title = {{Prototype-Sample Relation Distillation: Towards Replay-Free Continual Learning}},
  booktitle = {International Conference on Machine Learning},
  year = {2023},
  url = {https://openreview.net/forum?id=YlG5U5Zgxt},
}
Figure