Implementation of a Jupyter notebook tutorial for incremental learning
Context
This merge request introduces a Jupyter notebook tutorial that demonstrates incremental learning inside Aidge framework. The primary focus of the tutorial is to implement and showcase two key components widely used in incremental learning:
- Data Replay Method Based on iCaRL: This method is designed to mitigate catastrophic forgetting by replaying a subset of previously learned data along with the current task's data. The iCaRL-inspired replay strategy effectively balances between new and old tasks, helping the model retain knowledge of previous tasks while learning new ones. The notebook demonstrates how to build the replay buffer, select exemplars, and use them in conjunction with new task data during the learning process.
- Knowledge Distillation Loss: Implemented as an additional regularization term, the knowledge distillation loss ensures that the model retains knowledge from previous tasks while learning new ones. This technique transfers information from the old model (teacher) to the updated model (student) by aligning the soft outputs of both models. The tutorial integrates the distillation loss within the overall training objective, allowing for seamless integration into the incremental learning pipeline. Knowledge distillation is implemented in many SOTA methods of incremental learning such as WA or D3Former for example. This tutorial depends on my merge request for the aidge_learning module because this merge request implements knowledge distillation.
This tutorial serves as a practical guide for users interested in integrating incremental learning techniques in Aidge. In this tutorial, the model used is a simple MLP for practical reasons, but the methods presented are adaptable to more complex models such as CNNs or Transformers.
Modified files
-
examples/tutorials/Incremental_tutorial/incremental.ipynb
: Jupyter notebook for the incremental learning tutorial, this code is highly inspired by the tutorial learning.ipynb;
TODO
Integrate this merge request inside of Aidge
-
NOT DONE -
DONE -
TO DO