Continual Learning via Learning a Continual Memory in Vision Transformer

## Abstract

Abstract This paper studies task-incremental continual learning (TCL) using Vision Transformers (ViTs). Our goal is to improve the overall streaming-task performance without catastrophic forgetting by learning task synergies (e.g., a new task learns to automatically reuse/adapt modules from previous similar tasks, or to introduce new modules when needed, or to skip some modules when it appears to be an easier task).
One grand challenge is how to tame ViTs at streaming diverse tasks in terms of balancing their plasticity and stability in a task-aware way while overcoming the catastrophic forgetting.
To address the challenge, we propose a simple yet effective approach that identifies a lightweight yet expressive “sweet spot” in the ViT block as the task-synergy memory in TCL.
We present a Hierarchical task-synergy Exploration-Exploitation (HEE) sampling based neural architecture search (NAS) method for effectively learning task synergies by structurally updating the identified memory component with respect to four basic operations ( reuse, adapt, new and skip ) at streaming tasks.
The proposed method is thus dubbed as CHEEM (Continual Hierarchical-Exploration-Exploitation Memory).
In experiments, we test the proposed CHEEM on the challenging Visual Domain Decathlon (VDD) benchmark and the 5-Dataset benchmark. It obtains consistently better performance than the prior art with sensible CHEEM learned continually.

## 1 Introduction

Developing continual learning machines is one of the hallmarks of Artificial Intelligence (AI), to mimic human intelligence in terms of learning-to-learn to be adaptive and skilled at streaming tasks. However, state-of-the-art Deep Neural Networks (DNNs) are not yet intelligent in the biological sense from the perspective of continual learning, especially plagued with the critical issue known as catastrophic forgetting at streaming tasks in a dynamic environment (McCloskey & Cohen, ; Thrun & Mitchell, ).
To address catastrophic forgetting, there are two main categories of continual learning methods: exemplar-based methods (Aljundi et al., ; Hayes et al., ; Wu et al., ) and exemplar-free methods (Kirkpatrick et al., ; Li et al., ; Wang et al., ; ; ). Both have witnessed promising progress, while the latter is more challenging and has attracted more attention recently.

In this paper, we focus the exemplar-free setting. Since no data of previous tasks in any forms will be available, the challenge is typically on how to retain the model parameters trained for previous tasks in updating the model for a new task, i.e. balancing the plasticity and the stability.
There have a vast literature of exemplar-free continual learning using Convolutional Neural Networks.
One pioneering approach is to regularize the change in model parameters such as the popular Elastic Weight Consolidation (EWC) method (Kirkpatrick et al., ). To be more flexible in handling complexities at streaming tasks, a popular paradigm is to dynamically select and/or expand the model such as the learn-to-grow method (Li et al., ), Supermask in Superposition (SupSup) (Wortsman et al., ), Lightweight Learner (Ge et al., ), the calibration method (Singh et al., ), the efficient feature transformation method (Verma et al., ) and the Channel-wise Lightweight Reprogramming (CLR) method (Ge et al., ).

More recently, with the availability of powerful pretrained Transformer models (Vaswani et al., ; Dosovitskiy et al., ; Radford et al., ),
for continual learning, as illustrated in Fig. 1, two main approaches are the prompt-based design (Wang et al., ; ; ; Smith et al., ), and the parameter-tuning based design (Wortsman et al., ; Xue et al., ; Mallya et al., ; Ge et al., ; ; Ermis et al., ; Morgado & Vasconcelos, ), both of which do not dynamically and structurally update the model architectures. It remains an open problem of structurally and dynamically updating Transformer models for continual learning due to the challenge of taming Transformer models in general. The intuition underlying the need of doing such updates in continual learning is to flexibly handle the varying complexities of streaming tasks in the wild.

Figure: Figure 1: Comparisons of different continual learning methods using Vision Transformers (Dosovitskiy et al., ; Vaswani et al., ). (a) Prompt-based methods (Wang et al., ; ; ; Smith et al., ) leverage a pretrained and frozen Transformer and learn task-specific prompts. (b) Parameter-tuning based methods introduce task-specific layer-wise parameters on top of a pretrained and frozen Transformer, and are different in how the pretrained layer and the task-specific layer are fused, e.g., the parameter-masking methods (Wortsman et al., ; Xue et al., ; Mallya et al., ) and the output-addition methods (Ge et al., ; ; Ermis et al., ; Morgado & Vasconcelos, ). They often introduce task-specific layers at every pretrained layer. (c) Our proposed method utilizes four operations to sequentially and continually maintain task-synergy memory: Reuse, New, Adapt and Skip at streaming tasks.
Refer to caption: x1.png

Figure: Figure 2: Illustration of task-incremental continual learning on the Visual Domain Decathlon (VDD) (Rebuffi et al., ) benchmark, which consists of 10 tasks with #training images/#categories significantly varying across different tasks. As commonly adopted in the literature, we assume the first (base) task has sufficient data to train a base model, for which we use the ImageNet-1k in our experiments.
Refer to caption: x2.png

We aim to address the above challenge in this paper. To that end, we study task-incremental continual learning (TCL), in which tasks often have significantly different label spaces and task IDs of data are available in both training and testing. For example, we consider the challenging VDD benchmark (Rebuffi et al., ), as illustrated in Fig. 2. We are aware that class-incremental continual learning (CCL) has gained much more attention recently, which does not assume the availability of task IDs of testing data. However, we note that most of existing CCL methods using Transformers often assume a common classification space (e.g., all the stream tasks have the same number of classes such as L2P (Wang et al., ), CODAPrompt (Smith et al., ), and DER (Yan et al., )), or the total number of classes throughout continual learning is assumed to be known (Sodhani et al., )), or assume the streaming (domain-incremental) tasks are mostly separable via $k$-NN in the prompt space such as S-Prompts (Wang et al., ), which are not applicable in the VDD benchmark (Rebuffi et al., ) of interest in this paper.

So, we choose to take one step forward by studying TCL to gain insights on how to structurally and dynamically update Transformer models at streaming tasks in the VDD benchmark.
We aim to improve the overall streaming-task performance without catastrophic forgetting (i.e., resiliency) by learning task synergies (e.g., a new task learns to automatically reuse/adapt modules from previous similar tasks, or to introduce new modules when needed, or to skip some modules when it appears to be an easier task).
It is not feasible to devote all components of a Transformer model to be dynamic

Figure: Figure 3: Illustration of the proposed CHEEM. Left: A Transformer block in ViTs (Dosovitskiy et al., ) with the proposed CHEEM placed at the original output projection layer after the MHSA. Middle: The CHEEM is maintained by four operations. Right: An example of learned CHEEM for different tasks (e.g., $j$) starting from $i$.
Refer to caption: x3.png

in continual learning due to considerations in two-fold: the computational cost to compensate the quadratic complexity of multi-head self-attention (MHSA) in Transformer models, and the trade-off between the plasticity and the stability.
As illustrated in Fig. 3, we identify the output projection layer after MHSA as the task-synergy memory that will be structurally and dynamically updated in continual learning.
We present an effective hierarchical task-synergy exploration-exploitation (HEE) sampling based NAS method to learn to select the four operations in Fig. 1 (c). The proposed method is thus dubbed as CHEEM (Continual Hierarchical-Exploration-Exploitation Memory).
With our proposed CHEEM, we observe sensible structures learned to update as illustrated in Fig. 4. For example, Tsk2_C100 is very similar to Task1_ImNet, thus Reuses most of the blocks from Tsk1_ImNet, but Adapts ‘IN_B4’ (low-to-middle level features) and introduces a New B12 block (the high-level features). Tsk3_SVHN is very different from both Tsk1_ImNet and Tsk2_C100 and a relatively easier task, which learns to Adapt many of the blocks from Tsk1_ImNet with two (B10 and B11) blocks Skipped. We note that the learned task synergies make a lot intuitive sense considering the nature of different tasks, which shows the effectiveness of our proposed CHEEM.

Figure: Figure 4: An example of the CHEEM learned on the VDD benchmark (Rebuffi et al., ) with the task sequence shown in Fig. 2. S, R, A and N represent Skip, Reuse, Adapt and New respectively. Starting from the ImageNet-trained ViT (Dosovitskiy et al., ) (B1 – B12 in Tsk1_ImNet), sensible structures are continually learned for the subsequent 9 tasks. The last two columns show the number of new task-specific parameters and added FLOPs respectively, in comparison with the first task, ImNet model. See text for details and Appendix D for more examples. Best viewed in magnification.
Refer to caption: x4.png

Our Contributions.
This paper makes three main contributions to the field of task-incremental continual learning with ViTs. (i) It presents a hierarchical task-synergy exploration-exploitation sampling based NAS method for learning task-aware dynamic models continually with respect to four operations: Skip, Reuse, Adapt, and New to overcome catastrophic forgetting. (ii) It identifies a “sweet spot” in ViTs as the task-synergy memory, i.e., the output projection layers after MHSA in ViTs. It also presents a new usage for the class-token CLS in ViTs as the task-synergy memory updating guidance. (iii) It is the first work, to the best of our knowledge, to evaluate continual learning with ViTs on the large-scale, diverse and imbalanced VDD benchmark (Rebuffi et al., ), with better performance than the prior art.

## 2 Our Proposed CHEEM

In this section, we present details of our proposed CHEEM.

### 2.1 Identifying a Task-Synergy Memory in ViT

We start with a vanilla $D$-layer ViT model (e.g., the 12-layer ViT-Base) (Dosovitskiy et al., ).
The left of Fig. 3 shows a ViT block. Denote by $x_{L,d}$ an input sequence consisting of $L$ tokens encoded in a $d$-dimensional space. In ViTs, the first token is the so-called class-token, CLS. The remaining $L-1$ tokens are formed by patchifying an input image and then embedding patches, together with additive positional encoding. A ViT block is defined by,

$$ $\displaystyle z_{L,d}$ $\displaystyle=x_{L,d}+\text{Proj}(\text{MHSA}(\text{LN}_{1}(x_{L,d}))),$ (1) $\displaystyle y_{L,d}$ $\displaystyle=z_{L,d}+\text{FFN}(\text{LN}_{2}(z_{L,d})))),$ (2) $$

