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

大型语言模型的鲁棒且可扩展的模型编辑

Robust and Scalable Model Editing for Large Language Models

Tsinghua University(清华大学);Tencent Machine Learning Platform(腾讯机器学习平台);Shanghai Artificial Intelligence Laboratory(上海人工智能实验室)

Yingfa Chen, Zhengyan Zhang, Xu Han, Chaojun Xiao, Zhiyuan Liu, Chen Chen, Kuai Li, Tao Yang, Maosong Sun

AI总结:

本研究发现指令微调LLMs可通过提示方法受上下文知识控制并对不相关上下文鲁棒,据此提出EREN方法,通过上下文编辑提升模型编辑的可扩展性与鲁棒性,在新构建的高难度数据集上大幅超越现有方法。

摘要:

大型语言模型(LLMs)可以使用参数知识——编码在模型权重中的知识——或上下文知识——在上下文中呈现的知识——来进行预测。在许多场景中,理想的行为是当上下文知识与参数知识冲突时,LLMs优先考虑上下文知识,并在上下文不相关时回退到使用其参数知识。这使得可以通过上下文编辑而不是重新训练来更新和纠正模型的知识。先前的工作表明,LLMs倾向于忽略上下文知识,并在面对不相关上下文时无法可靠地回退到参数知识。在这项工作中,我们发现,通过适当的提示方法,经过指令微调的LLMs可以高度受上下文知识控制,并对不相关上下文具有鲁棒性。利用这一特性,我们提出了EREN(Edit models by REading Notes,通过阅读笔记编辑模型)来提高LLM编辑的可扩展性和鲁棒性。为了更好地评估模型编辑器的鲁棒性,我们收集了一个新数据集,其中包含比现有数据集中更具挑战性的不相关问题。实证结果表明,我们的方法大幅优于当前最先进的方法。与现有技术不同,它可以整合来自多次编辑的知识,并正确响应句法相似但语义无关的输入(反之亦然)。源代码可在 https://github.com/thunlp/EREN 找到。

英文摘要:

Large language models (LLMs) can make predictions using parametric knowledge--knowledge encoded in the model weights--or contextual knowledge--knowledge presented in the context. In many scenarios, a desirable behavior is that LLMs give precedence to contextual knowledge when it conflicts with the parametric knowledge, and fall back to using their parametric knowledge when the context is irrelevant. This enables updating and correcting the model's knowledge by in-context editing instead of retraining. Previous works have shown that LLMs are inclined to ignore contextual knowledge and fail to reliably fall back to parametric knowledge when presented with irrelevant context. In this work, we discover that, with proper prompting methods, instruction-finetuned LLMs can be highly controllable by contextual knowledge and robust to irrelevant context. Utilizing this feature, we propose EREN (Edit models by REading Notes) to improve the scalability and robustness of LLM editing. To better evaluate the robustness of model editors, we collect a new dataset, that contains irrelevant questions that are more challenging than the ones in existing datasets. Empirical results show that our method outperforms current state-of-the-art methods by a large margin. Unlike existing techniques, it can integrate knowledge from multiple edits, and correctly respond to syntactically similar but semantically unrelated inputs (and vice versa). The source code can be found at https://github.com/thunlp/EREN.

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

↑