What Makes and Breaks Safety Fine-tuning? A Mechanistic Study
Samyak Jain, Ekdeep Singh Lubana, Kemal Oksuz, Tom Joy, Philip Torr, Amartya Sanyal, Puneet K. Dokania
摘要
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. Correspondingly, when an adversarial input (e.g., a jailbreak) is provided, its activations are closer to safer samples, leading to the model processing such an input as if it were safe. We validate our findings, wherever possible, on real-world models -- specifically, Llama-2 7B and Llama-3 8B.
问 Lune
几分钟读透这篇 Paper,不用再花一下午。
Lune 能读完全文,也能读引用它的顶会 Paper,讲清它的结论、证据和局限,每一点都注明出自哪篇 Paper。不用硬啃,也不靠猜。
已有 14 篇顶会 Paper 引用了它。别等审稿人问起,先弄清它们发现了什么。
脉络
- LLMs Encode Harmfulness and Refusal Separately 引用了 Direct Preference Optimization: Your Language Model is Secretly a Reward Model
- LLMs Encode Harmfulness and Refusal Separately 引用了 Training language models to follow instructions with human feedback
- Direct Preference Optimization: Your Language Model is Secretly a Reward Model 引用了 Training language models to follow instructions with human feedback
- Obfuscated Activations Bypass LLM Latent-Space Defenses 引用了 Jailbroken: How Does LLM Safety Training Fail?
- Finetuned Language Models are Zero-Shot Learners 引用了 Training language models to follow instructions with human feedback
- Training language models to follow instructions with human feedback 引用了 Finetuned Language Models are Zero-Shot Learners
- Safety at One Shot: Patching Fine-Tuned LLMs with A Single Instance 引用了 Direct Preference Optimization: Your Language Model is Secretly a Reward Model
- Safety at One Shot: Patching Fine-Tuned LLMs with A Single Instance 引用了 Finetuned Language Models are Zero-Shot Learners
- Safety at One Shot: Patching Fine-Tuned LLMs with A Single Instance 引用了 Training language models to follow instructions with human feedback
- Jailbroken: How Does LLM Safety Training Fail? 引用了 Training language models to follow instructions with human feedback
引用它的顶会 Paper14
- LLMs Encode Harmfulness and Refusal SeparatelyJiachen Zhao, Jing Huang, Zhengxuan Wu, David Bau 等NeurIPS 2025 · 93 次引用
- From Flat to Hierarchical: Extracting Sparse Representations with Matching PursuitValérie Costa, Thomas Fel, Ekdeep Singh Lubana, Bahareh Tolooshams 等NeurIPS 2025 · 54 次引用
- Obfuscated Activations Bypass LLM Latent-Space DefensesLuke Bailey, Alex Serrano, Abhay Sheshadri, Mikhail Seleznyov 等ICLR 2026 · 28 次引用
- AlphaFuse: Learn ID Embeddings for Sequential Recommendation in Null Space of Language EmbeddingsGuoqing Hu, An Zhang, Shuo Liu, Zhibo Cai 等SIGIR 2025 · 10 次引用
- Safety at One Shot: Patching Fine-Tuned LLMs with A Single InstanceJiawen Zhang, Lipeng He, Kejia Chen, Jian Lou 等ICLR 2026 · 10 次引用
它引用的 Paper23
- Training language models to follow instructions with human feedbackLong Ouyang, Jeffrey Wu, Xu Jiang, Diogo Almeida 等NeurIPS 2022 · 24,707 次引用
- Direct Preference Optimization: Your Language Model is Secretly a Reward ModelRafael Rafailov, Archit Sharma, Eric Mitchell, Christopher D. Manning 等NeurIPS 2023 · 10,924 次引用
- Finetuned Language Models are Zero-Shot LearnersJason Wei, Maarten Bosma, Vincent Y. Zhao, Kelvin Guu 等ICLR 2022 · 4,966 次引用
- PaLM-E: An Embodied Multimodal Language ModelDanny Driess, Fei Xia, Mehdi S. M. Sajjadi, Corey Lynch 等ICML 2023 · 2,601 次引用
- Jailbroken: How Does LLM Safety Training Fail?Alexander Wei, Nika Haghtalab, Jacob SteinhardtNeurIPS 2023 · 2,230 次引用
相关 Paper
- On the Vulnerability of Safety Alignment in Open-Access LLMsJingwei Yi, Rui Ye, Qisi Chen, Bin Zhu 等ACL Findings 2024 · 15 次引用
- Alignment-Weighted DPO: A principled reasoning approach to improve safety alignmentMengxuan Hu, Vivek V. Datla, Anoop Kumar, Zihan Guan 等ICLR 2026 · 3 次引用
- Forewarned is Forearmed: Pre-Synthesizing Jailbreak-like Instructions to Enhance LLM Safety Guardrail to Potential AttacksSheng Liu, Qiang Sheng, Danding Wang, Yang Liu 等EMNLP Findings 2025 · 1 次引用
- How Alignment and Jailbreak Work: Explain LLM Safety through Intermediate Hidden StatesZhenhong Zhou, Haiyang Yu, Xinghua Zhang, Rongwu Xu 等EMNLP Findings 2024 · 14 次引用
- Safety Fine-Tuning at (Almost) No Cost: A Baseline for Vision Large Language ModelsYongshuo Zong, Ondrej Bohdal, Tingyang Yu, Yongxin Yang 等ICML 2024 · 140 次引用
