Lune

ICLR2024Top-tier venue

Safe RLHF: Safe Reinforcement Learning from Human Feedback

Josef Dai, Xuehai Pan, Ruiyang Sun, Jiaming Ji, Xinbo Xu, Mickel Liu, Yizhou Wang, Yaodong Yang

Abstract

With the development of large language models (LLMs), striking a balance between the performance and safety of AI systems has never been more critical. However, the inherent tension between the objectives of helpfulness and harmlessness presents a significant challenge during LLM training. To address this issue, we propose Safe Reinforcement Learning from Human Feedback (Safe RLHF), a novel algorithm for human value alignment. Safe RLHF explicitly decouples human preferences regarding helpfulness and harmlessness, effectively avoiding the crowdworkers' confusion about the tension and allowing us to train separate reward and cost models. We formalize the safety concern of LLMs as an optimization task of maximizing the reward function while satisfying specified cost constraints. Leveraging the Lagrangian method to solve this constrained problem, Safe RLHF dynamically adjusts the balance between the two objectives during fine-tuning. Through a three-round fine-tuning using Safe RLHF, we demonstrate a superior ability to mitigate harmful responses while enhancing model performance compared to existing value-aligned algorithms. Experimentally, we fine-tuned the Alpaca-7B using Safe RLHF and aligned it with collected human preferences, significantly improving its helpfulness and harmlessness according to human evaluations.

Ask Lune

Know this paper in minutes, not an afternoon.

Lune can read every page of it and the top-tier papers that cite it, and gives you its claims, its evidence and its limits, each one cited to the paper it comes from. No skimming, no AI slop.

256 top-tier papers have cited it since. Know what they found before your reviewers do.

Questions to start from

Lune can draw on

the full paper · the top-tier papers that cite it · related work

Get the answer

Free to start. No credit card required.

Lineage

  • GPT-4 Is Too Smart To Be Safe: Stealthy Chat with LLMs via Cipher cites Training language models to follow instructions with human feedback
  • Assessing the Brittleness of Safety Alignment via Pruning and Low-Rank Modifications cites GPT-4 Is Too Smart To Be Safe: Stealthy Chat with LLMs via Cipher
  • Assessing the Brittleness of Safety Alignment via Pruning and Low-Rank Modifications cites Direct Preference Optimization: Your Language Model is Secretly a Reward Model
  • Assessing the Brittleness of Safety Alignment via Pruning and Low-Rank Modifications cites Language Models are Few-Shot Learners
  • Assessing the Brittleness of Safety Alignment via Pruning and Low-Rank Modifications cites Training language models to follow instructions with human feedback
  • Multitask Prompted Training Enables Zero-Shot Task Generalization cites Language Models are Few-Shot Learners
  • PAL: Program-aided Language Models cites Language Models are Few-Shot Learners
  • Direct Preference Optimization: Your Language Model is Secretly a Reward Model cites Multitask Prompted Training Enables Zero-Shot Task Generalization
  • Direct Preference Optimization: Your Language Model is Secretly a Reward Model cites Language Models are Few-Shot Learners
  • Direct Preference Optimization: Your Language Model is Secretly a Reward Model cites Training language models to follow instructions with human feedback
  • SimPO: Simple Preference Optimization with a Reference-Free Reward cites Direct Preference Optimization: Your Language Model is Secretly a Reward Model
  • SimPO: Simple Preference Optimization with a Reference-Free Reward cites Language Models are Few-Shot Learners
  • SimPO: Simple Preference Optimization with a Reference-Free Reward cites Is DPO Superior to PPO for LLM Alignment? A Comprehensive Study
  • SimPO: Simple Preference Optimization with a Reference-Free Reward cites Training language models to follow instructions with human feedback
  • WildTeaming at Scale: From In-the-Wild Jailbreaks to (Adversarially) Safer Language Models cites GPT-4 Is Too Smart To Be Safe: Stealthy Chat with LLMs via Cipher
  • WildTeaming at Scale: From In-the-Wild Jailbreaks to (Adversarially) Safer Language Models cites Assessing the Brittleness of Safety Alignment via Pruning and Low-Rank Modifications
  • Is DPO Superior to PPO for LLM Alignment? A Comprehensive Study cites Direct Preference Optimization: Your Language Model is Secretly a Reward Model
  • Is DPO Superior to PPO for LLM Alignment? A Comprehensive Study cites Language Models are Few-Shot Learners
  • Is DPO Superior to PPO for LLM Alignment? A Comprehensive Study cites Training language models to follow instructions with human feedback
  • Training language models to follow instructions with human feedback cites Multitask Prompted Training Enables Zero-Shot Task Generalization
  • Training language models to follow instructions with human feedback cites Language Models are Few-Shot Learners
