Before you move a control in the demo, say what you expect to change.
Foundation reference
Reward Hacking & Overoptimization: Goodhart's Law in Preference Optimization
Reward hacking occurs when a policy raises a proxy reward without improving the quality that reward was meant to measure. In Gao et al. (2023), the proxy was a learned reward model and a larger 'gold' model stood in for human judgments; as the policy moved away from its starting point, the gold reward rose and then fell while the proxy reward kept rising.
Study guide
Where to start
What does Goodhart's law ("when a measure becomes a target, it ceases to be a good measure") predict for a policy trained to maximize a learned reward?
How to study this pagePredict · Check · Generalize · Continue
Compare what the demo shows with the key equation and with the papers cited below.
Identify the part of the idea that survives a change of notation or model, so you can recognize it in another paper or system.
The newer notebook covers the same concept and has an interactive demo.
Why It Matters for Modern Models
- Reward hacking occurs when a policy raises a proxy reward without improving the quality that reward was meant to measure. In Gao et al. (2023), the proxy was a learned reward model and a larger 'gold' model stood in for human judgments; as the policy moved away from its starting point, the gold reward rose and then fell while the proxy reward kept rising.
- A KL penalty slows reward hacking but does not remove it. In Gao et al.'s experiments it behaved much like early stopping: it limited how far the policy moved but did not raise the true reward reached at a given distance.
- Offline methods such as DPO are affected too: with sparse or noisy preference data, poorly covered responses can be overvalued (Type I) and good responses undervalued (Type II) (Rashidinejad & Tian, 2025).
- Disagreement within a reward-model ensemble is a usable warning sign: a high average reward with high disagreement marks a response the reward models cannot vouch for (Coste et al., 2024).
- Retraining the reward model on new data over several rounds of RLHF reduces overoptimization from round to round, but the gains level off (Wolf, Kirk & Musolesi, 2025).
Questions to Think About
- Why is reward hacking usually a sign of distribution shift, with the policy producing outputs the reward model never saw, rather than of a model "trying" to cheat?
- If a preference dataset contains no examples of a safety-critical case, why can an offline method such as DPO not learn the right behavior for it?
- How do sparse or noisy preference labels make a poor response look good (Type I) or a good response look bad (Type II)?
- Why might a high mean reward together with high disagreement across a reward-model ensemble mark a region where the proxy reward has broken down?
Interactive Demo
Core Math
If you prefer intuition first, try the demo above, then come back for the math.
Reward hacking happens when a policy is optimized against a proxy reward, usually a reward model learned from a finite set of human preferences, and finds outputs where the proxy is high but the true quality is not. Two things make this likely: the policy produces outputs unlike those the reward model was trained on (distribution shift), and the preference labels were noisy to begin with.
Proxy reward with a KL penalty (the RLHF objective):
The KL term keeps the policy near the reference model , where the reward model is more trustworthy. In a synthetic setup where a larger "gold" reward model stands in for human judgement, Gao et al. (2023) found that as the policy moves away from the reference, the proxy reward keeps rising while the gold reward first rises and then falls.
Conservative optimization with a reward-model ensemble:
Train reward models and compute their mean and variance:
Uncertainty-weighted optimization (UWO) maximizes
and worst-case optimization maximizes (Coste et al., 2024). Both prefer outputs on which the reward models agree.
InfoRM: an information bottleneck in the reward model:
where is the preference label and is a compressed representation of the prompt and response. The KL term limits how much information keeps, which aims to discard features that happen to predict the training labels but are unrelated to what people prefer (Miao et al., 2024).