Preference-Guided Reflective Sampling for Aligning Language Models

Hai Ye, Hwee Tou Ng
8/22/2024
cs.CL

No official code found. Best implementation: nusnlp/PRS (7 stars, last commit 2024-11-04).

Abstract

Iterative data generation and model re-training can effectively align large language models(LLMs) to human preferences. The process of data sampling is crucial, as it significantly influences the success of policy improvement. Repeated random sampling is a widely used method that independently queries the model multiple times to generate outputs. In this work, we propose a more effective sampling method, named Preference-Guided Reflective Sampling (PRS). Unlike random sampling, PRS employs a tree-based generation framework to enable more efficient sampling. It leverages adaptive self-refinement techniques to better explore the sampling space. By specifying user preferences in natural language, PRS can further optimize response generation according to these preferences. As a result, PRS can align models to diverse user preferences. Our experiments demonstrate that PRS generates higher-quality responses with significantly higher rewards. On AlpacaEval and Arena-Hard, PRS substantially outperforms repeated random sampling in best-of-$N$ sampling. Moreover, PRS shows strong performance when applied in iterative offline RL training.

View on arXivView PDF

Code Implementations(1)

nusnlp/PRSCommunity100%
70Shell, PythonJun 10, 20241 years ago

Similar Papers

Cite this paper

@article{ye2024preferenceguided,
  title  = {Preference-Guided Reflective Sampling for Aligning Language Models},
  author = {Hai Ye and Hwee Tou Ng},
  year   = {2024},
  eprint = {2408.12163},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2408.12163v2}
}

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

Discussion