Regularized Best-of-N Sampling with Minimum Bayes Risk Objective for Language Model Alignment

Yuu Jinnai, Tetsuro Morimura, Kaito Ariu, Kenshi Abe
4/1/2024
31 citations
cs.CLcs.AI
rlhf-rlvr-dpo

Official code: CyberAgentAILab/regularized-bon (14 stars, Python, MIT, last commit 2025-04-04).

Abstract

Best-of-N (BoN) sampling with a reward model has been shown to be an effective strategy for aligning Large Language Models (LLMs) to human preferences at the time of decoding. BoN sampling is susceptible to a problem known as reward hacking when the accuracy of the reward model is not high enough due to the quality or the quantity of the preference dataset.

Show full abstract

Because the reward model is an imperfect proxy for the true objective, over-optimizing its value can compromise its performance on the true objective. In this research, we propose MBR-BoN, a variant of BoN that aims to mitigate reward hacking at inference time by incorporating the Minimum Bayes Risk (MBR) objective as a proximity regularization term. We show empirically and analytically that the MBR objective quantifies the proximity of the response to the reference policy, serving as a proximity regularizer. We evaluate MBR-BoN on the AlpacaFarm and Anthropic's hh-rlhf datasets and show that it outperforms both BoN sampling and MBR decoding. We also evaluate MBR-BoN to generate a pairwise preference learning dataset for Direct Preference Optimization (DPO). Empirical results show that models trained on a dataset generated with MBR-BoN outperform those with vanilla BoN. Our code is available at https://github.com/CyberAgentAILab/regularized-bon

View on arXivView PDF

Code Implementations(1)

MIT

Code of "Regularized Best-of-N Sampling with Minimum Bayes Risk Objective for Language Model Alignment" (2025).

141Python, ShellMar 31, 20241 years agoMIT

Similar Papers

Cite this paper

@article{jinnai2024regularized,
  title  = {Regularized Best-of-N Sampling with Minimum Bayes Risk Objective for Language Model Alignment},
  author = {Yuu Jinnai and Tetsuro Morimura and Kaito Ariu and Kenshi Abe},
  year   = {2024},
  eprint = {2404.01054},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2404.01054v4}
}

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/2404.01054.svg)](https://codeofpaper.com/paper/2404.01054)

Discussion