Hybrid Memory Replay: Blending Real and Distilled Data for Class Incremental Learning

## Abstract

Abstract Incremental learning (IL) aims to acquire new knowledge from current tasks while retaining knowledge learned from previous tasks. Replay-based IL methods store a set of exemplars from previous tasks in a buffer and replay them when learning new tasks. However, there is usually a size-limited buffer that cannot store adequate real exemplars to retain the knowledge of previous tasks. In contrast, data distillation (DD) can reduce the exemplar buffer’s size, by condensing a large real dataset into a much smaller set of more information-compact synthetic exemplars. Nevertheless, DD’s performance gain on IL quickly vanishes as the number of synthetic exemplars grows.
To overcome the weaknesses of real-data and synthetic-data buffers, we instead optimize a hybrid memory including both types of data. Specifically, we propose an innovative modification to DD that distills synthetic data from a sliding window of checkpoints in history (rather than checkpoints on multiple training trajectories).
Conditioned on the synthetic data, we then optimize the selection of real exemplars to provide complementary improvement to the DD objective.
The optimized hybrid memory combines the strengths of synthetic and real exemplars, effectively mitigating catastrophic forgetting in Class IL (CIL) when the buffer size for exemplars is limited.
Notably, our method can be seamlessly integrated into most existing replay-based CIL models. Extensive experiments across multiple benchmarks demonstrate that our method significantly outperforms existing replay-based baselines.

## 1 Introduction

Incremental Learning (IL) [, , , ] is an emerging technique that emulates the human ability to continuously acquire new knowledge in an ever-changing world. However, the key challenge is that IL always suffers from catastrophic forgetting [], which means the model drastically forgets previously acquired information upon learning new tasks. Thus, how to mitigate catastrophic forgetting in IL remains a significant challenge.

In this work, we primarily focus on a particularly challenging scenario known as class incremental learning (CIL) [, , , ]. CIL aims to learn new and disjoint classes across successive task phases and then accurately predicts all classes observed thus far in each phase, without prior knowledge of task identities. A common approach to enhance CIL performance is the use of replay, which stores a subset of exemplars from old tasks and revisits them when learning new tasks. Storing real exemplars can significantly enhance the performance of CIL [, ]; however, the performance will be affected by the limitation of the exemplar buffer size. To decrease the dataset size, recent studies have explored data distillation (DD) [, ] to distill compact synthetic exemplars from real datasets. However, [] indicates that the effectiveness of synthetic exemplars declines as their quantity increases. Motivated by these findings, we aim to develop a new hybrid memory that combines the advantages of both real and synthetic exemplars for replay-based CIL methods.

Figure: Figure 1: Performance comparison between the real memory as used by the original CIL methods and our hybrid memory across multiple baselines: iCaRL [], BEEF [], and FOSTER [], all with the same exemplar buffer size on CIFAR-100 [].
Refer to caption: x1.png

In this paper, we introduce a novel hybrid memory that optimizes a limited number of both synthetic and real exemplars for replay-based CIL methods. A key challenge is enabling these limited exemplars to capture adequate information from data samples of previous tasks.
To address this challenge, we aim to introduce data distillation (DD) into CIL, which condenses large datasets into a small set of representative samples. However, classical DD techniques are not directly applicable to replay-based CIL due to the requirement of checkpoints
on multiple training trajectories. To address this challenge, we first propose an innovative Continual Data Distillation (CDD) method that adapts DD for replay-based CIL, extracting informative synthetic exemplars from previous tasks’ datasets.
Interestingly, experiments in Sec. 3 across different limited exemplar buffer sizes reveal that while memory relying solely on synthetic exemplars initially outperforms memory using only real exemplars, its performance becomes less effective than the memory only with real exemplars as the buffer size increases.
To address this issue, we further develop conditional real data selection that chooses optimal real samples to complement synthetic data. As a result, the interplay between selected real exemplars and synthetic data enhances model performance within a limited exemplar buffer size. As illustrated in Fig. 1, our proposed hybrid memory significantly outperforms the original real exemplars across various replay-based CIL methods. Finally, in Sec. 5, we evaluate our approach by integrating it into several existing replay-based CIL models and compare their performance against baseline models. The results validate that our hybrid memory consistently leads to superior performance.

Our contributions are four-fold: 1) to our best knowledge, we are the first to synergize limited synthetic and real exemplars to boost replay-based CIL performance; 2) we develop a novel conditional real data selection that optimally chooses real exemplars, which can complement the synthetic data effectively; 3) our approach can be inserted into many existing replay-based CIL models to improve their performance; and 4) extensive experiments demonstrate that our method can significantly outperform existing replay-based CIL approaches with a limited number of saved exemplars.

## 2 Related Work

Class Incremental Learning. Existing works of CIL can be categorized into three types: regularization-based methods, architecture-based methods, and replay-based methods.

(i) Regularization-based methods seek to mitigate catastrophic forgetting by incorporating explicit regularization terms to balance the knowledge from old and new tasks [, , , , ]. However, only using regularization-based methods often proves inadequate for preventing catastrophic forgetting. Therefore, these methods often collaborate with the replay-based methods to boost performance. (ii) Architecture-based methods try to mitigate catastrophic forgetting by either dynamically expanding the model’s parameters to accommodate new tasks [, , ] or by learning new tasks in parallel using task-specific sub-networks or modules [, , ]. However, these approaches often require substantial memory to store the expanded network or multiple sub-networks and typically depend on task identities to determine the appropriate parameters or sub-networks for a given task. Consequently, their applicability is significantly limited. (iii) Replay-based methods are designed to mitigate catastrophic forgetting by preserving a small subset of old task exemplars for replay while learning new tasks. One line of these methods [, , , ] maintains a limited memory for storing real exemplars from old tasks. However, due to data privacy concerns and inherent memory constraints, the number of real exemplars stored is typically small, significantly affecting performance in applications. Another line [, , , ] employs generative models, such as Variational Autoencoders (VAE) and Generative Adversarial Networks (GAN), to create synthetic exemplars of old tasks for replay. However, these methods often face challenges with label inconsistency during continual learning [, ], and is closely related to continual learning of generative models themselves []. In contrast, this paper aims to condense dataset information into a few synthetic exemplars without training additional models.

Data Distillation. Data distillation (DD) aims to condense the information from a large-scale dataset into a significantly smaller subset. This process ensures that the performance of a model trained on the distilled subset is comparable to that of a model trained on the original dataset. Existing DD methods can be grouped into three categories based on the optimization objectives: performance matching [, ], parameter matching [, , ], and distribution matching [, ]. While a few studies [, ] have applied DD to a simple specific IL application like GDumb [], they cannot be directly applied to the general replay-based CIL methods. This is because traditional DD techniques require training a set of models randomly sampled from an initialization distribution. However, for typical replay-based CIL, the initial model parameters for each task are derived from the weights trained on the previous task. Thus, directly applying existing DD techniques to CIL introduces significant computational costs, as it requires training an additional set of models to get multiple trajectories. To address this issue, we introduce the Continual DD (CDD) technique to suit replay-based CIL.

## 3 Why Hybrid Memory?

In this section, we mainly introduce the rationale behind the need for hybrid memory in CIL by comparing real, synthetic, and bybrid memory.

Figure: Figure 2: Performance evaluation of iCaRL [] using different exemplar buffer sizes for real memory, synthetic memory, and our hybrid memory. “real memory” refers to buffers containing only real exemplars selected by iCaRL. “synthetic memory” contains only synthetic exemplars generated by CDD.
Refer to caption: x2.png

