atlas

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

Vaccine: Perturbation-aware Alignment for Large Language Models against Harmful Fine-tuning Attack

NeurIPS 2024 · Large language models › Instruction and fine-tuning · approach: Safety alignment after fine-tuning · 3 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 Vaccine, an alignment-stage perturbation-aware (FGSM/SAM-like minimax) training method that makes hidden embeddings robust to harmful embedding drift during user fine-tuning, without access to user data.

Problem

Harmful fine-tuning-as-a-service: a few harmful examples mixed into user fine-tuning data break the safety alignment of LLMs, and defenses requiring user data or heavy per-request computation are impractical.

Approach

Identify harmful embedding drift as the cause of alignment breakage, then during alignment add a worst-case L2-bounded perturbation to each layer's hidden embeddings (computed from a first forward/backward pass) and optimize weights under that perturbation in a second pass, so embeddings remain invariant to later harmful fine-tuning.

Key results

Measured effects reported in the paper

What was changedWhereMeasuredEffect
apply Vaccine alignment instead of SFT alignmentLlama2-7B · SST2harmful score: 52.80 -> 42.80Helped
apply Vaccine alignment instead of SFT alignmentLlama2-7B · AGNEWSharmful score: 52.60 -> 41.60Helped
apply Vaccine alignment instead of SFT alignmentLlama2-7B · GSM8Kfine-tune accuracy: 23.40 -> 22.40Hurt
apply Vaccine alignment instead of SFT alignmentLlama2-7B · AlpacaEvalfine-tune accuracy: 43.14 -> 44.23Helped
increase perturbation intensity from rho=0.01 to rho=10 (ablation)Vaccine · default fine-tuning settingharmful score: 54.40 -> 44.20Helped
increase perturbation intensity from rho=0.01 to rho=10 (ablation)Vaccine · default fine-tuning settingfine-tune accuracy: 94.40 -> 89.00Hurt
use gradient-based rather than random Gaussian perturbation (ablation)Vaccine · default fine-tuning settingharmful score: 56.00 -> 49.00Helped
use gradient-based rather than random Gaussian perturbation (ablation)Vaccine · default fine-tuning settingfine-tune accuracy: 73.80 -> 93.60Helped
use Double-LoRA instead of Single-LoRA (ablation)Vaccine · SST2harmful score: 55.20 -> 48.90Helped
use Single-LoRA instead of Double-LoRA (ablation)Vaccine · GSM8Kharmful score: 69.40 -> 68.40Helped
add EWC to user fine-tuning with lambda=1e12 (ablation)Vaccine · SST2harmful score: 48.20 -> 43.00Helped
add EWC to user fine-tuning with lambda=1e12 (ablation)Vaccine · SST2fine-tune accuracy: 93.80 -> 54.40Hurt

Surprising findings

Limitations

Experimental setup

Datasets: BeaverTails SST2 AGNEWS GSM8K AlpacaEval

Benchmarks: BeaverTails SST2 AGNEWS GSM8K AlpacaEval

Metrics: harmful score fine-tune accuracy alignment loss training time GPU memory

Baselines: Non-Aligned SFT EWC Vlguard KL

Builds on: FGSM SAM LoRA EWC

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