where $\text{LN}(\cdot)$ represents the layer normalization (Ba et al., ), and $\text{Proj}(\cdot)$ is a linear transformation fusing the multi-head outputs from MHSA module.
The MHSA realizes the dot-product self-attention between Query and Key, followed by aggregating with Value, where Query/Key/Value are linear transformatons of the input token sequence. The FFN is often implemented by a multi-layer perceptron (MLP) with a feature expansion layer $\text{MLP}^{\text{u}}$ and a feature reduction layer $\text{MLP}^{\text{d}}$ with a nonlinear activation function (such as the GELU (Hendrycks & Gimpel, )) in the between.

**Table 1: Ablation study on identifying a component in a ViT block (Eqns. 1 and 2) as the task-synergy memory in TCL. The last row shows the result of a conventional transfer learning setting in which only the head classifier is trained.**
| Index | Finetuned Component | Avg. Acc. | Avg. Forgetting |
| --- | --- | --- | --- |
| 1 | $\text{LN}_{1}$ + $\text{LN}_{2}$ | $81.76$ | $21.24$ |
| 2 | FFN | $84.20$ | $44.76$ |
| 3 | $\text{MLP}^{\text{d}}$ | $83.66$ | $37.99$ |
| 4 | $\text{LN}_{2}$ | $80.04$ | $16.35$ |
| 5 | MHSA + $\text{LN}_{1}$ | $85.26$ | $54.38$ |
| 6 | LN1 | $81.18$ | $19.04$ |
| 7 | Query | $81.57$ | $19.69$ |
| 8 | Key | $81.56$ | $19.19$ |
| 9 | Query+Key | $81.49$ | $31.10$ |
| 10 | Value | $84.99$ | $37.58$ |
| 11 | Projection (CHEEM) | $85.11$ | $30.50$ |
| Classifier w/ Frozen Backbone | $70.78$ | - |  |

The proposed identification process is straightforward. Without introducing any modules handling forgetting, we compare both the task-to-task forward transferrability and the sequential forgetting of different components in a ViT block. Our intuition is that a desirable component for playing the role of task-synergy memory must enable strong transferrability with manageable forgetting.

To that end, we use the 10 tasks in the VDD benchmark (Rebuffi et al., ) (see Fig. 2). We first compare the transferrability of the ViT trained with the first task (ImageNet) to the remaining 9 tasks in a pairwise task-to-task manner and compute the average Top-1 accuracy on the 9 tasks (see Eqn. 6). Then, we start with the ImageNet-trained ViT, and train it on the remaining 9 tasks continually and sequentially in a predefined order (i.e., sequentially fine-tuning the ImageNet-trained ViT backbone in a plain way). We compute the average forgetting on the first 9 tasks (including ImageNet) (see Eqn. 8).
As shown in Table 1, we compare 11 components or composite components across all blocks in the ImageNet-pretrained ViT.
Consider the strong forward transfer ability, manageable forgetting, maintaining simplicity and for less invasive implementation in practice, we select the Projection layer after the MHSA (Fig. 3 and Eqn. 1) as the task-synergy memory to realize our proposed CHEEM.

### 2.2 Learning CHEEM

The proposed CHEEM is represented by a Mixture of Experts, similar in spirit to (Riquelme et al., ). After the first task, the CHEEM at the $l$-th layer in the ViT model consists of a single expert defined by a tuple,

$$ ${\tt E}_{l}^{(1,)}=(\theta_{l}^{(1,)},\mu_{l}^{1}),$ (3) $$

Figure: Figure 5: Illustration of CHEEM learning via NAS.
Refer to caption: x5.png

where the subscript presents the layer index and the list-based superscript shows which task(s) use this expert. $\theta_{l}^{(1,)}$ are the parameters of the projection layer and $\mu_{l}^{1}\in R^{d}$ is the associated mean class-token, CLS pooled from the training dataset after the model is trained, which is task specific (as indicated by the superscript). For example, if an expert is reused by another task (say, 3) in continual learning, we will have ${\tt E}_{l}^{(1,3,)}=(\theta_{l}^{(1,3,)},\mu_{l}^{1},\mu_{l}^{3})$.

As shown in Fig. 5, for a new task $t$, learning to update CHEEM consists of three components: i) the Supernet construction (the parameter space of updating CHEEM), ii) the Supernet training (the parameter estimation of updating CHEEM), and iii) the target network selection and finetuning (the consolidation of the CHEEM for the task $t$).

#### 2.2.1 Supernet Construction via Reuse, Adapt, New and Skip

For clarity, we consider how the space of CHEEM is constructed at a single layer $l$ for a new task, assuming the current CHEEM consists of two experts, $\{{\tt E}_{l}^{(1,)},{\tt E}_{l}^{(2,)}\}$ (Fig. 5, left). We utilize four operations in the Supernet construction:

- •
Skip: Skips the entire MHSA block, which encourages the adaptivity accounting for the diverse nature of tasks.
- •
Reuse: Uses the projection layer from an old task for the new task unchanged, which will help task synergies in learning.
- •
Adapt: Introduces a new lightweight layer on top of the projection layer of an old task, implemented by a MLP with one squeezing hidden layer.
- •
New: Adds a new projection layer, which enables the model to handle corner cases and novel situations.

The bottom of Fig. 5 shows the search space. The Supernet is constructed by reusing and adapting each existing expert at layer $l$, and adding a new and a skip expert. The newly added adapt MLPs and projection layers will be trained from scratch using the data of a new task only. The right-top of Fig. 5 shows the Adapt operation on top of ${\tt E}_{l}^{(2,)}$ is learned and added, ${\tt E}_{l}^{(3,)}=(\theta_{l}^{(3,)},\mu_{l}^{3})$ where $\theta_{l}^{(3,)}$ represents parameters of the adapt MLPs learned for the task 3, and $\mu_{l}^{3}$ is the mean CLS token pooled for the task 3. The expert ${\tt E}_{l}^{(2,)}$ is updated to ${\tt E}_{l}^{(2,3,)}=(\theta_{l}^{(2,3,)},\mu_{l}^{2})$ indicating its weights will be shared with task 3.

How to Adapt in a sustainable way? The proposed Adapt operation will effectively increase the depth of the network in a plain way. In the worst case, if too many tasks use Adapt on top of each other, we will end up stacking too many MLP layers together. This may lead to unstable training due to gradient vanishing. Shortcut connections (He et al., ) have been shown to alleviate the gradient vanishing problems. We introduce the shortcut connection in adding a MLP Adapt operation. We test two different implementations: with shortchut in all the three components (supernet training, target network selection and target network finetuing) versus with shortcut only in target network finetuning. The latter is preferred as analyzed in Appendix E.2.

#### 2.2.2 Supernet Training via the Proposed HEE-based NAS

To train the Supernet constructed for a new task $t$, we build on the SPOS method (Guo et al., ) due to its efficiency. The basic idea of SPOS is to train a single-path sub-network from the Supernet by sampling an expert at every layer in each mini-batch of training. One key aspect is the sampling strategy. The vanilla SPOS method uses uniform sampling (i.e., the pure exploration (PE) strategy, Fig. 6 left).
We propose an exploitation strategy (Fig. 6 right), which utilizes a hierarchical sampling method that forms the categorical distribution over the operations in the search space explicitly based on task synergies computed based on the pooled task-specific CLS tokens.

Consider a new task $t$ with the training dataset $D^{train}_{t}$, with the current supernet consisting of $t-1$ task-specific target networks, we first run inference of the $t-1$ target networks on $D^{train}_{t}$ to pool initial CLS tokens for each expert, e.g., $\mu_{l}^{1\rightarrow 3}$ and $\mu_{l}^{2\rightarrow 3}$ in the bottom of Fig. 5.
Consider one expert ${\tt E}_{l}^{(i,j,)}$ at the $l$-th layer which is shared by two previous tasks $i$ and $j$ with their mean CLS tokens $\mu_{l}^{i}$ and $\mu_{l}^{j}$ respectively, we have the pooled CLS tokens for the current task $t$, $\mu_{l}^{i\rightarrow t}$ and $\mu_{l}^{j\rightarrow t}$, computed accordingly. The task similarity is computed by,

$$ $S_{l}^{i,t}=\texttt{NormCosine}(\mu_{l}^{i},\mu_{l}^{i\rightarrow t}),$ (4) $$

where NormCosine$(\cdot,\cdot)$ is the Normalized Cosine Similarity, which is calculated by scaling the Cosine Similarity score between $-1$ and $1$ using the minimum and the maximum Cosine Similarity scores from all the experts in all the MHSA blocks of the ViT. This normalization is necessary to increase the difference in magnitudes of the similarities between tasks, which results in better Expert sampling distributions during the sampling process in our experiments. The task similarity score will be used in sampling the Reuse and Adapt operations.

For the new task $t$, we also have the New expert and the Skip expert at each layer $l$, for which we do not have similarity scores. Instead, we introduce an auxiliary expert, Aux (see the right of Fig. 6) which gives equally-likely chance to select the New expert or the Skip expert once sampled in NAS. For the Aux expert itself, the similarity score between it and the new task $t$ is specified by,

$$ $S_{l}^{aux,t}=-\max_{i=1}^{t-1}S_{l}^{i,t},$ (5) $$

which intuitively means we probabilistically resort to the New operation or the Skip operation when other experts turn out not “helpful” for the task $t$.

Figure: Figure 6: Illustration of the proposed hierarchical task-synergy exploration-exploitation (HEE) sampling based NAS. For efficiency, we build on the single-path one-shot (SPOS) NAS method (Guo et al., ). It integrates the vanilla exploration strategy (left) and the proposed exploitation strategy (right) with an epoch-wise scheduling.
Refer to caption: x6.png

At each layer $l$ in the ViT, for a new task $t$, the task-similarity oriented operation sampling is realized by a 2-level hierarchical sampling, as illustrated in the right of Fig. 6:

- •
The first level uses a categorical distribution with the maximum number of entries being $t$ consisting of at most the previous $t-1$ tasks (some of which may use Skip and thus will be ignored) and the Aux expert. The categorical distribution $(\psi_{1},\cdots,\psi_{i},\cdots,\psi_{I-1},\psi_{I})$ is computed by the Softmax function over the similarity scores defined above, where $I\leq t$.
- •
With a previous task $i$ sampled with the probability $\psi_{i}$, at the second level of sampling, we sample the Reuse operation for the associated expert using a Bernoulli distribution with the succcess rate computed by the Sigmoid function of the task similarity score defined by $\rho_{i}=\frac{1}{1+\exp(-S^{i,t}_{l})}$, and the Adapt operation with probability $1-\rho_{i}$.

#### 2.2.3 Target Network Selection and Finetuning

