arXiv:2503.02659cs.CL2025-03AAAI被引 11

通过激活值零空间初始化LoRA,有效防止大模型微调时遗忘预训练知识。

Put the Space of LoRA Initialization to the Extreme to Preserve Pre-trained Knowledge

  • 在预训练模型输入激活的零空间中初始化LoRA,而非权重零空间。
  • 在多个基准测试上保持90%以上预训练知识保留率,同时微调性能优异。
  • 特别适合需要保留原始知识的场景,如医疗、法律等专业领域微调。

低秩适配(LoRA)是大语言模型参数高效微调的主流方法,但仍存在灾难性遗忘问题。现有方法通常通过使残差权重接近预训练权重来缓解遗忘,或让LoRA初始化空间与预训练权重正交。然而,我们发现激活值的零空间比权重零空间更能准确反映预训练知识,且其有效秩更低,包含更少的预训练信息。因此,我们提出LoRA-Null,将LoRA初始化在预训练模型输入激活的零空间中。实验表明,该方法在多个任务上显著提升知识保留率(超过90%),同时保持良好的微调性能。代码已公开于https://github.com/HungerPWAY/LoRA-Null。

原文摘要 · Abstract (English)

Low-Rank Adaptation (LoRA) is the leading parameter-efficient fine-tuning method for Large Language Models (LLMs), but it still suffers from catastrophic forgetting. Recent work has shown that specialized LoRA initialization can alleviate catastrophic forgetting. There are currently two approaches to LoRA initialization aimed at preventing knowledge forgetting during fine-tuning: (1) making residual weights close to pre-trained weights, and (2) ensuring the space of LoRA initialization is orthogonal to pre-trained knowledge. The former is what current methods strive to achieve, while the importance of the latter is not sufficiently recognized. We find that the space of LoRA initialization is the key to preserving pre-trained knowledge rather than the residual weights. Existing methods like MiLoRA propose making the LoRA initialization space orthogonal to pre-trained weights. However, MiLoRA utilizes the null space of pre-trained weights. Compared to pre-trained weights, the input activations of pre-trained knowledge take into account the parameters of all previous layers as well as the input data, while pre-trained weights only contain information from the current layer. Moreover, we find that the effective ranks of input activations are much smaller than those of pre-trained weights. Thus, the null space of activations is more accurate and contains less pre-trained knowledge information compared to that of weights. Based on these, we introduce LoRA-Null, our proposed method that initializes LoRA in the null space of activations. Experimental results show that LoRA-Null effectively preserves the pre-trained world knowledge of LLMs while achieving good fine-tuning performance, as evidenced by extensive experiments. Code is available at {https://github.com/HungerPWAY/LoRA-Null}.

LoRA知识保留微调

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。