atlas

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

Safety-Tuned LLaMAs: Lessons From Improving the Safety of Large Language Models that Follow Instructions

ICLR 2024 · Large language models › Instruction and fine-tuning · approach: Instruction data selection · 11 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.

The paper shows that open instruction-tuned LLaMA/Falcon models are unsafe, and that adding a few hundred safety-refusal instruction examples to Alpaca-style LoRA tuning reduces harmfulness without hurting benchmarks, while too many safety examples cause exaggerated refusals.

Problem

Open-source instruction-tuned LLMs trained only for helpfulness readily follow malicious or harmful instructions, and there is no open safety instruction-tuning dataset to address this.

Approach

Convert red-teaming questions from the Anthropic Red Team dataset into imperative instructions with GPT-3.5-turbo refusal responses, mix 100 to 2,000 such safety examples into 20k Alpaca instructions, and LoRA-tune LLaMA and Falcon to measure the safety-helpfulness trade-off, including exaggerated safety.

Key results

Measured effects reported in the paper

What was changedWhereMeasuredEffect
Add a small set of safety examples during instruction tuning (ablation)LLaMA 7B fine-tuned on Alpaca · I-MaliciousInstructions, Q-Harm, I-CoNa, I-Controversial, and I-PhysicalSafetyUnsafeharmfulnessHelped
Increase safety examples from the baseline to 500–1,000 examples (ablation)LLaMA 7B fine-tuned on Alpaca · Safety evaluation datasetsharmfulnessHelped
Add safety examples during instruction tuning (ablation)LLaMA 7B fine-tuned on Alpaca · BoolQ, OpenBookQA, PIQA, and AlpacaEvalbenchmark performanceNo clear effect
Add 2,000 safety instructions, increasing the safety-data amount (ablation)LLaMA 7B fine-tuned on Alpaca · XSTestexaggerated-safety response rate: >50%Hurt
Train with safety questions rather than safety instructions (ablation)LLaMA 7B fine-tuned on Alpaca · Malicious instructionsharmfulnessHurt
Use mixed safety questions and instructions instead of safety questions alone (ablation)LLaMA 7B fine-tuned on Alpaca · Safety evaluation datasetsharmfulnessHelped
Use 500 curated safety examples rather than HH-RLHF chat training dataLLaMA 7B instruction-tuned model · I-MaliciousInstructionsharmfulness reward score: 1.65 -> 1.22Helped

Surprising findings

Limitations

Experimental setup

Datasets: Alpaca-cleaned Anthropic Red Team dataset HH-RLHF OpenAssistant

Benchmarks: I-MaliciousInstructions I-CoNa I-Controversial I-PhysicalSafety Q-Harm XSTest I-Alpaca AlpacaEval PIQA BoolQ OpenBookQA

Metrics: harmfulness reward model score OpenAI content moderation max score refusal rate win rate manual preference accuracy

Baselines: LLaMA (Alpaca) Falcon (Alpaca) Guanaco MPT-7b-chat

Builds on: Alpaca LoRA Anthropic Red Team dataset Alpaca-LoRA

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