After the Supernet is trained, we adopt the same evolutionary search used in the SPOS method (Guo et al., ) based on the proposed hierarchical sampling strategy. The evolutionary search is performed on the validation set to select the path which gives the best validation accuracy. After the target network for a new task is selected, we retrain the newly added layers by the New and Adapt operations from scratch (random initialization), rather than keeping or warming-up from the weights from the Supernet training. This is based on the observations in network pruning that it is the neural architecture topology that matters and that the warm-up weights may not need to be preserved to ensure good performance on the target dataset (Liu et al., ).

#### 2.2.4 Balancing Exploration and Exploitation

As illustrated in Fig. 6, to harness the best of the pure exploration strategy and the proposed exploitation strategy, we apply epoch-wise exploration and exploitation sampling for simplicity. For the pure exploration, we directly uniformly sample the experts at a layer $l$, consisting of the $n$ experts from the previous $t-1$ tasks, and the New and Skip operations, where $n\leq t-1$.
At the beginning of an epoch in the Supernet training, we choose the pure exploration strategy with a probability of $\epsilon_{1}$ (e.g., 0.3), and the hierarchical sampling strategy with a probability of $1-\epsilon_{1}$. Similarly, when generating the initial population during the evolutionary search, we draw a candidate target network from a uniform distribution over the operations with a probability of $\epsilon_{2}$, and from the hierarchical sampling process with a probability of $1-\epsilon_{2}$, respectively.
In practice, we set $\epsilon_{2}>\epsilon_{1}$ (e.g., $\epsilon_{2}=0.5$) to encourage more exploration during the evolutionary search, while encouraging more exploitation for faster learning in the Supernet training.

## 3 Experiments

We test our CHEEM on two benchmarks and compare with the prior art.
It obtains better performance than the prior art in comparisons. Our PyTorch code is provided in the supplementary. The Appendix provides implementation details C and more results (e.g., effects of different task orders on the VDD benchmark E.3).
We use 1 Nvidia A100 GPU in all experiments.

Data:
We evaluate our approach on the VDD benchmark (Rebuffi et al., ) and the 5-Datasets benchmark introduced in(Ebrahimi et al., ).
The VDD benchmark is challenging because of the large variations in tasks as well as small number of samples in many tasks, which makes it a favorable for evaluating continual learning algorithms. More details are in Appendix A.

Metric: We consider two task-incremental settings and compare with the corresponding prior art.
i) TCL via Task-to-Task Transfer Learning. It always starts from the model trained for the first task with the feature backbone and head classifier $(f_{1},C_{1})$ for any subsequent tasks. Let $f_{T_{n|1}}$ be the backbone trained for the task $n$ ($n=2,..N$) with weights initialized from the model of task $1$, and $C_{n}$ the head classifier trained from scratch. The average accuracy is defined as:

$$ $A_{1:N}=\frac{1}{N}\sum_{n=1}^{N}\text{Acc}(T_{n};f_{T_{n|1}},C_{n})$ (6) $$

where $\text{Acc}()$ uses the Top-1 accuracy, and $f_{T_{1|1}}=f_{1}$. Under this paradigm, there is no catastrophic forgetting. Depending on how $f_{T_{n|1}}$ is trained, it may require to keep $N$ separate model checkpoints.
ii) TCL via Sequential and Continual Learning. Let $f_{T_{1:n}}$ be the backbone trained sequentially and continually after task $T_{n}$ and $C_{n}$ is its head classifier.
The average accuracy is,

$$ $\mathbf{A}_{1:N}=\frac{1}{N}\sum_{n=1}^{N}\text{Acc}(T_{n};f_{T_{1:N}},C_{n}).$ (7) $$

The average forgetting (Chaudhry et al., ) on the first $N-1$ tasks is,

$$ $\mathbb{F}_{1:N-1}=\frac{1}{N-1}\sum_{n=1}^{N-1}\left(\max_{j\in[n,N-1]}a_{j,n }-a_{N,n}\right),$ (8) $$

where $a_{j,n}=\text{Acc}(T_{n};f_{T_{1:j}},C_{n}),j>n$.
Depending whether $f_{T_{1:n}}$ is task-aware or not, the average forgetting could be either zero or not. This continual learning paradigm (rather than task-to-task paradigm) is more interesting in the literature, and also our focus in this paper.

**Table 2: Results on the VDD benchmark (Rebuffi et al., ) using ViT-B/8 (Dosovitskiy et al., ) over 3 different seeds. The average accuracy is computed based on Eqn. 7. The results of L2G-ResNet26 (DARTS) are directly extracted from (Li et al., ) (in which the learning-to-grow is applied at every layer). The number of training images / #categories per task is shown.**
| Method | Epochs | ImNet | C100 | SVHN | UCF | OGlt | GTSR | DPed | Flwr | Airc. | DTD | Avg. Accuracy |  |
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
| Super | Target | 1.1M/1000 | 36k/100 | 42.4k/10 | 6.8k/101 | 16.1k/1623 | 28.2k/43 | 21.2k/2 | 0.92k/102 | 3.0k/100 | 1.7k/47 |  |  |
| S-Prompts (#Prompts=12) | n/a | 100 | $82.65$ | $89.32$ | $88.91$ | $64.52$ | $72.17$ | $99.29$ | ${99.89}$ | $\bm{96.93}$ | $45.55$ | $\bm{60.76}$ | $80.00\pm 0.07$ |
| L2P (#Prompts=12) | n/a | 100 | $82.65$ | $89.32$ | $89.89$ | $65.63$ | $72.34$ | $99.55$ | $\bm{99.94}$ | ${96.63}$ | $45.24$ | ${59.57}$ | $80.08\pm 0.10$ |
| L2G (DARTS) | 50 | 30 | $82.65$ | $88.47$ | $85.20$ | $\bm{79.22}$ | $80.19$ | $99.28$ | $98.06$ | $76.14$ | $39.29$ | $46.01$ | $77.45\pm 2.41$ |
| L2G ($\beta$-DARTS) | 50 | 30 | $82.65$ | $88.95$ | $94.73$ | $75.31$ | $79.76$ | $99.84$ | $99.76$ | $78.86$ | $34.50$ | $47.09$ | $78.14\pm 0.54$ |
| L2G-ResNet26 (DARTS) | - | - | $69.84$ | $79.59$ | $95.28$ | $72.03$ | $\bm{86.6}$ | $99.72$ | $99.52$ | $71.27$ | ${53.01}$ | $49.89$ | $77.68$ |
| Our CHEEM | 100 | 30 | $82.65$ | $\bm{90.54}$ | $\bm{96.12}$ | $75.53$ | ${83.81}$ | $\bm{99.93}$ | $99.88$ | $91.21$ | $\bm{55.59}$ | $59.18$ | $\bm{83.44}\pm{0.50}$ |

### 3.1 Results on the VDD Benchmark

We report results using the two settings stated above as follows.

#### 3.1.1 Results by Sequential and Continual Learning

We compare with three state-of-the-art methods: the Learning-to-Grow (L2G) method (Li et al., ), the Learning-to-Prompt (L2P) method (Wang et al., ) and the S-Prompts method (Wang et al., ). We modify L2G to work with ViTs using two NAS algorithm, the DARTS (Liu et al., ) used by the vanilla L2G and a recently improved $\beta$-DARTS (Ye et al., ). We also apply L2G only to the final projection layer in the MHSA. We modify both L2P and S-Prompts for VDD under the task-incremental setting (Appendix F.1).

As shown in Table 2, our CHEEM obtains the best overall performance with a significant margin around $3.3\%$. We observe:

i) Frozen/Fixed Backbone vs Task-Aware Dynamic Backbone. Both L2P and S-Prompts use the frozen backbone from the first ImNet task, while L2G and our CHEEM learn to grow the backbone. Compared to L2P and S-Prompts, although L2G is worse in terms of overall performance, it works much better for tasks that are different from the ImNet such as the three, SVHN, UCF and OGlt, where L2G can outperform L2P by more than $4\%$, $13\%$ and $7\%$ respectively. Overall, we observe that learning task-aware dynamic backbone is beneficial in continual learning with sensible architectures learned (Fig. 4), verifying our motivation stated in Sec. 1.

To further show the advantage of learning to grow the feature backbone in sequential and continual learning. We also compare with state-of-the-art weight regularization based continual learning methods: the L2 Parameter Regularization (Smith et al., ) and the Elastic Weight Consolidation (EWC) (Kirkpatrick et al., ), and a strong baseline of Experience Replay (Rebuffi et al., ). As shown in Tabe 3, the three methods suffer from catastrophic forgetting significantly. We note that all the methods initially have the same performance on the first ImNet task (82.65). The two weight regularization based methods only maintain the ImNet trained weights via different regularization strategies without introducing any new task-specific parameters, and the experience play method keep track of a small coreset of examples of previous tasks, all the three leading to catastrophic forgetting of earlier tasks after trained on all tasks.

**Table 3: Both weight regularization based methods and experience replay methods (30 samples/class in the coreset) suffer from catastrophic forgetting. When trained for 50 epochs, EWC achieves an Avg. Accuracy of 62.38, L2 Regularization achieves 66.01 and Experience Replay achieves 64.30, indicating recency bias.**
| Method | Epoch | ImNet | C100 | SVHN | UCF | OGlt | GTSR | DPed | Flwr | Airc. | DTD | Avg. Accuracy |
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
| EWC | 20 | $58.19$ | $87.69$ | $69.64$ | $57.27$ | $45.89$ | $95.01$ | $98.47$ | $90.20$ | $36.57$ | ${61.97}$ | $70.09$ |
| L2 Regularization | 20 | $55.28$ | $87.10$ | $55.23$ | $58.86$ | $40.48$ | $95.07$ | $99.17$ | $90.20$ | $37.53$ | $\bm{62.55}$ | $68.15$ |
| Experience Replay | 20 | $55.88$ | $78.70$ | $87.40$ | $58.20$ | $76.03$ | $97.92$ | $48.55$ | $84.41$ | $40.98$ | $54.68$ | $68.27$ |
| Our CHEEM | 100+30 | $82.65$ | $\bm{90.54}$ | $\bm{96.12}$ | $\bm{75.53}$ | $\bm{83.81}$ | $\bm{99.93}$ | $\bm{99.88}$ | $\bm{91.21}$ | $\bm{55.59}$ | $59.18$ | $\bm{83.44}\pm 0.50$ |

Efficiency. On the VDD benchmark, the number of parameters of our CHEEM increases by 1.06M/task (averaged over 3 different runs). Although this is higher than L2P (Li et al., ) which uses 12 extra prompts
(0.01M/task), our method increases the number of FLOPs only by 0.17G/task (due to Adapt experts), as compared to the increase of 2.02G/task of the L2P, $10$ times more expensive than ours, due to the quadratic complexity of MHSA with respect to the length of input token sequence. Similarly, our method requires less memory footprint.

ii) Pure Exploration (PE) vs Our Proposed Hierarchical Task-Synergy Exploration and Exploitation (HEE) in the SPOS NAS. We verify the effectiveness of our HEE sampling (Table 4), which is significantly better by a large margin, $6\%$ absolute average accuracy increase.

