An Empirical Analysis of Forgetting in Pre-trained Models with Incremental Low-Rank Updates

📄 arXiv: 2405.18069v2 📥 PDF

作者: Albin Soutif--Cormerais, Simone Magistri, Joost van de Weijer, Andew D. Bagdanov

分类: cs.LG

发布日期: 2024-05-28 (更新: 2025-05-19)

备注: CoLLAs 2024 accepted paper, PMLR 274:996-1012


💡 一句话要点

研究LoRA秩对预训练模型增量更新中遗忘的影响

🎯 匹配领域: 支柱九:具身大模型 (Embodied Foundation Models)

关键词: 低秩适应 LoRA 持续学习 灾难性遗忘 预训练模型 Vision Transformer 增量学习

📋 核心要点

  1. 现有持续学习方法较少关注LoRA合并后对预训练模型权重的影响,忽略了模型权重更新带来的遗忘问题。
  2. 该研究通过合并LoRA权重来更新预训练模型,并分析LoRA秩对预训练任务和后续任务遗忘的影响。
  3. 实验表明,LoRA秩显著影响预训练和下游任务的遗忘,Vision Transformer表现出独特的“上下文”遗忘行为。

📝 摘要(中文)

本文研究了使用低秩适应(LoRA)对预训练模型进行增量更新时出现的遗忘现象。当前的研究通常将学习到的适配器与现有模型一起存储,而很少尝试在每个任务训练完成后,通过合并LoRA权重来修改预训练模型的权重。本文重点研究了LoRA秩对预训练基础任务和后续任务的遗忘以及可塑性的影响。研究表明,LoRA秩对预训练和下游任务的遗忘都有重要影响。此外,研究还观察到,以这种方式微调的Vision Transformer表现出一种“上下文”遗忘,而残差网络没有观察到这种行为,并且作者认为这在以前的持续学习工作中尚未被观察到。

🔬 方法详解

问题定义:论文旨在研究在使用LoRA方法对预训练模型进行增量学习时,合并LoRA权重到原始模型后,LoRA的秩对模型遗忘的影响。现有方法通常只关注存储LoRA适配器,而忽略了合并权重后可能导致的灾难性遗忘问题,尤其是在持续学习的场景下。

核心思路:核心思路是通过实验分析不同LoRA秩对预训练任务和后续任务的遗忘程度。通过改变LoRA的秩,观察模型在学习新任务时,对原始预训练任务和之前学习过的任务的性能下降情况。作者假设LoRA秩的大小会影响模型对新知识的接纳程度以及对旧知识的保留程度。

技术框架:整体框架包括:1) 使用预训练模型(如Vision Transformer或ResNet);2) 使用LoRA方法对模型进行微调,学习新的任务;3) 将学习到的LoRA权重合并到预训练模型的原始权重中;4) 评估模型在原始预训练任务和之前学习过的任务上的性能,以此衡量遗忘程度。实验中会改变LoRA的秩,并重复上述步骤,以分析秩的影响。

关键创新:该研究的关键创新在于关注了LoRA合并权重后对预训练模型遗忘的影响,并发现了Vision Transformer中一种新的“上下文”遗忘现象。这种“上下文”遗忘是指模型在学习新任务时,会根据当前任务的上下文信息,选择性地遗忘之前学习过的任务的信息。这是之前持续学习工作中未曾观察到的。

关键设计:关键设计包括:1) 选择合适的预训练模型,如Vision Transformer和ResNet,以便比较不同架构的影响;2) 使用不同的LoRA秩进行实验,例如选择一系列不同的秩值,观察其对遗忘的影响;3) 设计合适的评估指标来衡量遗忘程度,例如在原始预训练任务和之前学习过的任务上的准确率或损失函数值;4) 仔细分析Vision Transformer的“上下文”遗忘现象,并尝试解释其原因。

🖼️ 关键图片

fig_0
fig_1
fig_2

📊 实验亮点

实验结果表明,LoRA秩对预训练任务和下游任务的遗忘都有显著影响。更重要的是,研究发现Vision Transformer在微调后表现出一种独特的“上下文”遗忘行为,这在残差网络中没有观察到,并且是先前持续学习研究中未曾报道的。这一发现为理解和改进Vision Transformer的持续学习能力提供了新的视角。

🎯 应用场景

该研究成果可应用于持续学习、迁移学习等领域,尤其是在资源受限的场景下,例如边缘计算设备。通过合理选择LoRA秩,可以在保证模型性能的同时,减少存储开销,并减轻灾难性遗忘。此外,对Vision Transformer“上下文”遗忘现象的发现,有助于更好地理解和优化视觉模型的持续学习能力。

📄 摘要(原文)

Broad, open source availability of large pretrained foundation models on the internet through platforms such as HuggingFace has taken the world of practical deep learning by storm. A classical pipeline for neural network training now typically consists of finetuning these pretrained network on a small target dataset instead of training from scratch. In the case of large models this can be done even on modest hardware using a low rank training technique known as Low-Rank Adaptation (LoRA). While Low Rank training has already been studied in the continual learning setting, existing works often consider storing the learned adapter along with the existing model but rarely attempt to modify the weights of the pretrained model by merging the LoRA with the existing weights after finishing the training of each task. In this article we investigate this setting and study the impact of LoRA rank on the forgetting of the pretraining foundation task and on the plasticity and forgetting of subsequent ones. We observe that this rank has an important impact on forgetting of both the pretraining and downstream tasks. We also observe that vision transformers finetuned in that way exhibit a sort of ``contextual'' forgetting, a behaviour that we do not observe for residual networks and that we believe has not been observed yet in previous continual learning works.