mlsanityData to 7 Oct 2026

How to Make LLMs Forget: On Reversing In-Context Knowledge Edits

arXiv 2410.12586 ↗First posted 16 Oct 2024cs.CLcited by 9

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

  1. 2014Neural Machine Translation by Jointly Learning to Align and Translatecited by 4,530
  2. 2021Prefix-Tuning: Optimizing Continuous Prompts for Generationcited by 3,878
  3. 2021The Power of Scale for Parameter-Efficient Prompt Tuningcited by 3,769
  4. 2022Locating and Editing Factual Associations in GPTcited by 2,609
  5. 2019Machine Unlearningcited by 1,020
  6. 2022Mass-Editing Memory in a Transformercited by 976
  7. 2019Universal Adversarial Triggers for Attacking and Analyzing NLPcited by 709
  8. 2021Editing Factual Knowledge in Language Modelscited by 548
  9. 2022Transformer Feed-Forward Layers Build Predictions by Promoting Concepts in the Vocabulary Spacecited by 522
  10. 2022Memory-Based Model Editing at Scalecited by 443
  11. 2020How Can We Know When Language Models Know? On the Calibration of Language Models for Question Answeringcited by 439
  12. 2022Knowledge Unlearning for Mitigating Privacy Risks in Language Modelscited by 424
15 more
  1. 2023MQuAKE: Assessing Knowledge Editing in Language Models via Multi-Hop Questionscited by 292
  2. 2023Can We Edit Factual Knowledge by In-Context Learning?cited by 284
  3. 2023Evaluating the Ripple Effects of Knowledge Editing in Language Modelscited by 238
  4. 2023Unlearn What You Want to Forget: Efficient Unlearning for LLMscited by 211
  5. 2023KGA: A General Machine Unlearning Framework Based on Knowledge Gap Alignmentcited by 94
  6. 2024BadEdit: Backdooring large language models by model editingcited by 84
  7. 2024Flooding Spread of Manipulated Knowledge in LLM-Based Multi-Agent Communitiescited by 84
  8. 2021BERTese: Learning to Speak to BERTcited by 82
  9. 2023Inseq: An Interpretability Toolkit for Sequence Generation Modelscited by 78
  10. 2023Give Me the Facts! A Survey on Factual Knowledge Probing in Pre-trained Language Modelscited by 32
  11. 2024Sowing the Wind, Reaping the Whirlwind: The Impact of Editing Language Modelscited by 20
  12. 2024Has this Fact been Edited? Detecting Knowledge Edits in Language Modelscited by 14
  13. 2024The Queen of England is not England's Queen: On the Lack of Factual Coherency in PLMscited by 7
  14. 2024MEGen: Generative Backdoor into Large Language Models via Model Editingcited by 5
  15. 2024"Flex Tape Can't Fix That": Bias and Misinformation in Edited Language Modelscited by 4

Built on by

Cited by year (2026 to 7 Oct)

Citing papers per year: 2025: 4; 2026: 5.

9 papers.