**Table 4: The effectiveness of our proposed hierarchical exploration and exploitation sampling empowered SPOS NAS (Fig. 6). The structure updates learned by the PE strategy are visualized in Fig. 11 in the Appendix.**
| Method | Epochs | ImNet | C100 | SVHN | UCF | OGlt | GTSR | DPed | Flwr | Airc. | DTD | Avg. Accuracy |
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
| PE | 100 | $82.65$ | $82.22$ | $95.23$ | $73.14$ | $81.42$ | ${99.92}$ | $99.83$ | $72.75$ | $38.27$ | $39.10$ | $76.45\pm 0.90$ |
| HEE | 100 | $82.65$ | $\bm{90.54}$ | $\bm{96.12}$ | $\bm{75.53}$ | $\bm{83.81}$ | $\bm{99.93}$ | $\bm{99.88}$ | $\bm{91.21}$ | $\bm{55.59}$ | $\bm{59.18}$ | $\bm{83.44}\pm 0.50$ |

Figure: Figure 7: Ablation studies of comparing the effectiveness of the vanilla PE and our proposed HEE sampling algorithm.
Refer to caption: x7.png

To further verify whether the vanilla PE sampling can catch up the performance gap using more supernet training epochs, we compare it with our proposed HEE sampling using 6 different numbers of training epochs from 50 to 300 on the VDD benchmark across 3 different runs. Fig. 7 shows the comparison in terms of both the average accuracy and the average number of parameter increased per task. In terms of average accuracy, our proposed HEE with 50-epoch supernet training already consistently outperforms the vanilla PE with 300-epoch training. In terms of the average number of parameters increased per task, our proposed HEE is also significantly better with much less new parameters introduced, thanks to its task-similarity oriented sampling (resulting in many Reuse and Adapt). We can clearly see the significance of our proposed HEE sampling to the success of learning-to-grow CHEEM in continual learning. The similar observations remain in terms of changing task orders (Appendix E.3).

iii) SPOS vs DARTS in the learning-to-grow NAS Algorithm. As shown in Table 2, L2G+ViT-B using DARTS or $\beta$-DARTS do not show significant improvement over L2G+ResNet26 using DARTS, although ViT-B has significantly better performance than ResNet26 (He et al., ) on the first ImNet task (82.65 vs 69.84). Furthermore, as shown in Table 4, our CHEEM with uniform sampling based SPOS obtains similar performance with L2G. These may suggest that the vanilla L2G+DARTS do not suit ViTs well.

iv) Similar Tasks vs Dissimilar Tasks. Both L2P and S-Prompts perform better on tasks similar to the first ImNet task and with less training data such as Flwr (918 training images) and DTD (1692 training images), which makes intuitive sense.
It also indicates that we could harness the best of prompting-based methods and our CHEEM, which we leave for the feature work.

#### 3.1.2 Results by Task-to-Task Transfer based continual Learning

We compare with three state-of-the-art methods: Supermasks in Superposition (SupSup) (Wortsman et al., ), Efficient Feature Transformation (EFT) (Verma et al., ) and Lightweight Learner (LL) (Ge et al., ). We modify them to work with ViTs with details provided in Appendix F.2.

**Table 5: Results on the VDD benchmark (Rebuffi et al., ) using ViT-B/8 (Dosovitskiy et al., ) under the task-to-task transfer based continual learning protocol. The learned CHEEM are visualized in Fig. 13 in the Appendix.**
| Method | Epochs | ImNet | C100 | SVHN | UCF | OGlt | GTSR | DPed | Flwr | Airc. | DTD | Avg. Accuracy |
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
| SupSup | 50 | $82.65$ | $89.96$ | $\bm{96.05}$ | $\bm{81.68}$ | $\bm{84.60}$ | $\bm{99.97}$ | ${99.97}$ | $78.76$ | $44.18$ | $51.60$ | $81.14\pm 0.04$ |
| EFT | 50 | $82.65$ | ${91.86}$ | $93.51$ | $73.89$ | $75.62$ | $99.58$ | $\bm{99.98}$ | ${96.34}$ | $48.17$ | $\bm{64.40}$ | $82.60\pm 0.07$ |
| LL | 50 | $82.65$ | $\bm{91.92}$ | $93.90$ | $75.63$ | $77.07$ | $99.71$ | $99.96$ | $\bm{96.47}$ | ${49.33}$ | ${64.34}$ | ${83.10}\pm{0.02}$ |
| Our CHEEM | 50 | $82.65$ | $90.93$ | ${95.96}$ | ${80.74}$ | ${83.25}$ | ${99.94}$ | $99.96$ | $94.12$ | $\bm{58.90}$ | $60.05$ | $\bm{84.65}\pm{0.33}$ |

As shown Table 5, our CHEEM also obtains the best overall performance. The SupSup method achieves a higher accuracy on tasks different from the first ImNet task such as UCF and OGlt, but does not perform well on similar tasks such as Flwr, Airc. and DTD, whereas both EFT and LL show the opposite behavior. Our CHEEM can perform well across all the tasks, indicating it is much less sensitive to the domain shifts in continual learning, thanks to its learning-to-grow core with a task-similarity oriented NAS. We note that our CHEEM under task-to-task transfer-based learning protocol obtains better performance than its counterpart under the sequential and continual learning protocol at
the expense of introducing much more New experts (the first one in Fig. 13 in the Appendix), compared to only one New expert in Fig. 4. It also has more Skip experts.
The different behaviors between continual learning and task-to-task transfer learning with CHEEM indicate that there are some room in further improving our HEE-based NAS.

### 3.2 Results on the 5-Dataset Benchmark

**Table 6: Results on the 5-Dataset benchmark averaged over 5 different task orders.**
| Method | #Prompts | Avg. Acc. |
| --- | --- | --- |
| S-Prompts | 12 | $92.42\pm 0.11$ |
| L2P | 12 | $92.73\pm 0.10$ |
| L2G (DARTS) | - | $93.88\pm 2.86$ |
| L2G ($\beta$-DARTS) | - | $92.19\pm 1.48$ |
| Our CHEEM | - | $\bm{94.82}\pm 0.02$ |

Table 6 shows the comparisons using the continual learning protocol. We use the same ViT-B/8 backbone pretrained on the ImageNet from the VDD benchmark for all the experiments across all the methods and upsample the images in the 5-Dataset benchmark (consisting of CIFAR10 (Krizhevsky et al., ), MNIST (LeCun et al., ), Fashion-MNIST (Xiao et al., ), not-MNIST (Bulatov, ), and SVHN (Netzer et al., )) to $72\times 72$.
Our CHEEM obtains the best performance.

### 3.3 Limitations

One main limitation of our proposed CHEEM is the assumption of task index available in inference. To move forward from task-incremental continual learning to class-incremental continual learning with our proposed CHEEM, a potential solution is to infer the task index of a testing data on the fly. To that end, we may develop methods similar in spirit to S-Prompts (Wang et al., ). S-Prompts focuses on domain-incremental learning (DIL) by learning domain-specific prompts using frozen pretrained Transformer backbones. It leverages the K-NN method in identifying the domain index in inference, which assumes separable Gaussian-type distributions of domain prompts and works well on the DIL benchmarks in their experiments.
We will investigate how to leverage the task-aware mean CLS tokens learned by each Expert in our CHEEM for explicit task index inference. In our preliminary investigation, we observed that the K-NN is a too strong assumption for benchmarks like the VDD which includes very similar tasks (e.g., CIFAR100 vs ImageNet). One potential solution is to integrate the task-aware mean CLS tokens at multiple layers to learn a task index predictor.

## 4 Related Work

Experience Replay Based approaches aim to retain some exemplars, in the form of either raw data or latent features, from the previous tasks and replay them to the model along with the data from the current task Aljundi et al. (; ); Balaji et al. (); Bang et al. (); Chaudhry et al. (; ); Lange & Tuytelaars (); Hayes et al. (); Lopez-Paz & Ranzato (); Prabhu et al. (); Rebuffi et al. (); Chaudhry et al. (); Hayes et al. (); Buzzega et al. (); Wu et al. (); Pham et al. (); Cha et al. (). Instead of storing raw exemplars, Generative replay methods Shin et al. (); Cong et al. () learn the generative process for the data of a task, and replay exemplars sampled from that process along with the data from the current task.
For exemplar-free continual learning, Regularization Based approaches explicitly control the plasticity of the model by preventing the parameters of the model from deviating too far from their stable values learned on the previous tasks when learning the current task Aljundi et al. (; ); Douillard et al. (); Nguyen et al. (); Kirkpatrick et al. (); Li & Hoiem (); Zenke et al. (); Schwarz et al. (). Both these approaches aim to balance the stability and plasticity of a fixed-capacity model.

Dynamic Models aim to use different parameters for each task to eliminate the use of stored exemplars. Dynamically Expandable Network Yoon et al. () adds neurons to a network based on learned sparsity constraints and heuristic loss thresholds. PathNet Fernando et al. () finds task-specific submodules from a dense network, and only trains submodules not used by other tasks. Progressive Neural Networks Rusu et al. () learn a new network per task and adds lateral connections to the previous tasks’ networks.  Rebuffi et al. () learns residual adapters which are added between the convolutional and batch normalization layers. Aljundi et al. () learns an expert network per task by transferring the expert network from the most related previous task. The L2G Li et al. () uses Differentiable Architecture Search (DARTS) Liu et al. () to determine if a layer can be reused, adapted, or renewed for a task, which is tested for ConvNets and the learning-to-grow operations are applied uniformly at each layer in a ConvNet. Our method is motivated by the L2G method, but with substantially significant differences.

