A Comprehensive Study of Class Incremental Learning Algorithms for Visual Tasks

Eden Belouadah, Adrian Popescu, Ioannis Kanellos

Introduction

Artificial agents which evolve in dynamic environments should be able to update their capabilities in order to integrate new data. Depending on the work hypotheses made, names such as continual learning , lifelong learning or incremental learning (IL) are used to describe associated works. The challenge faced in all cases is catastrophic forgetting , i.e., the tendency of a neural network to underfit past data when new ones are ingested. The effect of catastrophic forgetting is alleviated either by increasing the model capacity to accommodate new knowledge or by storing exemplars of past classes in a bounded memory and replaying them in each new state. Continual and lifelong learning algorithms usually increase model capacity and are tested in a setting in which a new task is added in each new state of the system. Recent comparative studies provide good coverage of these two types of approaches but give little room to incremental learning algorithms. We focus on class IL algorithms which provide the most interesting results in recent works from literature . Their study is interesting because one early example of such work is shown to outperform continual learning approaches when tested in a common experimental setting . More recent works have provided strong improvements compared to . We propose a series of contributions to better understand and evaluate existing class IL algorithms as well as interesting combinations of their components.

We first define a common analysis framework made of six desirable properties of incremental learning algorithms. This set of properties builds on the one proposed in , which already includes three of them (marked with * below):

Complexity (C)* - capacity to integrate new information with a minimal change in terms of the model structure. For a deep neural network, only the size of the classification layer should grow. Otherwise, the total number of parameters of the model is likely to increase strongly, especially at large scale.

Memory (M)* - ability to work with or without a fixed-size memory of past classes. Naturally, algorithms that do not require past data are preferable, but their performance is likely to be lower, especially if complexity growth is minimized.

Accuracy (A)* - performance for past and new classes should approach that of a non-incremental learning process that has access to all data at all times.

Timeliness (T) - delay needed between the occurrence of new data and their integration in the incremental models.

Plasticity (P) - capacity to deal with new classes that are significantly different from the ones that were learned in the past .

Scalability (S) - the aptitude to learn a large number of classes, typically up to tens of thousands, and ensure usability in complex real-world applications.

Second, we propose a unified formalization of the class incremental learning problem and use it to analyze algorithms and results. Focus is put on the components which differentiate algorithms one from another in order to facilitate the understanding of advantages and limitations brought by each one of them. Moreover, we introduce promising combinations of components from different algorithms and assess their merits experimentally.

Third, we propose a thorough evaluation framework. Four public datasets designed for different visual tasks are used to test performance variability. Three splits in terms of the number of incremental states and three sizes for past memory are tested to assess performance robustness for these IL parameters, which were previously identified as being the most important . We also propose an evaluation of the case when no past memory is allowed because this setting has a strong influence on algorithm performance.

Fourth, we examine the role of herding-based exemplar selection for past classes. Introduced in and first used in an IL context by , its usefulness was questioned in where it was reported to provide only marginal improvement compared to random selection. We run extensive experiments with the two selection algorithms and conclude that herding is useful for all methods tested.

Fifth, we show that it is possible to obtain interesting performance without the widely used knowledge distillation component . Instead, we use vanilla fine-tuning as a backbone for class IL with memory and model the problem as a case of imbalanced learning. The well-known thresholding method is used to reduce the classification bias between past and new classes.

Last but not least, we integrate the tested methods into a common open-source repository. We notably modify the implementations to make inputs and outputs uniform. These changes will facilitate future experiments in the existing setting and will allow an easy extension to other datasets.

The main experimental finding here is that none of the existing class IL algorithms is better than the others in all experimental configurations. We find that both memory and incremental state sizes influence the relative performance of algorithms. However, the most significant performance changes appear when testing IL with and without a memory of past classes. These findings indicate that class incremental learning remains an open research problem, and further research efforts should be dedicated to it.

Related work

There is a strong regain of interest for incremental learning due to the proposal of different deep learning based algorithms. We categorize recent approaches in three main groups and map each group to the six IL properties from Section 1 in Table 1. We discuss the advantages and/or challenges related to each group-property pair to facilitate their comparison. We also provide a global assessment with a focus on the application contexts in which each type of approach could be deployed.

Model-Growth (MG) based methods increase the size of deep models to include new knowledge. Wang et al. introduced Growing a Brain, a method based on increasing representational capacity by widening or deepening the network. Progressive Neural Networks are an alternative approach that exploits several models during training to preserve knowledge from past tasks. Lateral connections between all models are learned to leverage prior knowledge of past features and thus reduce the effect of catastrophic forgetting. Recently, propose an adaptive network that enables self-growth in a tree-like manner. It is based on features hierarchy reorganization whenever new tasks arrive.

Aljundi et al. present a lifelong learning architecture based on a network of experts. A gating mechanism uses training samples to decide which expert to transfer knowledge from for each task. Deep Adaptation Networks is another model-growth based approach which adds additional parameters for each new task. The architecture is importantly augmented if a large number of new tasks arrives. The approach presented in is based on several neural networks that share the majority of parameters and add modular adapters to connect the networks and specialize each one of them for a specific task.

PackNetPackNet is based on a pruning technique that identifies redundant parameters and uses them to train the network on new tasks. The approach is not able to learn a large number of tasks since the network can not be strongly compressed without significant performance loss. PiggybackPiggyback is a modified version of PackNetPackNet that exploits network quantization to propose masks for individual weights. It thus learns a large number of tasks with a single base network. The approach increases the model complexity as extra parameters are added to include new tasks. Alternately, Memory Aware Synapses (MAS) deploys a mechanism that identifies the most important weights in the model by looking at the sensitivity of the output function instead of the loss. When a new task arrives, changes to important weights are penalized. This method is basically designed to work with unlabeled datasets, but was later adapted for usage with unlabeled datasets . This use case is very interesting but, for now, limited to specific tasks such as face recognition.

Self-Organizing Maps (SOMs) are online unsupervised learning algorithms that rely on approximate stochastic gradient technique, and can be adapted to Incremental Learning. Neural Gas (NG) networks and its growing NG variant are related to SOMs which are often exploited for incremental learning. PROjection-PREdiction (PROPREPROPRE) is an incremental learner based on NG and SOMs, which implements an extra supervised read-out layer implemented as a linear regression, as well as a concept drift detection mechanism in order to make the SOM usuable in IL context. Neural Gas with local Principal Component Analysis (NGPCANGPCA) is an online incremental learner focused on robot platform for object manipulation tasks. It modifies the classical NG algorithm to extend nodes to ellipoids to better match the data distribution. Dynamic Online Growing Neural Gas (DYNGDYNG) is an online classification approach that controls the growing speed of the NG network in such a way to speed up learning for new knowledge while slowing down the growth for the already learned knowledge. NGPCANGPCA and DYNGDYNG are very interesting methods but not directly comparable to the methods evaluated here since they do not exploit deep learning backbones. NG and SOM are growing networks that were widely used for incremental semi-supervised clustering , multi-class online classification problems , and online semi-supervised vector quantization learning .

