arXivDaily arXiv每日学术速递 周一至周五更新
北美退伍军人节(Veterans Day),12 日无更新
arXiv 2409.19611cs.CL
收藏

面向语言模型持续学习的注意力混合低秩适配器学习方法

Learning Attentional Mixture of LoRAs for Language Model Continual Learning

Nankai University(南开大学)

Jialin Liu, Jianhua Wu, Jie Liu, Yutai Duan

AI总结:

本文提出AM-LoRA方法,通过注意力机制自适应混合多个LoRA模块,并引入L1稀疏约束减少相互干扰,以缓解大语言模型持续学习中的灾难性遗忘问题。

摘要:

使用低秩适配(LoRA)微调大语言模型(LLMs)被广泛认为是一种面向新任务持续学习的有效方法。然而,当顺序处理多个任务时,它常常遭受灾难性遗忘。为此,我们提出了注意力混合LoRA(AM-LoRA),这是一种专为大语言模型设计的持续学习方法。具体而言,AM-LoRA针对一系列任务学习一组LoRA序列,以持续地从不同任务中获取知识。我们方法的关键在于设计了一种注意力机制作为知识混合模块,以自适应地整合来自每个LoRA的信息。借助该注意力机制,AM-LoRA能够高效地利用每个LoRA的独特贡献,同时降低它们之间可能引发灾难性遗忘的相互负向干扰风险。此外,我们进一步在学习过程中引入$L1$范数,使注意力向量更加稀疏。稀疏约束能够促使模型倾向于选择少数高度相关的LoRA,而不是集体聚合和加权所有LoRA,从而进一步减少相互干扰带来的影响。在持续学习基准上的实验结果表明了我们所提方法的优越性。

英文摘要:

Fine-tuning large language models (LLMs) with Low-Rank adaption (LoRA) is widely acknowledged as an effective approach for continual learning for new tasks. However, it often suffers from catastrophic forgetting when dealing with multiple tasks sequentially. To this end, we propose Attentional Mixture of LoRAs (AM-LoRA), a continual learning approach tailored for LLMs. Specifically, AM-LoRA learns a sequence of LoRAs for a series of tasks to continually learn knowledge from different tasks. The key of our approach is that we devise an attention mechanism as a knowledge mixture module to adaptively integrate information from each LoRA. With the attention mechanism, AM-LoRA can efficiently leverage the distinctive contributions of each LoRA, while mitigating the risk of mutually negative interactions among them that may lead to catastrophic forgetting. Moreover, we further introduce $L1$ norm in the learning process to make the attention vector more sparse. The sparse constraints can enable the model to lean towards selecting a few highly relevant LoRAs, rather than aggregating and weighting all LoRAs collectively, which can further reduce the impact stemming from mutual interference. Experimental results on continual learning benchmarks indicate the superiority of our proposed method.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