Recently, there has been increasing interest in continual learning using Vision Transformers Wang et al. (; ); Xue et al. (); Ermis et al. (); Douillard et al. (); Pelosin et al. (); Yu et al. (); Li et al. (); Iscen et al. (); Wang et al. (; ); Mohamed et al. (); Gao et al. (). Prompt Based approaches learn external parameters appended to the data tokens that encode task-specific information useful for classification Wang et al. (; ); Douillard et al. (); Smith et al. ().
Our proposed method is complementary to those prompting-based ones.

## 5 Conclusion

This paper presents a method of transforming Vision Transformers (ViTs) for resilient task-incremental continual learning (TCL) with catastrophic forgetting overcome. It identifies the final projection layers of the multi-head self-attention blocks as the task-synergy memory in ViTs, which is then updated in a task-aware way using four operations, Skip, Reuse, Adapt and New. The learning of task-synergy memory is realized by a proposed hierarchical exploration-exploitation sampling based single-path one-short Neural Architecture Search algorithm, where the exploitation utilizes task similarities defined by the normalized cosine similarity between the mean class tokens of a new task and those of old tasks. The proposed method is dubbed as CHEEM (Continual Hierarchical-Exploration-Exploitation Memory). In experiments, the proposed method is tested on the challenging VDD and the 5-Datasets benchmarks.
It obtains better performance than the prior art with sensible CHEEM learned continually.
We also take great efforts in materializing several state-of-the-art baseline methods for ViTs and tested on the VDD, which are released in our code.

## Acknowledgements

This research is partly supported by NSF IIS-1909644, ARO Grant W911NF1810295, ARO Grant W911NF2210010, NSF IIS-1822477, NSF CMMI-2024688, NSF IUSE-2013451 and DHHS-ACL Grant 90IFDV0017-01-00.
The views and conclusions contained herein are those of the authors and should not be interpreted as necessarily representing the official policies or endorsements, either expressed or implied, of the NSF, ARO, DHHS or the U.S. Government. The U.S. Government is authorized to reproduce and distribute reprints for Governmental purposes not withstanding any copyright annotation thereon.

## Appendix

## Outline

In this Appendix, we elaborate on the following aspects that are not presented in the submission due to the space limit:

- •
Section A – Details of the two benchmarks tested in the experiments: the Visual Domain Decathlon (VDD) Rebuffi et al. () benchmark (Section A.1) and the 5-Datasets Ebrahimi et al. () benchmark (Section A.2).
- •
Section B – The base model and its training details: the Vision Transformer (ViT) model specification (ViT-B/8) and how it is initially training on the ImageNet in our experiments.
- •
Section C – Experimental settings and training hyperparameters in our implementation on the VDD benchmark and the 5-dataset benchmark.
- •
Section D – More examples of learned CHEEM by our proposed hierarchical exploration-exploitation (HEE) sampling scheme and by the vanilla pure exploration (PE) sampling scheme.
- •
Section E - Ablation Studies:
–
Section E.1 – How about other components in ViTs as CHEEM?: We compare with the Query/Key/Value layer and the FFN layer, and verify the effectiveness of the proposed identification in the main paper.
–
Section E.2 – How is the Adapt operation implemented?: We elaborate two implementation methods of the Adapt operation and compare their performance.
–
Section E.3 - Effects of task orders.
- •
Section F - Details of Modifying Baseline Methods on the VDD Benchmark:
–
Section F.1 – Modifying S-Prompts and Learn to Prompt (L2P) to leverage task ID in inference.
–
Section F.2 – Modifying SupSup, EFT and LL to work with ViTs.

## Appendix A Dataset Details

Figure: Figure 8: Example images from the VDD benchmark Rebuffi et al. (). Each task has a significantly different domain than others, making VDD a challenging benchmark for lifelong learning.
Refer to caption: x8.png

### A.1 The VDD Benchmark

It consists of 10 tasks: ImageNet-1k Russakovsky et al. (), CIFAR100 Krizhevsky et al. (), SVHN Netzer et al. (), UCF101 Dynamic Images (UCF) Soomro et al. (); Bilen et al. (), Omniglot Lake et al. (), German Traffic Signs (GTSR) Stallkamp et al. (), Daimler Pedestrian Classification (DPed) Munder & Gavrila (), VGG Flowers Nilsback & Zisserman (), FGVC-Aircraft Maji et al. (), and Describable Textures (DTD) Cimpoi et al. (). All the images in the VDD benchmark have been scaled such that the shorter side is 72 pixels. Table A shows the number of samples in each task. Fig. 8 shows examples of images from each task of the VDD benchmark.
In our experiments, we use 10% of the official training data from each of the tasks for validation (e.g., used in the target network selection in Section 3.2.3 in main text), and report the accuracy on the official validation set due to the unavailability of the ground-truth labels for the official test data. In Table A, the train, validation and test splits are thus referred to 90% of the official training data, 10% of the official training data, and the entire official validation data respectively. When finetuning the learned architecture (i.e., the searched target network) for each task, we use the entire official training data to train and report results on the official validation set.

Figure: Figure 9: Example images from the 5-Datasets benchmark Ebrahimi et al. ().
Refer to caption: x9.png

### A.2 The 5-Datasets Benchmark

It consists of 5 tasks: CIFAR10 Krizhevsky et al. (), MNIST LeCun et al. (), Fashion-MNIST Xiao et al. (), not-MNIST Bulatov (), and SVHN Netzer et al. (), all having 10 categories. MNIST, Fashion-MNIST, and not-MNIST have a resolution of $28\times 28$, and CIFAR10 and SVHN have a resolution of $32\times 32$. We upsample the images to $72\times 72$ to match the resolution of the ImageNet images on which the backbone ViT model is trained. Table A.1 shows the data statistics. Fig. 9 shows examples of images from each task. To be consistent with the settings used on the VDD benchmark, we use 15% of the training data for validation and report the results on the official test data, except for not-MNIST for which an official test split is not available. So, for the not-MNIST dataset, we use the small version of that dataset, with which we construct the test set by randomly sampling 20% of the samples. From the remaining 80%, we use 15% for validation, and the rest as the training set.

## Appendix B The Base Vision Transformer: ViT-B/8

We use the base Vision Transformer (ViT) model, with a patch size of $8\times 8$ (ViT-B/8) model from Dosovitskiy et al. (). The base ViT model contains 12 Transformer blocks. A Transformer block is defined by stacking a Multi-Head Self-Attention (MHSA) block and a Multi-Layer Perceptron (MLP) block with resudual connections for each block. ViT-B/8 uses 12 attention heads in each of the MHSA blocks, and a feature dimension of 768. The MLP block expands the dimension size to 3072 in the first layer and projects it back to 768 in the second layer. For all the experiments, we use an image size of $72\times 72$ following the VDD setting. We base the implementation of the ViT on the timm package  Wightman ().

##### Training the Base Model

To train the ViT-B/8 model, we use the ImageNet data provided by the VDD benchmark (the train split in Table A). To save the training time, we initialize the weights from the ViT-B/8 trained on the full resolution ImageNet dataset (224$\times$224) and available in the timm package, and finetune it for 30 epochs on the downsized version of ImageNet (72$\times$72) in the VDD benchmark. We use a batch size of 2048 split across 4 Nvidia Quadro RTX 8000 GPUs. We follow the standard training/finetuning recipes for ViT models. The file cheem/artifacts/imagenet_pretraining/args.yaml in our code folder provides all the training hyperparameters used for training the the ViT-B/8 model on ImageNet.
During testing, we take a single center crop of 72$\times$72 from an image scaled with the shortest side to scaled to 72 pixels.

## Appendix C Settings and Hyperparameters in

Learning CHEEM

Starting with the ImageNet trained ViT-B/8, the proposed CHEEM learning consists of three components: supernet training, evolutionary search for target network selection, and target network finetuning.

**Table 9: Data augmentations for the 9 tasks in the VDD benchmark.**
| Task | Scale and Crop | Hor. Flip | Ver. Flip |
| --- | --- | --- | --- |
| CIFAR100 | Yes | p=0.5 | No |
| Aircraft | Yes | p=0.5 | No |
| DPed | Yes | p=0.5 | No |
| DTD | Yes | p=0.5 | p=0.5 |
| GTSR | Yes | p=0.5 | No |
| OGlt | Yes | No | No |
| SVHN | Yes | No | No |
| UCF101 | Yes | p=0.5 | No |
| Flwr. | Yes | p=0.5 | No |

##### Data Augmentations

A full list of data augmentations used for the VDD benchmark is provided in Table C, and the data augmentations used for the tasks in the 5-datasets benchmark is provided in Table C. The augmentations are chosen so as not to affect the nature of the data. Scale and Crop transformation scales the image randomly between 90% to 100% of the original resolution and takes a random crop with an aspect ratio sampled from a uniform distribution over the original aspect ratio $\pm 0.05$.
In evaluating the supernet and the finetuned model on the validation set and test set respectively, images are simply resized to $72\times 72$ with bicubic interpolation.

##### Supernet Training

The VDD Benchmark: For each task, we train the supernet for 100 epochs, unless otherwise stated. We use a label smoothing of 0.1.
We use a learning rate of 0.001 and the Adam optimier Kingma & Ba () with a Cosine Decay Rule.
We use a batch size of 512, and ensure the minimum number of batches in an epoch is 15 (via repeatedly sampling when the number of total samples of a task is not sufficient).
As stated in the paper, for the Exploration-Exploitation sampling scheme, we use an exploration probability $\epsilon=0.3$.

The 5-datasets Benchmark: We use the same hyperparameters as those used in the VDD Benchmark, but train the supernet for 50 epochs to account for its relatively lower complexity.

L2G with DARTS and $\beta$-DARTS: We train the supernet of the Learn-to-Grow (L2G) Li et al. () for 50 epochs on the VDD benchmark and 25 epochs on the 5-datasets benchmark, since DARTS simultaneously trains all sub-networks (i.e. the entire supernet) at each epoch. We use a weight of 1 for the beta loss in all the experiments with $\beta$-DARTS.

##### Evolutionary Search

The evolutionary search is run for 20 epochs. We use a population size of 50. We use 25 candidates both in the mutation stage and the crossover stage. The top 50 candidates are retained. The crossover is performed among the top 10 candidates, and the top 10 candidates are mutated with a probability of $0.1$. For the Exploration-Exploitation sampling scheme, we use an exploration probability $\epsilon=0.5$ when generating the initial population.

##### Finetuning

