mlsanityData to 7 Oct 2026

Fast Exact Unlearning for In-Context Learning Data for LLMs

arXiv 2402.00751 ↗First posted 1 Feb 2024cs.LG cs.AI cs.CRcited by 33

On the map: LLM safety and security → Machine unlearning

Abstract (arXiv)

Modern machine learning models are expensive to train, and there is a growing concern about the challenge of retroactively removing specific training data. Achieving exact unlearning in deep learning pipelines--producing models as if certain data had never been included in training--remains an open problem. In this paper, we revisit exact unlearning in deep learning and show that for large language models (LLMs) we can efficiently exactly unlearn "fine-tuning data" (the data used to adapt a pre-trained model). This follows from two observations. First, we can use in-context learning to adapt the LLM to the fine-tuning dataset instead of SGD based algorithms. Second, we show that accurate in-context learning can be done with quantized k-means, which allows for effectively constant time unlearning operations. Our evaluation shows that this unlearning recipe has similar performance to fine-tuning alternatives, but vastly reduces the unlearning costs. Our study also highlights the need for new measures of unlearning cost when adapting the learning algorithm to have faster unlearn operations.

Key facts. Cited by 33 papers in the map (data through 7 Oct 2026). Placed in Machine unlearning, one of 12 directions in LLM safety and security. Builds on 28 of its 39 references that are in the map. First posted on arXiv 1 Feb 2024.

Builds on

28 of 39 references.

Closest ancestors · 8

Same direction, newest first

  1. 2023Unlearn What You Want to Forget: Efficient Unlearning for LLMs31 Oct
  2. 2023Large Language Model Unlearning14 Oct
  3. 2023In-Context Unlearning: Language Models as Few Shot Unlearners11 Oct
  4. 2023Who's Harry Potter? Approximate Unlearning in LLMs3 Oct
  5. 2022Knowledge Unlearning for Mitigating Privacy Risks in Language Models4 Oct
  6. 2021On the Necessity of Auditable Algorithmic Definitions for Machine Unlearning22 Oct
  7. 2021Unrolling SGD: Understanding Factors Influencing Machine Unlearning27 Sep
  8. 2021Adaptive Machine Unlearning8 Jun

Other references · 20

  1. 2020Language Models are Few-Shot Learnerscited by 32,199
  2. 2022Emergent Abilities of Large Language Modelscited by 2,483
  3. 2022Beyond the Imitation Game: Quantifying and extrapolating the capabilities of language modelscited by 1,970
  4. 2022Rethinking the Role of Demonstrations: What Makes In-Context Learning Work?cited by 1,413
  5. 2021Fantastically Ordered Prompts and Where to Find Them: Overcoming Few-Shot Prompt Order Sensitivitycited by 1,122
  6. 2019Machine Unlearningcited by 1,020
  7. 2021An Explanation of In-context Learning as Implicit Bayesian Inferencecited by 915
  8. 2022Few-Shot Parameter-Efficient Fine-Tuning is Better and Cheaper than In-Context Learningcited by 886
  9. 2022Automatic Chain of Thought Prompting in Large Language Modelscited by 684
  10. 2019Eternal Sunshine of the Spotless Net: Selective Forgetting in Deep Networkscited by 599
  11. 2019Certified Data Removal from Machine Learning Modelscited by 512
  12. 2019Making AI Forget You: Data Deletion in Machine Learningcited by 447
8 more
  1. 2021Differentially Private Fine-tuning of Language Modelscited by 392
  2. 2020Amnesiac Machine Learningcited by 305
  3. 2022Unlocking High-Accuracy Differentially Private Image Classification through Scalecited by 218
  4. 2020Machine Unlearning for Random Forestscited by 125
  5. 2020Machine Unlearning: Linear Filtration for Logit-based Classifierscited by 89
  6. 2021Manipulating SGD with Data Ordering Attackscited by 73
  7. 2023SILO Language Models: Isolating Legal Risk In a Nonparametric Datastorecited by 71
  8. 2023Gradients Look Alike: Sensitivity is Often Overestimated in DP-SGDcited by 11

