SLDR: Defending Against Malicious Fine-tuning via Selective Layers Recovery and Dynamic Routing
On the map: LLM alignment / RLHF / preference optimisation → Safety alignment and jailbreak attacks
Abstract (arXiv)
Fine-tuning-as-a-service enables users to adapt aligned large language models (LLMs) to specialized tasks, but malicious fine-tuning can erode refusal behavior while preserving task performance on legitimate inputs. We revisit recent layer-wise safety diagnostics and find that safety sensitivity is signed: scaling different layers can strengthen refusal, weaken it, or have little effect. Motivated by this observation, we propose SLDR, a post-fine-tuning defense based on Selective Layers Recovery and Dynamic Routing. SLDR trains a LoRA recovery adapter only on the layers with the maximum and minimum sensitivity scores in the signed spectrum, and uses representation-based dynamic routing inference to activate the adapter only for malicious queries. Across four model architectures, five downstream tasks, and four harmful benchmarks, SLDR substantially reduces harmful outputs while preserving downstream utility. On Llama3.1/SST2, SLDR reduces the average harmful score from 11.54 to 0.08 while maintaining downstream accuracy, and the harmful score remains near zero under poisoning ratios up to 0.9. The code is available at https://github.com/Stardust457/SLDR.
Key facts. No citing papers in the map yet (data through 7 Oct 2026). Placed in Safety alignment and jailbreak attacks, one of 10 directions in LLM alignment / RLHF / preference optimisation. Builds on 24 of its 55 references that are in the map. First posted on arXiv 7 Oct 2026.
Builds on
24 of 55 references.
Closest ancestors · 5
Same direction, newest first
- 2025Vulnerability-Aware Alignment: Mitigating Uneven Forgetting in Harmful Fine-Tuning4 Jun
- 2024Harmful Fine-tuning Attacks and Defenses for Large Language Models: A Survey26 Sep
- 2024Robustifying Safety-Aligned Large Language Models through Clean Data Curation24 May
- 2023LoRA Fine-tuning Efficiently Undoes Safety Training in Llama 2-Chat 70B31 Oct
- 2023Fine-tuning Aligned Language Models Compromises Safety, Even When Users Do Not Intend To!5 Oct
Other references · 19
- 2024The Llama 3 Herd of Modelscited by 14,192
- 2021Training Verifiers to Solve Math Word Problemscited by 9,743
- 2021Evaluating Large Language Models Trained on Codecited by 8,053
- 2024Qwen2.5 Technical Reportcited by 4,713
- 2023Mistral 7Bcited by 3,065
- 2017Decoupled Weight Decay Regularizationcited by 1,722
- 2024HarmBench: A Standardized Evaluation Framework for Automated Red Teaming and Robust Refusalcited by 1,330
- 2023Safety-Tuned LLaMAs: Lessons From Improving the Safety of Large Language Models that Follow Instructionscited by 377
- 2023Low-Resource Languages Jailbreak GPT-4cited by 290
- 2023Magicoder: Empowering Code Generation with OSS-Instructcited by 251
- 2024Tamper-Resistant Safeguards for Open-Weight LLMscited by 132
- 2024Representation Noising: A Defence Mechanism Against Harmful Finetuningcited by 93
7 more
- 2023Fine-tuning can cripple your foundation model; preserving features may be the solutioncited by 92
- 2024Defending Against Unforeseen Failure Modes with Latent Adversarial Trainingcited by 82
- 2024Open Problems in Technical AI Governancecited by 45
- 2025SaLoRA: Safety-Alignment Preserved Low-Rank Adaptationcited by 39
- 2025Rethinking Safety in LLM Fine-tuning: An Optimization Perspectivecited by 13
- 2025Secure LLM Fine-Tuning via Safety-Aware Probingcited by 10
- 2025Fine-Tuning Jailbreaks under Highly Constrained Black-Box Settings: A Three-Pronged Approachcited by 2
Built on by
Not cited yet.
Similar, not cited
Close in wording, no citation either way
- 2025SDD: Self-Degraded Defense against Malicious Fine-tuning
- 2025Fine-Tuning Lowers Safety and Disrupts Evaluation Consistency
- 2026Understanding and Preserving Safety in Fine-Tuned LLMs
- 2025Defending MoE LLMs against Harmful Fine-Tuning via Safety Routing Alignment
- 2026Gradient Immunity: Null-Space Resistance to Malicious Fine-Tuning
- 2024Safety Layers in Aligned Large Language Models: The Key to LLM Security
- 2026Safety Anchor: Defending Harmful Fine-tuning via Geometric Bottlenecks
- 2026RAS: Measuring LLM Safety Through Refusal Alignment