Efficient Two-Phase Offline Deep Reinforcement Learning from Preference Feedback

Yinglun Xu, Gagandeep SingharXiv 2024 · DOI

Introduction

Training reinforcement learning (RL) agents from human preferences in an offline setting often fails because agents "hack" the learned reward model by exploring actions the dataset doesn't cover. This paper introduces PRC (Preference-based Reinforcement learning with Constrained actions), a method that solves this by strictly limiting the agent’s choices to a "safe" action space defined by the original dataset, significantly improving learning efficiency and stability.

The Problem: Reward Hacking in Offline RLHF

Reinforcement Learning from Human Feedback (RLHF) has been a game-changer for technologies like chatbots, where defining a mathematical reward function is nearly impossible. However, in the real world, we often only have a static, offline dataset of preferences. The standard approach involves training a reward model and then optimizing a policy to maximize that reward.

The core issue is Reward Hacking: because the reward model is an approximation, it is often wildly inaccurate for state-action pairs not present in the training data. An RL agent naturally gravitates toward these out-of-distribution (OOD) areas if the model mistakenly assigns them high rewards. Furthermore, searching the entire possible action space makes optimization unnecessarily complex and unstable.

Methodology: Action Space Constraining

PRC proposes a hard constraint on the second step of the learning process. Instead of letting the RL agent try any action and then penalizing it for straying (the standard "soft" KL-regularization approach), PRC imposes a strict boundary.

The algorithm first trains a reward model and a "behavior clone" policy ($\pi_b$) that mimics the offline dataset. It then defines a restricted action space—essentially a "box" centered around the action suggested by the behavior clone. The RL agent is only allowed to optimize within this restricted neighborhood, preventing it from ever encountering the unreliable OOD rewards that lead to hacking.

A major realization of this work is that the difficulty of offline preference-based RL stems from the search space size. By shrinking this space, the RL agent finds a good policy faster and more reliably. Crucially, in PRC, the "simulated" performance (what the reward model predicts) and "true" performance (actual environment results) stay aligned. In contrast, standard methods often show the agent "thinking" it is performing well while it is actually failing—a classic sign of reward hacking.

Alignment of simulated vs. true performance across tasks.

Experimental Results

The researchers evaluated PRC using the D4RL benchmark across various environments like Hopper and Walker2d. PRC consistently outperformed other two-step baselines and rivaled the performance of an "Oracle" trained with true reward functions.

  • Performance: In the Walker2d-Medium-Expert task, PRC achieved a score of 110.4, nearly identical to the Oracle's 111.5, while standard KL-regularized methods trailed at 92.1.
  • Efficiency: PRC reached high performance levels in fewer training epochs compared to naive two-step learning, which often failed to learn a useful policy due to reward model instability.
True performance on the Walker2d-Medium-Expert task.

Across all tested D4RL datasets, PRC's sum of normalized scores was 669.6, significantly higher than the next best non-oracle method (RM+IQL at 587.4).

Conclusion and Future Work

PRC demonstrates that hard constraints on the action space are more effective than soft penalties for stabilizing offline RL from preferences. While highly effective for continuous control, future research is needed to evaluate its performance on discrete tasks and large-scale language modeling, as well as optimizing the hyperparameter for the constraint radius.

Summary updated

BibTeX
@misc{xu2024efficient,
  author = {Yinglun Xu and Gagandeep Singh},
  title = {{Efficient Two-Phase Offline Deep Reinforcement Learning from Preference Feedback}},
  year = {2024},
  eprint = {2401.00330},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2401.00330},
}
Figure