通过基于指令的思考链提示学习知识编辑
Learning to Edit Knowledge via Instruction-based Chain-of-Thought Prompting
AI总结:
本文提出CoT2Edit方法,通过思考链推理提升大语言模型的知识编辑能力,解决泛化差和范围窄的问题,实验显示在六个场景中表现优异。
摘要:
大型语言模型(LLMs)可通过知识编辑处理过时信息,但现有方法存在两大局限:(I)泛化能力差,多数方法机械注入新知识而无法有效解决问题;(II)范围狭窄,现有方法主要处理结构化事实三元组,忽视现实世界中多样化的非结构化事实信息(如新闻、文章)。为解决这些问题,我们提出新的范式:通过思考链推理(CoTs)教学LLM进行知识编辑(CoT2Edit)。我们首先利用语言模型代理生成结构化和非结构化编辑数据的CoTs,构建高质量指令数据。然后通过监督微调(SFT)和组相对策略优化(GRPO)训练模型进行编辑知识推理。在推理阶段,我们整合检索增强生成(RAG)动态检索相关编辑事实进行实时知识编辑。实验结果表明,我们的方法在六个多样化的知识编辑场景中仅通过一次训练即可实现强大的泛化能力。代码可在https://github.com/FredJDean/CoT2Edit获取。
英文摘要:
Large language models (LLMs) can effectively handle outdated information through knowledge editing. However, current approaches face two key limitations: (I) Poor generalization: Most approaches rigidly inject new knowledge without ensuring that the model can use it effectively to solve practical problems. (II) Narrow scope: Current methods focus primarily on structured fact triples, overlooking the diverse unstructured forms of factual information (e.g., news, articles) prevalent in real-world contexts. To address these challenges, we propose a new paradigm: teaching LLMs to edit knowledge via Chain of Thoughts (CoTs) reasoning (CoT2Edit). We first leverage language model agents for both structured and unstructured edited data to generate CoTs, building high-quality instruction data. The model is then trained to reason over edited knowledge through supervised fine-tuning (SFT) and Group Relative Policy Optimization (GRPO). At inference time, we integrate Retrieval-Augmented Generation (RAG) to dynamically retrieve relevant edited facts for real-time knowledge editing. Experimental results demonstrate that our method achieves strong generalization across six diverse knowledge editing scenarios with just a single round of training on three open-source language models. The codes are available at https://github.com/FredJDean/CoT2Edit.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。