To address catastrophic forgetting in CIL, general replay-based methods attempt to store real exemplars from previous tasks in a limited exemplar buffer. Intuitively, saving high-quality exemplars from old tasks can enhance the performance of replay-based CIL. However, a size-limited exemplar buffer cannot store adequate real exemplars to retain the knowledge of previous tasks. To address this challenge, we introduce a Continual Data Distillation (CDD) to compress important information from each task’s dataset into a limited number of synthetic exemplars, replacing the need to store real exemplars in the buffer.

However, synthetic exemplars alone are not always sufficient. As their number increases, performance tends to plateau due to the inevitable information loss that occurs during the distillation process. As shown in Fig. 2 and Appendix E, we evaluate various replay-based CIL methods with buffers containing either only real exemplars or only synthetic exemplars generated by CDD across different buffer sizes on CIFAR-100 []. We can observe that synthetic memory performs better than real memory when the buffer size is small, suggesting that synthetic exemplars capture more information per exemplar when storage is constrained. However, as the buffer size increases, synthetic exemplars become less effective than real exemplars, likely due to the inherent important information loss in the distillation process. Motivated by these observations, we propose to construct a hybrid memory that combines the conditionally selected real exemplars with the synthetic ones to complement each other. In the following Sec. 4, we will detail the proposed method.

## 4 Proposed Hybrid Memory

In this section, we first present the problem of using hybrid memory in replay-based CIL. Then we detail the proposed hybrid memory to mitigate the catastrophic forgetting in CIL.

### 4.1 Problem Formulation

This work aims to build a high-quality hybrid memory to mitigate the catastrophic forgetting problem in CIL, which involves sequentially learning distinct tasks, each consisting of disjoint groups of classes. Specifically, the real dataset for task-$t$ is denoted as $\mathcal{R}_{t}\triangleq\{(x_{i},y_{i})\}_{i=1}^{n_{t}}$, where $y_{i}$ belongs to the label space $C_{t}$ of task-$t$, and $n_{t}$ represents the number of instances. Unlike traditional replay-based methods that store only limited real exemplars, our approach maintains a hybrid memory with a limited number of hybrid exemplars from learned tasks’ classes. The hybrid memory is represented as $\mathcal{H}_{1:t-1}\triangleq\bigcup_{i=1}^{t-1}\mathcal{H}_{i}$, where $\mathcal{H}_{t}\triangleq\{\mathcal{S}_{t},\mathcal{R}_{t}[A_{t}]\}$ represents the hybrid memory for task-$t$. Here, $\mathcal{S}_{t}$ comprises synthetic exemplars for the classes in task-$t$, and
$A_{t}\subseteq V_{t}$ ($V_{t}=\{1,2,\cdots,|\mathcal{R}_{t}|\}$ is the ground set) indexes a subset of real samples selected from $\mathcal{R}_{t}$.
The model $f(x;\theta)$ trained on $\mathcal{H}_{1:t-1}\cup\mathcal{R}_{t}$ is required to predict probabilities for all former classes, including the current task-$t$, denoted as $C_{1:t}\triangleq\bigcup_{i=1}^{t}C_{i}$, for any given input $x$.
We define the important notations used in this work in Appendix A.

### 4.2 Overview of the Proposed Hybrid Memory

Fig. 3 presents the framework of the proposed hybrid memory system for CIL, comprising two key components: (i) model update and (ii) memory update. The model update refines the CIL model by leveraging a hybrid memory composed of both synthetic and real exemplars. Instead of trivially merging synthetic and real data, our memory update jointly optimizes the two by selecting real exemplars based on the optimized synthetic data. As the memory update is central to our method, we first elaborate on this component below.

Figure: Figure 3: The framework of the proposed hybrid memory system for replay-based CIL. We first leverage the current real data with the hybrid memory for former classes to update the model. Then we use Continual Data Distillation (❶) to extract synthetic exemplars and conditional real data selection (❷) to choose optimal exemplars conditioned on synthetic data. Finally, the synthetic exemplars and selected real exemplars are combined to update the hybrid memory.
Refer to caption: x3.png

### 4.3 Memory Update

According to Section 3, we propose to obtain an optimal hybrid memory $\mathcal{H}_{t}^{\star}$ for task-$t$ by optimizing the following objective,

$$ $\mathcal{H}_{t}^{\star}\in\mathop{\arg\min}\limits_{\mathcal{H}_{t}}\mathcal{L }(\mathcal{H}_{t},\mathcal{R}_{t}),~{}~{}\mathcal{H}_{t}\triangleq\{\mathcal{S }_{t};\mathcal{R}_{t}[A_{t}]\},$ (1) $$

where $\mathcal{L}(\cdot,\cdot)$ measures the distance between the hybrid memory $\mathcal{H}_{t}$ and the real dataset $\mathcal{R}_{t}$. The hybrid memory minimizing $\mathcal{L}(\cdot,\cdot)$ is expected to achieve comparable performance as $\mathcal{R}_{t}$ when used to train the model.

However, jointly optimizing both the synthetic exemplars $\mathcal{S}_{t}$ and the subset $A_{t}$ of real exemplars at the same time is challenging, as the optimization of $\mathcal{S}_{t}$ is a continuous process while selecting real exemplars $\mathcal{R}_{t}[A_{t}]$ requires combinatorial optimization. To address this problem, we adopt an alternating optimization strategy to optimize the hybrid memory, as illustrated on the right side of Fig. 3. Below, we detail our method for constructing an effective hybrid memory.

❶ Continual Data Distillation (CDD).
First, we aim to optimize the synthetic exemplars $\mathcal{S}^{\star}_{t}$ for hybrid memory. Traditional DD methods can condense dataset information into a few synthetic exemplars, but they cannot be directly applied to replay-based CIL methods. This is because existing DD methods distill synthetic data from multiple training trajectories (with different random initialization) while most CIL methods only produce one trajectory per task.
To address this issue, we introduce a novel Continual Data Distillation (CDD) technique, which distills $\mathcal{S}_{t}$ from checkpoints on task-$t$’s training trajectory $\theta_{1:N}$, where $N$ represents the total number of cached checkpoints $\theta$ in the history of learning task-$t$. We do not need multiple trajectories because the replay of $\mathcal{S}_{t}$ in the next task will only start from $\theta_{N}$ instead of random initializations.

Specifically, to distill synthetic exemplars from the real dataset (❶) after training the model on task-$t$, we will minimize the distance ($\mathcal{L}(\cdot,\cdot)$ in Eq. 1) between synthetic exemplars and the real data from task-$t$. To effectively solve this equation, we propose CDD to adapt the original DD optimization objective into CIL below,

$$ $\mathcal{S}_{t}^{\star}\in\operatorname*{arg\,min}_{\mathcal{S}_{t}}\mathcal{L }(\mathcal{S}_{t},\mathcal{R}_{t})=\mathop{\mathbb{E}}\limits_{\theta\sim \theta_{1:N}}\left[\ell(\mathcal{S}_{t},\mathcal{R}_{t};\theta)\right],$ (2) $$

where $\ell(\cdot,\cdot;\cdot)$ in Eq. 2 is a DD objective from any existing DD methods. It aims to measure the distance between the synthetic exemplars $\mathcal{S}_{t}$ and the real data $\mathcal{R}_{t}$ using the sampled model parameters $\theta$.
In Appendix D, we present a detailed description of several optimization objectives for CDD in CIL.

To keep a constant and smaller memory of model checkpoints, we can instead apply a sliding window version of CDD of window size $\tau\ll N$, i.e., updating $\mathcal{S}_{t}$ only based on the most recent $\tau$ checkpoints. Specifically, after each epoch-$j+1$ of task-$t$, we update the synthetic data $\mathcal{S}_{t}$ as $\mathcal{S}_{t,j+1}$ below.

