Can We Edit Factual Knowledge by In-Context Learning?
Ce Zheng, Lei Li, Qingxiu Dong, Yuxuan Fan, Zhiyong Wu, Jingjing Xu, Baobao Chang
摘要
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 outdated. 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/pkunlp-icler/IKE.
问 Lune
几分钟读透这篇 Paper,不用再花一下午。
Lune 能读完全文,也能读引用它的顶会 Paper,讲清它的结论、证据和局限,每一点都注明出自哪篇 Paper。不用硬啃,也不靠猜。
已有 109 篇顶会 Paper 引用了它。别等审稿人问起,先弄清它们发现了什么。
脉络
- Knowledge Boundary of Large Language Models: A Survey 引用了 Fantastically Ordered Prompts and Where to Find Them: Overcoming Few-Shot Prompt Order Sensitivity
- Knowledge Boundary of Large Language Models: A Survey 引用了 WISE: Rethinking the Knowledge Memory for Lifelong Model Editing of Large Language Models
- Fantastically Ordered Prompts and Where to Find Them: Overcoming Few-Shot Prompt Order Sensitivity 引用了 Language Models are Few-Shot Learners
- Fantastically Ordered Prompts and Where to Find Them: Overcoming Few-Shot Prompt Order Sensitivity 引用了 Calibrate Before Use: Improving Few-shot Performance of Language Models
- Fast Model Editing at Scale 引用了 Language Models are Few-Shot Learners
- Editing Large Language Models: Problems, Methods, and Opportunities 引用了 Language Models are Few-Shot Learners
- Larimar: Large Language Models with Episodic Memory Control 引用了 Fast Model Editing at Scale
- Larimar: Large Language Models with Episodic Memory Control 引用了 Editing Large Language Models: Problems, Methods, and Opportunities
- WISE: Rethinking the Knowledge Memory for Lifelong Model Editing of Large Language Models 引用了 Fast Model Editing at Scale
- WISE: Rethinking the Knowledge Memory for Lifelong Model Editing of Large Language Models 引用了 Language Models are Few-Shot Learners
- WISE: Rethinking the Knowledge Memory for Lifelong Model Editing of Large Language Models 引用了 Editing Large Language Models: Problems, Methods, and Opportunities
- PMET: Precise Model Editing in a Transformer 引用了 Editing Large Language Models: Problems, Methods, and Opportunities
- Calibrate Before Use: Improving Few-shot Performance of Language Models 引用了 Language Models are Few-Shot Learners
引用它的顶会 Paper109
- PMET: Precise Model Editing in a TransformerXiaopeng Li, Shasha Li, Shezheng Song, Jing Yang 等AAAI 2024 · 208 次引用
- WISE: Rethinking the Knowledge Memory for Lifelong Model Editing of Large Language ModelsPeng Wang, Zexi Li, Ningyu Zhang, Ziwen Xu 等NeurIPS 2024 · 125 次引用
- Editing Large Language Models: Problems, Methods, and OpportunitiesYunzhi Yao, Peng Wang, Bozhong Tian, Siyuan Cheng 等EMNLP 2023 · 83 次引用
- Larimar: Large Language Models with Episodic Memory ControlPayel Das, Subhajit Chaudhury, Elliot Nelson, Igor Melnyk 等ICML 2024 · 37 次引用
- Knowledge Boundary of Large Language Models: A SurveyMoxin Li, Yong Zhao, Wenxuan Zhang, Shuaiyi Li 等ACL 2025 · 33 次引用
它引用的 Paper11
- Language Models are Few-Shot LearnersTom B. Brown, Benjamin Mann, Nick Ryder, Melanie Subbiah 等NeurIPS 2020 · 64,255 次引用
- Calibrate Before Use: Improving Few-shot Performance of Language ModelsZihao Zhao, Eric Wallace, Shi Feng, Dan Klein 等ICML 2021 · 1,843 次引用
- Fantastically Ordered Prompts and Where to Find Them: Overcoming Few-Shot Prompt Order SensitivityYao Lu, Max Bartolo, Alastair Moore, Sebastian Riedel 等ACL 2022 · 1,494 次引用
- RealToxicityPrompts: Evaluating Neural Toxic Degeneration in Language ModelsSamuel Gehman, Suchin Gururangan, Maarten Sap, Yejin Choi 等EMNLP Findings 2020 · 692 次引用
- Fast Model Editing at ScaleEric Mitchell, Charles Lin, Antoine Bosselut, Chelsea Finn 等ICLR 2022 · 527 次引用
相关 Paper
- Dynamic Retriever for In-Context Knowledge Editing via Policy OptimizationMahmud Wasif Nafee, Maiqi Jiang, Haipeng Chen, Yanfu ZhangEMNLP 2025 · 3 次引用
- The Model Agreed, But Didn't Learn: Diagnosing Surface Compliance in Large Language ModelsXiaojie Gu, Ziying Huang, Weicong Hong, Jian Xie 等ACL Findings 2026
- Scaling Knowledge Editing in LLMs to 100, 000 Facts with Neural KV DatabaseWeizhi Fei, Hao Shi, Jing Xu, Jingchen Peng 等ICLR 2026 · 2 次引用
- Knowledge Editing through Chain-of-ThoughtChangyue Wang, Weihang Su, Qingyao Ai, Yichen Tang 等EMNLP 2025 · 2 次引用
- Forget for Get: A Lightweight Two-phase Gradient Method for Knowledge Editing in Large Language ModelsYanhong Li, Min Yang, Xiping Hu, Chengming LiEMNLP Findings 2025
