Secure LLM Fine-Tuning via Safety-Aware Probing
On the map: LLM safety and security → Safety alignment, refusal and guardrails
Abstract (arXiv)
Large language models (LLMs) have achieved remarkable success across many applications, but their ability to generate harmful content raises serious safety concerns. Although safety alignment techniques are often applied during pre-training or post-training, recent studies show that subsequent fine-tuning on adversarial or even benign data can still compromise model safety. In this paper, we revisit the fundamental question of why fine-tuning on non-harmful data may nevertheless degrade safety. We show that the safety and task-performance loss landscapes are partially decoupled, so updates that improve task-specific performance may still move the model toward unsafe regions. Based on this insight, we propose a safety-aware probing (SAP) optimization framework for mitigating safety risks during fine-tuning. Concretely, SAP uses contrastive safety signals to locate safety-correlated directions, and optimizes a lightweight probe that perturbs hidden-state propagation during fine-tuning, thereby steering parameter updates away from harmful trajectories while preserving task-specific learning. Extensive experiments show that SAP consistently improves the safety--utility tradeoff across multiple models and tasks. Averaged over multiple LLMs, SAP reduces the harmful score significantly relative to standard fine-tuning, outperforming strong baselines while maintaining competitive task-specific performance. SAP also demonstrates stronger robustness under harmful data poisoning, adversarial fine-tuning, and a dedicated post-fine-tuning adaptive attack, validating that SAP is an effective and scalable framework for preserving LLM safety during fine-tuning. Our code is available at https://github.com/ChengcanWu/SAP.
Key facts. Cited by 10 papers in the map (data through 14 Oct 2026). Placed in Safety alignment, refusal and guardrails, one of 12 directions in LLM safety and security. First posted on arXiv 22 May 2025.
Builds on
0 of 0 references.
No references here yet.
Built on by
Citing papers per year: 2025: 5; 2026: 5.
10 papers.
- 2025Unveiling the Basin-Like Loss Landscape in Large Language Modelscited by 13
- 2025Defending MoE LLMs against Harmful Fine-Tuning via Safety Routing Alignmentcited by 8
- 2026Antibody: Strengthening Defense Against Harmful Fine-Tuning for Large Language Models via Attenuating Harmful Gradient Influencecited by 6
- 2025Unified Defense for Large Language Models against Jailbreak and Fine-Tuning Attacks in Educationcited by 5
- 2026Surgery: Mitigating Harmful Fine-Tuning for Large Language Models via Attention Sinkcited by 4
- 2025The Unintended Trade-off of AI Alignment:Balancing Hallucination Mitigation and Safety in LLMscited by 2
- 2026The Hidden Costs of Domain Fine-Tuning: Pii-Bearing Data Degrades Safety and Increases Leakagecited by 1
- 2025Chat-CBM: Towards Interactive Concept Bottleneck Models with Frozen Large Language Modelscited by 0
- 2026SafeTune: A Unified Faithful Library for Auditing and Repairing Safety Drift in Fine-Tuned LLMscited by 0
- 2026SLDR: Defending Against Malicious Fine-tuning via Selective Layers Recovery and Dynamic Routingcited by 0
- 2026SLDR: Defending Against Malicious Fine-tuning via Selective Layers Recovery and Dynamic Routing7 Oct 2026
- 2026SafeTune: A Unified Faithful Library for Auditing and Repairing Safety Drift in Fine-Tuned LLMs26 Aug 2026
- 2026Antibody: Strengthening Defense Against Harmful Fine-Tuning for Large Language Models via Attenuating Harmful Gradient Influence28 Feb 2026
- 2026The Hidden Costs of Domain Fine-Tuning: Pii-Bearing Data Degrades Safety and Increases Leakage10 Feb 2026
- 2026Surgery: Mitigating Harmful Fine-Tuning for Large Language Models via Attention Sink5 Feb 2026
- 2025Unified Defense for Large Language Models against Jailbreak and Fine-Tuning Attacks in Education18 Nov 2025
- 2025The Unintended Trade-off of AI Alignment:Balancing Hallucination Mitigation and Safety in LLMs9 Oct 2025
- 2025Defending MoE LLMs against Harmful Fine-Tuning via Safety Routing Alignment26 Sep 2025
- 2025Chat-CBM: Towards Interactive Concept Bottleneck Models with Frozen Large Language Models22 Sep 2025
- 2025Unveiling the Basin-Like Loss Landscape in Large Language Models23 May 2025
Similar, not cited
Close in wording, no citation either way
- 2026Understanding and Preserving Safety in Fine-Tuned LLMs
- 2025Rethinking Safety in LLM Fine-tuning: An Optimization Perspective
- 2025Fine-Tuning Lowers Safety and Disrupts Evaluation Consistency
- 2024What Makes and Breaks Safety Fine-tuning? A Mechanistic Study
- 2023Fine-tuning Aligned Language Models Compromises Safety, Even When Users Do Not Intend To!
- 2024Locking Down the Finetuned LLMs Safety
- 2025Gradient Surgery for Safe LLM Fine-Tuning
- 2024Navigating the Safety Landscape: Measuring Risks in Finetuning Large Language Models