$$ $\mathcal{S}_{t,j+1}=\mathcal{S}_{t,j}-\eta\nabla_{\mathcal{S}_{t,j}}\left( \mathop{\mathbb{E}}\limits_{\theta\sim\theta_{j-\tau+2:j+1}}\left[\ell( \mathcal{S}_{t,j},\mathcal{R}_{t};\theta)\right]\right),$ (3) $$

where $\eta$ is the learning rate for updating the synthetic exemplars $\mathcal{S}_{t,j+1}$.
Hence, we only need to store $\tau$ checkpoints in any step but the final $\mathcal{S}_{t}$ at the end of each task is a result of DD on all the $N$ checkpoints. The final $\mathcal{S}_{t}^{\star}\leftarrow\mathcal{S}_{t,N}$.

❷ Conditional Real Data Selection.
While synthetic exemplars effectively capture rich information from previous tasks, their impact tends to plateau as their quantity increases (see Sec. 3). To overcome this limitation, we select a subset of real data complementary to $\mathcal{S}_{t}^{*}$ at the end of each task $t$ to further reduce the gap between the memory $\mathcal{H}_{t}$ and $\mathcal{R}_{t}$
(refer to ❷ in Fig. 3). Guided by Eq. 1, the objective is to find an optimal subset $A_{t}^{\star}\subseteq V_{t}$ such that the selected real data $\mathcal{R}_{t}[A_{t}^{\star}]$, in conjunction with the distilled synthetic exemplars $\mathcal{S}_{t}^{\star}$, minimize the DD objective below:

$$ $A_{t}^{\star}\in\operatorname*{arg\,min}_{A_{t}\subseteq V_{t},|A_{t}|\leq k} \ell([\mathcal{R}_{t}[A_{t}];\mathcal{S}_{t}^{\star}],\mathcal{R}_{t};\theta_{ t}),$ (4) $$

where $\theta_{t}$ denotes the model parameters trained on $\mathcal{R}_{t}\cup\mathcal{H}_{1:t-1}$, task-$t$’s real data $\mathcal{R}_{t}$ combined with the hybrid memory $\mathcal{H}_{1:t-1}$ for the former classes. The DD optimization objective $\ell(\cdot,\cdot;\cdot)$ is kept consistent with the one in Eq. 2.

Since the conditional subset selection problem in Eq. 4 is an NP-hard combinatorial optimization problem, we apply the greedy algorithm to approximately optimize the subset $A_{t}$.

Algorithm. To select some ideal real exemplars, we employ a greedy algorithm within our selection. This approach involves iteratively selecting the locally optimal real exemplars from the current task, guided by the objective in Eq. 4. The core idea is to approximate a globally optimal selection, designated as $\mathcal{R}_{t}[A_{t}^{\star}]$, through these successive local optimizations. The detailed algorithm is summarized in Appendix B.

Theoretical Analysis.
We also theoretically analyze the performance of the model trained on the proposed hybrid memory, showing that it can achieve performance comparable to a model trained on the real dataset for all tasks in CIL.
We begin our analysis by learning CIL tasks jointly, which serves as the performance benchmark for CIL. In this scenario, the training data for task-$t$ is written as $\mathcal{R}_{1:t}\triangleq\bigcup_{i=1}^{t-1}\mathcal{R}_{i}\cup\mathcal{R}_{t}$ and the model for task-$t$ can be obtained by the maximum likelihood estimation below

$$ $\theta_{\mathcal{R}_{1:t}}=\mathop{\arg\max}\limits_{\theta}(\log{P(\mathcal{R }_{1:t-1}|\theta)}+\log{P(\mathcal{R}_{t}|\theta)}).$ (5) $$

Given that the absence of $\mathcal{R}_{1:t-1}$ leads to catastrophic forgetting in CIL, our objective is to construct a smaller hybrid memory, $\mathcal{H}_{1:t-1}$, with limited exemplars that enable the network to achieve performance comparable to that obtained when trained on $\mathcal{R}_{1:t-1}$.

###### Definition 1 .

The optimal model trained on task-$t$’s hybrid memory is $\theta_{\mathcal{H}_{t}}=\mathop{\arg\max}\limits_{\theta}\log{P(\mathcal{H}_{
t}|\theta)}$.

###### Definition 2 .

The optimal model trained on task-$t$’s real data is $\theta_{\mathcal{R}_{t}}=\mathop{\arg\max}\limits_{\theta}\log{P(\mathcal{R}_{
t}|\theta)}$.

###### Definition 3 .

The optimal model trained on the hybrid memory of all prior tasks from 1 to $t$ is denoted by $\theta_{\mathcal{H}_{1:t}}=\mathop{\arg\max}\limits_{\theta}h_{t}(\theta)=
\mathop{\arg\max}\limits_{\theta}\log{P(\mathcal{H}_{1:t}|\theta)}$.

###### Definition 4 .

The optimal model trained on the real data of all tasks from 1 to $t$ is defined as $\theta_{\mathcal{R}_{1:t}}=\mathop{\arg\max}\limits_{\theta}r_{t}(\theta)=
\mathop{\arg\max}\limits_{\theta}\log{P(\mathcal{R}_{1:t}|\theta)}$.

###### Assumption 1 .

Based on our objective of the proposed hybrid memory, we assume that the model trained on the hybrid memory for one task can achieve comparable performance to that of the model trained solely on real data for the same task, we can express this formally as $\exists\epsilon_{t}\in[0,1),\log P(\mathcal{R}_{t+1}|\theta_{\mathcal{H}_{t+1}
})\geq(1-\epsilon_{t})\log P(\mathcal{R}_{t+1}|\theta_{\mathcal{R}_{t+1}})$.

###### Assumption 2 .

Assume that the performance of the model trained on the hybrid memory of all prior tasks till task-$t$ and the performance of the optimal model trained on the hybrid memory of task-$t+1$ can be bonded as $\exists\rho,\rho*r_{t+1}(\theta_{\mathcal{R}_{1:t+1}})\geq r_{t}(\theta_{
\mathcal{H}_{1:t}})+\log P(\mathcal{R}_{t+1}|\theta_{\mathcal{H}_{t+1}})$.

###### Theorem 1 (Performance Approximation) .

Based on the above Assumptions 1 and 2, when $\epsilon_{t+1}\geq\frac{\rho}{1-\epsilon_{t}}$, we can derive that the model trained on the hybrid memory of all previous tasks achieves performance comparable to that of the model trained on the real dataset of all previous tasks,

$$ $\log{P(\mathcal{R}_{1:t}|\theta_{\mathcal{H}_{1:t}})}\geq(1-\epsilon_{t})\log{ P(\mathcal{R}_{1:t}|\theta_{\mathcal{R}_{1:t}})}.$ (6) $$

We provide the detailed proof of Theorem. 1 in Appendix. C.

###### Remark .

According to Theorem 1, when $\epsilon_{t}$ and $\rho$ are small, Eq.6 is well bounded. In other words, if the proposed hybrid memory is optimized using $\mathcal{L}(\cdot,\cdot)$ in Eq.1 for each task in CIL, the performance of the model trained on the hybrid memory across all tasks can achieve results comparable to those of a model trained on a real dataset for all tasks.

###### Definition 1 .

###### Definition 2 .

###### Definition 3 .

###### Definition 4 .

###### Assumption 1 .

###### Assumption 2 .

###### Theorem 1 (Performance Approximation) .

###### Remark .

### 4.4 Model Update

Next, we describe the model update based on the updated hybrid memory. After optimizing the hybrid memory $\mathcal{H}_{t}$ for the task-$t$, the hybrid memory is then updated as follows:

