atlas

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

Do as I do (Safely): Mitigating Task-Specific Fine-tuning Risks in Large Language Models

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

Shows that task-specific fine-tuning datasets can be reformatted (AOA, AutoIF) to raise harmfulness while staying benign-looking, and proposes Paraphrase, which rewrites safety data to mimic the user's prompt format, to restore safety with few mixed examples.

Problem

Task-specific fine-tuning (datasets with ground-truth answers) may compromise LLM safety, either accidentally for benign users or deliberately via benign-looking prompt structuring by malicious users, and existing safety-data mixing defenses from instruction-following work may not transfer.

Approach

Malicious users restructure task-specific data with prompting strategies (AOA, AutoIF, AutoIF+AOA) to increase harmfulness while evading toxicity filters; the defense paraphrases safety examples with an LLM to match the user data's format and style before mixing them in, closing the distribution gap that otherwise lets the model forget safety.

Key results

Measured effects reported in the paper

What was changedWhereMeasuredEffect
Fine-tune on GSM8K with the standard benign promptLLaMA-2 7B · GSM8Kaccuracy: 19.11% -> 29.95%Helped
Use adversarial task prompts (AOA, AutoIF, or AutoIF + AOA) instead of the benign promptLLaMA-2 7B fine-tuned on PIQA · PIQAHarmI ASR: 0.00% -> 8.27%; 64.42%; 79.81%Hurt
Mix safety data paraphrased to match the user-data format instead of no mixingLLaMA-2 7B fine-tuned on mixed-prompt PIQA · PIQA (mixed prompting strategies)HarmI ASR: 7.50% -> 0.00%Helped
Mix safety data paraphrased to match the user-data format instead of Base mixingLLaMA-2 7B fine-tuned on mixed-prompt PIQA · PIQA (mixed prompting strategies)HarmQ ASR: 54.00% -> 4.00%Helped
Mix safety data paraphrased to match the user-data format instead of no mixingLLaMA-2 7B fine-tuned on mixed-prompt PIQA · PIQA (mixed prompting strategies)accuracy: 74.32% -> 75.96%Mixed
Mix safety data paraphrased to match the user-data format instead of Base mixingGPT-3.5 fine-tuned on PIQA · PIQAHarmI ASR: 23.85% -> 0.00%Helped
Mix safety data paraphrased to match the user-data format instead of no mixingGPT-3.5 fine-tuned on PIQA with Benign prompts · PIQAaccuracy: 86.89% -> 89.07%Helped
Add AOA prompting rather than use the standard benign promptLLaMA-2 7B fine-tuned on BoolQ · BoolQ (B)accuracy: 32.91% -> 64.10%Helped
Use AutoIF + AOA prompts rather than the benign promptLLaMA-2 7B fine-tuned on HellaSwag · HellaSwagHarmI ASR: 0.00% -> 84.42%Hurt
Use Anti-AOA system prompt instead of the regular prompt (ablation)LLaMA-2 7B fine-tuned on PIQA without safety-data mixing · PIQAHarmI ASR: 8.27% -> 7.73%Helped
Increase the number of fine-tuning epochs (ablation)LLaMA-2 7B fine-tuned on PIQA with Benign or AOA prompts · PIQAaccuracyHelped
Increase the number of fine-tuning epochs (ablation)LLaMA-2 7B fine-tuned on PIQA with AutoIF or AutoIF + AOA prompts · PIQAaccuracyHurt

Surprising findings

Limitations

Experimental setup

Datasets: BoolQ GSM8K HellaSwag MMLU OpenBookQA PIQA WinoGrande Harmful Instructions Harmful Questions XSTest safety fine-tuning dataset from prior work Alpaca/Dolly (referenced)

Benchmarks: BoolQ GSM8K HellaSwag MMLU OpenBookQA PIQA WinoGrande Harmful Instructions Harmful Questions XSTest

Metrics: attack success rate accuracy refusal rate toxicity detection rate

Baselines: Base safety data mixing Longest safety data mixing w/o Mixing Anti-AOA prompt Benign prompting

Builds on: Qi et al. fine-tuning compromises safety Absolutely Obedient Agent attack Base safety data mixing

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