Continual Learning with Global Alignment

Continual learning aims to sequentially learn new tasks without forgetting previous tasks' knowledge (catastrophic forgetting). One factor that can cause forgetting is the interference between the gradients on losses from different tasks. When the gradients on the current task's loss are in opposing directions to those on previous tasks' losses, updating the model for the current task may cause performance degradation on previous tasks. In this paper, we first identify causes of the above interference, and hypothesize that correlations between data representations are a key factor of interference. We then propose a method for promoting appropriate correlations between arbitrary tasks' data representations (i.e., global alignment) in individual task learning. Specifically, we learn the data representation as a task-specific composition of pre-trained token representations shared across all tasks. Then the correlations between different tasks' data representations are grounded by correlations between pre-trained token representations. We explore different ways to learn such compositions. Without experience replay, our model achieves SOTA performance in continual learning tasks. It also achieves advanced class-incremental performance through task-incremental training.

Paper

References (64)

Scroll for more · 38 remaining

Similar papers

Peer review

Reviewer R2vv6/10 · confidence 5/52024-06-30

Summary

This paper tackles continual learning by addressing interference between tasks. For the interference between different tasks, the authors propose a method called ‘global alignment’ to align the data representations using task-specific compositions of pre-trained token representations. Then the authors conduct extensive experiments to verify the effectiveness of the proposed method.

Strengths

1. This paper is well-written and easy to understand. 2. The motivation is clear. From the perspective of cross-task interference, this paper provides some simple but effective methods to avoid the interference of the data representation and classifier. 3. The proposed methods are easy to follow and experiments verify their effectiveness.

Weaknesses

1. The analysis of interference in Section 3.2 does not consider the activation function between the two layers of the network. Multiplying the two linear weight matrices is equivalent to using only one weight matrix, so the analysis of this linear case is different from that of the non-linear case and I’m curious about the inference in the non-linear case. 2. About wiring with neighbor attention: a) The author needs to explain the rationality of neighborhood tokens and the impact of the size of K on the model. b) This method requires matching the most similar K tokens for each token given a sample. This process may require a large amount of computation. c) The author needs to further explain the difference between this method and controlled-LoRA. Both these two methods add a learnable term to the original token representations but adopt different generation strategies. Specifically, this method adds a term composed of neighborhood tokens, while controlled-LoRA uses low-rank matrices. So what are the advantages of this method? 3. About Controlled-LoRA: a) Computational burden and parameter size: As the number of tasks increases, linearly increasing model parameters is not in line with the spirit of CL, and the increased parameter size should be limited even if LoRA only adds small parameters compared to the large model. b) Why does Controlled-LoRA perform worse than other methods? In the case of task-IL, given the task ID for each test sample, we can directly use the best LoRA model.

Questions

Please refer to Weaknesses.

Rating

6

Confidence

5

Soundness

3

Presentation

3

Contribution

3

Limitations

NA

Reviewer NuNi5/10 · confidence 4/52024-07-09

Summary

In Continual Learning (CL), the interference caused by the constant modification of the representation is the leading cause of catastrophic forgetting. Motivated by this and the idea that gradients in opposite directions are one cause of this interference, the authors proposed new ways of adding knowledge to a model. The authors motivate the proposal with a toy model that exemplifies where and why the interference occurs, concluding that it comes from the discrepancy between the representations of the different tasks and the relationship between the class vectors. These conclusions lead the authors to propose three proposals that slightly modify the transformer architecture, specifically adding learnable weights in the self-attention layers to generate a task-specific attention representation. The authors also propose using the probing and then fine-tuning approach presented in the past to help initialize class vectors. The results are presented in task and class incremental learning benchmarks in sequences of text datasets.

Strengths

- The authors present a motivation from which they exemplify the problem in a simple way and where they want to aim their solution. This motivation may help the reader understand the context and problem to be solved. - The paper introduces a method that alters the architecture of a transformer model. While the paper does not explicitly state this, the provided motivation helps to understand why certain parts of the self-attention layer (the k matrix) are modified. - The authors must describe why only the K matrix is modified and not the others.

Weaknesses