We note that SOM and NG are originally designed for unsupervised learning and an adaptation to a supervised scenario is needed for comparability with the approaches which are in focus here. TOpology-Preserving knowledge InCrementer (TOPICTOPIC) is a very recent such work which adapts NG to class incremental learning for visual datasets with focus on few-shot learning, with a method named FSCILFSCIL, but experiments are also run for the standard scenario. First, TOPICTOPIC introduces an NG network to learn feature space topologies for knowledge representation. The network grows to learn new classes while also dealing with changes in the feature space due to deep model update. This is achieved using a Min-Max loss that pushes new classes that share the same label to a new NG node, while pulling the new nodes of different labels away from each others. Second, TOPICTOPIC preserves past knowledge by stabilizing the topology of the NG network using an Anchor Loss term. Since TOPICTOPIC focuses on the feature space which encodes more semantic information than the raw classification scores, it is less affected by the bias induced by high new classes’ raw scores. A topology-preserving network named TPCILTPCIL is introduced in to handle catastrophic forgetting. The network models the feature space using an Elastic Hebbian Graph, and the topology is maintained using a topology-preserving loss that constrains the neighborhood relationships in the graph when learning new classes. This approach augments the Hebbian graph by inserting vertices for each new class. The addition of nodes in TOPICTOPIC and TPCILTPCIL gradually increases the complexity of the architecture.

Incremental Learning Vector Quantization (ILVQILVQ) is a prototype-based classifier that does not require prior knowledge of the number of prototypes or their initial value. Instead, it uses a threshold-based insertion scheme, based on training data distribution to determine the number of required prototypes for each class. The main drawback of this approach is the continuously increasing architecture to store the learned patterns in order to function in an IL setting.

Fixed-Representation (FR) based methods do not update the deep representation for each incremental state and are less present in literature. They can be seen as a basic variant of fine-tuning based methods. A fixed-representation method is briefly described in . The results reported with it are poor, and this is due to a suboptimal usage of the method. In particular, the classification layer for past classes is needlessly relearned in each incremental state using only the exemplars of each class. Since they rely on a fixed representation, the stronger classifier weights learned initially with all past class data are reusable. Deep Shallow Incremental Learning (DeeSILDeeSIL) is a method which applies a simple transfer learning scheme . The approach makes use of a deep fixed representation to learn the first batch of classes and a battery of Support Vector Machines (SVMs) to incrementally learn new classes.

FearNet is a biologically inspired such method. Separate networks are used for long and short term memories to represent past and new classes. A decision mechanism is implemented to decide which network should be used for each test example. FearNetFearNet is interesting, but its memory increases significantly with time since the algorithm needs to store detailed statistics for each class learned.

Deep Streaming Linear Discriminant Analysis (DeepDeep-SLDASLDA) is an online approach based on SLDA algorithm. The Network is trained on the first batch of classes and is frozen afterwards. During training, a class-specific running mean vector and a shared covariance matrix are updated, while the prediction is done by assigning the label to the closest Gaussian in feature space defined by the class-mean vectors and covariance matrix.

REplay using Memory INDexing (REMINDREMIND) is brain inspired by the hippocampal indexing theory. The method is also based on an initial representation which is only partially updated afterwards. The approach uses a vector quantization technique to stores compressed intermediate representations of images, which are more compact than images. The stored vectors are reconstructed and replayed for memory consolidation. Vector quantization is widely used in unsupervised incremental learning . Here, the authors combine the Adaptive Resonance Theory (ART) with variant of vector quantization to balance the trade-off between plasticity and stability during incremental online learning. This approach was designed to handle two- and high-dimensional data within image classification framework. We tackle in this paper supervised learning, and this approach is not compatible with our experimental protocol.

Fine-Tuning (FT) based methods form a group which often uses a distillation term to reduce catastrophic forgetting . The use of knowledge distillation in an IL context is similar to self-distillation in that it operates with the same network architecture for the teacher and the student. However, a notable difference arises from the fact that new data are progressively incorporated. Learning without Forgetting (LwFLwF) is a pioneering work that does not require a memory of past classes. It leverages knowledge distillation to minimize the discrepancy between representations of past classes from the previous and current IL states. LwFLwF first performs a warm-up step that freezes the past parameters and trains only the new ones and then jointly trains all network parameters until convergence.

Incremental Classifier and Representation Learning (iCaRLiCaRL) is a popular IL method that combines the use of LwFLwF and of a memory for past class exemplars storage. Classification is performed with a nearest-mean-of-exemplars method instead of the raw scores predicted by the network. This external classifier is deployed to reduce the prediction bias in favor of new classes, which occurs due to data imbalance between past and new classes. An iCaRL analysis concludes that its most important components are the fixed-size memory and the distillation loss. The herding mechanism and the nearest-mean-of-exemplars classification seem to matter less. The authors of present an IL algorithm which differs from iCaRLiCaRL mainly through the way prediction bias is reduced. The external classifier is replaced by a balanced fine-tuning step, which uses the same number of samples for past and new classes. This component has an important impact on performance and leads to a strong improvement compared to iCaRLiCaRL. Sophisticated data augmentation is also used and has a small positive influence on results.

Learning without Memorizing (LwMLwM) is a distillation based approach that does not need memory for past classes. Instead, the authors propose an information preserving penalty using attention distillation loss that captures the changes in the classifier attention maps in order to preserve past knowledge. In , another distillation based system is proposed, it trains two separate networks, one for new classes and one for past classes, and then combines them via a double distillation loss. A deep memory consolidation is also performed using unlabeled auxiliary data to replace past class memory.

A part of recent IL approaches focuses on a more sophisticated tackling of catastrophic forgetting. The authors of Multi-model and Multi-level Knowledge Distillation (M2KDM2KD) propose a loss that distills knowledge not only from the previous model but from all the past models where the classes have been learned for the first time. They also propose an additional distillation term that operates on the intermediate layers of the CNN in addition to the last fully connected one. In , knowledge distillation is also combined with a fixed-size memory of the past. The authors deploy an algorithm to set a dynamic vector which corrects the bias induced by distillation loss among past classes and improves the representativeness of past image features. Hou et al. present Learning a Unified Classifier Incrementally via Rebalancing (LUCIRLUCIR), a method which gains a lot of traction. LUCIRLUCIR is based on three main components: (1) cosine normalization balances the magnitudes of past and new class probabilities, (2) less-forget constraint modifies the usual distillation loss to handle feature vectors instead of raw scores and (3) inter-class separation encourages the network to separate past and new class embeddings and actually implements a theoretical finding from . Note that further improvement of IL with distillation could be obtained by adapting recent theoretical and empirical advances such as those described in and . Alternately, PODNetPODNet relies on a spacial-based distillation loss that constrains the evolution of the model’s representation, and multiple proxy vectors to flexibly represent learned classes. This approach is more adequate with long runs of small incremental tasks.

Another recent stream of research focuses on modeling IL as an imbalanced learning problem. Bias Correction (BiCBiC) is a recent approach that uses a classical knowledge distillation term and adds a linear layer after the prediction layer of the deep model to reduce the bias in favor of new classes. The layer needs a validation set to learn parameters and is effective as long as the size of the validation set is sufficient. Class Incremental Learning with Dual Memory (IL2MIL2M) advocates for the use of vanilla fine-tuning as a backbone for IL. A very compact memory that stores classification statistics from the initial state of each classifier is added. Its content is leveraged to rectify scores of past classes and make them more comparable to those of new classes. Maintaining Discrimination and Fairness (MDFMDF) is very similar to IL2MIL2M. The main difference is that MDFMDF keeps the distillation loss to maintain discrimination between past classes. In MDFMDF, the rectification of class scores is done by aligning new class weights to those of past classes by multiplying each new class weight by the mean norm of past class weights and dividing it by the mean norm of new class weights, before to finally compute the prediction scores.

