Table of Contents
Fetching ...

Repairing Reward Functions with Human Feedback to Mitigate Reward Hacking

Stephane Hatgis-Kessell, Logan Mondal Bhamidipaty, Emma Brunskill

TL;DR

The paper tackles reward misalignment and reward hacking by proposing Preference-Based Reward Repair (PBRR), which repairs a human-specified proxy reward $\hat{r}_{proxy}$ through a transition-dependent correction $g(s,a,s')$, yielding $\hat{r} = \hat{r}_{proxy} + g$. It learns $g$ from human trajectory preferences via a Bradley–Terry model, using a three-term loss that regularizes corrections to only misranked transitions and keeps aligned transitions unchanged, while exploring with a reference policy. Theoretical results show sublinear regret in both known and unknown dynamics, and empirical results across pandemic, glucose, traffic, and AI-safety domains demonstrate data-efficient repair and robust improvement over baselines that learn rewards from scratch or repair via alternative methods. The findings suggest that data-efficient reward alignment can be achieved by targeted exploration combined with a principled correction objective, reducing reliance on large human preference datasets. The work has practical significance for deploying RL in high-stakes settings where human objectives are only partially observable, and it provides a reusable framework for aligning agent behavior with human intent using limited feedback.

Abstract

Human-designed reward functions for reinforcement learning (RL) agents are frequently misaligned with the humans' true, unobservable objectives, and thus act only as proxies. Optimizing for a misspecified proxy reward function often induces reward hacking, resulting in a policy misaligned with the human's true objectives. An alternative is to perform RL from human feedback, which involves learning a reward function from scratch by collecting human preferences over pairs of trajectories. However, building such datasets is costly. To address the limitations of both approaches, we propose Preference-Based Reward Repair (PBRR): an automated iterative framework that repairs a human-specified proxy reward function by learning an additive, transition-dependent correction term from preferences. A manually specified reward function can yield policies that are highly suboptimal under the ground-truth objective, yet corrections on only a few transitions may suffice to recover optimal performance. To identify and correct for those transitions, PBRR uses a targeted exploration strategy and a new preference-learning objective. We prove in tabular domains PBRR has a cumulative regret that matches, up to constants, that of prior preference-based RL methods. In addition, on a suite of reward-hacking benchmarks, PBRR consistently outperforms baselines that learn a reward function from scratch from preferences or modify the proxy reward function using other approaches, requiring substantially fewer preferences to learn high performing policies.

Repairing Reward Functions with Human Feedback to Mitigate Reward Hacking

TL;DR

The paper tackles reward misalignment and reward hacking by proposing Preference-Based Reward Repair (PBRR), which repairs a human-specified proxy reward through a transition-dependent correction , yielding . It learns from human trajectory preferences via a Bradley–Terry model, using a three-term loss that regularizes corrections to only misranked transitions and keeps aligned transitions unchanged, while exploring with a reference policy. Theoretical results show sublinear regret in both known and unknown dynamics, and empirical results across pandemic, glucose, traffic, and AI-safety domains demonstrate data-efficient repair and robust improvement over baselines that learn rewards from scratch or repair via alternative methods. The findings suggest that data-efficient reward alignment can be achieved by targeted exploration combined with a principled correction objective, reducing reliance on large human preference datasets. The work has practical significance for deploying RL in high-stakes settings where human objectives are only partially observable, and it provides a reusable framework for aligning agent behavior with human intent using limited feedback.

Abstract

Human-designed reward functions for reinforcement learning (RL) agents are frequently misaligned with the humans' true, unobservable objectives, and thus act only as proxies. Optimizing for a misspecified proxy reward function often induces reward hacking, resulting in a policy misaligned with the human's true objectives. An alternative is to perform RL from human feedback, which involves learning a reward function from scratch by collecting human preferences over pairs of trajectories. However, building such datasets is costly. To address the limitations of both approaches, we propose Preference-Based Reward Repair (PBRR): an automated iterative framework that repairs a human-specified proxy reward function by learning an additive, transition-dependent correction term from preferences. A manually specified reward function can yield policies that are highly suboptimal under the ground-truth objective, yet corrections on only a few transitions may suffice to recover optimal performance. To identify and correct for those transitions, PBRR uses a targeted exploration strategy and a new preference-learning objective. We prove in tabular domains PBRR has a cumulative regret that matches, up to constants, that of prior preference-based RL methods. In addition, on a suite of reward-hacking benchmarks, PBRR consistently outperforms baselines that learn a reward function from scratch from preferences or modify the proxy reward function using other approaches, requiring substantially fewer preferences to learn high performing policies.
Paper Structure (46 sections, 9 theorems, 56 equations, 14 figures, 5 tables, 1 algorithm)

This paper contains 46 sections, 9 theorems, 56 equations, 14 figures, 5 tables, 1 algorithm.

Key Result

Theorem 4.1

Let $\delta \leq \frac{1}{e}$ and $\lambda \geq B/\kappa$. Then under Assumptions asm:linear,asm:bounded, asm:bt_prefs, and asm:bounded_features, and that the dynamics model is known, for $f=f_{mk}$ and $\Pi_t = \Pi_{t,mk}$, with probability at least $1-\delta$, the expected regret of Algorithm alg: where $\tilde{\mathcal{O}}$ hides logarithmic factors in $T,\frac{1}{\delta},B,\frac{1}{\kappa},\fr

Figures (14)

  • Figure 1: Illustration of Preference-Based Reward Repair (PBRR). A human specifies a proxy reward function $\hat{r}$, which is optimized for with reinforcement learning (RL) to produce a policy $\pi^*_{\hat{r}}$. Preferences between trajectories from $\pi^*_{\hat{r}}$ and a safe reference policy $\pi_{\text{ref}}$ are elicited to identify instances of unaligned behavior. The preferences are used to update $\hat{r}$ and the process repeats, iteratively aligning the proxy reward function with the human’s unobservable ground-truth reward function $r$.
  • Figure 2: Mean return under the ground-truth reward function achieved by PBRR compared to the baselines from Section \ref{['sec:baselines']}, averaged over 3 random seeds. The mean return for each seed is scaled so that, after scaling, the reference policy has a mean return of $0$ and $r$-PPO has a mean return of $1$. Values are clipped to $[-1, 1]$, with values below $-1$ indicating very poor performance. Shaded regions indicate the standard error. Unscaled, unclipped returns and further plotting details are provided in Appendix \ref{['app:unscaled_res']} and Appendix \ref{['app:plot_details']}.★ and ★ mark PBRR's performance after two proxy reward function updates and the final update respectively.
  • Figure 3: Mean return under the ground-truth reward function achieved by PBRR, compared to (i) PBRR using the standard preference-learning objective (Eq.\ref{['eq:loss']}) instead of our proposed objective (Eq.\ref{['eq:reg-pref-loss']}), and (ii) other methods that repair the proxy reward function equipped with our proposed objective. See Figure \ref{['fig:main_results']} for plotting details.
  • Figure 4: Mean return under the ground-truth reward function achieved by the Online-RLHF baseline and its variants that utilize proposed data-efficiency techniques from lee2021pebble and liang2022reward. See Figure \ref{['fig:main_results']} for plotting details.
  • Figure 5: Mean return under the ground-truth reward function achieved by the Online-RLHF baseline and the Online-RLHF + metcalf2024sample. See Figure \ref{['fig:main_results']} for plotting details.
  • ...and 9 more figures

Theorems & Definitions (16)

  • Theorem 4.1
  • Theorem 4.2
  • Theorem 4.3
  • Corollary 4.4
  • Corollary 4.5
  • Theorem H.1
  • proof
  • Theorem I.1
  • proof
  • Theorem I.2
  • ...and 6 more