Built on by

Cited by year (2026 to 7 Oct)

Citing papers per year: 2024: 8; 2025: 11; 2026: 14.

33 papers.

Sort:

By area:

  1. 2024Large Language Model Unlearning via Embedding-Corrupted Promptscited by 112
  2. 2025A Comprehensive Survey in LLM(-Agent) Full Stack Safety: Data, Training and Deploymentcited by 110
  3. 2024Guardrail Baselines for Unlearning in LLMscited by 90
  4. 2024LLM Unlearning via Loss Adjustment with Only Forget Datacited by 71
  5. 2024Position: LLM Unlearning Benchmarks are Weak Measures of Progresscited by 58
  6. 2024A Closer Look at Machine Unlearning for Large Language Modelscited by 54
  7. 2024UnUnlearning: Unlearning is not sufficient for content regulation in advanced generative AIcited by 46
  8. 2024Meta-Unlearning on Diffusion Models: Preventing Relearning Unlearned Conceptscited by 39
  9. 2025Exploring Criteria of Loss Reweighting to Enhance LLM Unlearningcited by 39
  10. 2025GUARD: Generation-time LLM Unlearning via Adaptive Restriction and Detectioncited by 17
  11. 2025Agents Are All You Need for LLM Unlearningcited by 9
  12. 2024Event-level Knowledge Editingcited by 8
21 more
  1. 2025What Should LLMs Forget? Quantifying Personal Data in LLMs for Right-to-Be-Forgotten Requestscited by 4
  2. 2025AntiDote: Bi-level Adversarial Training for Tamper-Resistant LLMscited by 4
  3. 2026REBEL: Hidden Knowledge Recovery via Evolutionary-Based Evaluation Loopcited by 4
  4. 2026Null Space Constrained Contrastive Visual Forgetting for MLLM Unlearningcited by 3
  5. 2025Forget to Know, Remember to Use: Context-Aware Unlearning for Large Language Modelscited by 2
  6. 2025A Survey on Unlearning in Large Language Modelscited by 2
  7. 2026Inference-time Unlearning Using Conformal Predictioncited by 2
  8. 2026Distinguishable Deletion: Unifying Knowledge Erasure and Refusal for Large Language Model Unlearningcited by 2
  9. 2025Holistic Audit Dataset Generation for LLM Unlearning via Knowledge Graph Traversal and Redundancy Removalcited by 1
  10. 2025Unlearning at Scale: State-Exact Trace-Preserving Deletion in Billion-Parameter Language Modelscited by 1
  11. 2025Leverage Unlearning to Sanitize LLMscited by 1
  12. 2026Data-Free Privacy-Preserving for LLMs via Model Inversion and Selective Unlearningcited by 1
  13. 2026Shadow Unlearning: A Neuro-Semantic Approach to Fidelity-Preserving Faceless Forgetting in LLMscited by 0
  14. 2026EvoMU: Evolutionary Machine Unlearningcited by 0
  15. 2026Harmonizing Multi-Objective LLM Unlearning via Unified Domain Representation and Bidirectional Logit Distillationcited by 0
  16. 2026Retain-Neutral Surrogates for Min-Max Unlearningcited by 0
  17. 2026ICCU: In-Context Continual Unlearning via Pattern-Induced Refusal Rulescited by 0
  18. 2026Routing-Aware Expert Calibration for Machine Unlearning in Mixture-of-Experts Language Modelscited by 0
  19. 2026Replay What Matters: Off-Policy Replay for Efficient LLM Reinforcement Unlearningcited by 0
  20. 2026CBD: API-Only LLM Black-Box Unlearning through Controlled Behavioral Divergencecited by 0
  21. 2026OriginBlame: Record- and Token-Level Data Provenance for AI Training Datasetscited by 0