The target network for a task selected by the evolutionary search is finetuned for 30 epochs with a learning rate of 0.001, Adam optimizer, and a Cosine Learning Rate scheduler. Drop Path of 0.25 and label smoothing of 0.1 are used for regularization. We use a batch size of 512, and a minimum of 30 batches are drawn.

We use a single Nvidia A100 GPU for all the experiments.

## Appendix D More Examples of CHEEM Learned Sequentially and Continually

Fig. 10 shows the CHEEM learned sequentially and continually via the proposed HEE-based NAS on the VDD benchmark Rebuffi et al. () with three different random seeds.

As comparisons, Fig. 11 shows the structure updates learned using the vanilla PE-based NAS. It can be seen that pure exploration does not reuse components from similar tasks.
The pure exploration based method adds many unnecessary Adapt and New operations even though the tasks are similar (e.g., ImNet → C100), verifying the effectiveness of the proposed sampling method. While the pure exploration scheme adds many Skip operations, thereby reducing the overall FLOPs, the average accuracy is low by a large margin, about 6%. This shows that the pure exploration scheme cannot learn to choose operations in a task synergy aware way.

Figure: Figure 10: Examples of the task-synergy memory (CHEEM) learned on the VDD benchmark Rebuffi et al. () with the task sequence shown in the top using our proposed HEE-based NAS and three different random seeds. The overall performance is reported in Table 2 in the main paper. S, R, A and N represent Skip, Reuse, Adapt and New respectively. The first one (the 2nd row) is also shown in Fig. 4 in the main paper. The last two columns show the number of new task-specific parameters and added FLOPs respectively, in comparison with the first task, ImNet model. Overall, the learned task synergies make intutive sense and remain relatively stable across different random seeds.
Refer to caption: x10.png

Figure: Figure 11: Examples of the task-synergy memory (CHEEM) learned on the VDD benchmark Rebuffi et al. () with the task sequence shown in the top using the vanilla PE-based NAS and three different random seeds. S, R, A and N represent Skip, Reuse, Adapt and New respectively. The overall performance is reported in Table 4 in the main paper and our proposed HEE-based NAS significantly improves the performance by an absolute 6% average accuracy. In terms of the learned CHEEM, the PE-based NAS leads to much more New operations, which shows it is less effective in terms of leveraging task synergies.
Refer to caption: x14.png

## Appendix E Ablation Studies

**Table 11: Results of ablation study on other components of the ViT used for realizing the CHEEM. The results have been averaged over 3 different seeds.**
| Component | ImNet | C100 | SVHN | UCF | OGlt | GTSR | DPed | Flwr | Airc. | DTD | Avg. Accuracy | Avg. Param. Inc./task (M) |
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
| Projection | $82.65$ | $90.54$ | $96.12$ | $75.53$ | $83.81$ | $99.93$ | $99.88$ | $91.21$ | $55.59$ | $59.18$ | $83.44\pm 0.50$ | $1.06\pm 0.04$ |
| Query | $82.65$ | $89.66$ | $93.74$ | $71.53$ | $82.02$ | $99.87$ | $99.89$ | $90.03$ | $49.57$ | $59.40$ | $81.84\pm 0.32$ | $2.38\pm 0.12$ |
| Key | $82.65$ | $89.29$ | $94.77$ | $72.25$ | $81.86$ | $99.86$ | $99.90$ | $88.86$ | $51.72$ | $60.46$ | $82.16\pm 0.17$ | $2.41\pm 0.03$ |
| Value | $82.65$ | $84.94$ | $95.90$ | $75.85$ | $84.68$ | $99.89$ | $99.89$ | $86.54$ | $48.83$ | $55.37$ | $81.46\pm 0.25$ | $1.70\pm 0.11$ |
| FFN | $82.65$ | $91.05$ | $96.08$ | $76.96$ | $85.22$ | $99.94$ | $99.94$ | $93.79$ | $56.74$ | $59.61$ | $84.20\pm 0.28$ | $2.31\pm 0.28$ |

### E.1 CHEEM Placed at Other ViT Components

Table 11 shows the performance comparisons with other four different components in the ViT (the Query/Key/Value linear projection layer and the FFN block) used in realizing the proposed CHEEM. The Query/Key/Value component as the CHEEM does not perform as well as the Projection component. The FFN block as the CHEEM performs only slightly better than the Projection layer, but at the expense of a much larger parameter cost. This reinforces our identification above.

### E.2 Implementation Details of the Adapt Operation

##### How to Adapt in a sustainable way?

The proposed Adapt operation will effectively increase the depth of the network in a plain way. In the worst case, if too many tasks use Adapt on top of each other, we will end up stacking too many MLP layers together. This may lead to unstable training due to gradient vanishing. Shortcut connections He et al. () have been shown to alleviate the gradient vanishing and exploding problems, making it possible to train deeper networks. We introduce the shortcut connection in adding a MLP Adapt operation. We test two different implementations: with shortchut in all the three components (supernet training, target network selection and target network finetuing) versus with shortcut only in target network finetuning (i.e., without shortcut in the NAS including both supernet training and target network selection).

**Table 12: Results of the ablation study on the implementation of the Adapt operation: with (w/) vs without (w/o) shortcut connection for the MLP Adapt layer in NAS. The first two rows are for the sequential and continual paradigm and the last two rows for the task-to-task (T2T) transfer based paradigm.**
| Shortcut in | ImNet | C100 | SVHN | UCF | OGlt | GTSR | DPed | Flwr | Airc. | DTD | Avg. | Avg. Param. | Avg. FLOPs |
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
| NAS | Accuracy | $\uparrow$/task (M) | $\uparrow$/task (G) |  |  |  |  |  |  |  |  |  |  |
| w/o | $82.65$ | $90.54$ | $96.12$ | $75.53$ | $83.81$ | $99.93$ | $99.88$ | $91.21$ | $55.59$ | $59.18$ | $83.44\pm 0.50$ | $1.06\pm 0.04$ | $0.17\pm 0.01$ |
| w/ | $82.65$ | $91.18$ | $96.18$ | $82.34$ | $86.03$ | $99.91$ | $99.95$ | $91.60$ | $58.90$ | $58.56$ | $84.73\pm 0.19$ | $2.01\pm 0.18$ | $0.49\pm 0.13$ |
| w/o (T2T) | $82.65$ | $90.93$ | ${95.96}$ | ${80.74}$ | ${83.25}$ | ${99.94}$ | $99.96$ | $94.12$ | ${58.90}$ | $60.05$ | ${84.65}\pm{0.33}$ | $2.61\pm 0.15$ | $-0.19\pm 0.09$ |
| w/ (T2T) | $82.65$ | $91.24$ | ${99.25}$ | ${84.14}$ | ${85.99}$ | ${99.97}$ | $99.95$ | $94.64$ | ${60.34}$ | $61.63$ | ${85.68}\pm{0.16}$ | $3.23\pm 0.12$ | $0.01\pm 0.02$ |

Figure: (a) An example of CHEEM learned without the shortcut for the MLP Adapt layer in NAS (the same one as the 2nd row in Fig. 10).
Refer to caption: x18.png

Table 12 shows the performance comparisons on the VDD Benchmark under the continual learning paradigm. In terms of sequentially introduced complexities, a more compact model is learned without the shortcut in the Adapt during NAS (supernet training and target network selection) as evidenced by the number of additional parameters and the increase in FLOPs. Using the shortcut in both supernet training and target network selection results in twice the parameter increase, and almost 4$\times$ increase in FLOPs.
Fig. 12 and Fig. 13 show comparisons of the learned CHEEM by the two implementation methods under the two paradigms respectively.

Remarks. We have two remarks as follows.

- •
We use the more parameter-efficient implementation (i.e., w/o shortcut for the Adapt in NAS) in the main paper for both the continual learning and the task-to-task transfer learning paradigms, even though the counterparts have better performance.
- •
We note that although the T2T paradigm results in larger parameter increase per task, its computational costs are relatively lower due to either more Skip operations learned and/or the fact that there is no Adapt-on-Adapt operations since it is task-to-task transfer based learning.

Figure: (a) An example of CHEEM learned without the shortcut for the MLP Adapt layer in NAS.
Refer to caption: x20.png

### E.3 Effects of Task Orders

We investigate the effects of task orders of the 9 tasks in the VDD benchmark. We test four more task sequences in addition to the one presented in the main paper. Overall, The CHEEM learned by our proposed HEE-based NAS achieve similar performance across different task orders, and consistently significantly outperform those learned by the vanilla PE-based NAS.

Table 13 reports the performance. Fig. 14, Fig. 15, Fig. 16 and Fig. 17 show the learned CHEEM using our proposed HEE-based NAS.

**Table 13: Results of ablation study on CHEEM learning with four different task orders using both our proposed HEE-based NAS and the vanilla PE-based NAS. The results have been averaged over 3 different seeds.**
| NAS | ImNet | OGlt | UCF | Airc. | Flwr | SVHN | DTD | GTSR | DPed | C100 | Avg. Accuracy | Avg. Param. Inc./task (M) |
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
| HEE | $82.65$ | $84.32$ | $75.27$ | $54.32$ | $90.29$ | $95.83$ | $57.89$ | $99.92$ | $99.72$ | $89.96$ | $83.02\pm 0.31$ | $1.25\pm 0.15$ |
| PE | $82.65$ | $77.41$ | $70.12$ | $39.40$ | $64.35$ | $94.12$ | $37.02$ | $99.83$ | $99.41$ | $70.78$ | $73.51\pm 0.80$ | $2.86\pm 0.14$ |
| NAS | ImNet | DPed | SVHN | DTD | Airc. | OGlt | C100 | GTSR | Flwr | UCF | Avg. Accuracy | Avg. Param. Inc./task (M) |
| HEE | $82.66$ | $99.94$ | $95.83$ | $58.56$ | $42.43$ | $83.55$ | $89.98$ | $99.95$ | $91.99$ | $75.67$ | $82.06\pm 1.28$ | $1.42\pm 0.05$ |
| PE | $82.66$ | $99.65$ | $95.04$ | $45.66$ | $35.87$ | $77.62$ | $71.51$ | $99.85$ | $66.11$ | $63.99$ | $73.79\pm 0.50$ | $2.85\pm 0.12$ |
| NAS | ImNet | UCF | C100 | OGlt | GTSR | DTD | Flwr | SVHN | DPed | Airc. | Avg. Accuracy | Avg. Param. Inc./task (M) |
| HEE | $82.66$ | $79.73$ | $90.75$ | $84.93$ | $99.90$ | $58.14$ | $91.27$ | $96.05$ | $99.89$ | $54.06$ | $83.74\pm 0.51$ | $1.37\pm 0.05$ |
| PE | $82.66$ | $74.49$ | $74.17$ | $78.76$ | $99.91$ | $41.01$ | $70.49$ | $94.15$ | $99.25$ | $37.77$ | $75.27\pm 2.41$ | $2.75\pm 0.16$ |
| NAS | ImNet | Flwr | UCF | OGlt | GTSR | DPed | C100 | Airc. | DTD | SVHN | Avg. Accuracy | Avg. Param. Inc./task (M) |
| HEE | $82.66$ | $87.52$ | $77.17$ | $84.20$ | $99.92$ | $99.80$ | $90.30$ | $54.49$ | $56.83$ | $96.03$ | $82.89\pm 0.58$ | $1.41\pm 0.09$ |
| PE | $82.66$ | $72.75$ | $76.31$ | $78.47$ | $99.89$ | $99.42$ | $70.09$ | $34.95$ | $39.89$ | $93.72$ | $74.81\pm 1.40$ | $2.70\pm 0.11$ |