$$ $\mathcal{H}_{1:t}\leftarrow\mathcal{H}_{1:t-1}\cup\left\{\mathcal{S}_{t}^{ \star},\mathcal{R}_{t}[A_{t}^{\star}]\right\}.$ (7) $$

We then combine the updated hybrid memory, $\mathcal{R}_{t+1}$, which contains data from previous tasks, with the real exemplars, $\mathcal{R}_{t+1}$, to train the CIL model for task-$t+1$.
As illustrated on the left side of Fig.3, to achieve the optimal model trained on the hybrid memory of all prior tasks, i.e., $\theta_{1:t}^{H}$ in Eq. 6, we adopt an alternating model update strategy based on the data and hybrid memory of task-$t$.

Finally, we detail the training pipeline for task-$t$ in Algorithm 1.

Figure: Algorithm 1 Training with Hybrid Memory on Task-$t$

## 5 Experiments

In this section, we first compare the performance of the proposed hybrid memory with the replay-based baselines in CIL. We then demonstrate that the integration of the hybrid memory can enhance the performance of some existing replay-based CIL methods. Additionally, we investigate the ratio of synthetic exemplars within the hybrid memory. Finally, we examine the effectiveness of our conditional real data selection in choosing ideal real exemplars.

Datasets. We evaluate the proposed method on two commonly used benchmarks for class incremental learning (CIL), CIFAR-100 [] and TinyImageNet []. CIFAR-100: CIFAR-100 contains $100$ classes, the whole dataset includes $50,000$ training images with $500$ images per class and $10,000$ test images with $100$ images per class. TinyImageNet: TinyImageNet contains $200$ classes, the whole dataset includes $100,000$ training images with $500$ images per class and $10,000$ test images with $50$ images per class.

Protocol. To evaluate the performance of our method, we apply two commonly used protocols [] for both datasets. 1) zero-base: For the zero-base setting, we split the whole classes into 5, and 10 tasks (5, and 10 phases) evenly to train the network incrementally. 2) half-base: For the half-base setting, we train half of the whole classes as the first task and then split the rest half of the classes into 5, and 10 tasks (5, and 10 phases) evenly to train the network incrementally. To ensure a fair comparison across different replay-based methods, we maintain a fixed memory capacity that stores 20 exemplars per class for training.

Baselines. We compare some replay-based methods that incorporate our proposed hybrid memory with other established replay-based approaches, including iCaRL [], BiC [], WA [], PODNet [], FOSTER [], and BEEF []. We assess the performance of these methods using two commonly used metrics in CIL: Average Accuracy (AA) [], which represents the overall performance at a given moment, and Average Incremental Accuracy (AIA) [], which captures historical performance variations.

Experiments Setting. In our experiments, we insert our hybrid memory into various replay-based CIL methods: iCaRL [], FOSTER [], and BEEF []. All methods are implemented with PyTorch [] and PyCIL [], which are well-regarded tools for CIL. We use ResNet-18 [] as the feature extractor for all methods, with a uniform batch size of $B=128$. For iCaRL, we employ the SGD optimizer [], with a momentum of 0.9 and a weight decay of 2e-4. The model is trained for 170 epochs, starting with an initial learning rate of 0.01, which is then reduced by a factor of 0.1 at the 80th and 120th epochs. For FOSTER [], we use SGD with a momentum of 0.9. The weight decay is set at 5e-4 during the boosting phases and 0 during the compression phase. The model is trained for 170 epochs during the boosting phases and 130 epochs during the compression phase. The learning rate starts at 0.01 and follows a cosine annealing schedule that decays to zero across the specified epochs. For BEEF [], we adopt SGD with a momentum of 0.9. The weight decay is 5e-4 during the expansion phase and 0 during the fusion phase. The model is trained for 170 epochs in the expansion phase and 60 in the fusion phase, with an initial learning rate of 0.01, decaying to zero according to a cosine annealing schedule. The detailed hyper-parameter settings for FOSTER and BEEF can be found in the original papers. For the specific data distillation algorithm for CDD, we adapt DM [], a distribution matching DD method, as the objective $\ell(\cdot,\cdot;\cdot)$ in Eq. 2. For the window size $\tau$ in the sliding window version CDD, we use $\tau=4$. For DM, we use the SGD optimizer with a momentum of 0.5 to learn the synthetic exemplars. The learning rate $\eta$ in Eq. 3 is set to 0.1 for CIFAR-100 and 1 for TinyImageNet. For both datasets, we train the synthetic exemplars for 10,000 iterations. All experiment results are averaged over three runs. We run all experiments on a single NVIDIA RTX A6000 GPU with 48GB of graphic memory.

### 5.1 Main Results

First, we compare the performance of the proposed hybrid memory with various replay-based CIL methods on CIFAR-100 and TinyImageNet datasets under zero-base settings with 5 and 10 phases and half-base settings with 5 and 10 phases, storing 20 exemplars per class. To demonstrate the effectiveness and applicability of our approach, we integrate it into three replay-based CIL models: the classical method iCaRL, and the recent methods FOSTER and BEEF. In this experiment, we adopt the DM as our CDD technique to extract synthetic exemplars for the hybrid memory, denoted by H. Our hybrid memory comprises 10 synthetic exemplars generated by CDD and 10 real exemplars selected through the proposed conditional real data selection.

Tables 1 and 2 show the comparison of the performance achieved by iCaRL, BEEF, and FOSTER using hybrid memory against different baselines under two different settings. The experimental results are averaged over three runs. Regarding the zero-base setting, as shown in Table 1, the FOSTER integrated with our hybrid memory, which achieves the best performance among our three methods in AIA and the last average accuracy (LAA), outperforms the best baseline FOSTER by a large margin on CIFAR-100 under both 5-phase and 10-phase settings. Likewise, the FOSTER with our method achieves higher AIA than the best baseline FOSTER on TinyImageNet for the same settings and also performs the best in LAA on TinyImageNet under the 10-phase setting.

For the half-base setting, as shown in Table 2, the BEEF incorporated with our method surpasses the best baseline (FOSTER) with a large margin in AIA and LAA on CIFAR-100 under the 5-phase setting, and on TinyImageNet under both 5-phase and 10-phase settings. Similarly, the FOSTER integrated with the proposed hybrid memory outperforms the best baseline FOSTER in AIA and LAA on CIFAR-100 under the 10-phase setting.

The reason why our method performs well is that the optimized hybrid memory, combining the strengths of synthetic and real exemplars, can retain more useful knowledge of previous tasks. In sum, the experimental results demonstrate the effectiveness of our hybrid memory in improving CIL performance. Due to limited space, we present more detailed results in Appendix F.

Table: Table 1: AIA (average incremental accuracy) and LAA (the last task’s average accuracy) of the three replay-based methods with the proposed hybrid memory and baselines on both CIFAR-100 and TinyImageNet under zero-base 5 and 10 phases with 20 exemplars per class. “w H” denotes using our proposed hybrid memory with distribution matching (DM).

Table: Table 2: AIA and LAA of the three replay-based methods with the proposed hybrid memory and baselines on both CIFAR-100 and TinyImageNet under half-base (train half of the whole classes as the first task) 5 and 10 phases with 20 exemplars per class. “w H” denotes using our proposed hybrid memory with distribution matching (DM).

### 5.2 Effectiveness of Hybrid Memory

