mlsanityData to 14 Oct 2026

Learning and Forgetting Unsafe Examples in Large Language Models

arXiv 2312.12736 ↗First posted 20 Dec 2023cs.CL cs.LGcited by 24

Not on the map. Why?

Abstract (arXiv)

As the number of large language models (LLMs) released to the public grows, there is a pressing need to understand the safety implications associated with these models learning from third-party custom finetuning data. We explore the behavior of LLMs finetuned on noisy custom data containing unsafe content, represented by datasets that contain biases, toxicity, and harmfulness, finding that while aligned LLMs can readily learn this unsafe content, they also tend to forget it more significantly than other examples when subsequently finetuned on safer content. Drawing inspiration from the discrepancies in forgetting, we introduce the "ForgetFilter" algorithm, which filters unsafe data based on how strong the model's forgetting signal is for that data. We demonstrate that the ForgetFilter algorithm ensures safety in customized finetuning without compromising downstream task performance, unlike sequential safety finetuning. ForgetFilter outperforms alternative strategies like replay and moral self-correction in curbing LLMs' ability to assimilate unsafe content during custom finetuning, e.g. 75% lower than not applying any safety measures and 62% lower than using self-correction in toxicity score.

Key facts. Cited by 24 papers in the map (data through 14 Oct 2026). Builds on 47 of its 67 references that are in the map. First posted on arXiv 20 Dec 2023.

Builds on

47 of 67 references.

References · 47

  1. 2023GPT-4 Technical Reportcited by 18,396
  2. 2019Exploring the Limits of Transfer Learning with a Unified Text-to-Text Transformercited by 14,599
  3. 2021LoRA: Low-Rank Adaptation of Large Language Modelscited by 14,380
  4. 2023LLaMA: Open and Efficient Foundation Language Modelscited by 14,132
  5. 2022Chain-of-Thought Prompting Elicits Reasoning in Large Language Modelscited by 12,459
  6. 2023Direct Preference Optimization: Your Language Model is Secretly a Reward Modelcited by 8,065
  7. 2016Overcoming catastrophic forgetting in neural networkscited by 4,787
  8. 2022Large Language Models are Zero-Shot Reasonerscited by 4,374
  9. 2016SQuAD: 100,000+ Questions for Machine Comprehension of Textcited by 4,148
  10. 2022Training a Helpful and Harmless Assistant with Reinforcement Learning from Human Feedbackcited by 3,720
  11. 2022OPT: Open Pre-trained Transformer Language Modelscited by 3,512
  12. 2022Constitutional AI: Harmlessness from AI Feedbackcited by 3,050
35 more
  1. 2019XLNet: Generalized Autoregressive Pretraining for Language Understandingcited by 2,811
  2. 2020The Pile: An 800GB Dataset of Diverse Text for Language Modelingcited by 2,411
  3. 2020Extracting Training Data from Large Language Modelscited by 2,189
  4. 2019Fine-Tuning Language Models from Human Preferencescited by 2,150
  5. 2022Large Language Models Encode Clinical Knowledgecited by 1,830
  6. 2023Pythia: A Suite for Analyzing Large Language Models Across Training and Scalingcited by 1,786
  7. 2020RealToxicityPrompts: Evaluating Neural Toxic Degeneration in Language Modelscited by 1,255
  8. 2021Scaling Language Models: Methods, Analysis & Insights from Training Gophercited by 1,202
  9. 2023Fine-tuning Aligned Language Models Compromises Safety, Even When Users Do Not Intend To!cited by 1,154
  10. 2018Co-teaching: Robust Training of Deep Neural Networks with Extremely Noisy Labelscited by 1,059
  11. 2021A General Language Assistant as a Laboratory for Alignmentcited by 1,055
  12. 2022Quantifying Memorization Across Neural Language Modelscited by 763
  13. 2017Automated Hate Speech Detection and the Problem of Offensive Languagecited by 736
  14. 2021BBQ: A Hand-Built Bias Benchmark for Question Answeringcited by 701
  15. 2023RAFT: Reward rAnked FineTuning for Generative Foundation Model Alignmentcited by 686
  16. 2018An Empirical Study of Example Forgetting during Deep Neural Network Learningcited by 678
  17. 2023An Empirical Study of Catastrophic Forgetting in Large Language Models During Continual Fine-tuningcited by 639
  18. 2020Dataset Cartography: Mapping and Diagnosing Datasets with Training Dynamicscited by 425
  19. 2017Measuring Catastrophic Forgetting in Neural Networkscited by 360
  20. 2023Principle-Driven Self-Alignment of Language Models from Scratch with Minimal Human Supervisioncited by 318
  21. 2019On Tiny Episodic Memories in Continual Learningcited by 307
  22. 2023Shadow Alignment: The Ease of Subverting Safely-Aligned Language Modelscited by 297
  23. 2023How is ChatGPT's behavior changing over time?cited by 270
  24. 2023Pretraining Language Models with Human Preferencescited by 247
  25. 2023Red-Teaming Large Language Models using Chain of Utterances for Safety-Alignmentcited by 223
  26. 2022Memorization Without Overfitting: Analyzing the Training Dynamics of Large Language Modelscited by 220
  27. 2018Online Structured Laplace Approximations For Overcoming Catastrophic Forgettingcited by 201
  28. 2022Are Large Pre-Trained Language Models Leaking Your Personal Information?cited by 200
  29. 2021Towards Continual Knowledge Learning of Language Modelscited by 174
  30. 2023The Capacity for Moral Self-Correction in Large Language Modelscited by 173
  31. 2023Removing RLHF Protections in GPT-4 via Fine-Tuningcited by 171
  32. 2019SELF: Learning to Filter Noisy Labels with Self-Ensemblingcited by 164
  33. 2021Wide Neural Networks Forget Less Catastrophicallycited by 64
  34. 2022Characterizing Datapoints via Second-Split Forgettingcited by 37
  35. 2023Recognition, recall, and retention of few-shot memories in large language modelscited by 5

