Locking Down the Finetuned LLMs Safety
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
- 2022Training language models to follow instructions with human feedbackcited by 15,971
- 2017Proximal Policy Optimization Algorithmscited by 15,215
- 2022Chain-of-Thought Prompting Elicits Reasoning in Large Language Modelscited by 12,459
- 2021Training Verifiers to Solve Math Word Problemscited by 10,109
- 2023Direct Preference Optimization: Your Language Model is Secretly a Reward Modelcited by 8,065
- 2022Large Language Models are Zero-Shot Reasonerscited by 4,374
- 2022Training a Helpful and Harmless Assistant with Reinforcement Learning from Human Feedbackcited by 3,720
- 2023Universal and Transferable Adversarial Attacks on Aligned Language Modelscited by 3,104
- 2022Self-Instruct: Aligning Language Models with Self-Generated Instructionscited by 2,724
- 2022Locating and Editing Factual Associations in GPTcited by 2,691
- 2022Emergent Abilities of Large Language Modelscited by 2,512
- 2018CommonsenseQA: A Question Answering Challenge Targeting Commonsense Knowledgecited by 1,822
38 more
- 2022Challenging BIG-Bench Tasks and Whether Chain-of-Thought Can Solve Themcited by 1,807
- 2023Jailbroken: How Does LLM Safety Training Fail?cited by 1,651
- 2023Jailbreaking Black Box Large Language Models in Twenty Queriescited by 1,420
- 2023Representation Engineering: A Top-Down Approach to AI Transparencycited by 1,336
- 2023Inference-Time Intervention: Eliciting Truthful Answers from a Language Modelcited by 1,302
- 2023Fine-tuning Aligned Language Models Compromises Safety, Even When Users Do Not Intend To!cited by 1,154
- 2023Steering Llama 2 via Contrastive Activation Additioncited by 1,085
- 2023Towards Understanding Sycophancy in Language Modelscited by 1,040
- 2024Refusal in Language Models Is Mediated by a Single Directioncited by 1,032
- 2024SimPO: Simple Preference Optimization with a Reference-Free Rewardcited by 963
- 2023A Multitask, Multilingual, Multimodal Evaluation of ChatGPT on Reasoning, Hallucination, and Interactivitycited by 894
- 2021Are NLP Models really able to Solve Simple Math Word Problems?cited by 878
- 2023BeaverTails: Towards Improved Safety Alignment of LLM via a Human-Preference Datasetcited by 860
- 2022Discovering Language Model Behaviors with Model-Written Evaluationscited by 836
- 2023AutoDAN: Generating Stealthy Jailbreak Prompts on Aligned Large Language Modelscited by 785
- 2023Baseline Defenses for Adversarial Attacks Against Aligned Language Modelscited by 651
- 2023Instruction Tuning for Large Language Models: A Surveycited by 623
- 2021Fast Model Editing at Scalecited by 498
- 2022Memory-Based Model Editing at Scalecited by 447
- 2023Detecting Language Model Attacks with Perplexitycited by 431
- 2023Jailbreak and Guard Aligned Language Models with Only Few In-Context Demonstrationscited by 431
- 2023Safety-Tuned LLaMAs: Lessons From Improving the Safety of Large Language Models that Follow Instructionscited by 387
- 2023A Survey on Large Language Model (LLM) Security and Privacy: The Good, the Bad, and the Uglycited by 387
- 2023DeepInception: Hypnotize Large Language Model to Be Jailbreakercited by 367
- 2016Solving General Arithmetic Word Problemscited by 360
- 2024Improving Alignment and Robustness with Circuit Breakerscited by 322
- 2023Are aligned neural networks adversarially aligned?cited by 315
- 2022Large Language Models are Better Reasoners with Self-Verificationcited by 307
- 2023Shadow Alignment: The Ease of Subverting Safely-Aligned Language Modelscited by 297
- 2023LLM Self Defense: By Self Examination, LLMs Know They Are Being Trickedcited by 244
- 2024Programming Refusal with Conditional Activation Steeringcited by 206
- 2024Foundational Challenges in Assuring Alignment and Safety of Large Language Modelscited by 199
- 2024ReFT: Representation Finetuning for Language Modelscited by 197
- 2023Localizing Model Behavior with Path Patchingcited by 195
- 2023Removing RLHF Protections in GPT-4 via Fine-Tuningcited by 171
- 2024A Comprehensive Study of Knowledge Editing for Large Language Modelscited by 163
- 2024LLM Defenses Are Not Robust to Multi-Turn Human Jailbreaks Yetcited by 151
- 2023Purple Llama CyberSecEval: A Secure Coding Benchmark for Language Modelscited by 138
50 most cited of 74 All 74 (JSON)
Built on by
Citing papers per year: 2024: 1; 2025: 14; 2026: 7.
22 papers.
Sort:
By area:
- 2024CycleResearcher: Improving Automated Research via Automated Reviewcited by 148
- 2025Benign Samples Matter! Fine-tuning On Outlier Benign Samples Severely Breaks Safetycited by 22
- 2025Panacea: Mitigating Harmful Fine-tuning for Large Language Models via Post-fine-tuning Perturbationcited by 20
- 2025Why LLM Safety Guardrails Collapse After Fine-tuning: A Similarity Analysis Between Alignment and Fine-tuning Datasetscited by 20
- 2025AsFT: Anchoring Safety During LLM Fine-Tuning Within Narrow Safety Basincited by 19
- 2025CTRAP: Embedding Collapse Trap to Safeguard Large Language Models from Harmful Fine-Tuningcited by 11
- 2025Gradient Surgery for Safe LLM Fine-Tuningcited by 11
- 2025Refusal Falls off a Cliff: How Safety Alignment Fails in Reasoning?cited by 11
- 2025Interpretation Meets Safety: A Survey on Interpretation Methods and Tools for Improving LLM Safetycited by 10
- 2025Unforgotten Safety: Preserving Safety Alignment of Large Language Models with Continual Learningcited by 10
- 2025Why Safeguarded Ships Run Aground? Aligned Large Language Models' Safety Mechanisms Tend to Be Anchored in The Template Regioncited by 6
- 2025No, of Course I Can! Deeper Fine-Tuning Attacks That Bypass Token-Level Safety Mechanismscited by 6
10 more
- 2025Safety Subspaces are Not Linearly Distinct: A Fine-Tuning Case Studycited by 6
- 2026Antibody: Strengthening Defense Against Harmful Fine-Tuning for Large Language Models via Attenuating Harmful Gradient Influencecited by 6
- 2026Do Activation Monitors Survive Model Updates? Benchmarking, Predicting, and Repairing Activation-Monitor Stalenesscited by 5
- 2026Surgery: Mitigating Harmful Fine-Tuning for Large Language Models via Attention Sinkcited by 4
- 2026Token-level Data Selection for Safe LLM Fine-tuningcited by 3
- 2025Multi-Level Safety Continual Projection for Fine-Tuned Large Language Models without Retrainingcited by 2
- 2026Finding and Reactivating Post-Trained LLMs' Hidden Safety Mechanismscited by 2
- 2026Beyond Token-Level Guidance: Inference-Time Alignment of Specialized LLMs via Cross-Family Representation Steeringcited by 1
- 2025Analysing Safety Risks in LLMs Fine-Tuned with Pseudo-Malicious Cyber Security Datacited by 0
- 2026Gradient Immunity: Null-Space Resistance to Malicious Fine-Tuningcited by 0
- 2026Beyond Token-Level Guidance: Inference-Time Alignment of Specialized LLMs via Cross-Family Representation Steering31 Aug 2026
- 2026Gradient Immunity: Null-Space Resistance to Malicious Fine-Tuning5 Aug 2026
- 2026Do Activation Monitors Survive Model Updates? Benchmarking, Predicting, and Repairing Activation-Monitor Staleness14 Jun 2026
- 2026Finding and Reactivating Post-Trained LLMs' Hidden Safety Mechanisms10 Mar 2026
- 2026Token-level Data Selection for Safe LLM Fine-tuning1 Mar 2026
- 2026Antibody: Strengthening Defense Against Harmful Fine-Tuning for Large Language Models via Attenuating Harmful Gradient Influence28 Feb 2026
- 2026Surgery: Mitigating Harmful Fine-Tuning for Large Language Models via Attention Sink5 Feb 2026
- 2025Unforgotten Safety: Preserving Safety Alignment of Large Language Models with Continual Learning10 Dec 2025
- 2025Refusal Falls off a Cliff: How Safety Alignment Fails in Reasoning?7 Oct 2025
- 2025Gradient Surgery for Safe LLM Fine-Tuning10 Aug 2025
- 2025Multi-Level Safety Continual Projection for Fine-Tuned Large Language Models without Retraining8 Aug 2025
- 2025AsFT: Anchoring Safety During LLM Fine-Tuning Within Narrow Safety Basin10 Jun 2025
10 more
- 2025Interpretation Meets Safety: A Survey on Interpretation Methods and Tools for Improving LLM Safety5 Jun 2025
- 2025Why LLM Safety Guardrails Collapse After Fine-tuning: A Similarity Analysis Between Alignment and Fine-tuning Datasets5 Jun 2025
- 2025CTRAP: Embedding Collapse Trap to Safeguard Large Language Models from Harmful Fine-Tuning22 May 2025
- 2025Safety Subspaces are Not Linearly Distinct: A Fine-Tuning Case Study20 May 2025
- 2025Analysing Safety Risks in LLMs Fine-Tuned with Pseudo-Malicious Cyber Security Data15 May 2025
- 2025Benign Samples Matter! Fine-tuning On Outlier Benign Samples Severely Breaks Safety11 May 2025
- 2025No, of Course I Can! Deeper Fine-Tuning Attacks That Bypass Token-Level Safety Mechanisms26 Feb 2025
- 2025Why Safeguarded Ships Run Aground? Aligned Large Language Models' Safety Mechanisms Tend to Be Anchored in The Template Region19 Feb 2025
- 2025Panacea: Mitigating Harmful Fine-tuning for Large Language Models via Post-fine-tuning Perturbation30 Jan 2025
- 2024CycleResearcher: Improving Automated Research via Automated Review28 Oct 2024
- 2025Why LLM Safety Guardrails Collapse After Fine-tuning: A Similarity Analysis Between Alignment and Fine-tuning Datasetscited by 20
- 2025Gradient Surgery for Safe LLM Fine-Tuningcited by 11
- 2025Unforgotten Safety: Preserving Safety Alignment of Large Language Models with Continual Learningcited by 10
- 2025Why Safeguarded Ships Run Aground? Aligned Large Language Models' Safety Mechanisms Tend to Be Anchored in The Template Regioncited by 6
- 2025Safety Subspaces are Not Linearly Distinct: A Fine-Tuning Case Studycited by 6
- 2026Surgery: Mitigating Harmful Fine-Tuning for Large Language Models via Attention Sinkcited by 4
- 2026Gradient Immunity: Null-Space Resistance to Malicious Fine-Tuningcited by 0
- 2026Gradient Immunity: Null-Space Resistance to Malicious Fine-Tuning5 Aug 2026
- 2026Surgery: Mitigating Harmful Fine-Tuning for Large Language Models via Attention Sink5 Feb 2026
- 2025Unforgotten Safety: Preserving Safety Alignment of Large Language Models with Continual Learning10 Dec 2025
- 2025Gradient Surgery for Safe LLM Fine-Tuning10 Aug 2025
- 2025Why LLM Safety Guardrails Collapse After Fine-tuning: A Similarity Analysis Between Alignment and Fine-tuning Datasets5 Jun 2025
- 2025Safety Subspaces are Not Linearly Distinct: A Fine-Tuning Case Study20 May 2025
- 2025Why Safeguarded Ships Run Aground? Aligned Large Language Models' Safety Mechanisms Tend to Be Anchored in The Template Region19 Feb 2025
- 2025Benign Samples Matter! Fine-tuning On Outlier Benign Samples Severely Breaks Safetycited by 22
- 2025CTRAP: Embedding Collapse Trap to Safeguard Large Language Models from Harmful Fine-Tuningcited by 11
- 2025Interpretation Meets Safety: A Survey on Interpretation Methods and Tools for Improving LLM Safetycited by 10
- 2025No, of Course I Can! Deeper Fine-Tuning Attacks That Bypass Token-Level Safety Mechanismscited by 6
- 2026Antibody: Strengthening Defense Against Harmful Fine-Tuning for Large Language Models via Attenuating Harmful Gradient Influencecited by 6
- 2025Multi-Level Safety Continual Projection for Fine-Tuned Large Language Models without Retrainingcited by 2
- 2025Analysing Safety Risks in LLMs Fine-Tuned with Pseudo-Malicious Cyber Security Datacited by 0
- 2026Antibody: Strengthening Defense Against Harmful Fine-Tuning for Large Language Models via Attenuating Harmful Gradient Influence28 Feb 2026
- 2025Multi-Level Safety Continual Projection for Fine-Tuned Large Language Models without Retraining8 Aug 2025
- 2025Interpretation Meets Safety: A Survey on Interpretation Methods and Tools for Improving LLM Safety5 Jun 2025
- 2025CTRAP: Embedding Collapse Trap to Safeguard Large Language Models from Harmful Fine-Tuning22 May 2025
- 2025Analysing Safety Risks in LLMs Fine-Tuned with Pseudo-Malicious Cyber Security Data15 May 2025
- 2025Benign Samples Matter! Fine-tuning On Outlier Benign Samples Severely Breaks Safety11 May 2025
- 2025No, of Course I Can! Deeper Fine-Tuning Attacks That Bypass Token-Level Safety Mechanisms26 Feb 2025
- 2024CycleResearcher: Improving Automated Research via Automated Reviewcited by 148
- 2025Panacea: Mitigating Harmful Fine-tuning for Large Language Models via Post-fine-tuning Perturbationcited by 20
- 2025AsFT: Anchoring Safety During LLM Fine-Tuning Within Narrow Safety Basincited by 19
- 2026Do Activation Monitors Survive Model Updates? Benchmarking, Predicting, and Repairing Activation-Monitor Stalenesscited by 5
- 2026Token-level Data Selection for Safe LLM Fine-tuningcited by 3
- 2026Do Activation Monitors Survive Model Updates? Benchmarking, Predicting, and Repairing Activation-Monitor Staleness14 Jun 2026
- 2026Token-level Data Selection for Safe LLM Fine-tuning1 Mar 2026
- 2025AsFT: Anchoring Safety During LLM Fine-Tuning Within Narrow Safety Basin10 Jun 2025
- 2025Panacea: Mitigating Harmful Fine-tuning for Large Language Models via Post-fine-tuning Perturbation30 Jan 2025
- 2024CycleResearcher: Improving Automated Research via Automated Review28 Oct 2024
Similar, not cited
Close in wording, no citation either way
- 2026Few Tokens, Big Leverage: Preserving Safety Alignment by Constraining Safety Tokens during Fine-tuning
- 2026Safety at One Shot: Patching Fine-Tuned LLMs with A Single Instance
- 2026Understanding and Preserving Safety in Fine-Tuned LLMs
- 2025SafeMERGE: Preserving Safety Alignment in Fine-Tuned Large Language Models via Selective Layer-Wise Model Merging
- 2025Fine-Tuning Lowers Safety and Disrupts Evaluation Consistency
- 2025Secure LLM Fine-Tuning via Safety-Aware Probing
- 2026Safeguarding LLM Fine-tuning via Push-Pull Distributional Alignment
- 2026Beyond Safe Data: Pretraining-Stage Alignment with Regular Safety Reflection