Why LLM Safety Guardrails Collapse After Fine-tuning: A Similarity Analysis Between Alignment and Fine-tuning Datasets
By: Lei Hsiung , Tianyu Pang , Yung-Chen Tang and more
Potential Business Impact:
Makes AI safer by changing its training data.
Recent advancements in large language models (LLMs) have underscored their vulnerability to safety alignment jailbreaks, particularly when subjected to downstream fine-tuning. However, existing mitigation strategies primarily focus on reactively addressing jailbreak incidents after safety guardrails have been compromised, removing harmful gradients during fine-tuning, or continuously reinforcing safety alignment throughout fine-tuning. As such, they tend to overlook a critical upstream factor: the role of the original safety-alignment data. This paper therefore investigates the degradation of safety guardrails through the lens of representation similarity between upstream alignment datasets and downstream fine-tuning tasks. Our experiments demonstrate that high similarity between these datasets significantly weakens safety guardrails, making models more susceptible to jailbreaks. Conversely, low similarity between these two types of datasets yields substantially more robust models and thus reduces harmfulness score by up to 10.33%. By highlighting the importance of upstream dataset design in the building of durable safety guardrails and reducing real-world vulnerability to jailbreak attacks, these findings offer actionable insights for fine-tuning service providers.
Similar Papers
Fundamental Safety-Capability Trade-offs in Fine-tuning Large Language Models
Machine Learning (Stat)
Makes AI smarter without making it unsafe.
SafeCOMM: What about Safety Alignment in Fine-Tuned Telecom Large Language Models?
Computers and Society
Fixes AI that talks to you to be safe.
Unified Defense for Large Language Models against Jailbreak and Fine-Tuning Attacks in Education
Computation and Language
Keeps AI tutors from giving bad answers.