- What is the actual contribution of applying wiring or C-LoRA? The results show that applying FP can benefit the methods much more than adding the proposals presented. - What are the implications of applying FP to the Adaptation or CL methods? The performance gain from the proposed methods is relatively low (compared to L2P), and this could further decrease with the application of FP. This requires a deeper exploration of the proposed methods and the alternatives. - The writing is unclear and often unnecessarily complex, making reading difficult for someone unfamiliar with the subject. The notation used is only sometimes in line with the literature, which can confuse readers. In addition, there are problems explaining some terms and easily avoidable problems. For example: - Line 46, FP, is mentioned but needs to be correctly defined. However, the document defines the abbreviation FP multiple times after that when only one should be enough. - Line 182, there is an extra “192”.

Questions

- My main concern is the causes of interference that motivate this work. The author hypothesised that a gradient in the same direction can alleviate forgetting between tasks, a concept also adopted by GEM, despite its susceptibility to forgetting. Even with a gradient in the same direction, if it induces significant weight changes, the representations could be compromised, leading to catastrophic forgetting. - How much does having a model pre-trained in tasks similar to those used in CL affect the proposed methods? The gradient will likely be low for these tasks. - Text benchmarks need minor modifications to the model weights due to the similar distribution between the pre-trained model and the new tasks. In cases where higher modifications are needed, can the scaling factor (s) help reduce this effect? Did you explore different values of the scaling factors? - Can this method work on image benchmarks? Images can have a more complex distribution than text, making avoiding interference between tasks difficult. - Is FP applied to CL or adaptation methods in Table 1? - Another technique used in CL is freezing class vectors in the classifier so that only the classes present in the batch during training are modified. This is especially useful when there is no memory. Can this help further reduce interference in the proposed methods? - Fig 2.b, what method of global alignment was used? - Three methods to mitigate interference are presented. Can these methods be complemented by each other? - How many neighbours are used in Wire-Neigh? Did you perform experiments to find the optimal number of neighbours? - Did you train only the classifier for the Task Incremental Learning problem? This method should not forget, and the pre-trained model can have good prior knowledge. - For the CIL experiments, the proposed methods have very similar results to previous methods when applying FT in Yahoo. This somewhat contradicts the claim that the proposed methods mitigate forgetting. Do you have any intuition about why FT+PF works so well? - In Fig 4.b., is the performance with or without FP?

Rating

5

Confidence

4

Soundness

2

Presentation

1

Contribution

2

Limitations

As the authors mention, this method heavily relies on a pre-trained model with a similar distribution to the incoming tasks. This assumption is only sometimes true and can be more complex in scenarios with a more complex input data distribution.

Reviewer Ep6T7/10 · confidence 3/52024-07-09

Summary

This paper addresses the problem of Task-Incremental-Learning (TIL) with pre-trained transformer in the context of NLP. The author extended their experiments in the Class-Incremental Learning (CIL) scenario. The authors identify potential forgetting causes as (1) negative correlation between data representations and (2) negative correlation between class prototypes. After theoretically justifying their claim, the authors propose to align the model representations with either a) learning new key matrices for pre-trained queries and values b) learning new key matrices for with additional token chosen as the nearest neighbors of the considered token c) learning new queries and values from the original ones with a low-rank adaptation strategy. The author additionally align prototypes (class vectors) leveraging a probing and fine-tuning strategy. This paper shows superior performances on various dataset in CIL and briefly discuss the effect of various components.

Strengths

- clear and understandable paper - the equations are well derived and clear - the proposed approach has interesting theoretical justifications - The obtained performances on the TIL settings are compelling

Weaknesses

1. While I believe the evaluation to be sufficient, it would improve the paper to include more recent prompt-learning techniques such as CODA [1] which showed stronger performances than L2P. I believe it would equally be interesting to see this approach applied to Computer Vision problems, even though I understand this paper focuses on NLP. 2. Although the proposed approach is theoretically justified, it would be interesting to quantify such alignment through experiments, by computing data representations covariance/correlation between transformed class vectors; for each alignment strategy. 3. I appreciate the effort to include results in CIL scenarios. However, I think more discussions as to how the proposed approach performs poorly compared to ER-ACE could be introduced. 4. What is the link between the findings of this paper and previous work on orthogonal subspaces in continual learning [2, 3]? In these works, amongst others, it seems that the correlation between hidden representation should be zero, and not positive. I think such work should be included in related work section. 5. A discussion regarding the extra computation induced by the alignment strategies and the PF would be welcomed as well, as it seems to increase it considerably. 6. The code is unfortunately not accessible to the reviewers. If the authors can address most of the above points I would happily increase my score. **Typos and presentation** - LoRA l44 and PF l.46 are not defined. Please either define the acronyms or cite the corresponding paper. - l.114 $h_{\tau}$ should be h_{i} - I do not like the use of RHS l.163 and 164. - l. 182: "grounded192"? [1] Smith, James Seale, et al. "Coda-prompt: Continual decomposed attention-based prompting for rehearsal-free continual learning." Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition. 2023. [2] Wang, Xiao, et al. "Orthogonal subspace learning for language model continual learning." Findings of the Association for Computational Linguistics: EMNLP 2023, pages 10658–10671 [3] Chaudhry, Arslan, et al. "Continual learning in low-rank orthogonal subspaces." Advances in Neural Information Processing Systems 33 (2020): 9900-9911.

