mlsanityData to 14 Oct 2026

Locking Down the Finetuned LLMs Safety

arXiv 2410.10343 ↗First posted 14 Oct 2024cs.CLcited by 22

Not on the map. Why?

Abstract (arXiv)

Fine-tuning large language models (LLMs) on additional datasets is often necessary to optimize them for specific downstream tasks. However, existing safety alignment measures, which restrict harmful behavior during inference, are insufficient to mitigate safety risks during fine-tuning. Alarmingly, fine-tuning with just 10 toxic sentences can make models comply with harmful instructions. We introduce SafetyLock, a novel alignment intervention method that maintains robust safety post-fine-tuning through efficient and transferable mechanisms. SafetyLock leverages our discovery that fine-tuned models retain similar safety-related activation representations to their base models. This insight enables us to extract what we term the Meta-SafetyLock, a set of safety bias directions representing key activation patterns associated with safe responses in the original model. We can then apply these directions universally to fine-tuned models to enhance their safety. By searching for activation directions across multiple token dimensions, SafetyLock achieves enhanced robustness and transferability. SafetyLock re-aligns fine-tuned models in under 0.01 seconds without additional computational cost. Our experiments demonstrate that SafetyLock can reduce the harmful instruction response rate from 60% to below 1% in toxic fine-tuned models. It surpasses traditional methods in both performance and efficiency, offering a scalable, non-invasive solution for ensuring the safety of customized LLMs. Our analysis across various fine-tuning scenarios confirms SafetyLock's robustness, advocating its integration into safety protocols for aligned LLMs. The code is released at https://github.com/zhu-minjun/SafetyLock.

Key facts. Cited by 22 papers in the map (data through 14 Oct 2026). Builds on 74 of its 88 references that are in the map. First posted on arXiv 14 Oct 2024.

Builds on

74 of 88 references.

References · 74

  1. 2022Training language models to follow instructions with human feedbackcited by 15,971
  2. 2017Proximal Policy Optimization Algorithmscited by 15,215
  3. 2022Chain-of-Thought Prompting Elicits Reasoning in Large Language Modelscited by 12,459
  4. 2021Training Verifiers to Solve Math Word Problemscited by 10,109
  5. 2023Direct Preference Optimization: Your Language Model is Secretly a Reward Modelcited by 8,065
  6. 2022Large Language Models are Zero-Shot Reasonerscited by 4,374
  7. 2022Training a Helpful and Harmless Assistant with Reinforcement Learning from Human Feedbackcited by 3,720
  8. 2023Universal and Transferable Adversarial Attacks on Aligned Language Modelscited by 3,104
  9. 2022Self-Instruct: Aligning Language Models with Self-Generated Instructionscited by 2,724
  10. 2022Locating and Editing Factual Associations in GPTcited by 2,691
  11. 2022Emergent Abilities of Large Language Modelscited by 2,512
  12. 2018CommonsenseQA: A Question Answering Challenge Targeting Commonsense Knowledgecited by 1,822
38 more
  1. 2022Challenging BIG-Bench Tasks and Whether Chain-of-Thought Can Solve Themcited by 1,807
  2. 2023Jailbroken: How Does LLM Safety Training Fail?cited by 1,651
  3. 2023Jailbreaking Black Box Large Language Models in Twenty Queriescited by 1,420
  4. 2023Representation Engineering: A Top-Down Approach to AI Transparencycited by 1,336
  5. 2023Inference-Time Intervention: Eliciting Truthful Answers from a Language Modelcited by 1,302
  6. 2023Fine-tuning Aligned Language Models Compromises Safety, Even When Users Do Not Intend To!cited by 1,154
  7. 2023Steering Llama 2 via Contrastive Activation Additioncited by 1,085
  8. 2023Towards Understanding Sycophancy in Language Modelscited by 1,040
  9. 2024Refusal in Language Models Is Mediated by a Single Directioncited by 1,032
  10. 2024SimPO: Simple Preference Optimization with a Reference-Free Rewardcited by 963
  11. 2023A Multitask, Multilingual, Multimodal Evaluation of ChatGPT on Reasoning, Hallucination, and Interactivitycited by 894
  12. 2021Are NLP Models really able to Solve Simple Math Word Problems?cited by 878
  13. 2023BeaverTails: Towards Improved Safety Alignment of LLM via a Human-Preference Datasetcited by 860
  14. 2022Discovering Language Model Behaviors with Model-Written Evaluationscited by 836
  15. 2023AutoDAN: Generating Stealthy Jailbreak Prompts on Aligned Large Language Modelscited by 785
  16. 2023Baseline Defenses for Adversarial Attacks Against Aligned Language Modelscited by 651
  17. 2023Instruction Tuning for Large Language Models: A Surveycited by 623
  18. 2021Fast Model Editing at Scalecited by 498
  19. 2022Memory-Based Model Editing at Scalecited by 447
  20. 2023Detecting Language Model Attacks with Perplexitycited by 431
  21. 2023Jailbreak and Guard Aligned Language Models with Only Few In-Context Demonstrationscited by 431
  22. 2023Safety-Tuned LLaMAs: Lessons From Improving the Safety of Large Language Models that Follow Instructionscited by 387
  23. 2023A Survey on Large Language Model (LLM) Security and Privacy: The Good, the Bad, and the Uglycited by 387
  24. 2023DeepInception: Hypnotize Large Language Model to Be Jailbreakercited by 367
  25. 2016Solving General Arithmetic Word Problemscited by 360
  26. 2024Improving Alignment and Robustness with Circuit Breakerscited by 322
  27. 2023Are aligned neural networks adversarially aligned?cited by 315
  28. 2022Large Language Models are Better Reasoners with Self-Verificationcited by 307
  29. 2023Shadow Alignment: The Ease of Subverting Safely-Aligned Language Modelscited by 297
  30. 2023LLM Self Defense: By Self Examination, LLMs Know They Are Being Trickedcited by 244
  31. 2024Programming Refusal with Conditional Activation Steeringcited by 206
  32. 2024Foundational Challenges in Assuring Alignment and Safety of Large Language Modelscited by 199
  33. 2024ReFT: Representation Finetuning for Language Modelscited by 197
  34. 2023Localizing Model Behavior with Path Patchingcited by 195
  35. 2023Removing RLHF Protections in GPT-4 via Fine-Tuningcited by 171
  36. 2024A Comprehensive Study of Knowledge Editing for Large Language Modelscited by 163
  37. 2024LLM Defenses Are Not Robust to Multi-Turn Human Jailbreaks Yetcited by 151
  38. 2023Purple Llama CyberSecEval: A Secure Coding Benchmark for Language Modelscited by 138

