Can We Edit Factual Knowledge by In-Context Learning?

05/22/2023
by   Ce Zheng, et al.
0

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.

READ FULL TEXT

page 1

page 2

page 3

page 4

research
08/14/2023

EasyEdit: An Easy-to-use Knowledge Editing Framework for Large Language Models

Large Language Models (LLMs) usually suffer from knowledge cutoff or fal...
research
01/10/2023

Does Localization Inform Editing? Surprising Differences in Causality-Based Localization vs. Knowledge Editing in Language Models

Language models are known to learn a great quantity of factual informati...
research
06/15/2023

Propagating Knowledge Updates to LMs Through Distillation

Modern language models have the capacity to store and use immense amount...
research
01/25/2023

Editing Language Model-based Knowledge Graph Embeddings

Recently decades have witnessed the empirical success of framing Knowled...
research
07/24/2023

Evaluating the Ripple Effects of Knowledge Editing in Language Models

Modern language models capture a large body of factual knowledge. Howeve...
research
05/02/2023

Can LMs Learn New Entities from Descriptions? Challenges in Propagating Injected Knowledge

Pre-trained language models (LMs) are used for knowledge intensive tasks...
research
05/24/2023

Editing Commonsense Knowledge in GPT

Memory editing methods for updating encyclopedic knowledge in transforme...

Please sign up or login with your details

Forgot password? Click here to reset