In this section, we demonstrate the overall effectiveness of the proposed hybrid memory in enhancing the performance of some existing replay-based CIL methods. In this experiment, we adapt the original DM objective in CDD, denoted as $\ell(\cdot,\cdot;\cdot)$ in Eq. 2, to generate synthetic exemplars, which make up the synthetic memory (S). We then conditionally select the optimal real exemplars based on these synthetic exemplars to construct the hybrid memory (H). To validate its general effectiveness, we integrate both the synthetic memory and hybrid memory into three replay-based CIL methods: iCaRL, FOSTER, and BEEF. We evaluate the performance of these methods on CIFAR-100 under two configurations: zero-base (5 and 10 phases) and half-base (5 and 10 phases), using 20 exemplars per class. The performance comparison between the original methods and those using our hybrid memory, as shown in Table 3, indicates that integrating hybrid memory significantly enhances performance across all three replay-based CIL methods.
Especially, under the half-base setting, our hybrid memory improves iCaRL by 2.22% and 1.85%, BEEF by 7.74% and 3.98%, and FOSTER by 2.36% and 4.86% in AIA for the 5-phase and 10-phase settings. Comparing the performance of the three methods integrated with our hybrid memory (w H) against the original methods with real memory and with synthetic memory (w S), our hybrid memory consistently outperforms both the synthetic and original real memory across different CIL methods and settings, all while maintaining the same exemplar buffer size.

Table: Table 3: AIA and LAA of the three replay-based methods with the proposed hybrid memory, synthetic exemplars, and baselines on CIFAR-100 under zero-base and half-base 5 and 10 phases with 20 exemplars per class. “w S” denotes using the synthetic memory achieved by CDD with distribution matching (DM).

### 5.3 Impact of the Ratio in Hybrid Memory

We also study the impact of varying the ratio of synthetic exemplars in the hybrid memory under a limited exemplar buffer size. Using grid search, we empirically determine the optimal ratio of synthetic exemplars in the hybrid memory. In this experiment, we apply our hybrid memory to the replay-based CIL method iCaRL on CIFAR-100, using the zero-base 10-phase setting with 20 exemplars per class, and evaluate its performance at different synthetic-to-real exemplar ratios. As shown in Fig. 5, the performance peaks when the ratio is $0.5$. This result suggests that synthetic exemplars and real exemplars are equally important, with both contributing to improved performance.

Figure: Figure 4: LAA and AIA of iCaRL with proposed hybrid memory at different synthetic exemplar ratios. “LAA” refers to the last average accuracy, “AIA” refers to the average incremental accuracy.
Refer to caption: x4.png

### 5.4 Effectiveness of Conditional Real Data Selection

To verify the effectiveness of our proposed conditional real data selection, we compared it with random sampling. Specifically, we apply the conditional real data selection in Eq.4 to choose optimal real exemplars based on the synthetic exemplars by CDD, and then combine selected real exemplars with synthetic ones to construct a hybrid memory. For a fair comparison, we also construct a hybrid memory by randomly selecting real exemplars and combining them with synthetic exemplars. These hybrid memories are individually integrated into different replay-based CIL methods, iCaRL, FOSTER, and BEEF. We evaluate the performance using AIA on CIFAR-100 under a zero-base setting with 10 phases, with each class containing 20 exemplars. The hybrid memory maintains a balance of 10 synthetic and 10 real exemplars, while the original method utilizes 20 real exemplars. As shown in Fig.5, the hybrid memory with our conditional real data selection not only outperforms the original method but also demonstrates a significant advantage over hybrid memories with random selection. Notably, the performance comparison of FOSTER with different memory types reveals that random sampling can affect the effectiveness of the generated synthetic exemplars.The superior performance of our proposed hybrid memory is attributed to the conditional real data selection’s ability to optimally choose real exemplars that complement the synthetic exemplars.

## 6 Conclusion and Limitations

In this work, we introduced a hybrid memory that stores a limited number of real and synthetic exemplars for improving the CIL performance. Specifically, we devised a new Continual Data Distillation (CDD) technique that can adapt most existing DD methods into CIL to generate optimal synthetic exemplars for the general replay-based CIL models. To further complement synthetic data, we proposed a conditional real-data selection to choose optimal real exemplars based on synthetic exemplars. As a result, the combination of synthetic and real exemplars significantly enhanced the CIL performance. Extensive experimental results on two benchmarks demonstrated that our hybrid memory can improve the performance of the original methods and other baselines. A limitation of our method is that the ratio between synthetic and real exemplars in the hybrid memory is currently set as an empirical hyper-parameter. In future work, we plan to develop an adaptive algorithm to automatically determine the optimal ratio for hybrid memory.

## Appendix A Notation list.

Table 4 describes the important notations used in our work.

**Table 4: Summary of Notations.**
| Notation | Definition |
| --- | --- |
| $t$ | The current task ID |
| $\mathcal{R}_{1:t}\triangleq\bigcup_{i=1}^{t-1}\mathcal{R}_{i}\cup\mathcal{R}_{t}$ | The real data for tasks from 1 to $t-1$ |
| $\mathcal{R}_{t}\triangleq\{(x_{i},y_{i})\}_{i=1}^{n_{t}}$ | The real data for task-$t$ |
| $x_{i}$ | The real data sample |
| $y_{i}$ | The label of the real data sample $x_{i}$ |
| $n_{t}$ | The number of real instances in task-$t$ |
| $C_{t}$ | The whole label space for task-$t$ |
| $\mathcal{H}_{1:t-1}\triangleq\bigcup_{i=1}^{t-1}\mathcal{H}_{i}$ | The hybrid memory for tasks from $1$ to $t-1$ |
| $\mathcal{H}_{t}\triangleq\{\mathcal{S}_{t},\mathcal{R}_{t}[A_{t}]\}$ | The hybrid memory for the task-$t$ |
| $\mathcal{S}_{t}$ | The synthetic exemplars for the task-$t$ |
| $\mathcal{S}_{t,j}$ | The updated synthetic exemplars for the task-$t$ after epoch-$j$ of task-$t$ in sliding window version of CDD |
| $\tau$ | The window size (the number of cached checkpoints) for sliding window version of CDD |
| $\eta$ | The learning rate for updating the synthetic exemplars $\mathcal{S}_{t,j}$ by sliding window version of CDD |
| $A_{t}\subseteq\{1,2,\cdots,|\mathcal{R}_{t}|\}$ | The indexes of subset chosen from the real dataset $\mathcal{R}_{t}$ |
| $f(\cdot;\theta)$ | The whole model, with parameters $\theta$ |
| $\theta_{\mathcal{H}_{t}}$ | The optimal model trained on task-$t$’s hybrid memory |
| $\theta_{\mathcal{R}_{t}}$ | The optimal model trained on task-$t$’s real data |
| $\theta_{\mathcal{R}_{1:t}}$ | The optimal model trained on the real data of all tasks from 1 to $t$ |
| $\theta_{\mathcal{H}_{1:t}}$ | The optimal model trained on the hybrid memory of all prior tasks from 1 to $t$ |
| $\epsilon_{t}$ | The scalar value bounding the performance of $\theta_{\mathcal{H}_{1:t}}$ on $\mathcal{R}_{1:t}$ by the performance of $\theta_{\mathcal{R}_{1:t}}$ on $\mathcal{R}_{1:t}$. |
| $\rho$ | The scaling factor that bounds the sum of the performance of $\theta_{\mathcal{H}_{1:t}}$ on $\mathcal{R}_{1:t}$ and the performance of $\theta_{\mathcal{H}_{t+1}}$ on $\mathcal{R}_{t+1}$. |

## Appendix B Algorithm of Conditional Real Data Selection

As described in Sec. 4.3, we employ a greedy algorithm for our proposed conditional real data selection. The details of this algorithm are provided below,

Figure: Algorithm 2 Conditional Real Data Selection (Greedy Algorithm)

## Appendix C The Proof For Theorem 1 .

Here we provide the detailed proof for Theorem 1.
See 1

