Lune

NeurIPS2024顶会

Safe LoRA: The Silver Lining of Reducing Safety Risks when Finetuning Large Language Models

Chia-Yi Hsu, Yu-Lin Tsai, Chih-Hsun Lin, Pin-Yu Chen, Chia-Mu Yu, Chun-Ying Huang

摘要

While large language models (LLMs) such as Llama-2 or GPT-4 have shown impressive zero-shot performance, fine-tuning is still necessary to enhance their performance for customized datasets, domain-specific tasks, or other private needs. However, fine-tuning all parameters of LLMs requires significant hardware resources, which can be impractical for typical users. Therefore, parameter-efficient fine-tuning such as LoRA have emerged, allowing users to fine-tune LLMs without the need for considerable computing resources, with little performance degradation compared to fine-tuning all parameters. Unfortunately, recent studies indicate that fine-tuning can increase the risk to the safety of LLMs, even when data does not contain malicious content. To address this challenge, we propose Safe LoRA, a simple one-liner patch to the original LoRA implementation by introducing the projection of LoRA weights from selected layers to the safety-aligned subspace, effectively reducing the safety risks in LLM fine-tuning while maintaining utility. It is worth noting that Safe LoRA is a training-free and data-free approach, as it only requires the knowledge of the weights from the base and aligned LLMs. Our extensive experiments demonstrate that when fine-tuning on purely malicious data, Safe LoRA retains similar safety performance as the original aligned model. Moreover, when the fine-tuning dataset contains a mixture of both benign and malicious data, Safe LoRA mitigates the negative effect made by malicious data while preserving performance on downstream tasks. Our codes are available at https://github.com/IBM/SafeLoRA.

问 Lune

几分钟读透这篇 Paper,不用再花一下午。

Lune 能读完全文,也能读引用它的顶会 Paper,讲清它的结论、证据和局限,每一点都注明出自哪篇 Paper。不用硬啃,也不靠猜。

已有 58 篇顶会 Paper 引用了它。别等审稿人问起,先弄清它们发现了什么。

可以从这些问题问起

Lune 可以查阅

全文 · 引用它的顶会 Paper · 相关的 Paper

获取答案

免费开始,无需绑卡

脉络

  • Lisa: Lazy Safety Alignment for Large Language Models against Harmful Fine-tuning Attack 引用了 Navigating the Safety Landscape: Measuring Risks in Finetuning Large Language Models
  • Lisa: Lazy Safety Alignment for Large Language Models against Harmful Fine-tuning Attack 引用了 Direct Preference Optimization: Your Language Model is Secretly a Reward Model
  • Lisa: Lazy Safety Alignment for Large Language Models against Harmful Fine-tuning Attack 引用了 Training language models to follow instructions with human feedback
  • Navigating the Safety Landscape: Measuring Risks in Finetuning Large Language Models 引用了 Direct Preference Optimization: Your Language Model is Secretly a Reward Model
  • Navigating the Safety Landscape: Measuring Risks in Finetuning Large Language Models 引用了 Finetuned Language Models are Zero-Shot Learners
  • Navigating the Safety Landscape: Measuring Risks in Finetuning Large Language Models 引用了 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
  • Towards Understanding Safety Alignment: A Mechanistic Perspective from Safety Neurons 引用了 Direct Preference Optimization: Your Language Model is Secretly a Reward Model
  • Towards Understanding Safety Alignment: A Mechanistic Perspective from Safety Neurons 引用了 Training language models to follow instructions with human feedback
  • Representation Noising: A Defence Mechanism Against Harmful Finetuning 引用了 LoRA: Low-Rank Adaptation of Large Language Models
  • 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
  • AgentAuditor: Human-level Safety and Security Evaluation for LLM Agents 引用了 Representation Noising: A Defence Mechanism Against Harmful Finetuning
它引用的引用它的从左到右按年份排列,引用越多,位置越高。

引用它的顶会 Paper58

  1. Lisa: Lazy Safety Alignment for Large Language Models against Harmful Fine-tuning AttackTiansheng Huang, Sihao Hu, Fatih Ilhan, Selim F. Tekin 等NeurIPS 2024 · 113 次引用
  2. Representation Noising: A Defence Mechanism Against Harmful FinetuningDomenic Rosati, Jan Wehner, Kai Williams, Lukasz Bartoszcze 等NeurIPS 2024 · 107 次引用
  3. AgentAuditor: Human-level Safety and Security Evaluation for LLM AgentsHanjun Luo, Shenyu Dai, Chiming Ni, Xinfeng Li 等NeurIPS 2025 · 98 次引用
  4. Navigating the Safety Landscape: Measuring Risks in Finetuning Large Language ModelsShengyun Peng, Pin-Yu Chen, Matthew Hull, Duen Horng ChauNeurIPS 2024 · 68 次引用
  5. Towards Understanding Safety Alignment: A Mechanistic Perspective from Safety NeuronsJianhui Chen, Xiaozhi Wang, Zijun Yao, Yushi Bai 等NeurIPS 2025 · 53 次引用

它引用的 Paper27

  1. Training language models to follow instructions with human feedbackLong Ouyang, Jeffrey Wu, Xu Jiang, Diogo Almeida 等NeurIPS 2022 · 24,707 次引用
  2. LoRA: Low-Rank Adaptation of Large Language ModelsEdward J. Hu, Yelong Shen, Phillip Wallis, Zeyuan Allen-Zhu 等ICLR 2022 · 18,833 次引用
  3. Direct Preference Optimization: Your Language Model is Secretly a Reward ModelRafael Rafailov, Archit Sharma, Eric Mitchell, Christopher D. Manning 等NeurIPS 2023 · 10,924 次引用
  4. Finetuned Language Models are Zero-Shot LearnersJason Wei, Maarten Bosma, Vincent Y. Zhao, Kelvin Guu 等ICLR 2022 · 4,966 次引用
  5. Model soups: averaging weights of multiple fine-tuned models improves accuracy without increasing inference timeMitchell Wortsman, Gabriel Ilharco, Samir Yitzhak Gadre, Rebecca Roelofs 等ICML 2022 · 1,464 次引用

相关 Paper

  1. SaLoRA: Safety-Alignment Preserved Low-Rank AdaptationMingjie Li, Wai Man Si, Michael Backes, Yang Zhang 等ICLR 2025
  2. Separate the Wheat from the Chaff: A Post-Hoc Approach to Safety Re-Alignment for Fine-Tuned Language ModelsDi Wu, Xin Lu, Yanyan Zhao, Bing QinACL Findings 2025
  3. NLSR: Neuron-Level Safety Realignment of Large Language Models Against Harmful Fine-TuningXin Yi, Shunfan Zheng, Linlin Wang, Gerard de Melo 等AAAI 2025 · 38 次引用
  4. Interpretable Safety Alignment via SAE-Constructed Low-Rank Subspace AdaptationDianyun Wang, Qingsen Ma, Yuhu Shang, Zhifeng Lu 等ACL 2026 · 2 次引用
  5. Beware of Your Po! Measuring and Mitigating AI Safety Risks in Role-Play Fine-Tuning of LLMsWeixiang Zhao, Yulin Hu, Yang Deng, Jiahe Guo 等ACL 2025 · 23 次引用
黄昏的海面,两侧是细线勾勒的悬崖