Enhancing Safety in Reinforcement Learning with Human Feedback via Rectified Policy Optimization

Fuente: arXiv
Enregistré dans:
Détails bibliographiques
Auteurs principaux: Peng, Xiyue, Guo, Hengquan, Zhang, Jiawei, Zou, Dongqing, Shao, Ziyu, Wei, Honghao, Liu, Xin
Format: Preprint
Publié: 2024
Sujets:
Accès en ligne:
Tags: Ajouter un tag
Pas de tags, Soyez le premier à ajouter un tag!
_version_ 1866909513549873152
author Peng, Xiyue
Guo, Hengquan
Zhang, Jiawei
Zou, Dongqing
Shao, Ziyu
Wei, Honghao
Liu, Xin
author_facet Peng, Xiyue
Guo, Hengquan
Zhang, Jiawei
Zou, Dongqing
Shao, Ziyu
Wei, Honghao
Liu, Xin
contents Balancing helpfulness and safety (harmlessness) is a critical challenge in aligning large language models (LLMs). Current approaches often decouple these two objectives, training separate preference models for helpfulness and safety, while framing safety as a constraint within a constrained Markov Decision Process (CMDP) framework. This paper identifies a potential issue when using the widely adopted expected safety constraints for LLM safety alignment, termed "safety compensation", where the constraints are satisfied on expectation, but individual prompts may trade off safety, resulting in some responses being overly restrictive while others remain unsafe. To address this issue, we propose Rectified Policy Optimization (RePO), which replaces the expected safety constraint with critical safety constraints imposed on every prompt. At the core of RePO is a policy update mechanism driven by rectified policy gradients, which penalizes the strict safety violation of every prompt, thereby enhancing safety across nearly all prompts. Our experiments demonstrate that RePO outperforms strong baseline methods and significantly enhances LLM safety alignment.
format Preprint
id arxiv_https___arxiv_org_abs_2410_19933
institution arXiv
publishDate 2024
record_format arxiv
spellingShingle Enhancing Safety in Reinforcement Learning with Human Feedback via Rectified Policy Optimization
Peng, Xiyue
Guo, Hengquan
Zhang, Jiawei
Zou, Dongqing
Shao, Ziyu
Wei, Honghao
Liu, Xin
Machine Learning
Artificial Intelligence
Computers and Society
Balancing helpfulness and safety (harmlessness) is a critical challenge in aligning large language models (LLMs). Current approaches often decouple these two objectives, training separate preference models for helpfulness and safety, while framing safety as a constraint within a constrained Markov Decision Process (CMDP) framework. This paper identifies a potential issue when using the widely adopted expected safety constraints for LLM safety alignment, termed "safety compensation", where the constraints are satisfied on expectation, but individual prompts may trade off safety, resulting in some responses being overly restrictive while others remain unsafe. To address this issue, we propose Rectified Policy Optimization (RePO), which replaces the expected safety constraint with critical safety constraints imposed on every prompt. At the core of RePO is a policy update mechanism driven by rectified policy gradients, which penalizes the strict safety violation of every prompt, thereby enhancing safety across nearly all prompts. Our experiments demonstrate that RePO outperforms strong baseline methods and significantly enhances LLM safety alignment.
title Enhancing Safety in Reinforcement Learning with Human Feedback via Rectified Policy Optimization
topic Machine Learning
Artificial Intelligence
Computers and Society
url https://arxiv.org/abs/2410.19933