atlas

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

Safety Alignment Should be Made More Than Just a Few Tokens Deep

ICLR 2025 · Large language models › Instruction and fine-tuning · approach: Safety alignment after fine-tuning · 4 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.

Argues that LLM safety alignment is "shallow" (concentrated in the first few output tokens), shows this explains several known vulnerabilities, and proposes a safety-recovery data augmentation and a token-wise constrained fine-tuning objective that improve robustness on Llama-2-7B-Chat and Gemma-1.1-7B-IT.

Problem

Current safety alignment of LLMs is vulnerable to prefilling, adversarial suffix, decoding-parameter, and fine-tuning attacks; the paper asks whether a shared underlying cause is that alignment only changes the first few output tokens.

Approach

Alignment takes a shortcut by adapting only the initial refusal prefix, so harmful continuations stay largely unchanged deeper in the response; the paper counters with safety-recovery examples (harmful prefix followed by refusal) and a token-wise constrained SFT loss that limits deviation on early tokens.

Key results

Measured effects reported in the paper

What was changedWhereMeasuredEffect
Add safety recovery examples pairing harmful prefixes with refusalsLlama-2-7B-Chat · HEx-PHI prefilling attack, 5 tokensASR: 42.1 ± 0.9 -> 2.8 ± 0.4Helped
Add safety recovery examples pairing harmful prefixes with refusalsLlama-2-7B-Chat · GCG attack, AdvBenchASR: 65.6 ± 3.1 -> 19.0 ± 2.9Helped
Add safety recovery examples pairing harmful prefixes with refusalsLlama-2-7B-Chat · Decoding parameter exploit, MaliciousInstructASR: 84.3 ± 1.7 -> 1.0 ± 0Helped
Add safety recovery examples pairing harmful prefixes with refusalsLlama-2-7B-Chat · AlpacaEvalwinrate: 51.8% -> 49.5%No clear effect
Constrain initial-token distributions with larger β_t during fine-tuningLlama-2-7B-Chat · Harmful Examples fine-tuning attack, HEx-PHIASR: 88.9 ± 1.2 -> 4.6 ± 0.5Helped
Constrain initial-token distributions with larger β_t during fine-tuningLlama-2-7B-Chat · SamsumROUGE-1 utility: 51.7 ± 0.5 -> 50.1 ± 0.2No clear effect
Use uniform β = 0.1 instead of stronger initial-token constraints (ablation)Constrained SFT on Llama-2-7B-Chat · Harmful Examples fine-tuning attack, HEx-PHIASR: 4.6% -> 86.2%Hurt
Use uniform β = 2.0 at all token positions (ablation)Constrained SFT on Llama-2-7B-Chat · GSM8kaccuracy: 37.4% -> 2.1%Hurt
Remove the 10-step learning-rate warmup (ablation)Constrained SFT on Llama-2-7B-Chat · Harmful Examples fine-tuning attack, HEx-PHIASR: 4.6% -> 29.1%Hurt
Add a 10-step learning-rate warmup (ablation)Standard SFT on Llama-2-7B-Chat · Harmful Examples fine-tuning attack, HEx-PHIASR: 88.9% -> 89.4%No clear effect

Surprising findings

Limitations

Experimental setup

Datasets: HEx-PHI AdvBench MaliciousInstruct Alpaca Samsum SQL Create Context GSM8K Harmful HEx-PHI

Benchmarks: HEx-PHI AdvBench MaliciousInstruct AlpacaEval Samsum SQL Create Context GSM8K

Metrics: attack success rate harmfulness rate winrate ROUGE-1 accuracy per-token KL divergence

Baselines: Standard SFT Llama-2-7B-Chat initial model GCG attack decoding parameters exploit

Builds on: DPO KTO GCG adversarial suffix attack Superficial Alignment Hypothesis fine-tuning attacks (harmful examples)

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