mlsanityData to 7 Oct 2026

Panacea: Mitigating Harmful Fine-tuning for Large Language Models via Post-fine-tuning Perturbation

arXiv 2501.18100 ↗First posted 30 Jan 2025cs.CL cs.AIcited by 20

Not on the map. Why?

Abstract (arXiv)

Harmful fine-tuning attack introduces significant security risks to the fine-tuning services. Main-stream defenses aim to vaccinate the model such that the later harmful fine-tuning attack is less effective. However, our evaluation results show that such defenses are fragile--with a few fine-tuning steps, the model still can learn the harmful knowledge. To this end, we do further experiment and find that an embarrassingly simple solution--adding purely random perturbations to the fine-tuned model, can recover the model from harmful behaviors, though it leads to a degradation in the model's fine-tuning performance. To address the degradation of fine-tuning performance, we further propose Panacea, which optimizes an adaptive perturbation that will be applied to the model after fine-tuning. Panacea maintains model's safety alignment performance without compromising downstream fine-tuning performance. Comprehensive experiments are conducted on different harmful ratios, fine-tuning tasks and mainstream LLMs, where the average harmful scores are reduced by up-to 21.2%, while maintaining fine-tuning performance. As a by-product, we analyze the adaptive perturbation and show that different layers in various LLMs have distinct safety affinity, which coincide with finding from several previous study. Source code available at https://github.com/w-yibo/Panacea.

Key facts. Cited by 20 papers in the map (data through 7 Oct 2026). Builds on 65 of its 146 references that are in the map. First posted on arXiv 30 Jan 2025.

Builds on

65 of 146 references.

References · 65

  1. 2022Training language models to follow instructions with human feedbackcited by 15,712
  2. 2021LoRA: Low-Rank Adaptation of Large Language Modelscited by 14,084
  3. 2023Llama 2: Open Foundation and Fine-Tuned Chat Modelscited by 12,865
  4. 2021Training Verifiers to Solve Math Word Problemscited by 9,743
  5. 2023Direct Preference Optimization: Your Language Model is Secretly a Reward Modelcited by 7,916
  6. 2022Training a Helpful and Harmless Assistant with Reinforcement Learning from Human Feedbackcited by 3,634
  7. 2023Universal and Transferable Adversarial Attacks on Aligned Language Modelscited by 2,914
  8. 2015Character-level Convolutional Networks for Text Classificationcited by 2,293
  9. 2024Qwen2 Technical Reportcited by 2,076
  10. 2024Gemma 2: Improving Open Language Models at a Practical Sizecited by 1,928
  11. 2017Decoupled Weight Decay Regularizationcited by 1,722
  12. 2023Fine-tuning Aligned Language Models Compromises Safety, Even When Users Do Not Intend To!cited by 1,106
38 more
  1. 2023BeaverTails: Towards Improved Safety Alignment of LLM via a Human-Preference Datasetcited by 828
  2. 2023RAFT: Reward rAnked FineTuning for Generative Foundation Model Alignmentcited by 672
  3. 2023RRHF: Rank Responses to Align Language Models with Human Feedback without tearscited by 454
  4. 2024Safety Alignment Should Be Made More Than Just a Few Tokens Deepcited by 450
  5. 2023Safety-Tuned LLaMAs: Lessons From Improving the Safety of Large Language Models that Follow Instructionscited by 377
  6. 2023Shadow Alignment: The Ease of Subverting Safely-Aligned Language Modelscited by 284
  7. 2024SORRY-Bench: Systematically Evaluating Large Language Model Safety Refusalcited by 224
  8. 2024Assessing the Brittleness of Safety Alignment via Pruning and Low-Rank Modificationscited by 220
  9. 2023LoRA Fine-tuning Efficiently Undoes Safety Training in Llama 2-Chat 70Bcited by 183
  10. 2023Removing RLHF Protections in GPT-4 via Fine-Tuningcited by 165
  11. 2024Safety Fine-Tuning at (Almost) No Cost: A Baseline for Vision Large Language Modelscited by 160
  12. 2024Latent Adversarial Training Improves Robustness to Persistent Harmful Behaviors in LLMscited by 158
  13. 2023Chain of Hindsight Aligns Language Models with Feedbackcited by 147
  14. 2024Tamper-Resistant Safeguards for Open-Weight LLMscited by 132
  15. 2024Safety Layers in Aligned Large Language Models: The Key to LLM Securitycited by 126
  16. 2024Safe LoRA: the Silver Lining of Reducing Safety Risks when Fine-tuning Large Language Modelscited by 122
  17. 2024What is in Your Safe Data? Identifying Benign Data that Breaks Safetycited by 114
  18. 2024Vaccine: Perturbation-aware Alignment for Large Language Models against Harmful Fine-tuning Attackcited by 113
  19. 2024Keeping LLMs Aligned After Fine-tuning: The Crucial Role of Prompt Templatescited by 94
  20. 2023Fine-tuning can cripple your foundation model; preserving features may be the solutioncited by 92
  21. 2024Booster: Tackling Harmful Fine-tuning for Large Language Models via Attenuating Harmful Perturbationcited by 92
  22. 2024Harmful Fine-tuning Attacks and Defenses for Large Language Models: A Surveycited by 86
  23. 2024Defending Against Unforeseen Failure Modes with Latent Adversarial Trainingcited by 82
  24. 2024Covert Malicious Finetuning: Challenges in Safeguarding LLM Adaptationcited by 74
  25. 2024Antidote: Post-fine-tuning Safety Alignment for Large Language Models against Harmful Fine-tuningcited by 71
  26. 2024SEAL: Safety-enhanced Aligned LLM Fine-tuning via Bilevel Data Selectioncited by 64
  27. 2023Pairwise Proximal Policy Optimization: Harnessing Relative Feedback for LLM Alignmentcited by 57
  28. 2024On Evaluating the Durability of Safeguards for Open-Weight LLMscited by 51
  29. 2021RDA: Robust Domain Adaptation via Fourier Adversarial Attackingcited by 48
  30. 2024Navigating the Safety Landscape: Measuring Risks in Finetuning Large Language Modelscited by 45
  31. 2024A safety realignment framework via subspace-oriented model fusion for large language modelscited by 40
  32. 2025SaLoRA: Safety-Alignment Preserved Low-Rank Adaptationcited by 39
  33. 2024NLSR: Neuron-Level Safety Realignment of Large Language Models Against Harmful Fine-Tuningcited by 37
  34. 2024Targeted Vaccine: Safety Alignment for Large Language Models against Harmful Fine-Tuning via Layer-wise Perturbationcited by 35
  35. 2024Immunization against harmful fine-tuning attackscited by 33
  36. 2024Safety-Aware Fine-Tuning of Large Language Modelscited by 33
  37. 2024Towards Understanding the Fragility of Multilingual LLMs against Fine-Tuning Attackscited by 33
  38. 2024No Two Devils Alike: Unveiling Distinct Mechanisms of Fine-tuning Attackscited by 28

