提出Learning to Edit(LTE)框架,通过两阶段过程教导LLMs将更新知识应用于输入问题,在多基准与架构上展现出优越的知识编辑性能、鲁棒性与低干扰。
摘要:
知识编辑技术旨在高效修改大型语言模型(LLMs)中的小部分知识,同时不负面影响其他输入上的性能,已引起广泛关注。然而,现有方法主要依赖于记忆更新后的知识,阻碍了LLMs在回答问题时将新知识与其固有知识有效结合。为此,我们提出了一种Learning to Edit(LTE)框架,受“授人以渔”理念启发,专注于教导LLMs将更新后的知识应用于输入问题。LTE包含两阶段过程:对齐阶段在精心整理的平行数据集上微调LLMs,以进行可靠的范围内编辑,同时保留范围外信息和语言能力;推理阶段采用基于检索的机制,实现实时和大规模知识编辑。通过在四个流行的知识编辑基准和两种LLM架构上与七种先进基线方法比较,我们证明了LTE在知识编辑性能上的优越性,在批量与序列编辑中的鲁棒性,对一般任务的极小干扰,以及快速的编辑速度。数据和代码可在https://github.com/YJiangcm/LTE获取。
英文摘要:
Knowledge editing techniques, aiming to efficiently modify a minor proportion of knowledge in large language models (LLMs) without negatively impacting performance across other inputs, have garnered widespread attention. However, existing methods predominantly rely on memorizing the updated knowledge, impeding LLMs from effectively combining the new knowledge with their inherent knowledge when answering questions. To this end, we propose a Learning to Edit (LTE) framework, focusing on teaching LLMs to apply updated knowledge into input questions, inspired by the philosophy of "Teach a man to fish." LTE features a two-phase process: (i) the Alignment Phase, which fine-tunes LLMs on a meticulously curated parallel dataset to make reliable, in-scope edits while preserving out-of-scope information and linguistic proficiency; and (ii) the Inference Phase, which employs a retrieval-based mechanism for real-time and mass knowledge editing. By comparing our approach with seven advanced baselines across four popular knowledge editing benchmarks and two LLM architectures, we demonstrate LTE's superiority in knowledge editing performance, robustness in both batch and sequential editing, minimal interference on general tasks, and rapid editing speeds. The data and code are available at https://github.com/YJiangcm/LTE.
Knowledge in Superposition: Unveiling the Failures of Lifelong Knowledge Editing for Large Language Models
Institute of Automation, Chinese Academy of Sciences(中国科学院自动化研究所);School of Artificial Intelligence, University of Chinese Academy of Sciences(中国科学院大学人工智能学院)
National Engineering Research Center of Speech and Language Information Processing(语音与语言信息处理国家级工程研究中心);University of Science and Technology of China(中国科学技术大学);iFLYTEK Research(iFLYTEK研究院);University of California, Los Angeles(美国加州大学洛杉矶分校)
Uncovering Overfitting in Large Language Model Editing
Shandong University(山东大学);School of Computer Science, Beijing University of Posts and Telecommunications(北京邮电大学计算机学院);New Laboratory of Pattern Recognition (NLPR) State Key Laboratory of Multimodal Artificial Intelligence Systems (MAIS) Institute of Automation, Chinese Academy of Sciences(中国科学院自动化研究所)
LyapLock: Bounded Knowledge Preservation in Sequential Large Language Model Editing
Institute of Information Engineering, Chinese Academy of Sciences(中国科学院信息工程研究所);School of Cyber Security, University of Chinese Academy of Sciences(中国科学院大学网络空间安全学院)
Knowledge Graph Enhanced Large Language Model Editing
School of Computer Science and Technology, Shandong University(山东大学计算机科学与技术学院);School of Computer Science, Beijing University of Posts and Telecommunications(北京邮电大学计算机学院)
Orthogonal Representation Editing: Decoupling Semantic Entanglement in Batch Knowledge Editing of LLMs
School of Computer Science and Technology, Tianjin University(天津大学计算机科学与技术学院);Kexin Technology(可心科技);University of Chinese Academy of Sciences(中国科学院大学);Tencent Hunyuan(腾讯混元);College of Computer Science, Chongqing University(重庆大学计算机学院)
Potential and Challenges of Model Editing for Social Debiasing
Zhejiang University School of Engineering(浙江大学工程学院);Westlake University(西湖大学);Institute of Advanced Technology, Westlake Institute for Advanced Study(西湖高等研究院先进技术研究所)
Edit Less, Achieve More: Dynamic Sparse Neuron Masking for Lifelong Knowledge Editing in LLMs
Key Lab of Intell. Info. Process., Inst. of Comput. Tech., CAS(智能信息处理重点实验室,计算技术研究所,中国科学院);University of Chinese Academy of Sciences(中国科学院大学);Agriculture Information Institute, CAAS(农业信息研究所,中国农业科学院)
Constraining Sequential Model Editing with Editing Anchor Compression
National Engineering Research Center of Speech and Language Information Processing, University of Science and Technology of China(中国科学技术大学语音及语言信息处理国家工程研究中心);Zhejiang University(浙江大学);University of California, Los Angeles(加利福尼亚大学洛杉矶分校)
Reasons and Solutions for the Decline in Model Performance after Editing
School of Artificial Intelligence, University of Chinese Academy of Sciences(中国科学院大学人工智能学院);Beijing Academy of Artificial Intelligence(北京人工智能研究院);Institute of Automation, Chinese Academy of Sciences(中国科学院自动化研究所)
Aligning Language Models with Real-time Knowledge Editing
National Key Laboratory for Multimedia Information Processing, Peking University School of Computer Science, Peking University(国家多媒体信息处理重点实验室,北京大学计算机学院,北京大学)