Built on by

Cited by year (2026 to 14 Oct)

Citing papers per year: 2024: 13; 2025: 9; 2026: 2.

24 papers.

Sort:

By area:

  1. 2024Vaccine: Perturbation-aware Alignment for Large Language Models against Harmful Fine-tuning Attackcited by 115
  2. 2024Keeping LLMs Aligned After Fine-tuning: The Crucial Role of Prompt Templatescited by 96
  3. 2024Lisa: Lazy Safety Alignment for Large Language Models against Harmful Fine-tuning Attackcited by 92
  4. 2024Covert Malicious Finetuning: Challenges in Safeguarding LLM Adaptationcited by 80
  5. 2024SEAL: Safety-enhanced Aligned LLM Fine-tuning via Bilevel Data Selectioncited by 64
  6. 2024Single Image Unlearning: Efficient Machine Unlearning in Multimodal Large Language Modelscited by 46
  7. 2024A safety realignment framework via subspace-oriented model fusion for large language modelscited by 41
  8. 2024Immunization against harmful fine-tuning attackscited by 35
  9. 2025Fun-tuning: Characterizing the Vulnerability of Proprietary LLMs to Optimization-based Prompt Injection Attacks via the Fine-Tuning Interfacecited by 17
  10. 2024On Catastrophic Inheritance of Large Foundation Modelscited by 15
  11. 2025In-Training Defenses against Emergent Misalignment in Language Modelscited by 15
  12. 2024Open LLMs are Necessary for Current Private Adaptations and Outperform their Closed Alternativescited by 12
12 more
  1. 2025Enhancing Model Defense Against Jailbreaks with Proactive Safety Reasoningcited by 11
  2. 2025Jailbreak-Tuning: Models Efficiently Learn Jailbreak Susceptibilitycited by 9
  3. 2025Guardians and Offenders: A Survey on Harmful Content Generation and Safety Mitigation of LLMcited by 9
  4. 2024How Does Vision-Language Adaptation Impact the Safety of Vision Language Models?cited by 8
  5. 2024Recent Advances in Attack and Defense Approaches of Large Language Modelscited by 6
  6. 2025Multi-level Value Alignment in Agentic AI Systems: Survey and Perspectivescited by 5
  7. 2024Composable Interventions for Language Modelscited by 4
  8. 2026Invisible Safety Threat: Malicious Finetuning for LLM via Steganographycited by 2
  9. 2026The Piggyback Hypothesis of Generalization: Explaining and Mitigating Emergent Misalignmentcited by 2
  10. 2025Poison Once, Refuse Forever: Weaponizing Alignment for Injecting Bias in LLMscited by 1
  11. 2025A Data-Centric Approach for Safe and Secure Large Language Models against Threatening and Toxic Contentcited by 0
  12. 2025Large Language Models in Cybersecurity: Applications, Vulnerabilities, and Defense Techniquescited by 0