Classifier Weights Scailing for Class Incremental Learning (ScaILScaIL) is motivated by the same hypothesis as IL2MIL2M , MDFMDF and BiCBiC . Inspired by fixed-representation methods, bias reduction is achieved by reusing the classifier weights learned initially with all data. The experimental results indicate that, while the model evolves throughout incremental states, initial classifiers are still usable after a scaling operation, which makes them comparable to classifiers learned for new data. Standardization of Initial Weights (SIW) is also based on initial weights replay in a memoryless IL setting. The weights replay is followed by standardization of all class weights to smooth weights distribution in order to tackle catastrophic forgetting.

Mnemonics Training is built on top of herding-based approaches such as iCaRLiCaRL, BiCBiC and LUCIRLUCIR to modify the herding procedure by parameterizing exemplars and making them optimizable. The network is then optimized in two manners: model-level and exemplar-level. The memory is thus adjusted incrementally to match the data distribution in an effective way, leading mnemonic exemplars to yield separation between classes. In embedding systems, Semantic Drift Compensation (SDCSDC) was proposed to estimate the semantic drift of past knowledge while learning new knowledge to compensate for it, to further improve performance. The drift is computed at the class-mean-embedding level, which means that this approach is based on NCM classifier that does not need exemplars storage, since the past class-mean embeddings are estimated using new data only. In , authors propose an approach that calibrates activation maps of the CNN in order to accommodate new knowledge. Calibration is done using spatial and channel-wise calibration modules, and only the calibration parameters are trained at each new incremental state. This method does not require a past-class memory. However, the calibration parameters grow instead.

Using Generative Adversarial Networks (GANs) to generate past data holds promise since it reduces the memory footprint of algorithms. However, despite recent progress , generated images are still sub-optimal for IL. Since additional GAN models need to be created, the complexity in the number of parameters is fair but not optimal. The authors of use a GAN to create artificial images for past classes. Generated and real examples are mixed to obtain slightly better performance than that of iCaRLiCaRL . However, the performance significantly drops when relying exclusively on artificially generated images. Alternately, GAN Memory with No Forgetting is based on sequential style modulations to represent the past memory by forming a sequential targeted generative models. Here, the memory itself is designed as a form of lifelong learning.

This paper is focused on a scenario that requires a constant complexity of deep models and investigate the effect of allowing a fixed-size memory or not. Consequently, experiments are conducted with approaches that are fit to work under these conditions, namely those based on fine tuning and fixed representations.

Problem formalization

We propose a formalization of class incremental learning which builds on those introduced in . Given an initial non-incremental state S0\mathcal{S}_{0}, a model M0\mathcal{M}_{0} is trained from scratch on a dataset D0={(X0j,Y0j);j=1,2,...,P0}\mathcal{D}_{0}=\{(X_{0}^{j},Y^{j}_{0});j=1,2,...,P_{0}\}. X0jX_{0}^{j} and Y0jY_{0}^{j} are respectively the set of images and labels for the jthj^{th} class in S0\mathcal{S}_{0}, N0=P0N_{0}=P_{0} is the number of classes in the first non-incremental state.

We note TT the total number of states, including the initial state and T−1T-1 incremental states. A new batch of PtP_{t} new classes is streamed in each incremental state St\mathcal{S}_{t} and the objective is to learn a model Mt\mathcal{M}_{t} which recognizes Nt=P0+P1+...+PtN_{t}=P_{0}+P_{1}+...+P_{t} classes. This model is trained using the previous state model Mt−1\mathcal{M}_{t-1} on a dataset Dt={(Xtj,Y0t);j=1,2,...,Pt}∪K\mathcal{D}_{t}=\{(X_{t}^{j},Y^{t}_{0});j=1,2,...,P_{t}\}\cup\mathcal{K}. Note that all data of the new PtP_{t} classes are available with only a bounded exemplar subset K\mathcal{K} of data from the Nt−1=P0+P1+...+Pt−1N_{t-1}=P_{0}+P_{1}+...+P_{t-1} past classes. An imbalance in favor of new classes appears and grows throughout incremental states since the bounded memory K\mathcal{K} needs to be allocated to a larger number of past classes each time.

As discussed in Section 2, recent class incremental learning algorithms were implemented using deep convolutional networks (DNNs) as a backbone. While DNNs are end-to-end classification approaches, a part of the IL algorithms use a separate classifier layer. In such cases, the model Mt\mathcal{M}_{t} includes two main components: a feature extractor Ft\mathcal{F}_{t} and a classification component Ct\mathcal{C}_{t}.

The feature extractor Ft\mathcal{F}_{t} is defined as:

where ftx\boldsymbol{f}^{\textbf{x}}_{t} is a dd-dimensional compact vectorial representation of the image x.

The classifier Ct\mathcal{C}_{t} is usually defined as:

ot=(ot1,ot2,...,otNt)\boldsymbol{o}_{t}=(o_{t}^{1},o_{t}^{2},...,o_{t}^{N_{t}}) is the vector of raw scores of size NtN_{t} providing the individual prediction scores for each class j=1,2,...,Ntj=1,2,...,N_{t}.

Wt\boldsymbol{W}_{t} and bt\boldsymbol{b}_{t} are the weights matrix and bias vector of the last fully connected layer of size (d,Nt)(d,N_{t}) and NtN_{t} respectively. The size dd of the feature vector depends on the CNN architecture used.

In an end-to-end DNN , a softmax function is applied to transform raw scores ot=(ot1,ot2,...,otNt)\boldsymbol{o}_{t}=(o_{t}^{1},o_{t}^{2},...,o_{t}^{N_{t}}) to probabilities pt=(pt1,pt2,...,ptNt)\boldsymbol{p}_{t}=(p_{t}^{1},p_{t}^{2},...,p_{t}^{N_{t}}). This is the case for approaches such as . Ct\mathcal{C}_{t} can also be implemented using an external classifier. For instance, and a variant of use a Nearest-Class-Mean (NCM) as a classifier to compute class prediction based on the similarity of each test image to the average class feature computed from the available images in each state. Yet another choice is to exploit a fixed deep representation to extract features for all incremental states and a battery of linear SVMs to implement C\mathcal{C}.

A majority of existing IL algorithms alleviate the effects of catastrophic forgetting by introducing a distillation term in the loss function . In general, this function takes the following form:

where Lc\mathcal{L}^{c} and Ld\mathcal{L}^{d} are classical cross-entropy and distillation terms, respectively. λ∈\lambda\in is a hyper-parameter that provides the weight of each loss term.

Cross-Entropy Loss in the state St\mathcal{S}_{t} is computed for all past and new classes and is given by :

Distillation Loss in the state St\mathcal{S}_{t} is computed for past classes and is given by:

where Φ\Phi is the softened softmax applied on the raw scores predicted by the network. The softened score of the jthj^{th} class in state St\mathcal{S}_{t} is:

where T\mathcal{T} is a temperature scalar. Ld\mathcal{L}^{d} was originally introduced to improve performance when no memory of past classes is available . The authors of adapted it for the case when a bounded memory K\mathcal{K} is allowed. Different flavors of distillation were later proposed in .

2 Score bias correction

Recent works hypothesize that due to the limited memory of the past, IL is akin to imbalanced learning where the network is trained with enough images for the new classes but only a few ones for past classes.

