Do as I do (Safely): Mitigating Task-Specific Fine-tuning Risks in Large Language Models
On the map: LLM alignment / RLHF / preference optimisation → Safety alignment and jailbreak attacks
also in 1 more
Abstract (arXiv)
Recent research shows that fine-tuning on benign instruction-following data can inadvertently undo the safety alignment process and increase a model's propensity to comply with harmful queries. While instruction-following fine-tuning is important, task-specific fine-tuning - where models are trained on datasets with clear ground truth answers (e.g., multiple choice questions) - can enhance model performance on specialized downstream tasks. Understanding and mitigating safety risks in the task-specific setting remains distinct from the instruction-following context due to structural differences in the data. Our work demonstrates how malicious actors can subtly manipulate the structure of almost any task-specific dataset to foster significantly more dangerous model behaviors, while maintaining an appearance of innocuity and reasonable downstream task performance. To address this issue, we propose a novel mitigation strategy that mixes in safety data which mimics the task format and prompting style of the user data, showing this is significantly more effective and efficient than existing baselines at re-establishing safety alignment while maintaining similar task performance.
Key facts. Cited by 17 papers in the map (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 35 references that are in the map. First posted on arXiv 12 Jun 2024.
Builds on
24 of 35 references.
Closest ancestors · 3
Same direction, newest first
- 2023Removing RLHF Protections in GPT-4 via Fine-Tuning9 Nov
- 2023Fine-tuning Aligned Language Models Compromises Safety, Even When Users Do Not Intend To!5 Oct
- 2023Universal and Transferable Adversarial Attacks on Aligned Language Models27 Jul
Other references · 21
- 2020Language Models are Few-Shot Learnerscited by 32,199
- 2023GPT-4 Technical Reportcited by 18,132
- 2022Training language models to follow instructions with human feedbackcited by 15,712
- 2023Llama 2: Open Foundation and Fine-Tuned Chat Modelscited by 12,865
- 2021Training Verifiers to Solve Math Word Problemscited by 9,743
- 2023Direct Preference Optimization: Your Language Model is Secretly a Reward Modelcited by 7,916
- 2020Measuring Massive Multitask Language Understandingcited by 7,768
- 2019HellaSwag: Can a Machine Really Finish Your Sentence?cited by 4,018
- 2022Training a Helpful and Harmless Assistant with Reinforcement Learning from Human Feedbackcited by 3,634
- 2019PIQA: Reasoning about Physical Commonsense in Natural Languagecited by 2,818
- 2019BoolQ: Exploring the Surprising Difficulty of Natural Yes/No Questionscited by 2,140
- 2018Can a Suit of Armor Conduct Electricity? A New Dataset for Open Book Question Answeringcited by 2,114
9 more
- 2024HarmBench: A Standardized Evaluation Framework for Automated Red Teaming and Robust Refusalcited by 1,330
- 2023Jailbreaking Black Box Large Language Models in Twenty Queriescited by 1,326
- 2023Large Language Models as Optimizerscited by 830
- 2023Quantifying Language Models' Sensitivity to Spurious Features in Prompt Design or: How I learned to start worrying about prompt formattingcited by 778
- 2023XSTest: A Test Suite for Identifying Exaggerated Safety Behaviours in Large Language Modelscited by 477
- 2024Jailbreaking Leading Safety-Aligned LLMs with Simple Adaptive Attackscited by 450
- 2023Catastrophic Jailbreak of Open-source LLMs via Exploiting Generationcited by 439
- 2023Safety-Tuned LLaMAs: Lessons From Improving the Safety of Large Language Models that Follow Instructionscited by 377
- 2024Long Is More for Alignment: A Simple but Tough-to-Beat Baseline for Instruction Fine-Tuningcited by 85
Built on by
Citing papers per year: 2024: 1; 2025: 8; 2026: 8.
17 papers.
Sort:
By area:
- 2025We Should Identify and Mitigate Third-Party Safety Risks in MCP-Powered Agent Systemscited by 27
- 2025Why LLM Safety Guardrails Collapse After Fine-tuning: A Similarity Analysis Between Alignment and Fine-tuning Datasetscited by 18
- 2024Superficial Safety Alignment Hypothesiscited by 14
- 2025Gradient Surgery for Safe LLM Fine-Tuningcited by 11
- 2025Safety Subspaces are Not Linearly Distinct: A Fine-Tuning Case Studycited by 6
- 2025When Style Breaks Safety: Defending LLMs Against Superficial Style Alignmentcited by 6
- 2026Antibody: Strengthening Defense Against Harmful Fine-Tuning for Large Language Models via Attenuating Harmful Gradient Influencecited by 6
- 2025No, of Course I Can! Deeper Fine-Tuning Attacks That Bypass Token-Level Safety Mechanismscited by 5
- 2025Efficiency vs. Alignment: Investigating Safety and Fairness Risks in Parameter-Efficient Fine-Tuning of LLMscited by 4
- 2026Surgery: Mitigating Harmful Fine-Tuning for Large Language Models via Attention Sinkcited by 3
- 2026GR-SAP: Generative Replay for Safety Alignment Preservation during Fine-Tuningcited by 2
- 2025Linearly Decoding Refused Knowledge in Aligned Language Modelscited by 1
5 more
- 2026From Parameter Dynamics to Risk Scoring : Quantifying Sample-Level Safety Degradation in LLM Fine-tuningcited by 0
- 2026SPARD: Defending Harmful Fine-Tuning Attack via Safety Projection with Relevance-Diversity Data Selectioncited by 0
- 2026DataRx: Missingness-Aware Sampling for Safer Large Language Model Task-Specific Fine-Tuningcited by 0
- 2026Introspecting Alignment Shifts Beyond Behaviors Implanted Through Fine-Tuningcited by 0
- 2026Aligned Data Can Induce Misalignment via Context Confusioncited by 0
- 2026Aligned Data Can Induce Misalignment via Context Confusion29 Sep 2026
- 2026Introspecting Alignment Shifts Beyond Behaviors Implanted Through Fine-Tuning5 Aug 2026
- 2026DataRx: Missingness-Aware Sampling for Safer Large Language Model Task-Specific Fine-Tuning5 Aug 2026
- 2026SPARD: Defending Harmful Fine-Tuning Attack via Safety Projection with Relevance-Diversity Data Selection27 May 2026
- 2026From Parameter Dynamics to Risk Scoring : Quantifying Sample-Level Safety Degradation in LLM Fine-tuning6 May 2026
- 2026GR-SAP: Generative Replay for Safety Alignment Preservation during Fine-Tuning10 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
- 2025Efficiency vs. Alignment: Investigating Safety and Fairness Risks in Parameter-Efficient Fine-Tuning of LLMs1 Nov 2025
- 2025Gradient Surgery for Safe LLM Fine-Tuning10 Aug 2025
- 2025Linearly Decoding Refused Knowledge in Aligned Language Models30 Jun 2025
- 2025We Should Identify and Mitigate Third-Party Safety Risks in MCP-Powered Agent Systems16 Jun 2025
5 more
- 2025When Style Breaks Safety: Defending LLMs Against Superficial Style Alignment9 Jun 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
- 2025No, of Course I Can! Deeper Fine-Tuning Attacks That Bypass Token-Level Safety Mechanisms26 Feb 2025
- 2024Superficial Safety Alignment Hypothesis7 Oct 2024
- 2025Why LLM Safety Guardrails Collapse After Fine-tuning: A Similarity Analysis Between Alignment and Fine-tuning Datasetscited by 18
- 2024Superficial Safety Alignment Hypothesiscited by 14
- 2025Gradient Surgery for Safe LLM Fine-Tuningcited by 11
- 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 3
- 2026GR-SAP: Generative Replay for Safety Alignment Preservation during Fine-Tuningcited by 2
- 2025Linearly Decoding Refused Knowledge in Aligned Language Modelscited by 1
- 2026From Parameter Dynamics to Risk Scoring : Quantifying Sample-Level Safety Degradation in LLM Fine-tuningcited by 0
- 2026SPARD: Defending Harmful Fine-Tuning Attack via Safety Projection with Relevance-Diversity Data Selectioncited by 0
- 2026SPARD: Defending Harmful Fine-Tuning Attack via Safety Projection with Relevance-Diversity Data Selection27 May 2026
- 2026From Parameter Dynamics to Risk Scoring : Quantifying Sample-Level Safety Degradation in LLM Fine-tuning6 May 2026
- 2026GR-SAP: Generative Replay for Safety Alignment Preservation during Fine-Tuning10 Mar 2026
- 2026Surgery: Mitigating Harmful Fine-Tuning for Large Language Models via Attention Sink5 Feb 2026
- 2025Gradient Surgery for Safe LLM Fine-Tuning10 Aug 2025
- 2025Linearly Decoding Refused Knowledge in Aligned Language Models30 Jun 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
- 2024Superficial Safety Alignment Hypothesis7 Oct 2024
- 2025When Style Breaks Safety: Defending LLMs Against Superficial Style Alignmentcited by 6
- 2026Antibody: Strengthening Defense Against Harmful Fine-Tuning for Large Language Models via Attenuating Harmful Gradient Influencecited by 6
- 2025No, of Course I Can! Deeper Fine-Tuning Attacks That Bypass Token-Level Safety Mechanismscited by 5
- 2026Antibody: Strengthening Defense Against Harmful Fine-Tuning for Large Language Models via Attenuating Harmful Gradient Influence28 Feb 2026
- 2025When Style Breaks Safety: Defending LLMs Against Superficial Style Alignment9 Jun 2025
- 2025No, of Course I Can! Deeper Fine-Tuning Attacks That Bypass Token-Level Safety Mechanisms26 Feb 2025
- 2025Efficiency vs. Alignment: Investigating Safety and Fairness Risks in Parameter-Efficient Fine-Tuning of LLMscited by 4
- 2026DataRx: Missingness-Aware Sampling for Safer Large Language Model Task-Specific Fine-Tuningcited by 0
- 2026Introspecting Alignment Shifts Beyond Behaviors Implanted Through Fine-Tuningcited by 0
- 2026Aligned Data Can Induce Misalignment via Context Confusioncited by 0
- 2026Aligned Data Can Induce Misalignment via Context Confusion29 Sep 2026
- 2026Introspecting Alignment Shifts Beyond Behaviors Implanted Through Fine-Tuning5 Aug 2026
- 2026DataRx: Missingness-Aware Sampling for Safer Large Language Model Task-Specific Fine-Tuning5 Aug 2026
- 2025Efficiency vs. Alignment: Investigating Safety and Fairness Risks in Parameter-Efficient Fine-Tuning of LLMs1 Nov 2025
Similar, not cited
Close in wording, no citation either way
- 2025Fine-Tuning Lowers Safety and Disrupts Evaluation Consistency
- 2024What Makes and Breaks Safety Fine-tuning? A Mechanistic Study
- 2025SafeMERGE: Preserving Safety Alignment in Fine-Tuned Large Language Models via Selective Layer-Wise Model Merging
- 2025Safety-Aligned Weights Are Not Enough: Refusal-Teacher-Guided Finetuning Enhances Safety and Downstream Performance under Harmful Finetuning Attacks
- 2025Secure LLM Fine-Tuning via Safety-Aware Probing
- 2024Locking Down the Finetuned LLMs Safety
- 2025Picky LLMs and Unreliable RMs: An Empirical Study on Safety Alignment after Instruction Tuning
- 2024Multitask Mayhem: Unveiling and Mitigating Safety Gaps in LLMs Fine-tuning