###### Proof.

According to the Definition 4, the $\theta_{\mathcal{R}_{1:t}}$ is the optimal solution of $r_{t}(\theta)$, thus we can get $r_{t}(\theta_{\mathcal{R}_{1:t}})\geq r_{t}(\theta_{\mathcal{R}_{1:t+1}})$. And according to the Definition 2, the $\theta_{\mathcal{R}_{t+1}}$ is the optimal solution of $\log{P(\mathcal{R}_{t+1}|\theta)}$, thus we can get $\log{P(\mathcal{R}_{t+1}|\theta_{\mathcal{R}_{t+1}})}\geq\log{P(\mathcal{R}_{t
+1}|\theta_{\mathcal{R}_{1:t+1}})}$.

According to the Mathematical Induction:

Base Case ($t=1$):

$$ $\log{P(\mathcal{R}_{1:1}|\theta_{\mathcal{H}_{1:1}})}=\log{P(\mathcal{R}_{1}| \theta_{\mathcal{H}_{1}})},~{}\log{P(\mathcal{R}_{1:1}|\theta_{\mathcal{R}_{1: 1}})}=\log{P(\mathcal{R}_{1}|\theta_{\mathcal{R}_{1}})}$ $$

$$ $\exists\epsilon\in[0,1),~{}\log P(\mathcal{R}_{1}|\theta_{\mathcal{H}_{1}}) \geq(1-\epsilon)\log P(\mathcal{R}_{1}|\theta_{\mathcal{R}_{1}})$ $$

According to the Assumption 1, the base case holds true.

Inductive Hypothesis: Assume that the formula holds for $\epsilon_{t}$ at task-$t$:

$$ $\log{P(\mathcal{R}_{1:t}|\theta_{\mathcal{H}_{1:t}})}\geq(1-\epsilon_{t})\log{ P(\mathcal{R}_{1:t}|\theta_{\mathcal{R}_{1:t}})}$ $$

Inductive Step: We will prove that the formula holds for $\epsilon_{t+1}$ at task-$t+1$:

$$ $\displaystyle\log{P(\mathcal{R}_{1:t+1}|\theta_{\mathcal{H}_{1:t+1}})}$ $\displaystyle=\log{P(\mathcal{R}_{1:t}|\theta_{\mathcal{H}_{1:t+1}})}+\log{P( \mathcal{R}_{t+1}|\theta_{\mathcal{H}_{1:t+1}})}$ $\displaystyle=r_{t}(\theta_{\mathcal{H}_{1:t+1}})+\log{P(\mathcal{R}_{t+1}| \theta_{\mathcal{H}_{1:t+1}})}$ $\displaystyle=r_{t+1}(\theta_{\mathcal{H}_{1:t+1}})$ $$

$$ $\displaystyle\log{P(\mathcal{R}_{1:t+1}|\theta_{\mathcal{R}_{1:t+1}})}$ $\displaystyle=\log{P(\mathcal{R}_{1:t}|\theta_{\mathcal{R}_{1:t+1}})}+\log{P( \mathcal{R}_{t+1}|\theta_{\mathcal{R}_{1:t+1}})}$ $\displaystyle=r_{t}(\theta_{\mathcal{R}_{1:t+1}})+\log{P(\mathcal{R}_{t+1}| \theta_{\mathcal{R}_{1:t+1}})}$ $\displaystyle=r_{t+1}(\theta_{\mathcal{R}_{1:t+1}})$ $$

$$ $\displaystyle r_{t+1}(\theta_{\mathcal{R}_{1:t+1}})-r_{t+1}(\theta_{\mathcal{H }_{1:t+1}})$ $\displaystyle\leq r_{t}(\theta_{\mathcal{R}_{1:t+1}})+\log{P(\mathcal{R}_{t+1} |\theta_{\mathcal{R}_{1:t+1}})}$ $\displaystyle\leq r_{t}(\theta_{\mathcal{R}_{1:t}})+\log{P(\mathcal{R}_{t+1}| \theta_{\mathcal{R}_{t+1}})}$ $\displaystyle\leq\frac{1}{1-\epsilon_{t}}\left(r_{t}(\theta_{\mathcal{H}_{1:t} })+\log{P(\mathcal{R}_{t+1}|\theta_{\mathcal{H}_{t+1}})}\right)$ $\displaystyle\leq\frac{\rho}{1-\epsilon_{t}}r_{t+1}(\theta_{\mathcal{R}_{1:t+1 }})$ $\displaystyle\leq\epsilon_{t+1}r_{t+1}(\theta_{\mathcal{R}_{1:t+1}})$ $$

Thus, by the principle of mathematical induction, the formula holds for all $\epsilon_{t}$ of task-$t$.
∎

Discussion. We discuss the performance boundary of the model trained with the proposed hybrid memory. According to Theorem 1, the performance of the optimal model trained on the hybrid memory for all tasks which is denoted as $r_{t}(\theta_{1:t}^{H})$, is bounded by the performance of the optimal model trained on the real dataset for all tasks, scaled by $1-\epsilon_{t}$, when $\epsilon_{t+1}\geq\frac{\rho}{1-\epsilon_{t}}$. It is evident that $\epsilon_{t}$ can converge to $\epsilon_{t}=\frac{1\pm\sqrt{1-4\rho}}{2}$ if $\rho\leq\frac{1}{4}$, ensuring that $\epsilon_{t}$ remains within the bounds $\epsilon_{t}\in[0,1)$. Therefore, if the initial $\epsilon_{t}\leq\frac{1\pm\sqrt{1-4\rho}}{2}$, the performance will be well bounded. We also illustrate how $\epsilon_{t}$ changes iteratively over 100 tasks with different values of $\rho$ and initial $\epsilon_{t}$ in Fig. 6.

Figure: (a) $\rho=0.1,initial\epsilon_{t}\in[0,\frac{1-\sqrt{1-4\rho}}{2})$
Refer to caption: x6.png

###### Proof.

## Appendix D CDD Optimization Objectives.

We present a detailed description of several optimization objectives for our CDD approach.

CDD with DM. First, we describe the adaptation of DM [] as the optimization objective for CDD, as outlined below,

$$ $\mathop{\mathbb{E}}\limits_{\theta\sim\theta_{1:N}}\left[\ell_{DM}(\mathcal{S} _{t},\mathcal{R}_{t};\theta)\right]=\mathop{\mathbb{E}}\limits_{\theta\sim \theta_{1:N}}\left[\|\mathbb{E}[\psi(\mathcal{S}_{t};\theta)]-\mathbb{E}[\psi( \mathcal{R}_{t};\theta)]\|^{2}\right],$ (8) $$

where $N$ in Eq. 8 represents the total number of cached checkpoints $\theta$ in the history of learning task-$t$,
$\psi(\cdot;\theta)$ is the function to extract the embedding of the input samples. The objective of Eq. 8 aims to measure the distance between the mean vector of the synthetic exemplars and the mean vector of the real dataset.

CDD with FTD. We also adapt the FTD [] as the optimization objective for CDD as follows,

$$ $\displaystyle\mathop{\mathbb{E}}\limits_{\theta\sim\theta_{1:N}}\left[\ell_{ FTD}(\mathcal{S}_{t},\{\mathcal{R}_{t},\mathcal{H}_{1:t-1}\};\theta)\right]$ $\displaystyle=\mathop{\mathbb{E}}\limits_{\theta\sim\theta_{1:N}}\frac{\|( \theta_{S}^{(n)}-\theta^{(m)})\|^{2}_{2}}{\|(\theta-\theta^{(m)})\|^{2}_{2}},$ $\displaystyle\theta_{S}^{(0)}=\theta,~{}\theta_{S}^{(n)}=\theta_{S}^{(n-1)}$ $\displaystyle+\eta\nabla L(\mathcal{S}_{t};\theta_{S}^{(n-1)}),$ $\displaystyle\theta^{(0)}=\theta,~{}\theta^{(m)}=\theta^{(m-1)}$ $\displaystyle+\eta\nabla L(\{\mathcal{R}_{t},\mathcal{H}_{1:t-1}\};\theta^{(m- 1)}),$ (9) $$

