atlas

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

BackdoorAlign: Mitigating Fine-tuning based Jailbreak Attack with Backdoor Enhanced Safety Alignment

NeurIPS 2024 · Large language models › Instruction and fine-tuning · approach: Safety alignment after fine-tuning · 6 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 Backdoor Enhanced Safety Alignment, which prefixes a random secret prompt to a few safety examples in the fine-tuning data so the secret prompt acts as a backdoor trigger that restores safety after fine-tuning-based jailbreak attacks.

Problem

Fine-tuning aligned LLMs on a few harmful examples (FJAttack) compromises safety in LMaaS settings, and existing defenses that mix in safety examples need many of them to be effective.

Approach

Treat the limited safety examples as poisoned data and a secret random-token prompt prepended to their system prompts as a backdoor trigger, so fine-tuning binds the trigger to safe responses; the provider prepends the secret at inference to activate safety.

Key results

Measured effects reported in the paper

What was changedWhereMeasuredEffect
Add prefixed safety examples with a secret prompt and use it at inferenceLlama-2-7B-Chat · Policy-Oriented Safety Evaluation BenchmarksASR (%): 34.91 -> 3.64Helped
Add prefixed safety examples with a secret prompt and use it at inferenceGPT-3.5-Turbo · Policy-Oriented Safety Evaluation BenchmarksASR (%): 60.00 -> 14.91Helped
Add prefixed safety examples with a secret prompt and use it at inferenceLlama-2-7B-Chat · ARC-ChallengeAccuracy (%): 50.68 -> 51.88No clear effect
Add prefixed safety examples with a secret prompt and use it at inferenceGPT-3.5-Turbo · MMLUAccuracy (%): 66.51 -> 66.37No clear effect
Select the 11 safety examples category-wise across harmful categories rather than randomly (ablation)Backdoor Enhanced Safety Alignment · Policy-Oriented Safety Evaluation BenchmarksASR (%): 7.64 -> 3.64Helped
Select safety examples category-wise rather than using LLM-generated examples (ablation)Backdoor Enhanced Safety Alignment · Policy-Oriented Safety Evaluation BenchmarksASR (%): 20.73 -> 3.64Helped
Add the prefixed secret prompt during inference (ablation)Backdoor Enhanced Safety Alignment · Policy-Oriented Safety Evaluation BenchmarksASR (%): 26.18 -> 3.64Helped
Add an inference secret prompt to the Baseline defense without secret-prompt fine-tuning (ablation)Baseline · Policy-Oriented Safety Evaluation BenchmarksASR (%): 34.91 -> 33.09No clear effect
Use 150 random tokens instead of the Llama 2 default system prompt as the secret prompt (ablation)Backdoor Enhanced Safety Alignment · Policy-Oriented Safety Evaluation BenchmarksASR (%): 7.64 -> 3.64Helped
Use 150 random tokens instead of the GPT-4-generated prompt as the secret prompt (ablation)Backdoor Enhanced Safety Alignment · Policy-Oriented Safety Evaluation BenchmarksASR (%): 7.27 -> 3.64Helped
Use LoRA fine-tuning (ablation)Backdoor Enhanced Safety Alignment · Policy-Oriented Safety Evaluation BenchmarksASR (%): 40.36 -> 2.91Helped
Apply Backdoor Enhanced Safety Alignment in dialog-summary fine-tuningLlama-2-7B-Chat · Dialog SummaryASR (%): 22.55 -> 10.55Helped

Surprising findings

Limitations

Experimental setup

Datasets: pure_bad harmful examples (100) Policy-Oriented Safety Evaluation Benchmarks SAMSum sql-create-context Stanford Alpaca

Benchmarks: Policy-Oriented Safety Evaluation Benchmarks ARC-Challenge MMLU MT-Bench SAMSum sql-create-context

Metrics: Harmfulness Score Attack Success Rate ARC-Challenge Acc MMLU Acc MT-Bench Score Rouge-1 F1

Baselines: No Defense Baseline mixed safety examples fine-tuning

Builds on: Harmful example demonstration attack (FJAttack) backdoor attacks

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