atlas

Research map / Large language models / Language, safety and interpretability

Backtracking Improves Generation Safety

ICLR 2025 · Large language models › Language, safety and interpretability · approach: Zero-shot machine-text detection · 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.

Proposes backtracking, where a language model emits a special [RESET] token after an unsafe partial generation and regenerates a safe response, trained via SFT and DPO on safety and utility data.

Problem

Safety alignment is prevention-based, so once a language model begins an unsafe generation it tends to continue it; the paper asks how to improve safety when unsafe generations are expected to occur.

Approach

Teach the model to emit a one-shot [RESET] token after recognizing an unsafe partial output, discard everything before the reset, and regenerate a safe response, learned via SFT on contrastive demonstrations and DPO on backtracking preference pairs.

Key results

Measured effects reported in the paper

What was changedWhereMeasuredEffect
Add backtracking to SFT + DPOGemma-2-2B · Safety evaluation, Overallviolation rate: 10.8% -> 6.1%Helped
Add backtracking to SFT + DPOLlama-3-8B · Safety evaluation, Overallviolation rate: 5.3% -> 1.5%Helped
Add backtracking to SFT + DPOGemma-2-2B · MT-Benchscore: 5.20 -> 4.96No clear effect
Add backtracking to SFT + DPOLlama-3-8B · MT-Benchscore: 6.68 -> 7.12No clear effect
Use backtracking SFT without DPO (ablation)Gemma-2-2B · Safety evaluation, Overallviolation rate: 10.6% -> 9.0%Helped
Use backtracking SFT without DPO (ablation)Llama-3-8B · Safety evaluation, Overallviolation rate: 5.3% -> 4.8%Helped
Add DPO after backtracking SFT (ablation)Gemma-2-2B · Safety evaluation, Overallviolation rate: 9.0% -> 6.1%Helped
Add DPO after backtracking SFT (ablation)Llama-3-8B · Safety evaluation, Overallviolation rate: 4.8% -> 1.5%Helped
Apply a more negative [RESET] logit bias (ablation)Backtracking Llama-3-8B · Safety evaluationsafety: 2X as unsafeHurt
Apply a small [RESET] logit bias (-5) (ablation)Backtracking Llama-3-8B · Safety evaluationgeneration efficiency: -5Helped
Train backtracking with a 50:50 utility/safety data mixture (ablation)Backtracking model · Safety tuninghelpfulnessHurt
Use backtracking rather than baseline DPOGemma-2-2B · Prefilling attackattack success rate: 50.4% -> 11.6%Helped

Surprising findings

Limitations

Experimental setup

Datasets: OpenAssistant-2 HH-RLHF harmless subset AdvBench MaliciousInstructions SimpleSafetyTests StrongREJECT MT-Bench

Benchmarks: AdvBench MaliciousInstructions SimpleSafetyTests StrongREJECT MT-Bench

Metrics: safety violation rate attack success rate reset rate MT-Bench score latency throughput

Baselines: Baseline SFT Baseline SFT + DPO Backtrack SFT GCG AutoDAN Prefilling

Builds on: DPO GCG AutoDAN Llama Guard 2

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