Figure: Figure 14: Examples of the task-synergy memory (CHEEM) learned on the VDD benchmark Rebuffi et al. () with the task sequence shown in the top using our proposed HEE-based NAS and three different random seeds. The overall performance is reported in Table 13. S, R, A and N represent Skip, Reuse, Adapt and New respectively. The last two columns show the number of new task-specific parameters and added FLOPs respectively, in comparison with the first task, ImNet model. Overall, the learned task synergies make intutive sense and remain relatively stable across different random seeds.
Refer to caption: x22.png

Figure: Figure 15: Examples of the task-synergy memory (CHEEM) learned on the VDD benchmark Rebuffi et al. () with the task sequence shown in the top using our proposed HEE-based NAS and three different random seeds. The overall performance is reported in Table 13. S, R, A and N represent Skip, Reuse, Adapt and New respectively. The last two columns show the number of new task-specific parameters and added FLOPs respectively, in comparison with the first task, ImNet model. Overall, the learned task synergies make intutive sense and remain relatively stable across different random seeds.
Refer to caption: x26.png

Figure: Figure 16: Examples of the task-synergy memory (CHEEM) learned on the VDD benchmark Rebuffi et al. () with the task sequence shown in the top using our proposed HEE-based NAS and three different random seeds. The overall performance is reported in Table 13. S, R, A and N represent Skip, Reuse, Adapt and New respectively. The last two columns show the number of new task-specific parameters and added FLOPs respectively, in comparison with the first task, ImNet model. Overall, the learned task synergies make intutive sense and remain relatively stable across different random seeds.
Refer to caption: x30.png

Figure: Figure 17: Examples of the task-synergy memory (CHEEM) learned on the VDD benchmark Rebuffi et al. () with the task sequence shown in the top using our proposed HEE-based NAS and three different random seeds. The overall performance is reported in Table 13. S, R, A and N represent Skip, Reuse, Adapt and New respectively. The last two columns show the number of new task-specific parameters and added FLOPs respectively, in comparison with the first task, ImNet model. Overall, the learned task synergies make intutive sense and remain relatively stable across different random seeds.
Refer to caption: x34.png

## Appendix F Details of Modifying Baseline Methods on the VDD Benchmark

### F.1 Modifying S-Promts and L2P for Task-Incremental Setting on the VDD Benchmark

Both the S-Prompts Wang et al. () and the Learn-to-Prompt (L2P) Wang et al. () can be modified for task-incremental setting (i.e., task ID is available in both training and inference) on the VDD benchmark without altering the core algorithm for learning the prompts.

For the S-Prompts method, the modification is done by training $L$ prompts (randomly initialized) per task and then by retrieving the correct task-specific prompts with the task ID. Table 14 and Table 15 show the results of varying the number of prompts on the VDD benchmark and 5-dataset benchmark respectively, from which we can observe that varying the number of prompts beyond 10 does not affect the performance significantly, which is also observed in the original paper Wang et al. ().

**Table 14: Results of S-Prompts on the VDD benchmark Rebuffi et al. () with various number of prompts. The results have been averaged over 3 different seeds.**
| Method | ImNet | C100 | SVHN | UCF | OGlt | GTSR | DPed | Flwr | Airc. | DTD | Avg. Accuracy |
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
| S-Prompts (L=1/task) | $82.65$ | $87.06$ | $76.42$ | $54.82$ | $62.10$ | $96.74$ | $99.59$ | $95.52$ | $37.62$ | $57.78$ | $75.03\pm 0.19$ |
| S-Prompts (L=5/task) | $82.65$ | $88.91$ | $85.23$ | $62.23$ | $70.64$ | $99.08$ | $99.87$ | $97.35$ | $45.32$ | $60.74$ | $79.20\pm 0.53$ |
| S-Prompts (L=10/task) | $82.65$ | $89.62$ | $88.69$ | $65.20$ | $72.18$ | $99.37$ | $99.91$ | $97.06$ | $45.17$ | $60.94$ | $80.08\pm 0.30$ |
| S-Prompts (L=12/task) Wang et al. () | $82.65$ | $89.32$ | $88.91$ | $64.52$ | $72.17$ | $99.29$ | $99.89$ | $96.93$ | $45.55$ | $60.76$ | $80.00\pm 0.07$ |
| S-Prompts (L=15/task) | $82.65$ | $89.63$ | $89.36$ | $65.88$ | $72.54$ | $99.37$ | $99.94$ | $97.03$ | $45.07$ | $61.17$ | $80.26\pm 0.09$ |

**Table 15: Results of S-Prompts on the 5-Dataset benchmark Ebrahimi et al. (). The results have been averaged over 5 different task orders.**
| Method | #Prompts | Avg. Acc. |
| --- | --- | --- |
| S-Prompts | 1 | $88.93\pm 0.34$ |
| S-Prompts | 5 | $91.14\pm 0.78$ |
| S-Prompts | 10 | $92.28\pm 0.16$ |
| S-Prompts | 12 | $92.42\pm 0.11$ |
| S-Prompts | 15 | $92.39\pm 0.05$ |