These works handle catastrophic forgetting as an imbalance issue and thus make use of an additional bias removal layer Rt\mathcal{R}_{t} at the end of the model Mt\mathcal{M}_{t}. The layer takes the raw scores ot\boldsymbol{o}_{t} predicted by the classifier Ct\mathcal{C}_{t} and multiply those of new classes by a reducing factor to make them more comparable to those of past classes, giving a chance to the latter to be selected during inference.

α\alpha and β\beta are scaling factors. They differ from an approach to another. BiCBiC learns them using a validation set after fine-tuning the model. IL2MIL2M uses past classes’ statistics to set the value of α\alpha while zeroing β\beta, and the rectification aims to increase past classes’ scores instead of decreasing those of new classes. MDFMDF aligns new classes’ weights with those of past classes by setting α\alpha to the mean norm of past class weights divided by the mean norm of new class weights. Finally, ScaILScaIL normalizes the weights matrix of Ct\mathcal{C}_{t} leading to an implicit change in the values of the scores ot\boldsymbol{o}_{t}.

3 Past memory management

The bounded memory K\mathcal{K}, which stores a partial view of past classes, is a central component of existing IL algorithms. Regardless of the state St\mathcal{S}_{t}, the same number of images ∣Ktj∣=∣K∣/Nt|\mathcal{K}_{t}^{j}|=|\mathcal{K}|/N_{t} is kept for each class . Because the memory capacity is bounded, the number of images for each past class is reduced at the end of each state to accommodate images from new classes. The representation of past classes is thus degraded since the number of images per class is progressively reduced. Consequently, the model is biased toward new classes and underfits past classes, a well-known effect of catastrophic forgetting .

The role of exemplar selection techniques is debated in literature . Notably, the authors of report similar results with herding-based and random selection of exemplars. We run extensive experiments with both methods and reach a different conclusion. This is a result of a different interpretation of herding definition. Both and select exemplars statically using their similarity to the mean embedding of the class. We follow the original definition from , also exploited in , and select each exemplar based on a dynamic mean computed at each step based on the exemplars which were already selected. The advantage of the original definition is that it provides a better approximation of the actual class center compared to a static selection. It consists in taking, for each class, the set of images having the closest mean to the real class mean. Exemplar means are computed on feature vectors extracted from the penultimate layer of the CNN. We also tried exemplar selection techniques inspired from active learning approaches such as: entropy , min margin , core-set , k-means . Initial experiments showed that none of these techniques provide better performance than herding. Consequently, we do not report such results.

Fine-Tuning based IL algorithms

We compare recent class incremental algorithms and also adaptations of them, which combine components from different algorithms. An overview of the tested algorithms and of their characteristics is presented in Table 2. The model update for each incremental state is widely used in existing approaches. Distillation is also used by a majority of algorithms from literature to counter the effect of catastrophic forgetting. Bias removal aims at balancing predictions for past and new classes. It is deployed either as a complement to distillation or to replace it . Memory usage is compulsory for methods that rely heavily on exemplars of past classes. The dominant approach is based on model updating via fine-tuning to integrate new knowledge . The performance of these algorithms depends heavily on the existence of a bounded memory of the past. We also present results with fixed-representation based algorithms , which do not update the model but are also less dependent on memory.

LwF uses distillation loss to encourage the model Mt\mathcal{M}_{t} to predict the same scores for past classes in the current state St\mathcal{S}_{t} than in the previous one. LwFLwF was designed to work without a memory of past classes. LwF constitutes the inspiration for all class IL algorithms .

iCaRL exploits fine-tuning with distillation loss Ld\mathcal{L}^{d} to prevent catastrophic forgetting and a variant of Nearest-Class-Mean to counter imbalance between past and new classes. The main difference with LwFLwF is the introduction of a bounded memory to enable efficient replay.

LUCIR is based on fine-tuning with an integrated objective function. Authors propose the following contributions: (1) cosine normalization to balance magnitudes of past and new classifiers (2) less forget constraint to preserve the geometry of past classes and (3) inter-class separation to maximize the distances between past and new classes. The combination of these contributions constitutes a more sophisticated take at countering catastrophic forgetting compared to the use of knowledge distillation from . We experiment with two versions of this approach:

LUCIRNCMLUCIR^{NCM} - the original definition proposed by the authors where a Nearest-Class-Mean classifier is used. This version is functional in presence of a memory only, due to the need for exemplars to compute past class-mean..

LUCIRCNNLUCIR^{CNN} - the network outputs are used for classification. This version can be deployed with or without a memory for the past.

FT is the plain use of vanilla fine-tuning. The model Mt\mathcal{M}_{t} is initialized with the weights of the previous model Mt−1\mathcal{M}_{t-1} and only the cross-entropy loss Lc\mathcal{L}^{c} is used. FTFT constitutes the simplest way to update models in incremental learning. It is heavily affected by catastrophic forgetting if a bounded memory is not available but becomes an interesting baseline if a memory is available .

FTNEM is a version of FTFT which replaces the classifier Ct\mathcal{C}_{t} by a NEM classifier from . FTNEMFT^{NEM} is a modified version of iCaRLiCaRL in which the distillation loss Ld\mathcal{L}^{d} is ablated. FTNEM can only be deployed if a bounded memory is allowed to alleviate catastrophic forgetting.

FTBAL is inspired by . A vanilla FTFT is first performed, followed by a balanced FTFT. This second step aims to reduce bias between past and new classes by training on a version of Dt\mathcal{D}_{t}, which stores the same number of images for past and new classes to obtain similar magnitudes for them. FTBAL is also tributary to the fixed memory K\mathcal{K} because past exemplars are needed for the balancing step. In the absence of memory, this approach becomes equivalent to FTFT and is heavily affected by catastrophic forgetting.

BiC adds a linear layer for bias removal which is trained separately from the rest of the model learned with cross-entropy and distillation losses. The objective of the supplementary layer is to reduce the magnitudes of predictions for new classes to make them more comparable to those of past classes. Since a validation set is needed to optimize the bias removal layer, BiC can only function if a memory K\mathcal{K} is available. We note that K\mathcal{K} needs to be large enough to obtain reliable parameter estimations.

ScaIL hypothesizes that the classification layer Ct\mathcal{C}_{t} learned when classes were first streamed and learned with all data can be reused later. The main challenge is that deep models M\mathcal{M} are updated between incremental states. Normalization of the initial Ct\mathcal{C}_{t} is proposed to mitigate the effect of model updates and make past and new classes’ predictions comparable. ScaIL needs a bounded memory to keep trace of past classes in the embeddings.

IL2M uses past classes’ statistics to reduce the prediction bias in favor of new classes. Past classes’ scores are modified using the ratio between their mean classification score when learned initially in the state Si\mathcal{S}_{i} and in the current state St\mathcal{S}_{t}. Furthermore, the ratio between the mean classification score over all classes in St\mathcal{S}_{t} and Si\mathcal{S}_{i} is also used. This approach is also prone to catastrophic forgetting if no memory is allowed.

FTth, inspired by imbalanced learning , it implements fine tuning followed by threshold calibration (also known as threshold moving or post scaling). Thresholding adjusts the decision threshold of the model by adding a calibration layer at the end of the model during inference to compensate the prediction bias in favor of new classes:

where ∣Xtj∣|X_{t}^{j}| is the number of samples for the jthj^{th} class and ∣Dt∣|\mathcal{D}_{t}| is the total number of training examples in the state St\mathcal{S}_{t}. A memory of the past is needed to rectify past classes’ scores. This method is also heavily dependant on the bounded memory.