Questions

See weaknesses.

Rating

7

Confidence

3

Soundness

3

Presentation

4

Contribution

3

Limitations

Limitations have been partially addressed in the main draft. I believe a discussion regarding the poor performances on CIL scenarios should be included, as well as a discussion on the potential computation overhead.

Reviewer LhK36/10 · confidence 3/52024-07-11

Summary

This paper studies the cause of cross-task interference in class-incremental learning of transformer-based language models. The authors disentangle the cause into the correlation (i) between data representations and (ii) between class vectors in the linear classifier. To tackle (i), the authors propose three ways to construct data representations at each layer by learning an attention over the pretrained token representations. To tackle (ii), the authors propose to only train the classifier for a new task (to obtain a good initialization) before jointly training both the classifier and the encoder. The authors perform experiments with the pretrained BERT-base model and various text datasets. Training is in the task-incremental setup (where task labels are provided and the model predicts over in-task classes); the model is evaluated on both task-incremental and class-incremental (where task labels are not provided and the model predicts among all classes) setups. The authors found that their methods, "alignment models", outperform existing adaptation and continual models.

Strengths

1. This paper is well-written and I did not find major technical flaws. 2. I enjoyed reading the motivation of the paper in Sec. 3 where the authors examine the causes of cross-task interference. 3. I find that the initialization of class vectors may influence cross-task interference interesting, although I have some related questions.

Weaknesses

1. While the main goal of the paper is reducing cross-task interference, the main results (Table 1) is using the task-incremental setup, where task labels are known during prediction. The class-incremental learning results are only in Fig. 4, comparing the proposed method only with LoRA and ERACE. 2. I find it a bit hard to infer where the performance improvement comes from from the results. I wonder if it is possible to do some fine-grained ablation analysis that verifies that the proposed method indeed helps by reducing overlap in data representations and in class vectors' features for different tasks. For example, one could measure the accuracy on the task level or look at the confusion matrix, which may reveal some information about cross-task confusions. 3. Is $\Delta W$ shared across tasks? If so, I don't understand why the proposed method does not forget. The authors hypothesize that this is potentially due to referencing pretrained representations. However, since the [CLS] representations are constructed involving $\Delta W$, I'd expect the model to lose some ability to generate good representations for past tasks. Could the authors elaborate on this point?

Questions

1. Could the authors explain the choice of training in TIL while evaluating in CIL, as opposed to training and evaluating in the same setup? 2. (Eq. 2) Since weights are usually initialized from a distribution centered around 0, shouldn't the first term be quite small? 3. (Sec 4.3) Does probing perform softmax over only the new classes? If so, how does it help two class vectors for different tasks to focus on different features, since the loss does not require differentiating between the two classes? 4. (Sec. 4.2) In the wiring models, what is the intuition behind only replacing the key matrix but not the query and value matrices? Minor: 5. (Eq. 1) It seems that interference is eliminated once any of the three components is 0. Is it possible to fix the class vectors to be the canonical basis which are guaranteed to be perpendicular, and only learn the data representations? 6. (Sec. 4.2) In Wire-Neigh, do you need to find the $K$ nearest neighbors for each token? If so, how expensive it is in practice? 7. (L#219) Could you elaborate on what "grounded" means here? 8. Missing references: [1, 2] are two prompting-based CL methods that are shown to perform better than L2P. 9. (L#41-44) I recommend changing the indices to, e.g., "(i), (ii), (iii)", as a different "(2)" is referred to in the next paragraph. 10. (L#53) "by" -> "after" 11. (L#182) "grounded192" -> "grounded" [1] DualPrompt: Complementary Prompting for Rehearsal-free Continual Learning. Wang et al. ECCV 2022. [2] CODA-Prompt: COntinual Decomposed Attention-based Prompting for Rehearsal-Free Continual Learning. Smith et al. CVPR 2023.

