arXivDaily arXiv每日学术速递 周一至周五更新
arXiv周末暂无论文更新,休息一下吧,周末愉快~~
arXiv 2305.12740cs.CL
收藏

我们能否通过上下文学习编辑事实知识?

Can We Edit Factual Knowledge by In-Context Learning?

Peking University(北京大学);Shanghai Artificial Intelligence Laboratory(上海人工智能实验室)

Ce Zheng, Lei Li, Qingxiu Dong, Yuxuan Fan, Zhiyong Wu, Jingjing Xu, Baobao Chang

AI总结:

针对大型语言模型事实知识过时且传统梯度编辑方法计算成本高的问题,提出基于上下文学习的上下文知识编辑(IKE)方法,无需参数更新即可在GPT-J等模型上取得相当成功率且副作用更少,具备良好可扩展性。

摘要:

先前的研究表明,诸如GPTs的大型语言模型(LLMs)在其参数中存储了大量事实知识。然而,所存储的知识可能是错误或过时的。传统的知识编辑方法通过在包含特定知识的文本上进行微调来改进LLMs。然而,随着LLMs规模的不断增大,这些基于梯度的方法带来了巨大的计算成本。模型即服务的趋势也使得在黑盒语言模型中修改知识成为不可能。受上下文学习(ICL)的启发——这是一种基于演示上下文且无需参数更新的新范式,我们探索了ICL能否编辑事实知识。为了回答这个问题,我们对ICL策略进行了全面的实证研究。实验表明,在没有任何梯度和参数更新的情况下,上下文知识编辑(IKE)在GPT-J(6B)上取得了与基于梯度方法相当的成功率,且副作用更少,包括对相似但不相关事实的过度编辑更少,以及对先前存储知识的遗忘更少。我们还将该方法应用于具有数百亿参数的更大语言模型,如OPT-175B,这展示了我们方法的可扩展性。代码可在https://github.com/Zce1112zslx/IKE获取。

英文摘要:

Previous studies have shown that large language models (LLMs) like GPTs store massive factual knowledge in their parameters. However, the stored knowledge could be false or out-dated. Traditional knowledge editing methods refine LLMs via fine-tuning on texts containing specific knowledge. However, with the increasing scales of LLMs, these gradient-based approaches bring large computation costs. The trend of model-as-a-service also makes it impossible to modify knowledge in black-box LMs. Inspired by in-context learning (ICL), a new paradigm based on demonstration contexts without parameter updating, we explore whether ICL can edit factual knowledge. To answer this question, we give a comprehensive empirical study of ICL strategies. Experiments show that in-context knowledge editing (IKE), without any gradient and parameter updating, achieves a competitive success rate compared to gradient-based methods on GPT-J (6B) but with much fewer side effects, including less over-editing on similar but unrelated facts and less knowledge forgetting on previously stored knowledge. We also apply the method to larger LMs with tens or hundreds of parameters like OPT-175B, which shows the scalability of our method. The code is available at https://github.com/Zce1112zslx/IKE.

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

↑