FTinit , FTL2init{}^{init}_{L2} , FTL2+mcinit{}^{init}_{L2+mc} , FTsiw+mcinit{}^{init}_{siw+mc} , LwFinit , LwFL2init{}^{init}_{L2} , and LwFsiwinit{}^{init}_{siw} , are methods built on top of FTFT and LwFLwF, in order to reduce the bias of the network towards new classes, where:

initinit - replaces the weights of past classes in the current state with their initial weights learned in the initial state with all available data.

L2L2 - normalization that makes classifier weights more comparable across states.

siwsiw - standardization of last layer weights, in order to make them comparable.

mcmc - state mean calibration defined as:

μ(Mt)\mu(\mathcal{M}_{t}) and μ(Mij)\mu(\mathcal{M}^{j}_{i}) - means of top-1 predictions of models learned in the current state and the initial state of the jthj^{th} class computed over their training sets.

The four components can be combined together, where first initinit is applied, followed either by L2L2 or siwsiw normalization, and finally followed by the state mean calibration mcmc. These methods are mostly interesting for IL without memory because they do not require the use of a past exemplars memory.

Fixed-Representation based IL algorithms

Fixed-Representation (FR) exploits the initial model M0\mathcal{M}_{0} trained on the classes of S0\mathcal{S}_{0} and freezes all its layers except the classification one in later incremental states. The frozen model is a limitation but also an advantage in that it allows the reuse of initial classifier layers, learned with all images, throughout the entire incremental process. Unfortunately, the reuse of initial layers, is not done in and results are suboptimal. The method does not need a bounded memory for the update.

DeeSIL is a variant of FRFR in which the classification layer of DNNs is replaced by linear SVMs. DeeSIL is a straightforward application of a transfer learning scheme in an incremental context. The use of external classifiers is proposed because they are faster to optimize compared to an end-to-end FRFR.

Deep-SLDA defines the model as Mt≡F(G(⋅))\mathcal{M}_{t}\equiv F(G(\cdot)) where GG is the fixed upper part of the network and F(⋅)F(\cdot) is the output layer. Only F(⋅)F(\cdot) is trained across incremental states in a streaming manner, while G(⋅)G(\cdot) serves as a feature extractor. At each incremental state, DeepDeep-SLDASLDA updates a class-specific running mean vector and a running shared covariance matrix among classes. During inference, it assigns an image to the closest Gaussian in feature space defined by the class mean vectors and the covariance matrix. DeepDeep-SLDASLDA does not need to store past class data and it is thus functional in absence of memory.

REMIND shares the same definition of Mt\mathcal{M}_{t} as DeepDeep-SLDASLDA, where G(⋅)G(\cdot) is the first fifteen convolutional and three down sampling layers, and F(⋅)F(\cdot) is the remaining two convolutional and one fully connected layers of a ResNet-18 . REMINDREMIND relies on Product Quantizer (PQ) algorithm to store intermediate representations of images as compressed vectors for fast learning. The compact vectors are then reconstructed and replayed for memory consolidation. Note that compact vectors allow us to save much more past data than with raw images (for instance, all ILSVRC can fit in the memory when ∣K∣=20000|\mathcal{K}|=20000).

Experimental setup

Experiments are done with all IL approaches presented in Sections 4 and 5. We also provide results with FullFull, a classical non-incremental training from scratch where all classes are learned with all their data. This algorithm is the upper bound for all class incremental approaches.

Four datasets designed for object, face, and landmark recognition are used here. The choice of significantly different tasks is important to study the adaptability and robustness of the tested methods. The main dataset statistics are provided in Table 3.

ILSVRC is a subset of 1000 ImageNetImageNet classes used in the ImagenetLSVRCImagenetLSVRC challenges. It is constituted of leaves of the ImageNetImageNet hierarchy which most often depicts specific visual concepts.

VGGFACE2 is designed for face recognition. We selected 1000 classes having the largest number of associated images. Face cropping is done with MTCNN before further processing.

Google Landmarks (LANDMARKS below) is built for landmark recognition, and we selected 1000 classes having the largest number of associated images.

CIFAR100 is designed for object recognition and includes 100 basic level classes .

2 Experimental protocol

The experimental protocol is inspired by the one proposed in iCaRLiCaRL . The most important parameters in IL are the number of states TT, and the size of the memory K\mathcal{K}, and we test three values for each one of them. First, we fix the number of states T=10T=10 and vary the memory to include approximately 2%,1%,0.5%2\%,1\%,0.5\% of the full training sets. Memory sizes are thus ∣K∣={20000,10000,5000}|\mathcal{K}|=\{20000,10000,5000\} for ILSVRC, ∣K∣={10000,5000,2500}|\mathcal{K}|=\{10000,5000,2500\} for VGGFACE2, ∣K∣={8000,4000,2000}|\mathcal{K}|=\{8000,4000,2000\} for LANDMARKS and ∣K∣={1000,500,250}|\mathcal{K}|=\{1000,500,250\} for CIFAR100. Second, we fix the memory size ∣K∣|\mathcal{K}| to include 0.5%0.5\% of the full training sets and vary the number of states T={20,50}T=\{20,50\}. Here, we chose the smallest memory size because it represents the most challenging case when a memory is allowed. This is also the most interesting in practice since it requires a reduced resource to store past data. We report results with ∣K∣=0|\mathcal{K}|=0 separately since the absence of memory renders some of the algorithms completely inoperable while others are still working.

3 Implementation details

A ResNet-18 architecture with an SGD optimizer is used as a backbone for all the methods. REMINDREMIND , DeepDeep-SLDASLDA , BiCBiC and LUCIRLUCIR are run using the optimal parameters of the public implementations provided in the original papers. iCaRLiCaRL is run using the code from since it provides better performance than the original implementation. LwFLwF is run using the code from , The SVMs in DeeSILDeeSIL are implemented using LinearSVC solver from Scikit-Learn toolbox . The SVMs were optimized using classical grid search as described in the original paper.

FTFT and its derivatives are based on the same fine-tuning backbone and are implemented in Pytorch . Training images are processed using randomly resized 224×224224\times 224 crops, horizontal flipping, and are normalized afterward. Given the difference in scale and the number of images between CIFAR100 and the other datasets, we found that a different parametrization was needed for this dataset. Note that the parameters’ values presented below are largely inspired by the original ones given in .

Dataset details and the code of all tested approaches and their adaptations are publicly available to facilitate reproducibility. https://github.com/EdenBelouadah/class-incremental-learning

4 Evaluation measures

The main evaluation measure used here is the popular top-5 accuracy . Following , accuracy is averaged only for incremental states (i.e., excluding the initial, non-incremental state), which is not of interest from an IL perspective. The sizes of the past memory K\mathcal{K} and the number of states TT are varied to evaluate the robustness of algorithms.

Since a relatively large number of configurations is tested, it is convenient also to use a global measure. We use the incremental learning gap measure (GILG_{IL}) , which computes the average performance gap between a classical learning and each IL configuration for each algorithm. GILG_{IL} is defined as:

where: ZZ is the number of tested configurations; acczacc_{z} is the top-5 score for each configuration; accFullacc_{Full} is the upper-bound accuracy of the dataset (FullFull accuracy); accMaxacc_{Max} is the maximum theoretical value obtainable for the measure (accMax=100acc_{Max}=100 here).