For the L2P method, we follow the official implementation(^1^11L2P official implementation: [https://github.com/google-research/l2p](https://github.com/google-research/l2p)) which is tested on the 5-datasets benchmark Ebrahimi et al. (). The vanilla L2P first trains a set of $N$ prompts of length $L_{p}$ (i.e. $N\cdot L_{p}$ tokens) per task. It then learns a set of $N$ keys such that the distance between the keys and the image encoding (using a fixed feature extractor) is maximized.
In modifying the vanilla L2P for the task-incremental setting, we can directly retrieve the correct prompts using the Task ID instead of using a key-value matching.
We initialize the prompts for task $t$ from the trained prompts of task $t-1$ following the original implementation. We note that the prompt initialization is the only difference between the modified S-Prompts and the modified L2P. Base on the above observations of performance changes w.r.t. the number of prompts in modifying S-Prompts, we use $L=12$ for L2P in our experiments.

### F.2 Modifying SupSup, EFT and LL to Work With ViTs

In the main paper, we compare with Supermasks in Superposition (SupSup) Wortsman et al. (), Efficient Feature Transformation (EFT) Verma et al. (), and Lightweight Learner (LL) Ge et al. () in Table 5 under the task-to-task transfer learning paradigm. The three methods are originally developed for Convolutional Neural Networks. We modify them to be compatible with ViTs for a fair comparison with our CHEEM.

We use the same ViT-B/8 base model (Sec. B) for SupSup, EFT and LL.
For the SupSup method Wortsman et al. (), we learn masks for the weights of the final linear projection layer of the Multi-Head Self-Attention block using the straight through estimator Bengio et al. ().
We apply the EFT Verma et al. () on all the linear layers in the ViT-B/8 (i.e., all the Query/Key/Value projection layers, the final projection layer, and the FFN layers) by scaling their activation maps via the Hadamard product with learnable scaling vectors, following the original proposed formulation for fully-connected layers in the EFT Verma et al. ().
For the LL method Ge et al. () which learns a task-specific bias vector that is added to all the feature maps of convolutional layers, we learn a similar bias vector and add it to the output of all the linear layers of the ViT.

## Peer Reviews

confidence: 4
contribution: 2
initial_rating: 5
presentation: 2
questions: Please refer to the Weakness.
soundness: 2
strengths: 1. Instead of simply learning more parameters, the proposed method considers reusing the model weight when the new task is similar with previous task.
2. Ablation study is conducted for each design component.
summary: This work proposed to adapt a network for task-incremental learning. Considering the characteristics of different tasks, the proposed method learns additional parameters or reuse the model weight learned from previous tasks.
Experimental results demonstrate the effectiveness of the proposed method.
The presentation can be improvement.
weaknesses: 1. The presentation can be improve. For example, the figure 4 in the Introduction is overly detailed and contains redundant content. To illustrate the main idea, showing a case of only two or three sequential tasks are enough. For the Fig. 5, the corresponding description is far away from the figure, and a detailed figure for method will be helpful.

2. The overall designs are not focus to the continual learning. (i) For example, in line 244 "How to Adapt in a sustainable way" is related to the gradient vanishing or exploding when learning deep network. And the design of residual connection is not novel.
(ii) Using the cls-token to guide the task-specific learning is not a significant contribution because previous works also use the cls-token to select and learn task specific prompts as in L2P and DualPrompt. (iii) The proposed HEE-BASED NAS considers the task similarity but the novelty is limited due to (ii). 

3. The methods compared in Table 2 and Table 3 are limited and somewhat outdated; the latest papers in class-incremental learning should be included with necessary modifications.

4. With the parameter-efficient finetuning (PEFT) techniques, the task-incremental learning seems can be directly addressed by learning different PEFT module while keeping the main backbone frozen. The L2P learns the tasks prompt, which can be regarded as prompt tuning in PEFT. Although simply adding more prompts will quickly leads to performance saturation, adding more PEFT modules such as Adapter, LoRA may help. Therefore, a natural question is the comparison of the proposed method and the combination of different PEFT compare in terms of performance and number of learnable parameters.

---

confidence: 4
contribution: 3
initial_rating: 6
presentation: 3
questions: 1. Due to the additional training time for NAS in this method, is the training time of the paper's method longer compared to other methods ?
soundness: 2
strengths: 1. The proposed method proposes a novel hierarchical task-synergy exploration-exploitation sampling method based on NAS for learning task-aware dynamic models continually with respect to four operations.
2. This paper is good written and easy to follow.
3. The proposed method is evaluated on a persuasive experimental setup with larger datasets, which is similar with the wild scenarios.
summary: This paper focus on task-incremental continual learning (TCL). The proposed method, CHEEM, presents a hierarchical task-synergy exploration-exploitation sampling based NAS method for learning task-aware dynamic models continually with respect to four operations. The results on experiments conducted on the large-scale, diverse and imbalanced VDD benchmark demonstrate the better performance of CHEEM.
weaknesses: 1. There are not enough methods for comparison. In my opinion, the methodology of the paper may need to be compared with more methods，such as DualPrompt [1].

[1] DualPrompt: Complementary Prompting for Rehearsal-free Continual Learning. Wang. et.al. European Conference on Computer Vision.

---

confidence: 5
contribution: 2
initial_rating: 5
presentation: 2
questions: Please see the weakness above.
soundness: 3
strengths: 1. Strong Motivation. The natural way to conduct continual learning is to re-wire the neural networks and it is good to see the trial on the popular vision transformers.
2. Reasonable designing. I think the design of Reuse, New, Adapt, and Skip is reasonable and complete.
3. The proposed task-synergy exploration-exploitation (HEE) is novel and effective.
summary: This paper presents a novel way of designing a dynamic network in continual learning.
Specifically, this work first analyzes the potential component of the ViT network as the synergy memory and concludes with choosing the projection layer.
The paper designs a NAS-based framework and defines operations like Reuse, New, Adapt, and Skip and associated methods to achieve continual learning.
The author also shows experiments under task-incremental learning settings on multiple datasets.
weaknesses: 1. Limited applicability. This paper only focuses on the task-incremental learning paradigm, which holds a strong assumption that the incoming streaming samples are organized as different domain groups and that the task IDs are available during inference. I have noticed the authors have explained their thoughts on this in Lines 92-102. However, I am still concerned about this because (1) I don't think assuming a common classification space is a problem since identifying the samples within a domain is much more difficult than identifying which domain is a sample in. In other words, a common space is compatible with separated spaces, i.e., the unified classification space can be easily decomposed into domain-separated spaces but it is hard to merge independent spaces into a unified one. (2) The design of CHEEM is based on the task-incremental learning setting and I cannot see the potential of applying CHEEM in more complex continual learning settings (class-incremental, domain-incremental, online continual learning, etc.).

2. The design and the training of the proposed method CHEEM. The training of the proposed CHEEM relies on the feature mean of each layer's output. My concern is why using the mean of the features is enough to identify the similarities of different tasks but ignores other information like the (co-)variances of the features. I am very interested in how to measure the similarity of various tasks but this paper has not discussed more potential options of this. 

4. Experiment results. (1) Why does the proposed method achieve worse performance on DAD shown in Table 4? I don't recognize the performance shown in Table 5. as SOTA performance since CHEEM loses on almost all datasets except the small dataset Aircraft. I think the authors did not make a reasonable explanation of the advantages of the proposed methods in the part of the experiment.
(2) It is stated in Lines 402 to 407 that the proposed method introduces fewer FLOPs compared to L2P. I am confused about how the number of `2.2G/task' in L2P. As far as I know, the L2P method maintains a fixed-size pool and only a sequential fixed-size prompt will be appended to the MHSA at all tasks so the increase of the FLOPs is fixed rather than increased per task. And the citation of L2P is not correct in the lines.
(3) Recent works on task-incremental learning have shifted into the vision-language models (like CLIP, which also employs the ViT as the backbone) [A, B], and I encourage the authors to explore the application of the proposed method in this challenging task.
```
    [A] Z. Zheng, M. Ma, K. Wang, Z. Qin, X. Yue, and Y. You. Preventing zero-shot transfer degradation in continual learning of vision-language
models. Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition. 2023
    [B] Yu J, Zhuge Y, Zhang L, et al. Boosting continual learning of vision-language models via mixture-of-experts adapters. Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition. 2024: 23219-23230.
```
5. The paper is hard to follow and the writing can be greatly improved, especially the structure of section 2.2.

6. Lack of citation of more vision-transformer-based continual learning methods:

```
[1] Jung D, Han D, Bang J, et al. Generating instance-level prompts for rehearsal-free continual learning. Proceedings of the IEEE/CVF International Conference on Computer Vision. 2023: 11847-11857.
[2] Tang Y M, Peng Y X, Zheng W S. When prompt-based incremental learning does not meet strong pretraining. Proceedings of the IEEE/CVF International Conference on Computer Vision. 2023: 1706-1716.
[3] Zhou D W, Sun H L, Ye H J, et al. Expandable subspace ensemble for pre-trained model-based class-incremental learning. Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition. 2024: 23554-23564.
[4]Zhou D W, Ye H J, Zhang D C, Liu z. Revisiting Class-Incremental Learning with Pre-Trained Models: Generalizability and Adaptivity are All You Need, arXiv 2023.
```
And related NAS-based and archi-search-based methods:
```
[5]Gao Q, Luo Z, Klabjan D, et al. Efficient architecture search for continual learning. IEEE Transactions on Neural Networks and Learning Systems, 2022, 34(11): 8555-8565.
[6]Abati D, Tomczak J, Blankevoort T, et al. Conditional channel gated networks for task-aware continual learning. Proceedings of the IEEE/CVF conference on computer vision and pattern recognition. 2020: 3931-3940.
[7]Rajasegaran J, Hayat M, Khan S H, et al. Random path selection for continual learning. Advances in neural information processing systems, 2019, 32.
```

---

confidence: 4
contribution: 2
initial_rating: 3
presentation: 1
questions: See the Weakness.
soundness: 3
strengths: 1. The work conducts experiments on the challenging Visual Domain Decathlon (VDD) benchmark, and obtains good results. 
2. The work proposes a new model based on NAS and MoE, which is somewhat novel in continual learning field.
summary: This paper proposes a new model for task-incremental continual learning (TCL) by Vision Transformers. To improve the overall streaming-task performance of TCL, this work proposes a NAS-based method cooperated with a Hierarchical tasksynergy Exploration-Exploitation (HEE) sampling method, which effectively learns task synergies by structurally updating the identifed memory component. In this way, the proposed model can tackle various tasks in TCL by adaptively using reuse, adapt, new or skip strategies. The authors conduct experiments mainly on the challeging Visual Domain Decathlon benchmak, which demonstrates the effectiveness of the proposed model.
weaknesses: 1. The writing and presentation of the paper is poor. 
2. Why the authors ignore class-incremental learning in this work? Compared with task-incremental learning, class-incremental learning is more practical. Although the authors have explained some in Line 97-102, it is still confused to me. 
3. The authors show an example of learned network architecture in Figure 4, but the conclusion is not clear to me. What insights can we get from the figure?
4. Please clarify the detailed differences between the adopted Visual Domain Decathlon (VDD) benchmark and other popular ones. More importantly, why the proposed model is specifically targeted at VDD? Please clarify this from the perspective of model design.  
5. Please clarify why you choose the projection layer after MHSA. As you ilustrated in Line 199-202, please clarify this from the perspectives of forward transfer ability, forgetting, simplicity and invasive implementation. 
6. Please conduct more comparison between your proposed model and existing models. For example, the authors only compare with S-Prompts and L2P in Table 2, it is not enough at all. Furthermore, I wonder if the authors have conducted a comparison with models at the same scale of parameters.

Meta-review: (a) Scientific Claims and Findings

The paper introduces a method for task-incremental continual learning using a network adaptation strategy. The proposed approach, CHEEM, employs a hierarchical task-synergy exploration-exploitation sampling based on neural architecture search (NAS) to learn task-aware dynamic models. The method focuses on reusing model weights for similar tasks and introduces operations like Reuse, New, Adapt, and Skip to achieve continual learning. Experimental results on the Visual Domain Decathlon (VDD) benchmark demonstrate the method's effectiveness, though the presentation and comparison with other methods could be improved.

(b) Strengths

Reviewer ceyj appreciates the method's consideration of reusing model weights for similar tasks and the inclusion of an ablation study. Reviewer roRA finds the hierarchical task-synergy exploration-exploitation sampling method novel and effective, with a well-written paper and a persuasive experimental setup. Reviewer 874z commends the strong motivation and reasonable design of the operations, as well as the novelty of the task-synergy exploration-exploitation method. Reviewer wv9n notes the good results obtained on the challenging VDD benchmark and the novelty of the NAS and MoE-based model.

(c) Weaknesses

Reviewer ceyj points out that the presentation needs improvement, with figures being overly detailed or poorly placed, and the design not being focused on continual learning. Reviewer roRA mentions the lack of comparison with more methods, such as DualPrompt. Reviewer 874z highlights the limited applicability to task-incremental learning, concerns about the training method, and the lack of convincing experimental results. Reviewer wv9n criticizes the poor writing and presentation, the exclusion of class-incremental learning, and insufficient comparisons with existing models.

(d) Decision Reasons

On balance, AC agrees with negative points raised by the reviewers which outweigh the positive points. Reviewer ceyj rates the paper as marginally below the acceptance threshold due to presentation issues and limited novelty. Reviewer roRA gives a higher rating, appreciating the novel method and good experimental setup. However, Reviewer 874z and Reviewer wv9n both recommend rejection, citing limited applicability, poor presentation, and insufficient comparisons. Importantly, after the rebuttal period, the most postitive reviewer  roRA, states the following 
> I have carefully reviewed the authors' rebuttal, their revisions, and the feedback from other reviewers. My comments are as follows: ﻿ I commend the authors for their effort in addressing the concerns raised during the review process. I concur with reviewers wv9n and 874z that the substantial revisions required, particularly those involving the main claim of the paper, are beyond what is typically feasible or supported within the constraints of this review cycle. ﻿ Considering this, I believe the manuscript would benefit from being submitted to another venue. This would provide the authors with an opportunity to fully address these foundational concerns and present a more cohesive and well-supported narrative.

The overall consensus is that while the method shows potential, the weaknesses outweigh the strengths, leading to a decision to reject. While the method shows promise and novelty in its approach to task-incremental learning, the limited applicability, lack of comprehensive comparisons are significant drawbacks. The paper does not convincingly demonstrate superiority over existing methods, and the focus on task-incremental learning without addressing more practical scenarios like class-incremental learning limits its impact. Additionally, the writing and structure need improvement to enhance clarity and understanding. These weaknesses outweigh the strengths, leading to a decision to reject.

Decision: Reject