Rating

6

Confidence

3

Soundness

3

Presentation

3

Contribution

3

Limitations

The authors have addressed the limitations clearly in Sec. 6.

Reviewer NuNi2024-08-09

I thank the authors for their detailed answers. W1. Yes, I am sorry about my error. I associate IDBR's results with L2P, and because IDBR uses memory, I understand that their comparison is not completely fair. For Q1.a, I was referring to the gradient in the model. I understand that the gradient in the classifier can be high, and it should be high to learn the downstream task. However, some techniques have been proposed to mitigate the classifier's forgetting. For example, fix the columns of those classes not present in the batch (to mitigate the interference at the gradient level). Q1.c. Yes, this is exactly what I was referring to. If the task distribution is very different, the strategy must modify the model weights, increasing the scaling factor. I understand that this can increase forgetting, but it is interesting to understand how much the scaling factor can move to learn a very out-of-distribution downstream task but mitigate forgetting. This is the main challenge in CL when using pre-trained models. Q.6. Thanks. I didn't see it. Would it be a good idea to add something in the first column? Due to this, I will increase my score to a 5.

Authorsrebuttal2024-08-10

We thank the reviewer for the thoughtful response and detailed explanation. ___ **W1.** Thank you for your understanding. ___ **Q1.a.** We agree that fixing the columns of classes not present in the batch can mitigate interference *in the classifier*. Under this setting, updating the columns of class vectors from new tasks will not influence the class vectors learned in the previous tasks (i.e., zero gradient for class vectors of previous tasks). As stated in the rebuttal Q2, we have already used this technique in training all our models, including baselines. However, this technique can not fully mitigate interference *in the encoder*. Since the encoder is shared across all tasks, the value of new class vectors will influence the gradients on the encoder (Eq. 1), in both the magnitude and direction. Since the loss is usually non-zero at the beginning of task learning, the gradients of the encoder are unlikely to be zero*. This will cause interference based on the encoder’s gradients, on which we focus in this paper. *If we have a good pre-trained model that can solve the target task by only tuning the classifier, then the gradients on the encoder are zero (i.e., the loss is zero) after probing. However, that is not always the case as shown in the probing results of Table 1. ___ **Q1.c.** Thanks for your suggestions. We show the Task-IL accuracies of different scaling factors $s$ for controlled-LoRA (C-LoRA) and Wire-Neigh in the tables below. We test on the News-Series sequence, where the tasks are from nature language inference (NLI) datasets that have different data distributions from pre-training. The probing performance on News Series also has a large gap to MTL, which indicates that models need more plasticity to solve the tasks. | Model | s = 0 (Probing) | s = 0.1 |s = 0.4|s = 0.7|s = 1.0| |-|-|-|-|-|-| | C-LoRA | 74.81 | 74.83 |72.99|71.02|69.59| | C-LoRA + PF | 74.81 | 78.59|77.41|76.83|76.81| * For C-Lora, when $s$ increases, the model's global alignment effect decreases while the plasticity increases. The results suggest: (1) C-LoRA’s CL performances decreases when $s > 0.1$. This may be because the encoder loses the global alignment effect, which also misleads the learning of the classifier and increases the interference. (2) After applying PF, C-LoRA’s accuracy first increases and then slightly decreases, overall consistently outperforms probing. This may be because PF reduces the interference caused by the class vectors, and the model can fully utilize its global alignment ability when increasing plasticity. However, when the scaling factor goes too large, the loss of alignment ability will lead to more forgetting even with PF. | Model | s = 0 (Wire-Fixed) | s = 0.1 |s = 0.3|s = 0.5| |-|-|-|-|-| | Wire-Neigh | 76.28|77.20 |75.19|72.46| * For Wire-Neigh, we can improve its plasticity by expanding the neighborhood (general response 3), or increasing the scaling factor $s$ that represents the interpolation between the pre-trained token representations and their neighbor representations. The observation is similar to C-LoRA: when $s$ goes up, the model’s accuracy first increases and then decreases because of the trade-offs between global alignment and plasticity. ___ **Q6.** Yes, we will mark the probing as the classifier-only learning baseline in the first column.

Reviewer LhK32024-08-10

