atlas

Research map / Large language models / Instruction and fine-tuning

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

NeurIPS 2024 · Large language models › Instruction and fine-tuning · approach: Fine-tuning generalization and delta compression · 8 citations (OpenAlex)

Read the paperCheck your idea against 108,967 papers

AI-extracted summary. Written by AI from the paper's full text. Numbers and claims can be wrong or missing context, so check the paper before you cite or build on it.

Proposes Safe LoRA, a training-free, data-free patch that projects LoRA weight updates from selected layers onto a safety subspace defined by the aligned-minus-base weight difference, to preserve safety during LoRA fine-tuning.

Problem

Fine-tuning aligned LLMs with LoRA, even on benign data, can significantly degrade their safety alignment, and existing defenses (SafeInstr, BEA) need extra safety data and are data-dependent.

Approach

Define an alignment matrix V = W_aligned - W_unaligned per layer, form a projection matrix onto its column space, and project only those layers' LoRA updates whose cosine similarity with their projection falls below a threshold (or top-K lowest), requiring no training data or training.

Key results

Measured effects reported in the paper

What was changedWhereMeasuredEffect
Apply Safe LoRA projection instead of native LoRA fine-tuningLlama-2-7B-Chat · PureBadHarmfulness score: 4.66 -> 1.055Helped
Apply Safe LoRA projection instead of native LoRA fine-tuningLlama-2-7B-Chat · PureBadUtility (MT-Bench): 4.54 -> 6.34Helped
Apply Safe LoRA projection instead of native LoRA fine-tuningLlama-3-8B-Instruct · PureBadHarmfulness score: 4.637 -> 1.10Helped
Apply Safe LoRA projection instead of native LoRA fine-tuningLlama-3-8B-Instruct · PureBadUtility (MT-Bench): 5.85 -> 5.05Hurt
Apply Safe LoRA projection instead of native LoRA fine-tuningLlama-2-7B-Chat · Dialog Summary with 100 harmful examplesHarmfulness score: 2.63 -> 1.297Helped
Apply Safe LoRA projection instead of native LoRA fine-tuningLlama-2-7B-Chat · Dialog Summary with 100 harmful examplesUtility (Rouge-1 F1): 50.66% -> 49.79%Hurt
Apply Safe LoRA projection instead of native LoRA fine-tuningLlama-3-8B-Instruct · Dialog Summary with 100 harmful examplesHarmfulness score: 1.65 -> 1.268Helped
Apply Safe LoRA projection instead of native LoRA fine-tuningLlama-3-8B-Instruct · Dialog Summary with 100 harmful examplesUtility (Rouge-1 F1): 49.37% -> 49.04%No clear effect
Apply Safe LoRA projection instead of native LoRA fine-tuningLlama-2-7B-Chat · AlpacaHarmfulness score: 2.25 -> 1.09Helped
Use approximate C instead of exact Ĉ projection (ablation)Safe LoRA on Llama-2-7B-Chat · PureBadMT-Bench: 5.96 -> 6.34Helped
Use approximate C instead of exact Ĉ projection (ablation)Safe LoRA on Llama-2-7B-Chat · PureBadHarmfulness score: 1.18 -> 1.055Helped
Project more LoRA layers (ablation)Safe LoRA on Llama-2-7B-Chat · Dialog SummaryUtility (Rouge F1)Hurt

Surprising findings

Limitations

Experimental setup

Datasets: PureBad Dialog Summary Alpaca

Benchmarks: PureBad Dialog Summary Alpaca MT-Bench

Metrics: harmfulness score (1-5) ASR (refusal keyword-based) MT-Bench score Rouge-1 F1

Baselines: LoRA SafeInstr BEA Vaccine

Builds on: LoRA task arithmetic Vaccine

Closest papers by meaning

Writing a paper in this area? scime draft is a free LaTeX editor with AI included, real-time co-authors and a check of your references and venue rules before you submit. It also imports OpenAI Prism projects.

Open scime draft

Get the next scime Dispatch and a monthly field update

Free. We send a confirmation link first; every email has a one-click unsubscribe. Privacy