Can We Edit Factual Knowledge by In-Context Learning?
By Ce Zheng, Lei Li, Qingxiu Dong, Yuxuan Fan, Zhiyong Wu, Jingjing Xu, Baobao Chang. Conference on Empirical Methods in Natural Language Processing, 2023
356 citations recorded by the source corpus.
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.
Subfields: Artificial Intelligence
View Paper: https://www.semanticscholar.org/paper/ff2a0fb125e7f03428420230c6ecbeafd4cf07a8
Citations in the corpus
- A Survey on In-context Learning (2022, unknown): “In a comprehensive study, Zheng et al. (2023) investigated ICL strategies for editing factual knowledge, finding that well-designed demonstrations enabled competitive success rates compared to gradient-based methods, with significantly fewer side effects.”
- Rethinking machine unlearning for large language models (2024, unknown): “Thus, existing memory-based model editing techniques (Li et al., 2022; Mitchell et al., 2022; Madaan et al., 2022; Zheng et al., 2023) focus on updating short-term working memory instead of altering the long-term memory encapsulated in the model’s weights.”
- Editing Large Language Models: Problems, Methods, and Opportunities (2023, unknown): “An exception is IKE, whose performance remains relatively stable due to the fact that it inherently requires the edited fact to be concatenated before the input.”
- Siren's Song in the AI Ocean: A Survey on Hallucination in Large Language Models (2023, unknown): “These could include editing black-box LLMs (Murty et al., 2022), in-context model editing (Zheng et al., 2023a), and multi-hop model editing (Zhong et al., 2023), etc. Attack/defense for inducing hallucination As previously discussed, significant efforts have been undertaken by both researchers and…”