Builds onCited byLeft to right by year; the more cited, the higher.

Cited by top-tier papers256

  1. SimPO: Simple Preference Optimization with a Reference-Free RewardYu Meng, Mengzhou Xia, Danqi ChenNeurIPS 2024 · 1,203 citations
  2. GPT-4 Is Too Smart To Be Safe: Stealthy Chat with LLMs via CipherYouliang Yuan, Wenxiang Jiao, Wenxuan Wang, Jen-tse Huang et al.ICLR 2024 · 441 citations
  3. Is DPO Superior to PPO for LLM Alignment? A Comprehensive StudyShusheng Xu, Wei Fu, Jiaxuan Gao, Wenjie Ye et al.ICML 2024 · 274 citations
  4. WildTeaming at Scale: From In-the-Wild Jailbreaks to (Adversarially) Safer Language ModelsLiwei Jiang, Kavel Rao, Seungju Han, Allyson Ettinger et al.NeurIPS 2024 · 247 citations
  5. Assessing the Brittleness of Safety Alignment via Pruning and Low-Rank ModificationsBoyi Wei, Kaixuan Huang, Yangsibo Huang, Tinghao Xie et al.ICML 2024 · 215 citations

Builds on14

  1. Language Models are Few-Shot LearnersTom B. Brown, Benjamin Mann, Nick Ryder, Melanie Subbiah et al.NeurIPS 2020 · 64,255 citations
  2. Training language models to follow instructions with human feedbackLong Ouyang, Jeffrey Wu, Xu Jiang, Diogo Almeida et al.NeurIPS 2022 · 24,707 citations
  3. Direct Preference Optimization: Your Language Model is Secretly a Reward ModelRafael Rafailov, Archit Sharma, Eric Mitchell, Christopher D. Manning et al.NeurIPS 2023 · 10,924 citations
  4. Multitask Prompted Training Enables Zero-Shot Task GeneralizationVictor Sanh, Albert Webson, Colin Raffel, Stephen H. Bach et al.ICLR 2022 · 1,976 citations
  5. PAL: Program-aided Language ModelsLuyu Gao, Aman Madaan, Shuyan Zhou, Uri Alon et al.ICML 2023 · 700 citations

Related papers

  1. SafeDPO: A Simple Approach to Direct Preference Optimization with Enhanced SafetyGeon-Hyeong Kim, Yu Jin Kim, Byoungjip Kim, Honglak Lee et al.ICLR 2026 · 42 citations
  2. PURE: Aligning LLM via Pluggable Query Reformulation for Enhanced HelpfulnessWenjin Yao, Yidong Wang, Zhuohao Yu, Rui Xie et al.EMNLP Findings 2024 · 2 citations
  3. One-Shot Safety Alignment for Large Language Models via Optimal DualizationXinmeng Huang, Shuo Li, Edgar Dobriban, Osbert Bastani et al.NeurIPS 2024 · 30 citations
  4. Stepwise Alignment for Constrained Language Model Policy OptimizationAkifumi Wachi, Thien Q. Tran, Rei Sato, Takumi Tanabe et al.NeurIPS 2024 · 33 citations
  5. Gradient-Adaptive Policy Optimization: Towards Multi-Objective Alignment of Large Language ModelsChengao Li, Hanyu Zhang, Yunkun Xu, Hongyan Xue et al.ACL 2025 · 13 citations
Dusk over the sea between two cliffs drawn in fine vertical lines