How to Make LLMs Forget: On Reversing In-Context Knowledge Edits
Not on the map. Why?
Abstract (arXiv)
In-context knowledge editing (IKE) enables efficient modification of large language model (LLM) outputs without parameter changes and at zero-cost. However, it can be misused to manipulate responses opaquely, e.g., insert misinformation or offensive content. Such malicious interventions could be incorporated into high-level wrapped APIs where the final input prompt is not shown to end-users. To address this issue, we investigate the detection and reversal of IKE-edits. First, we demonstrate that IKE-edits can be detected with high accuracy (F1 > 80%) using only the top-10 output probabilities of the next token, even in a black-box setting, e.g. proprietary LLMs with limited output information. Further, we introduce the novel task of reversing IKE-edits using specially tuned reversal tokens. We explore using both continuous and discrete reversal tokens, achieving over 80% accuracy in recovering original, unedited outputs across multiple LLMs. Our continuous reversal tokens prove particularly effective, with minimal impact on unedited prompts. Through analysis of output distributions, attention patterns, and token rankings, we provide insights into IKE's effects on LLMs and how reversal tokens mitigate them. This work represents a significant step towards enhancing LLM resilience against potential misuse of in-context editing, improving their transparency and trustworthiness.
Key facts. Cited by 9 papers in the map (data through 7 Oct 2026). Builds on 27 of its 47 references that are in the map. First posted on arXiv 16 Oct 2024.
Builds on
27 of 47 references.
References · 27
- 2014Neural Machine Translation by Jointly Learning to Align and Translatecited by 4,530
- 2021Prefix-Tuning: Optimizing Continuous Prompts for Generationcited by 3,878
- 2021The Power of Scale for Parameter-Efficient Prompt Tuningcited by 3,769
- 2022Locating and Editing Factual Associations in GPTcited by 2,609
- 2019Machine Unlearningcited by 1,020
- 2022Mass-Editing Memory in a Transformercited by 976
- 2019Universal Adversarial Triggers for Attacking and Analyzing NLPcited by 709
- 2021Editing Factual Knowledge in Language Modelscited by 548
- 2022Transformer Feed-Forward Layers Build Predictions by Promoting Concepts in the Vocabulary Spacecited by 522
- 2022Memory-Based Model Editing at Scalecited by 443
- 2020How Can We Know When Language Models Know? On the Calibration of Language Models for Question Answeringcited by 439
- 2022Knowledge Unlearning for Mitigating Privacy Risks in Language Modelscited by 424
15 more
- 2023MQuAKE: Assessing Knowledge Editing in Language Models via Multi-Hop Questionscited by 292
- 2023Can We Edit Factual Knowledge by In-Context Learning?cited by 284
- 2023Evaluating the Ripple Effects of Knowledge Editing in Language Modelscited by 238
- 2023Unlearn What You Want to Forget: Efficient Unlearning for LLMscited by 211
- 2023KGA: A General Machine Unlearning Framework Based on Knowledge Gap Alignmentcited by 94
- 2024BadEdit: Backdooring large language models by model editingcited by 84
- 2024Flooding Spread of Manipulated Knowledge in LLM-Based Multi-Agent Communitiescited by 84
- 2021BERTese: Learning to Speak to BERTcited by 82
- 2023Inseq: An Interpretability Toolkit for Sequence Generation Modelscited by 78
- 2023Give Me the Facts! A Survey on Factual Knowledge Probing in Pre-trained Language Modelscited by 32
- 2024Sowing the Wind, Reaping the Whirlwind: The Impact of Editing Language Modelscited by 20
- 2024Has this Fact been Edited? Detecting Knowledge Edits in Language Modelscited by 14
- 2024The Queen of England is not England's Queen: On the Lack of Factual Coherency in PLMscited by 7
- 2024MEGen: Generative Backdoor into Large Language Models via Model Editingcited by 5
- 2024"Flex Tape Can't Fix That": Bias and Misinformation in Edited Language Modelscited by 4
Built on by
Citing papers per year: 2025: 4; 2026: 5.
9 papers.
- 2025Position: Editing Large Language Models Poses Serious Safety Riskscited by 15
- 2025UltraEdit: Training-, Subject-, and Memory-Free Lifelong Editing in Language Modelscited by 7
- 2025Tracing and Reversing Edits in LLMscited by 7
- 2026Are We Evaluating the Edit Locality of LLM Model Editing Properly?cited by 4
- 2025Can Fine-Tuning Erase Your Edits? On the Fragile Coexistence of Knowledge Editing and Adaptationcited by 2
- 2026From Backward Spreading to Forward Replay: Revisiting Target Construction in LLM Parameter Editingcited by 1
- 2026Towards Reliable, Generalizable, and Specific In-Context Knowledge Editing via Multi-Objective Reinforcement Learningcited by 1
- 2026Implicit Reasoning Steering via Concept Chainingcited by 0
- 2026Selective Knowledge Edit Reversal via Gated Singular Vector Shrinkagecited by 0
- 2026Selective Knowledge Edit Reversal via Gated Singular Vector Shrinkage2 Sep 2026
- 2026Towards Reliable, Generalizable, and Specific In-Context Knowledge Editing via Multi-Objective Reinforcement Learning25 Aug 2026
- 2026Implicit Reasoning Steering via Concept Chaining15 Jul 2026
- 2026From Backward Spreading to Forward Replay: Revisiting Target Construction in LLM Parameter Editing1 May 2026
- 2026Are We Evaluating the Edit Locality of LLM Model Editing Properly?24 Jan 2026
- 2025Can Fine-Tuning Erase Your Edits? On the Fragile Coexistence of Knowledge Editing and Adaptation8 Nov 2025
- 2025Tracing and Reversing Edits in LLMs27 May 2025
- 2025UltraEdit: Training-, Subject-, and Memory-Free Lifelong Editing in Language Models20 May 2025
- 2025Position: Editing Large Language Models Poses Serious Safety Risks5 Feb 2025