Online Preference Alignment for Language Models via Count-based Exploration

Chenjia Bai, Yang Zhang, Shuang Qiu, Qiaosheng Zhang, Kang Xu +1 more
1/22/2025
cs.LG

No official code found. Best implementation: Baichenjia/COPO (21 stars, last commit 2025-01-14).

Abstract

Reinforcement Learning from Human Feedback (RLHF) has shown great potential in fine-tuning Large Language Models (LLMs) to align with human preferences. Existing methods perform preference alignment from a fixed dataset, which can be limited in data coverage, and the resulting reward model is hard to generalize in out-of-distribution responses. Thus, online RLHF is more desirable to empower the LLM to explore outside the support of the initial dataset by iteratively collecting the prompt-response pairs. In this paper, we study the fundamental problem in online RLHF, i.e. \emph{how to explore} for LLM. We give a theoretical motivation in linear reward assumption to show that an optimistic reward with an upper confidence bound (UCB) term leads to a provably efficient RLHF policy. Then, we reformulate our objective to direct preference optimization with an exploration term, where the UCB-term can be converted to a count-based exploration bonus. We further propose a practical algorithm, named \emph{Count-based Online Preference Optimization (COPO)}, which leverages a simple coin-flip counting module to estimate the pseudo-count of a prompt-response pair in previously collected data. COPO encourages LLMs to balance exploration and preference optimization in an iterative manner, which enlarges the exploration space and the entire data coverage of iterative LLM policies. We conduct online RLHF experiments on Zephyr and Llama-3 models. The results on instruction-following and standard academic benchmarks show that COPO significantly increases performance.

View on arXivView PDF

Code Implementations(1)

Baichenjia/COPOCommunity100%

Online Preference Alignment for Language Models via Count-based Exploration

212Shell, PythonJan 14, 20251 years ago

Similar Papers

Cite this paper

@article{bai2025online,
  title  = {Online Preference Alignment for Language Models via Count-based Exploration},
  author = {Chenjia Bai and Yang Zhang and Shuang Qiu and Qiaosheng Zhang and Kang Xu and Xuelong Li},
  year   = {2025},
  eprint = {2501.12735},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2501.12735v3},
  journal = {ICLR 2025 2025}
}

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

Discussion