What Makes and Breaks Safety Fine-tuning? A Mechanistic Study
Samyak Jain, Ekdeep Singh Lubana, Kemal Oksuz, Tom Joy, Philip H.S., Torr, Amartya Sanyal, Puneet K. Dokania

TL;DR
This paper investigates the mechanisms behind safety fine-tuning of large language models, revealing how these methods minimally alter model weights to cluster unsafe inputs with safe ones, affecting model safety behavior.
Contribution
It introduces a synthetic data framework and provides mechanistic insights into how safety fine-tuning aligns unsafe inputs into the model's null space, impacting safety detection.
Findings
Safety fine-tuning minimally changes model weights.
Unsafe inputs are clustered with safe ones in the null space.
Adversarial inputs are processed as safe due to activation proximity.
Abstract
Safety fine-tuning helps align Large Language Models (LLMs) with human preferences for their safe deployment. To better understand the underlying factors that make models safe via safety fine-tuning, we design a synthetic data generation framework that captures salient aspects of an unsafe input by modeling the interaction between the task the model is asked to perform (e.g., "design") versus the specific concepts the task is asked to be performed upon (e.g., a "cycle" vs. a "bomb"). Using this, we investigate three well-known safety fine-tuning methods -- supervised safety fine-tuning, direct preference optimization, and unlearning -- and provide significant evidence demonstrating that these methods minimally transform MLP weights to specifically align unsafe inputs into its weights' null space. This yields a clustering of inputs based on whether the model deems them safe or not.…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
Taxonomy
TopicsRisk and Safety Analysis · Safety Systems Engineering in Autonomy · Software Reliability and Analysis Research
MethodsALIGN
