Our new X account is live! Follow @wizwand_team for updates
WorkDL logo mark

One-Shot Safety Alignment for Large Language Models via Optimal Dualization

About

The growing safety concerns surrounding large language models raise an urgent need to align them with diverse human preferences to simultaneously enhance their helpfulness and safety. A promising approach is to enforce safety constraints through Reinforcement Learning from Human Feedback (RLHF). For such constrained RLHF, typical Lagrangian-based primal-dual policy optimization methods are computationally expensive and often unstable. This paper presents a perspective of dualization that reduces constrained alignment to an equivalent unconstrained alignment problem. We do so by pre-optimizing a smooth and convex dual function that has a closed form. This shortcut eliminates the need for cumbersome primal-dual policy iterations, greatly reducing the computational burden and improving training stability. Our strategy leads to two practical algorithms in model-based and preference-based settings (MoCAN and PeCAN, respectively). A broad range of experiments demonstrate the effectiveness and merits of our algorithms.

Xinmeng Huang, Shuo Li, Edgar Dobriban, Osbert Bastani, Hamed Hassani, Dongsheng Ding• 2024

Related benchmarks

TaskDatasetResultRank
General KnowledgeMMLU
MMLU General Knowledge Accuracy71.83
170
Instruction FollowingAlpacaEval
Win Rate95.71
125
Math ReasoningMATH
Accuracy75.5
88
Code GenerationLiveCodeBench
Pass@10.2416
86
Math ReasoningOlympiadBench
Accuracy39.65
54
Harmful Request DefenseAdvBench
ASR0.38
44
Prohibited Content DetectionALERT
ASR0.0865
34
Harmful QuerySorry
ASR (%)12.79
20
Math and ReasoningGSM8K
Accuracy82.87
20
Harmful QueryJailbreakB
ASR2
20
Showing 10 of 13 rows

Other info

Follow for update