50 most cited of 65 All 65 (JSON)

Built on by

Cited by year (2026 to 7 Oct)

Citing papers per year: 2025: 12; 2026: 8.

20 papers.

Sort:

By area:

  1. 2025A Comprehensive Survey in LLM(-Agent) Full Stack Safety: Data, Training and Deploymentcited by 110
  2. 2025Safety at Scale: A Comprehensive Survey of Large Model and Agent Safetycited by 63
  3. 2025Backdoor Cleaning without External Guidance in MLLM Fine-tuningcited by 34
  4. 2025Benign Samples Matter! Fine-tuning On Outlier Benign Samples Severely Breaks Safetycited by 22
  5. 2025Adaptive Defense against Harmful Fine-Tuning for Large Language Models via Bayesian Data Schedulercited by 12
  6. 2025CTRAP: Embedding Collapse Trap to Safeguard Large Language Models from Harmful Fine-Tuningcited by 11
  7. 2025Shape it Up! Restoring LLM Safety during Finetuningcited by 11
  8. 2025Towards Resilient Safety-driven Unlearning for Diffusion Models against Downstream Fine-tuningcited by 8
  9. 2025Safety Subspaces are Not Linearly Distinct: A Fine-Tuning Case Studycited by 6
  10. 2025Pharmacist: Safety Alignment Data Curation for Large Language Models against Harmful Fine-tuningcited by 6
  11. 2026Antibody: Strengthening Defense Against Harmful Fine-Tuning for Large Language Models via Attenuating Harmful Gradient Influencecited by 6
  12. 2025Reshaping Representation Space to Balance the Safety and Over-rejection in Large Audio Language Modelscited by 4
8 more
  1. 2026Q-realign: Piggybacking Realignment on Quantization for Safe and Efficient LLM Deploymentcited by 4
  2. 2026Surgery: Mitigating Harmful Fine-Tuning for Large Language Models via Attention Sinkcited by 3
  3. 2025Safety-Aligned Weights Are Not Enough: Refusal-Teacher-Guided Finetuning Enhances Safety and Downstream Performance under Harmful Finetuning Attackscited by 2
  4. 2026Safeguarding LLM Fine-tuning via Push-Pull Distributional Alignmentcited by 2
  5. 2026Preventing Safety Drift in Large Language Models via Coupled Weight and Activation Constraintscited by 2
  6. 2026Safety Anchor: Defending Harmful Fine-tuning via Geometric Bottleneckscited by 0
  7. 2026Jailbreak to Protect: Buffering and Reinforcing via Temporary Jailbreaking for Safe Fine-Tuning in Large Language Modelscited by 0
  8. 2026The Safeguard Worked. Is the LLM System Safer?cited by 0

Similar, not cited

Close in wording, no citation either way

  1. 2025Fine-Tuning Lowers Safety and Disrupts Evaluation Consistency
  2. 2026Security in the Fine-Tuning Lifecycle of Large Language Models: Threats, Defenses,Evaluation, and Future Directions
  3. 2024Do as I do (Safely): Mitigating Task-Specific Fine-tuning Risks in Large Language Models
  4. 2026Understanding and Preserving Safety in Fine-Tuned LLMs
  5. 2025SafeMERGE: Preserving Safety Alignment in Fine-Tuned Large Language Models via Selective Layer-Wise Model Merging
  6. 2025Rethinking Safety in LLM Fine-tuning: An Optimization Perspective
  7. 2025Secure LLM Fine-Tuning via Safety-Aware Probing
  8. 2025Gradient Surgery for Safe LLM Fine-Tuning