Do as I do (Safely): Mitigating Task-Specific Fine-tuning Risks in Large Language Models

Fuente: arXiv
Enregistré dans:
Détails bibliographiques
Auteurs principaux: Eiras, Francisco, Petrov, Aleksandar, Torr, Philip H. S., Kumar, M. Pawan, Bibi, Adel
Format: Preprint
Publié: 2024
Sujets:
Accès en ligne:
Tags: Ajouter un tag
Pas de tags, Soyez le premier à ajouter un tag!
_version_ 1866913711842656256
author Eiras, Francisco
Petrov, Aleksandar
Torr, Philip H. S.
Kumar, M. Pawan
Bibi, Adel
author_facet Eiras, Francisco
Petrov, Aleksandar
Torr, Philip H. S.
Kumar, M. Pawan
Bibi, Adel
contents 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.
format Preprint
id arxiv_https___arxiv_org_abs_2406_10288
institution arXiv
publishDate 2024
record_format arxiv
spellingShingle Do as I do (Safely): Mitigating Task-Specific Fine-tuning Risks in Large Language Models
Eiras, Francisco
Petrov, Aleksandar
Torr, Philip H. S.
Kumar, M. Pawan
Bibi, Adel
Computation and Language
Machine Learning
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.
title Do as I do (Safely): Mitigating Task-Specific Fine-tuning Risks in Large Language Models
topic Computation and Language
Machine Learning
url https://arxiv.org/abs/2406.10288