Provably Efficient Online RLHF with One-Pass Reward Modeling

Long-Fei Li, Yuyang Qian, Peng Zhao, Zhi-Hua Zhou
2/1/2025
9 citations
rlhf-rlvr-dpo

No official code found. Best implementation: ZinYY/Online_RLHF (95 stars, Python, last commit 2025-12-13).

Abstract

Reinforcement Learning from Human Feedback (RLHF) has shown remarkable success in aligning Large Language Models (LLMs) with human preferences. Traditional RLHF methods rely on a fixed dataset, which often suffers from limited coverage.

Show full abstract

To this end, online RLHF has emerged as a promising direction, enabling iterative data collection and refinement. Despite its potential, this paradigm faces a key bottleneck: the requirement to continuously integrate new data into the dataset and re-optimize the model from scratch at each iteration, resulting in computational and storage costs that grow linearly with the number of iterations. In this work, we address this challenge by proposing a one-pass reward modeling method that eliminates the need to store historical data and achieves constant-time updates per iteration. Specifically, we first formalize RLHF as a contextual preference bandit and develop a new algorithm based on online mirror descent with a tailored local norm, replacing the standard maximum likelihood estimation for reward modeling. We then apply it to various online RLHF settings, including passive data collection, active data collection, and deployment-time adaptation. We provide theoretical guarantees showing that our method enhances both statistical and computational efficiency. Finally, we design practical algorithms for LLMs and conduct experiments with the Llama-3-8B-Instruct and Qwen2.5-7B-Instruct models on Ultrafeedback and Mixture2 datasets, validating the effectiveness of our approach.

View on arXivView PDF

Code Implementations(1)

ZinYY/Online_RLHFCommunity25%

A PyTorch implementation of the paper "Provably Efficient Online RLHF with One-Pass Reward Modeling". This repository provides a flexible and modular approach to Online Reinforcement Learning from Human Feedback (Online RLHF).

9518Python, ShellFeb 7, 202511 months ago
large-language-modelllmpost-trainingrlhf

Similar Papers

Cite this paper

@article{li2025provably,
  title  = {Provably Efficient Online RLHF with One-Pass Reward Modeling},
  author = {Long-Fei Li and Yuyang Qian and Peng Zhao and Zhi-Hua Zhou},
  year   = {2025},
  eprint = {2502.07193},
  archivePrefix = {arXiv},
  doi    = {10.52202/085713-5567},
  url    = {https://doi.org/10.52202/085713-5567},
  journal = {Neural Information Processing Systems}
}

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

Discussion