Following , the denominator is introduced in order to ensure that no individual configuration has an exaggerated influence on the global score. Note that GILG_{IL} is related to the forgetting rate proposed in , which is actually the numerator of individual configurations from Equation 11.

Results and discussion

Table 4 presents the performance of all algorithms tested in all experimental configurations when using herding for exemplar selection. Both the number of incremental states TT and the bounded memory size ∣K∣|\mathcal{K}| have a strong influence on results. The easiest configurations for all visual tasks are those including a large memory (∣K∣=2%|\mathcal{K}|=2\%) and a small number of states (T=10T=10). Inversely, the most difficult configuration combines a low memory (∣K∣=0.5%|\mathcal{K}|=0.5\%) and a large number of states (T=50T=50). This finding is intuitive insofar more exemplars for past classes enhance the quality of the replay for them, and a larger number of states makes IL more prone to catastrophic forgetting. However, the performance drop is more marked for the object recognition tasks (ILSVRC and CIFAR100) compared to face and landmark recognition (VGGFACE2 and LANDMARKS). For instance, with T=10T=10, the ILSVRC’s accuracy drop for BiCBiC is of 5.85.8 points when moving from ∣K∣=2%|\mathcal{K}|=2\% to ∣K∣=0.5%|\mathcal{K}|=0.5\% while the corresponding drop for VGGFACE2 is only of 1.61.6 points and the one for LANDMARKS is only of 1.31.3 points. The latter two tasks are simpler, and a smaller amount of exemplars can thus represent past classes.

The increase of TT, the number of incremental states, also has a detrimental effect on performance. For fine-tuning based methods, the performance drop is explained by the fact that a larger number of retraining steps causes more information loss, and the effect of catastrophic forgetting is increased. Also important, for methods like BiCBiC, which need a validation set, the size of the latter becomes insufficient when TT increases. This insufficiency is clearly illustrated by BiCBiC results for ∣K∣=0.5%|\mathcal{K}|=0.5\% and T=50T=50. In this configuration, BiCBiC performance drops more significantly than that of competing methods. The loss is most striking for CIFAR100, the smallest of all datasets tested, where a performance of only 19.6%19.6\% is obtained compared to 50.5%50.5\% for ∣K∣=0.5%|\mathcal{K}|=0.5\% and T=20T=20. For fixed-representation methods, larger values of TT decrease performance because the size of the first non-incremental state becomes smaller. Consequently, the fixed representation obtained from this state has lower generalization power and is less transferable to later states.

None of the methods is best in all configurations tested. On aggregate, the best results are obtained with FTthFT^{th}, with a GIL=−3.62G_{IL}=-3.62 points loss compared to FullFull, the classical learning upper-bound. The other methods with strong performance were all proposed recently: ScaILScaIL (GIL=−3.7G_{IL}=-3.7), BiCBiC (GIL=−4.03G_{IL}=-4.03) and LUCIRCNNLUCIR^{CNN} (GIL=−4.13G_{IL}=-4.13). The analysis of individual configurations shows that BiCBiC has good performance in many of them. This method is best or second-best for the largest memory tested (∣K∣=2%|\mathcal{K}|=2\%) and the smallest number of incremental states (T=10T=10). However, its performance drops faster for the other values of ∣K∣|\mathcal{K}| and TT. This is explained by its dependency on a validation set whose size becomes insufficient when ∣K∣|\mathcal{K}| is low, and TT is high.

The two LUCIRLUCIR variants have similar overall performance, with LUCIRCNNLUCIR^{CNN} being globally better than LUCIRNEMLUCIR^{NEM}. This result confirms the original findings reported in . The iCaRLiCaRL implementation from the same paper has significantly lower performance than the two versions of LUCIRLUCIR. The positive influence of inter-class separation and cosine normalization introduced in addition to standard knowledge distillation is thus confirmed.

Vanilla FTFT has lower performance than more recent methods but still much better than iCaRLiCaRL, contrary to the comparison presented in . However, the original comparison in that paper was biased since iCaRLiCaRL used memory while their version of FTFT was implemented without memory. All bias reduction methods applied to FTFT are beneficial, with FTthFT^{th} being the best one followed closely by ScaILScaIL. FTNEMFT^{NEM}, which exploits the external classifier from also has interesting performance and outperforms FTBALFT^{BAL} and IL2MIL2M. The lower performance of the last two methods is an effect of the fact that they are the most sensitive to memory reduction (∣K∣=0.5%|\mathcal{K}|=0.5\%) and the growth of the number of states (T=50T=50).

FRFR and DeeSILDeeSIL, the fixed-representation based methods, behave worse than most FTFT-based approaches, with the only exception being that DeeSILDeeSIL is globally better than iCaRLiCaRL. However, it is interesting to note that FRFR and DeeSILDeeSIL have a low dependency on memory size, and their performance becomes competitive for ∣K∣=0.5%|\mathcal{K}|=0.5\%. In this latter setting, fine-tuning based methods suffer more from catastrophic forgetting since memory becomes insufficient for an efficient replay of past classes. Globally, DeeSILDeeSIL has a better behavior compared to FRFR, especially for large scale datasets, and this confirms that the optimization of an external classifier is easier than that of the classification layer of a deep model. REMINDREMIND performs better than FRFR and DeeSILDeeSIL for large datasets and has a better global score (GIL=−6.02G_{IL}=-6.02 VS. GIL=−7.62G_{IL}=-7.62 and GIL=−6.92G_{IL}=-6.92 respectively). However, its performance drops significantly compared to DeeSILDeeSIL when the number of states is increased from T=10T=10 to T=20T=20 and T=50T=50.

For ILSVRC, REMINDREMIND clearly outperforms many FT-based approaches such as iCaRLiCaRL, LUCIRLUCIR, IL2MIL2M and FTFT variants except FTthFT^{th} and FTBALFT^{BAL}. Streaming based approaches like REMINDREMIND have the advantage to run much faster than class incremental based approaches, since they revisit each training example only once. However, the computational cost of DeeSILDeeSIL is still comparable to that of REMINDREMIND since the SVMs training is fast. Equally important, REMINDREMIND allows immediate evaluation since it learns the dataset images one by one. It is still usable in class incremental context since we can evaluate the model at the end of all training samples of each incremental state.

2 Role of exemplar selection

As we mentioned, there is an ongoing debate concerning the effectiveness of herding-based versus random exemplar selection in IL . We compare the two selection methods by providing results with random selection for the main algorithms evaluated here in Table 5. The obtained results indicate that herding has a positive effect on performance for most of algorithms, albeit with a variable difference with respect to random selection. The best results in Table 5 are obtained with LUCIRCNNLUCIR^{CNN}, ScaILScaIL and BiCBiC which have very close GILG_{IL} performance. Among fine-tuning based methods, LUCIRCNNLUCIR^{CNN} and BiCBiC are the methods which are least affected by the switch from herding to random exemplar selection. Both of these methods implement an end-to-end IL approach. iCaRLiCaRL has a more significant performance drop because it makes use of a NEMNEM external classifier. This is a consequence of the fact that the classifiers are computed directly on the randomly selected exemplars.

Vanilla FTFT is more affected by the use of random selection than LUCIRCNNLUCIR^{CNN} and BiCBiC. The use of distillation for past data partly compensates a poorer class representation with random exemplars. Since vanilla FTFT has a lower performance, algorithms which build on it are also negatively affected. Among them, ScaILScaIL is the least affected because it exploits the initial classifiers of past classes. FTthFT^{th} performance falls behind that of LUCIRCNNLUCIR^{CNN}, ScaILScaIL, and BiCBiC with random exemplar selection because exemplars have a more prominent role for learning past classes’ representations. Thresholding with prior class probabilities is less efficient on poorer past class models.

