arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2408.11869cs.CLcs.AIcs.LG
收藏

ELDER: 用LoRA混合增强终身模型编辑

ELDER: Enhancing Lifelong Model Editing with Mixture-of-LoRA

University of Science and Technology of China(中国科学技术大学);Beijing University of Posts and Telecommunications(北京邮电大学)

Jiaang Li, Quan Wang, Zhongnan Wang, Yongdong Zhang, Zhendong Mao

AI总结:

针对终身模型编辑场景下现有方法遗忘严重、对输入变化鲁棒性差的问题,提出基于路由网络整合多LoRA的ELDER方法,搭配新型损失与延迟机制,在多个模型上优于8个基线,兼具编辑效果、可扩展性与通用能力保留性。

摘要:

大语言模型(LLMs)需要模型编辑来高效更新其中的特定知识,避免事实性错误。大多数模型编辑方法仅为单次使用设计,在需要随时间进行序列编辑的终身编辑场景中会产生严重的遗忘效应。此前的方法通过冻结原始参数、为每次知识更新离散分配新参数来处理序列编辑,但由于数据与参数之间的离散映射,这些方法对输入的微小变化缺乏鲁棒性。为克服这一挑战,我们提出ELDER——一种在数据与适配器之间建立连续关联的新方法。ELDER通过路由网络整合多个LoRA(低秩适配),经训练建立平滑的数据-适配器关联,从而提升编辑鲁棒性以及对语义等价输入的泛化能力。为确保包含相同知识的输入由相同的LoRA处理,我们设计了一种新的损失函数,引导模型将LoRA分配与编辑知识关联起来。此外,我们提出一种延迟机制,以在编辑后保留LLM的原有能力。在GPT-2 XL和LLaMA2-7B上开展的大量实验表明,ELDER在终身设置下能有效编辑模型,性能优于8个基线方法,同时展现出强可扩展性,且能保留LLM在下游任务上的通用能力。我们的代码可在https://github.com/JiaangL/ELDER 获取。

英文摘要:

Large language models (LLMs) require model editing to efficiently update specific knowledge within them and avoid factual errors. Most model editing methods are solely designed for single-time use and result in a significant forgetting effect in lifelong editing scenarios, where sequential edits are conducted over time. Previous approaches manage sequential edits by freezing original parameters and discretely allocating new parameters for each knowledge update. However, these methods lack robustness to minor input variations due to the discrete mapping between data and parameters. To overcome this challenge, we propose ELDER, a novel approach to create a continuous association between data and adapters. ELDER integrates multiple LoRAs through a router network and is trained to establish a smooth data-adapter association, thereby enhancing the edit robustness and generalization of semantically equivalent inputs. To ensure inputs containing the same knowledge will be processed by the same LoRAs, we design a novel loss to guide the model link LoRA allocations with edit knowledge. Furthermore, we propose a deferral mechanism to retain the original LLM capabilities post-edit. Extensive experiments on GPT-2 XL and LLaMA2-7B demonstrate that ELDER effectively edits models in the lifelong setting, outperforming eight baselines while exhibiting strong scalability and preserving LLMs' general abilities on downstream tasks. Our code is available at https://github.com/JiaangL/ELDER.

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

↑