Thanks for rebuttal

I thank the authors for answers my questions. My concerns are resolved and I've increased my score to a 6. Regarding W3, I wonder if the reason that a shared $\Delta W$ shows low forgetting could also be due to that it does not contain a lot of parameters. This recent paper [1] shows that PEFT methods enjoy low forgetting when you don't have too many tunable parameters. [1] Thede et al. Reflecting on the State of Rehearsal-free Continual Learning with Pretrained Models. CoLLAs 2024.

Authorsrebuttal2024-08-10

We thank the reviewer for the thoughtful response and helpful reference. ___ Yes, we agree that tuning fewer parameters may help to mitigate forgetting. In the paper Table 1, we observe popular PEFT methods (Adapter, LoRA, Prefix-Tuning) have overall less forgetting than pure fine-tuning (FT). In this paper, we provide an angle of interference that connects PEFT models’ superior performance to a global alignment effect. According to [1], token representations in different PEFT models can be viewed as combinations of the pre-trained token representations and some modification vectors. When the models have limited parameters, the modifications may also be limited (e.g., prefix tuning with a limited number of prompts). This makes the token representations strongly guided by the pre-trained token representations, which has the global alignment effect to reduce interference and mitigate forgetting. However, if models have too few parameters, they may lose the plasticity to learn hard tasks and perform inferiorly in CL. Therefore, we also study ways to reduce forgetting when increasing model parameters/adaptations for plasticity. ___ [1] He et al, Towards a Unified View of Parameter-Efficient Transfer Learning, ICLR 22

Reviewer Ep6T2024-08-11

Thank you for the rebuttal

I thank the authors for taking the time to answer my question and improve my understanding of the manuscript. **W1** I believe it would make it a fairer comparison to include CODA as a SoTA prompt-learning based method after hyper-parameter, since it outperforms L2P on vision tasks, at least for CIL scenarios. I acknowledge that results might differ for the TIL scenario. I still appreciate the effort and I understand that the limited time for rebuttal is not necessarily sufficient to conduct an extensive hyper-parameter search. **W2** Thank you for the extra experiments, which are convincing. Including them in the main draft could also clarify the impact of the proposed loss on the model alignment. **W3** Thank you for the clarification. I agree that direct comparison to replay-based methods might be unfair. **W4** Thank you for the clarification. I would advise the authors to include such discussion in the related work. **Time consumption** Thank you for the additional information. Such details could be included in the paper or the appendix, as computation is a major focus focus in Continual Learning. Overall, I do not have major concern and I will **increase my score to 7**.

Authorsrebuttal2024-08-11

Thank you for the response

We thank the reviewer for the thoughtful response and helpful suggestions. ___ **W1** We agree with that. We are working on the hyperparameter searching on CODA and will include it for comparison in the later version of the paper. **W2** Thank you for the suggestions. We will include them in the main draft. **W3** Thank you for your understanding. **W4 and Time consumption** Thank you for the suggestions. We will include the discussions in the paper.

Area Chair hjxC2024-08-11

Discussion

Dear Reviewers, This paper has received diverging reviews ranging from 4 to 7. The authors have submitted a rebuttal and the anonymous link to their code https://drive.google.com/file/d/1PNjqBgr-ZUBmarNK-yPZ7GWUdFjNf7t0/view?usp=sharing. Most reviewers have raised their scores after reviewing the authors' rebuttal except one. @Reviewer R2vv: Please read the authors' rebuttal/code and other reviewers' comments. Have the authors' responses addressed your concerns? If so, please reconsider the borderline decision. AC

Reviewer R2vv2024-08-13

Thank you for the rebuttal

Thanks for answering my questions. After going through all the other reviews and the given rebuttal, I've increased my score to 6. W1. I understand the difficulty of the non-linearity analysis and thanks for the authors' explanation. W2. The comparison between Wire-Fixed, Wire-Neigh, and C-LoRA is clear, and I suggest adding this part to the main text for better understanding. W3. I'm sorry for the misunderstanding about C-LoRA and my concerns have been addressed.

Authorsrebuttal2024-08-13

Thank you for the response

We thank the reviewer for the thoughtful response. ___ **W1 and W3.** Thank you for your understanding. **W2.** Thank you for the suggestion. We will add this part to the main paper.

Program Chairsdecision2024-09-25

Decision

Accept (poster)

© 2026 NYSGPT2525 LLC