The use of random selection has a small effect on FRFR and DeeSILDeeSIL because the exemplars are only used as negatives when new classifiers are trained. Their presence has a positive effect in that it allows a slightly better separation between new and past classes across IL states. According to the authors of REMINDREMIND, many herding strategies were deployed based on distance from current example, number of times a sample has been replayed, and the time since it was last replayed, but all of the tested methods performed nearly the same as random selection, with higher computational time.

3 Incremental learning without memory

In many applications, no memory of past classes is available. For instance, in medical data processing , this is often due to privacy issues. We study the behavior of the main algorithms which can be deployed in the absence of memory here. The following algorithms cannot be deployed: (1) all variants which exploit an external NEMNEM classifier since exemplars are not available to build the classifiers for past classes; (2) BiCBiC because it requires a validation set; (3) ScaILScaIL because it requires past exemplars for normalization; (4) IL2MIL2M because the mean scores of past classes cannot be computed in the current state.

Without memory, iCaRLiCaRL becomes LwFLwF, the method which inspired more recent works using distillation in IL. LwFinitLwF^{init}, LwFL2initLwF^{init}_{L2}, and LwFsiwinitLwF^{init}_{siw} test if the basic hypothesis of ScaILScaIL regarding the reuse of initial classifier weights applies to a method which integrates distillation. This use of initial weight leads to a 3 points GILG_{IL} gain compared to classical LwFLwF. Further L2L2 normalization in LwFL2initLwF^{init}_{L2} is not efficient. However, standardization of weights in LwFsiwinitLwF^{init}_{siw} improves the results of LwFinitLwF^{init} with 3.9 points. LUCIRCNNLUCIR^{CNN} implements a more sophisticated scheme to counter catastrophic forgetting by adding cosine normalization and inter-class separation on top of knowledge distillation. The two additional components have a significant decisive role since they provide a 10 points gain compared to LwFLwF. Vanilla FTFT has no component to counter catastrophic forgetting and it has the worst overall performance. The use of initial classifiers of past classes in FTinitFT^{init} provides a very consequent gain over simple FTFT. The application of initinit is much more efficient for FTFT compared to LwFLwF and even gives nearly the same results than LwFsiwinitLwF^{init}_{siw}, the best variant of LwFLwF. The use of L2L2 normalization in FTL2initFT^{init}_{L2} improves the results of FTinitFT^{init} with 2 GILG_{IL} points, while adding the mean state calibration mcmc in FTL2+mcinitFT^{init}_{L2+mc} further gains another 1 GILG_{IL} points over FTL2initFT^{init}_{L2}. The best fine tuning based approach without memory is FTsiw+mcinitFT^{init}_{siw+mc} from . This approach outperforms the other methods with a large margin.

Overall, the best results are obtained with the fixed-representation methods because their dependence on past exemplars is much lower compared to fine-tuning based methods. In order, the best global score is obtained by DeeSILDeeSIL, DeepDeep-SLDASLDA, FRFR and REMINDREMIND. As we mentioned, DeeSILDeeSIL is easier to optimize compared to FRFR and has a comparable accuracy variation with DeepDeep-SLDASLDA for most tested configurations. However, DeeSILDeeSIL provides the best performance when no memory is allowed. The performance of fixed-representation methods drops when the number of incremental states increases because the initial state includes a lower number of classes. This is notably the case for CIFAR100, the smallest dataset tested, where the fixed-representations have lower performance compared to all variants of LwFLwF for all tested TT values. However, FRFR, REMINDREMIND, DeepDeep-SLDASLDA and DeeSILDeeSIL have consequently better performance for ILSVRC, VGGFACE2, and LANDMARKS where their initial representations are trained with at least 20 classes.

The analysis of individual datasets shows that LwFLwF variants have a strong performance for CIFAR100, the smallest one among the four tested. LwFLwF scales worse than LUCIRCNNLUCIR^{CNN}, which is better for the three larger datasets. The performance inversion is probably explained by the handling of inter-class separation in LUCIRLUCIR. This indicates that knowledge distillation alone does not scale well because when the number of past classes increases, the confusions between them hamper the performance of the method. Further analysis of this point is provided in Subsection 7.4.

4 Role of knowledge distillation

In , authors hypothesize that distillation is useful when the teacher model is trained with a large and balanced dataset. This is not the case in IL due to the fact that the dataset progressively includes knowledge about more classes and that there is an imbalance between past and new classes. In spite of this observation, knowledge distillation is commonly used to tackle catastrophic forgetting . Its use in IL with memory was encouraged by the experimental results presented in the influential iCaRLiCaRL paper . There, the original comparison between FTFT and iCaRLiCaRL was not fair since the first method is implemented without memory, while the second exploits a memory of the past. The results reported in Table 4 for vanilla FTFT and methods built on top of it challenge the assumption that distillation loss Ld\mathcal{L}^{d} is necessary in IL with memory. These experiments show that FTFT is globally better since the GILG_{IL} score is over 2 points smaller than that of iCaRLiCaRL. iCaRLiCaRL is more effective for ILSVRC and VGGFACE2 datasets only for a small number of incremental states (T=10T=10) and the smallest memory (∣K∣={1%,0.5%}|\mathcal{K}|=\{1\%,0.5\%\}). FTNEMFT^{NEM} is a version of iCaRLiCaRL without distillation. The results from Table 4 show that the use of the NEM classification layer further improves performance compared to vanilla fine-tuning.

When no memory is allowed for past classes, the experiments reported in Table 6 confirm those presented in . There, LwFLwF is clearly better than vanilla FTFT, and the usefulness of distillation is confirmed. Even without memory, the reuse of the weights of past classes from their initial states in FTinitFT^{init} is better than the sole use of knowledge distillation in LwFLwF . Only a more sophisticated scheme which combines distillation and an inter-class separation component in LUCIRCNNLUCIR^{CNN} outperforms FTinitFT^{init}, but stays way below FTsiw+mcinitFT^{init}_{siw+mc} that does not need distillation. Instead, it makes use of initial weights combined with standardization of all weights and mean state calibration.

In Table 7, we present the distribution of correct and erroneous predictions across incremental states to have a better understanding of the behavior of distillation in IL. Results are given for LwFLwF , LUCIRCNNLUCIR^{CNN} and FTL2initFT^{init}_{L2} which implement classical distillation, features-based distillation plus inter-class separation and the reuse of L2-normalized initial classifier weights, respectively. The authors of noted that distillation induces a bias among past classes, which leads to confusion between their predictions. This finding is confirmed by the large number of past-past class confusions e(p,p)e(p,p) associated to LwFLwF in Table 7. When advancing in incremental states, the number of past classes increases. If an error is made while training the model M1\mathcal{M}_{1} using the activations of M0\mathcal{M}_{0} as soft targets, it will be passed on to all the subsequent incremental states. Consequently, the percentage of e(p,p)e(p,p) errors in Table 7 increases in later incremental states. However, the percentage of e(p,p)e(p,p) errors is smaller for LwFLwF and LUCIRCNNLUCIR^{CNN} compared to FTL2initFT^{init}_{L2} indicating that distillation has a positive effect of past classes. The addition of the interclass separation in LUCIRCNNLUCIR^{CNN} removes a part of e(p,p)e(p,p), and the overall increases significantly c(p)c(p), the number of correct predictions for past classes. We note that, since distillation operates on past class scores, the bias in favor of new classes is not handled by LwFLwF and LUCIRCNNLUCIR^{CNN}. Consequently, e(p,n)e(p,n) is the main type of error for the distillation-based methods. This is explained in by the fact that the model is biased towards new classes, leading to predict past images as belonging to new classes. This bias is caused by the fact that new classes are well learned with all their data.