50 most cited of 74 All 74 (JSON)

Built on by

Cited by year (2026 to 14 Oct)

Citing papers per year: 2024: 1; 2025: 14; 2026: 7.

22 papers.

Sort:

By area:

  1. 2024CycleResearcher: Improving Automated Research via Automated Reviewcited by 148
  2. 2025Benign Samples Matter! Fine-tuning On Outlier Benign Samples Severely Breaks Safetycited by 22
  3. 2025Panacea: Mitigating Harmful Fine-tuning for Large Language Models via Post-fine-tuning Perturbationcited by 20
  4. 2025Why LLM Safety Guardrails Collapse After Fine-tuning: A Similarity Analysis Between Alignment and Fine-tuning Datasetscited by 20
  5. 2025AsFT: Anchoring Safety During LLM Fine-Tuning Within Narrow Safety Basincited by 19
  6. 2025CTRAP: Embedding Collapse Trap to Safeguard Large Language Models from Harmful Fine-Tuningcited by 11
  7. 2025Gradient Surgery for Safe LLM Fine-Tuningcited by 11
  8. 2025Refusal Falls off a Cliff: How Safety Alignment Fails in Reasoning?cited by 11
  9. 2025Interpretation Meets Safety: A Survey on Interpretation Methods and Tools for Improving LLM Safetycited by 10
  10. 2025Unforgotten Safety: Preserving Safety Alignment of Large Language Models with Continual Learningcited by 10
  11. 2025Why Safeguarded Ships Run Aground? Aligned Large Language Models' Safety Mechanisms Tend to Be Anchored in The Template Regioncited by 6
  12. 2025No, of Course I Can! Deeper Fine-Tuning Attacks That Bypass Token-Level Safety Mechanismscited by 6
10 more
  1. 2025Safety Subspaces are Not Linearly Distinct: A Fine-Tuning Case Studycited by 6
  2. 2026Antibody: Strengthening Defense Against Harmful Fine-Tuning for Large Language Models via Attenuating Harmful Gradient Influencecited by 6
  3. 2026Do Activation Monitors Survive Model Updates? Benchmarking, Predicting, and Repairing Activation-Monitor Stalenesscited by 5
  4. 2026Surgery: Mitigating Harmful Fine-Tuning for Large Language Models via Attention Sinkcited by 4
  5. 2026Token-level Data Selection for Safe LLM Fine-tuningcited by 3
  6. 2025Multi-Level Safety Continual Projection for Fine-Tuned Large Language Models without Retrainingcited by 2
  7. 2026Finding and Reactivating Post-Trained LLMs' Hidden Safety Mechanismscited by 2
  8. 2026Beyond Token-Level Guidance: Inference-Time Alignment of Specialized LLMs via Cross-Family Representation Steeringcited by 1
  9. 2025Analysing Safety Risks in LLMs Fine-Tuned with Pseudo-Malicious Cyber Security Datacited by 0
  10. 2026Gradient Immunity: Null-Space Resistance to Malicious Fine-Tuningcited by 0

Similar, not cited

Close in wording, no citation either way

  1. 2026Few Tokens, Big Leverage: Preserving Safety Alignment by Constraining Safety Tokens during Fine-tuning
  2. 2026Safety at One Shot: Patching Fine-Tuned LLMs with A Single Instance
  3. 2026Understanding and Preserving Safety in Fine-Tuned LLMs
  4. 2025SafeMERGE: Preserving Safety Alignment in Fine-Tuned Large Language Models via Selective Layer-Wise Model Merging
  5. 2025Fine-Tuning Lowers Safety and Disrupts Evaluation Consistency
  6. 2025Secure LLM Fine-Tuning via Safety-Aware Probing
  7. 2026Safeguarding LLM Fine-tuning via Push-Pull Distributional Alignment
  8. 2026Beyond Safe Data: Pretraining-Stage Alignment with Regular Safety Reflection