where $N$ in Eq. D represents the total number of cached checkpoints $\theta$ in the history of learning task-$t$. The parameter vectors $\theta_{S}^{(n)}$ and $\theta^{(m)}$, which originate from the initial model parameters $\theta$, are iteratively trained on the synthetic dataset $\mathcal{S}_{t}$ and the data $\mathcal{R}_{t}\cup\mathcal{H}_{1:t-1}$ of the current task, respectively, for $n$ and $m$ steps with learning rate $\eta$. The function $L(\cdot;\cdot)$ is the loss function used for training the network across different CIL methods. The objective in Eq. D focuses on quantifying the difference between two sets of parameter vectors: $\theta_{S}^{(n)}$ and $\theta^{(m)}$. Here $\theta_{S}^{(n)}$ is derived from the initial parameters $\theta$, which are trained with synthetic exemplars $\mathcal{S}_{t}$ for $n$ steps, while $\theta^{(m)}$ originates from the same initial parameters but is trained with real data $\mathcal{R}_{t}\cup\mathcal{H}_{1:t-1}$ for $m$ steps.

CDD with DSA. Additionally, we also adapt the DSA [] as the optimization objective for CDD as follows,

$$ $\mathop{\mathbb{E}}\limits_{\theta\sim\theta_{1:N}}\left[\ell_{DSA}(\mathcal{S }_{t},\mathcal{R}_{t};\theta)\right]=\mathop{\mathbb{E}}\limits_{\theta\sim \theta_{1:N}}\frac{<\nabla L(\mathcal{S}_{t};\theta),\nabla L(\mathcal{R}_{t}; \theta)>}{\|\nabla L(\mathcal{S}_{t};\theta)\|_{2},\|\nabla L(\mathcal{R}_{t}; \theta)\|_{2}},$ (10) $$

where $N$ in Eq. 10 represents the total number of cached checkpoints $\theta$ in the history of learning task-$t$. The function $L(\cdot;\cdot)$ is the loss function used for training the network across different CIL methods.
The objective in Eq. 10 focuses on quantifying the cosine similarity between the gradient of the synthetic exemplars $\mathcal{S}_{t}$ and the gradient of the real dataset $\mathcal{R}_{t}$, both computed on the sampled parameters $\theta$ with the loss function $L(\cdot;\cdot)$.

CDD with DataDAM. Furthermore, we adapt the DataDAM [] as the optimization objective for CDD as follows,

$$ $\mathop{\mathbb{E}}\limits_{\theta\sim\theta_{1:N}}\left[\ell_{DataDAM}( \mathcal{S}_{t},\mathcal{R}_{t};\theta)\right]=\mathop{\mathbb{E}}\limits_{ \theta\sim\theta_{1:N}}\left[L_{SAM}(\mathcal{S}_{t},\mathcal{R}_{t};\theta)+ \lambda L_{MMD}(\mathcal{S}_{t},\mathcal{R}_{t};\theta)\right],$ (11) $$

where $N$ in Eq. 10 represents the total number of cached checkpoints $\theta$ in the history of learning task-$t$.
The objective in Eq. 11 focuses on attention matching and quantifying the distributions between synthetic exemplars and real datasets by objectives $L_{SAM}(\cdot,\cdot;\cdot)$ and $L_{MMD}(\cdot,\cdot;\cdot)$.

Figure: Figure 7: Results of different CDD optimization objectives on CIFAR-100 with zero-base 10 phases setting. S$(\cdot)$ means synthetic memory generated by a specific objective.
Refer to caption: x10.png

Furthermore, we validate the wild applicability of our CDD in adapting the data distillation methods into CIL. In this experiment, we adapt different DD algorithms, DM, FTD, DSA, and DataDAM above as CDD optimization objectives. These objectives with CDD are integrated into iCaRL, and their performance is evaluated on the CIFAR-100 dataset with zero-base 10 phases setting. In the experiment, each CDD is used to generate 10 synthetic exemplars per class, denoted as $S(DM)$, $S(FTD)$, $S(DSA)$, and $S(DataDAM)$. These are compared against the original iCaRL method, which selects 10 and 20 real exemplars per class using herding[], as described in[].
As illustrated in Fig. 7, iCaRL with 10 synthetic exemplars per class outperforms the original method which uses 10 real exemplars per class (black curve). In addition, using just 10 synthetic exemplars per class as $S(FTD)$ achieves comparable performance to iCaRL configured with 20 real exemplars per class (blue dash curve).

Figure: (a) Performance of FOSTER
Refer to caption: x11.png

## Appendix E Effectiveness of Hybrid Memory Across Different Exemplar Buffer Sizes

To further validate the assumption from Sec. 3 that synthetic exemplars alone are not always sufficient, we explore the effectiveness of the hybrid memory across different exemplar buffer sizes with several different replay-based CIL methods. In addition to the iCaRL results shown in Fig. 2, we compare the performance of hybrid memory with both synthetic and real memory on two other replay-based CIL methods, BEEF and FOSTER, across various buffer sizes. The experiments were conducted on CIFAR-100 under the zero-base 10-phase setting, the same setting used for iCaRL in Fig. 2.

As shown in Fig. 8, the performance of synthetic memory generated by CDD significantly improves at smaller buffer sizes but quickly diminishes as the number of synthetic exemplars increases in both FOSTER and BEEF. In contrast, our proposed hybrid memory leverages the strengths of both synthetic and real exemplars, consistently outperforming synthetic and real memory across different exemplar buffer sizes.

Figure: (a) CIFAR-zero-5
Refer to caption: x13.png

Figure: (a) Synthetic Exemplars (CIFAR-100)
Refer to caption: x21.png

## Appendix F Additional Results

To demonstrate the superior performance of our approach, we also compare the average accuracy curves for each task against the baselines. As described in Sec. 5.1, we here present the average accuracy (AA) for each task corresponding to Table 1 and Table 2. As shown in Fig. 9, a comparison between the solid curves (representing methods with our proposed hybrid memory) and the dashed curves of the same color (representing the original methods) shows that our hybrid memory consistently enhances the performance of replay-based CIL methods, even with a limited exemplar buffer size, across different dataset scales and experimental settings.

## Appendix G Visualization

In this section, we provide visualizations of the synthetic and selected exemplars from CIFAR-100 and TinyImageNet. As shown in Fig. 10, we randomly select three different classes and compare the synthetic exemplars generated by our CDD with the corresponding selected exemplars conditioned on these synthetic exemplars. By comparing the upper and bottom rows, we observe that the selected exemplars are chosen based on the given synthetic exemplars and provide complementary information that the synthetic exemplars alone do not capture.

## Peer Reviews

