Share your thoughts, 1 month free Claude Pro on usSee more
WorkDL logo mark

Improving LLM Safety Alignment with Dual-Objective Optimization

About

Existing training-time safety alignment techniques for large language models (LLMs) remain vulnerable to jailbreak attacks. Direct preference optimization (DPO), a widely deployed alignment method, exhibits limitations in both experimental and theoretical contexts as its loss function proves suboptimal for refusal learning. Through gradient-based analysis, we identify these shortcomings and propose an improved safety alignment that disentangles DPO objectives into two components: (1) robust refusal training, which encourages refusal even when partial unsafe generations are produced, and (2) targeted unlearning of harmful knowledge. This approach significantly increases LLM robustness against a wide range of jailbreak attacks, including prefilling, suffix, and multi-turn attacks across both in-distribution and out-of-distribution scenarios. Furthermore, we introduce a method to emphasize critical refusal tokens by incorporating a reward-based token-level weighting mechanism for refusal learning, which further improves the robustness against adversarial exploits. Our research also suggests that robustness to jailbreak attacks is correlated with token distribution shifts in the training process and internal representations of refusal and harmful tokens, offering valuable directions for future research in LLM safety alignment. The code is available at https://github.com/wicai24/DOOR-Alignment

Xuandong Zhao, Will Cai, Tianneng Shi, David Huang, Licong Lin, Song Mei, Dawn Song• 2025

Related benchmarks

TaskDatasetResultRank
Instruction FollowingAlpacaEval
Win Rate91.61
420
Multi-task Language UnderstandingMMLU
Accuracy37
353
General KnowledgeMMLU
MMLU General Knowledge Accuracy70.25
307
Math ReasoningMATH
Accuracy37.15
160
Code GenerationLiveCodeBench
Pass@10.2223
86
Machine UnlearningMUSE Books--
83
Math ReasoningOlympiadBench
Accuracy15.15
76
Safety EvaluationSafety Suite AdvBench, PKU-SafeRLHF, HarmBench, JailbreakBench, SORRY-Bench, HarmfulQA, ALERT
AdvBench Score2.99
56
General LLM CapabilityGeneral Capability Suite MMLU, AlpacaEval, GSM8K, MATH, HumanEval
MMLU68
56
UnlearningMUSE-News 1.0 (test)
Privacy Leak0.103
55
Showing 10 of 33 rows

Other info

Follow for update