Improving Reinforcement Learning from Human Feedback Using Contrastive Rewards

Wei Shen, Xiaoying Zhang, Yuanshun Yao, Rui Zheng, Hongyi Guo +1 more
3/12/2024
cs.CLcs.AI

No confident code implementation found for this paper.

Abstract

Reinforcement learning from human feedback (RLHF) is the mainstream paradigm used to align large language models (LLMs) with human preferences. Yet existing RLHF heavily relies on accurate and informative reward models, which are vulnerable and sensitive to noise from various sources, e.g. human labeling errors, making the pipeline fragile. In this work, we improve the effectiveness of the reward model by introducing a penalty term on the reward, named as \textit{contrastive rewards}. %Contrastive rewards Our approach involves two steps: (1) an offline sampling step to obtain responses to prompts that serve as baseline calculation and (2) a contrastive reward calculated using the baseline responses and used in the Proximal Policy Optimization (PPO) step. We show that contrastive rewards enable the LLM to penalize reward uncertainty, improve robustness, encourage improvement over baselines, calibrate according to task difficulty, and reduce variance in PPO. We show empirically contrastive rewards can improve RLHF substantially, evaluated by both GPTs and humans, and our method consistently outperforms strong baselines.

View on arXivView PDF

Code Implementations

No confident code match yet

We couldn't find an author-owned or strongly-evidenced community implementation for this paper. Any repos shown below are weak matches — verify before relying on them.

No code implementations found yet.

Know of an implementation? Let us know in the comments below!

Similar Papers

Cite this paper

@article{shen2024improving,
  title  = {Improving Reinforcement Learning from Human Feedback Using Contrastive Rewards},
  author = {Wei Shen and Xiaoying Zhang and Yuanshun Yao and Rui Zheng and Hongyi Guo and Yang Liu},
  year   = {2024},
  eprint = {2403.07708},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2403.07708v2}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2403.07708.svg)](https://codeofpaper.com/paper/2403.07708)

Discussion