In Table 6, the comparison of LwFLwF, LUCIRCNNLUCIR^{CNN} and FTL2initFT^{init}_{L2} for T=10T=10 shows that LwFLwF has the lowest and highest performance for ILSVRC and CIFAR100 respectively. The detailed view in Table 7 gives further insights into the structure of results. c(p)c(p) is higher and e(p,p)e(p,p) is lower for CIFAR100 compared to ILSVRC, indicating that distillation is much more efficient at a smaller scale. We conclude that distillation is not always useful in IL. The performance of distilled networks depends on the size of the dataset, the number of incremental states, and the presence or not of the bounded memory of the past. It should be used only when the incremental task is known to be characterized by a favorable combination of these parameters.

5 Additional experiment

We present a supplementary experiment which compares the performance of a very recent Neural Gas (NG) based approach to that of other methods. TOpology-Preserving knowledge InCrementer relies on the NG network to preserve the feature space topology using a Hebbian learning . Two variants of TOPICTOPIC are tested: (1) TOPIC-AL - uses an Anchor Loss to stabilize the NG network in order to preserve past knowledge and (2) TOPIC-AL-MML - uses an Anchor Loss and also a Min-Max Loss to control the network growth while adapting it to new knowledge. They are compared to FTFT, FTthFT^{th}, iCaRLiCaRL, BiCBiC, LUCIRCNNLUCIR^{CNN}, and LUCIRNCMLUCIR^{NCM}. Note that we use a single dataset because the authors of did not provide their complete code and, while we tried to reproduce their results independently, that was not possible. Following , we use IMAGENET100 , a subset of 100 classes extracted from the ILSVRC dataset, where each class contains 500 training images and 100 test images. To start with a good data representation, the first model M0\mathcal{M}_{0} is trained on P0=60P_{0}=60 initial classes. The remaining 40 classes are divided in 8 incremental states containing each Pt=5P_{t}=5 new classes. The past classes’ memory is set to ∣Kt>0∣=400+4×(Nt−P0)|\mathcal{K}_{t>0}|=400+4\times(N_{t}-P_{0}), where 400 images are divided equally between the first state classes, and 4 images per class are used for the classes that do not belong to the first state.

Table 8 provides top-1 accuracy of classical class IL approaches FTFT, FTthFT^{th}, iCaRLiCaRL, LUCIRLUCIR and BiCBiC, and also results of TOPICTOPIC, the NG-based incremental learner, for IMAGENET100. Results indicate that LUCIRNCMLUCIR^{NCM} is the best approach, followed by LUCIRCNNLUCIR^{CNN}, BiCBiC, iCaRLiCaRL, TOPICTOPIC, FTthFT^{th} and FTFT. The two variants of TOPICTOPIC provide very similar performances with TOPIC−ALTOPIC-AL being marginally better. These results are different from those reported in , where TOPICTOPIC was found to have better performance. This difference is probably explained in part by method parametrization choices and in part by the fact that herding was not exploited for LUCIRLUCIR, BiCBiC and iCaRLiCaRL. We used the original parameters for the methods compared to TOPICTOPIC in Table 8. The use of herding is beneficial for all methods compared to TOPICTOPIC, with important impact for FTthFT^{th}, iCaRLiCaRL and BiCBiC and lower impact for LUCIRLUCIR variants. TOPICTOPIC is not affected by the use of herding since this selection is done by the neural gas component. Globally, the results from Table 8 show that, while interesting, the recent adaptation of neural gas approaches to class IL lags well behind the best methods tested in this work.

Conclusion and perspectives

We presented a comparison of class IL algorithms. An analysis based on six desirable properties shows that none of the studied groups is best adapted in all applications. We then proposed a formalization of methods that are designed to cope with constant model complexity and with bounded or no memory of past classes. A selection of recently proposed algorithms is then presented and evaluated thoroughly. The evaluation confirms that no algorithm is best in all configurations.

When a memory is allowed, the best global result is obtained when incremental learning is cast as a kind of imbalanced learning. This type of approach implements a vanilla FTFT backbone followed by a bias rectification layer. It is especially useful in the most challenging conditions (low memory and many incremental states). If enough memory is available, and the number of incremental states is low, distillation based approaches become competitive. The choice of the method will thus depend on the computation and storage capacities but also on the expected characteristics of the data stream, which needs to be processed.

When no memory is allowed, fixed-representation methods are globally much more competitive than fine-tuning ones while also being simpler and faster to deploy. They are particularly advantageous for large datasets, where distillation-based methods fail to scale-up. This finding is surprising insofar fixed-representation methods exploit a classical transfer learning scheme . They do not update models across incremental states and were considered less apt for usage in IL without memory . We note that these methods work better than distillation based IL algorithms even when initial representations are learned with a few dozens of classes.

Online learning methods are useful when the stream of data arrives image per image. The model capacity to learn individual classes is increased continuously as new images appear. They are fast to train and well adapted to embedded systems because they have low memory footprint.

For fairness, we evaluated fixed-representation based and fine-tuning based methods with the same initial representation. If a larger pool of classes is available at the beginning of the process, the performance of fixed-representations will be boosted because the initial representation generalizes better . However, fixed-representations work well only if the task does not change over time, as it is the case in the evaluated scenarios presented in .

The evaluation is done with four different datasets dedicated to distinct visual tasks. This setting can be reused and enriched to ensure a robust testing of class incremental algorithms. We will release the detailed implementations of all presented methods to facilitate reproducibility.

The comparison presented here shows that recently proposed approaches reduce the performance gap between non-incremental and incremental learning processes. The analysis of existing algorithms proposed here highlights a series of open problems which could be investigated in the future. First, handling class IL as an imbalanced learning problem provides very interesting results with or without the use of a distillation component. Here, we introduced a competitive method where classification bias in favor of new classes is reduced by using prior class probabilities . It would be interesting to investigate more sophisticated bias reduction schemes to improve performance further. Second, a more in-depth investigation of why distillation fails to work for large scale datasets is needed. The empirical findings reported here should be complemented with a more theoretical analysis to improve its usefulness. Already, the addition of inter-class separation from is promising. More powerful distillation formulations, such as the relational knowledge distillation , also hold promise. Third, the results obtained with herding based selection of exemplars are better compared to a random selection for all methods tested. Further work in this direction could follow-up on and investigate in more depth which exemplar distribution is optimal for replay. Finally, the evaluation scenario should be made more realistic by: (1) dropping the strong hypothesis that new data are readily annotated when they are streamed; (2) using a variable number of classes for the incremental states and (3) working with imbalanced datasets, which are more likely to occur in real-life applications than the controlled datasets tested until now.

Acknowledgements. This work was supported by European Union´s Horizon 2020 research and innovation program under grant number 951911 - AI4Media. This publication was made possible by the use of the FactoryIA supercomputer, financially supported by the Ile-de-France Regional Council.

References