confidence: 2
contribution: 2
initial_rating: 3
presentation: 2
questions: 1- How does the synthetic-to-real exemplar ratio impact performance in tasks with more significant shifts in data distribution? Would an imbalance lead to overfitting to synthetic data, particularly in settings with high task complexity?
2- Can the authors clarify the criteria for synthetic exemplar selection beyond theoretical metrics? How does the algorithm ensure diversity in synthetic data without redundancy?
soundness: 3
strengths: - The approach of using real and distilled data within a hybrid memory framework is interesting.
- The proposed hybrid memory can be integrated seamlessly with existing replay-based CIL methods like iCaRL, BEEF, and FOSTER, making it a versatile addition to existing frameworks.
- Availability of code is appreciated.
summary: The authors propose a new approach to incremental learning called "Hybrid Memory", which combines the benefits of replay-based methods with leveraging both real exemplars and distilled data, which can potentially reduce the exemplar buffer size while mitigating catastrophic forgetting. Their experimental results show that Hybrid Memory outperforms existing replay-based CIL methods on several benchmarks, including CIFAR-100 and Tiny ImageNet.
weaknesses: - The authors said, "We do not need multiple trajectories because the replay of St in the next task will only start from θN instead of random initializations." As you may know the reason to use multiple training trajectories is to gain more robust and representative dataset for approximate the complex structure of the original dataset, improving generalization and reducing overfitting to any single path of learning. As you didn't provide any proof over generalization of your method, it is a real concern that your model might be overfitted on dataset and achieve higher accuracy over other methods.
- The proposed method "Hybrid Memory", relies heavily on existing replay-based CIL, with minimal innovation or breakthroughs presented in this work. The authors fail to provide a clear and compelling justification for their approach, instead relying on vague claims about improving performance on certain benchmarks.
- Given the focuses of paper is on hybrid exemplars, an analysis of computational and memory overhead associated with the hybrid memory structure is essential.
- Paper needs ablation study.

---

confidence: 3
contribution: 3
initial_rating: 5
presentation: 3
questions: I would like to confirm whether the results presented in the base version of the competitor methods (*i.e.*, the upper part of Table 1) are derived using their original replay mechanisms, such as iCaRL with Herding, and not altered in any way. Additionally, could you clarify how these original methods have been combined with your proposed approach, particularly in relation to the introduction of Hybrid Memory (*i.e.*, the lower part *w. H*)?

Have you considered whether the success of your data distillation might be sufficient when paired with a strategy that maximizes diversity? For example, could already existing Memory Update techniques (like Herding or the approach based on Algo. 2 of [1]) make your Hybrid Memory effective without requiring conditional updates for the real data? This analysis could provide valuable insights and enrich the discussion presented in Figure 5. 

     [1] Buzzega, Pietro, et al. "Rethinking experience replay: a bag of tricks for continual learning." 2020 25th International Conference on Pattern Recognition (ICPR). IEEE, 2021.

I noticed that you mentioned the results are averaged over three runs. It would be helpful to include the standard deviations at least in the main results Tables.
soundness: 3
strengths: The motivation for this work is strong, clear, and easy to follow. By addressing the challenge of catastrophic forgetting in Class Incremental Learning (CIL), the authors offer a practical solution that optimizes memory use while maintaining performance.  

Several studies, including theoretical discussions, ablation studies on the update strategy, investigations into the synthetic/real exemplar ratio, and other relevant analyses, reinforce the validity of this work.
summary: The authors propose a modified data distillation method to develop a hybrid memory approach that combines real and synthetic examples, to reduce catastrophic forgetting in Class Incremental Learning (CIL) without requiring extensive data storage. This hybrid memory relies on a novel technique called Continual Data Distillation (CDD), which generates synthetic exemplars from a sequence of checkpoints taken along the same model’s training trajectory, instead of needing multiple model initializations. The work mainly builds on a memory update strategy, where real data are conditionally selected to complement synthetic exemplars, maximizing a data distillation objective through a greedy selection process.
weaknesses: - Instead of focusing on reporting results for both the **zero-base** setting and the **half-base** setting- which I consider less important—the authors could have presented results on other benchmarks, particularly since using only two datasets is rather limited. Expanding the range of benchmarks, especially across slightly different domains, *e.g.*, Caltech256 (*Griffin, G. Holub, AD. Perona, P*) or MIT67 (*Quattoni & Torralba*), would enhance the relevance of their findings. 

- While the authors adhere to the standards set by other works, it would be beneficial to provide explicitly how **AIA** and **LAA** are computed. This would facilitate a better understanding of the results. Could you please include a brief description of the AIA and LAA computations either in the main text or as a footnote in the results tables?

- I recommend including the standard upper and lower bounds for Class Incremental Learning (*i.e.*, training on all tasks jointly and finetuning with no countermeasure to forgetting). This would provide a more comprehensive view of the method's capabilities.

---

confidence: 4
contribution: 2
initial_rating: 3
presentation: 3
questions: * “However, as the buffer size increases, synthetic exemplars become less effective than real exemplars, likely due to the inherent important information loss in the distillation process” I do not know if this is true only for the very particular simulation setting(s) considered in this paper.  Or, if it is universally true. Are there any other publications that can support this claim, especially in the area of data distillation? I am also not sure about “likely due to the inherent important information loss in the distillation process…” If a data distillation method loses “important” information, the method was not designed well. The objective of all data distillation methods should be keeping “important” information. Also, as the number of synthetic exemplars grows, the loss of “important” information must be less and less by any reasonably designed data distillation methods. Therefore, “likely due to the inherent important information loss in the distillation process” doesn’t explain why “as the buffer size increases, synthetic exemplars become less effective than real exemplars”.
* To solve (1), the authors use (2) (or (3)) and (4), which looks straightforward. Is this the most efficient approach to solve (1)? Are there any other approaches that can be potentially better? 
* To solve (4), greedy algorithms are used. Any other more effective methods?
* Isn't it possible at all to prove Assumption 1 and Assumption 2? If not, how can we trust the results of Theorem 1? At the very least, do we have any numerical results to support those assumptions?
* The numerical results of FOSTER in this paper do not seem to match those in the original paper of FOSTER. Also, for BEEF (including BEEF-Compress), the numerical results in the original paper seem to be better than those in this paper. 
• Any experiment results on ImageNet-1k?
soundness: 3
strengths: * The authors’ proposed method of combining real and synthetic (distilled) data for CIL is interesting and might be potentially useful for certain scenarios. 
* Their proposed method seems to be integrated into (some) existing replay-based CIL methods.
summary: This paper proposes a new hybrid memory system for replay-based CIL by combining both synthetic and real exemplars. The authors propose a new data distillation method, namely Continual Data Distillation (CDD), which adapts data distillation for CIL by extracting synthetic exemplars without requiring multiple training checkpoints. Their experiments show that while synthetic-only memory initially performs better, its effectiveness diminishes as the memory buffer grows. The authors then propose a conditional real data selection method, by selecting optimal real samples to complement synthetic ones. Their experiment results show that their hybrid approach outperforms the method using only real exemplars.
weaknesses: * The novelty seems to be limited: the proposed methods looks rather straightforward. Instead of jointly optimizing the optimal sets of real and synthetic data, the authors first simply construct synthetic samples (without worrying about the real samples to be selected later) and then, fixing the synthetic samples, they now simply select real samples based on a greedy algorithm. Although the authors claim that using a sliding window of checkpoints is an innovative modification, it also seems rather an obvious (trivial) modification. 
* There is no guarantee or evidence that the two assumptions, Assumption 1 and Assumption 2, are true. Therefore, it is not possible if Theorem 1 is valid or not. In this case, I really do not know if we can call it a theorem. 
* The hybrid memory is composed of equal numbers of real and synthetic samples. But, I do not know why they must be the same. The ratio between those two groups of samples seems to be a critical parameter to be optimized. Fig 4 might support the equal numbers. But, this is a very simple simulation for a very specific setting for iCaRL. How about other more recent and advanced IL methods across various datasets?
* Recently, more and more researchers in this area (including the papers for both FOSTER and BEEF that the authors considered) test ImageNet-1k as well in their simulation, which is not the case in this paper.