recipes/02-measure/reward-hacking
(offline, no key, seconds).
What the research says
Plot the training reward (the proxy) and the reward you care about (the gold) against how far the weights have moved, and both rise together until the gold turns over while the proxy keeps climbing [1]. The signatures are verbosity, boilerplate, hedging, sycophancy and over-refusal [1, 4]. GRPO baselines each rollout against the others of the same ask, so only what separates reward within an ask is gradient [2]. That is why every check here centers within ask. A judge is a reward model, only as good as its agreement with your labels, and it prefers long replies unless you check it [3]. The reward has to read the trajectory, because the reply can claim anything [4].Five checks
1. The scan: what would the policy learn?
features= of your own. Auto features: the 200 most common
words and word pairs in the agent’s text, and pairwise ANDs that beat both
parents.
endorsed names what the reward should track; integrity is the share of
above-floor signal that is endorsed.
optimize(mode="rl", endorsed=) carries the scan in its report and
data.push(name, strict_hacks=True) refuses a reward_hack. The pooled
correlation (what reward_correlations reports) prints beside the
within-ask one; only the latter is immune to the difficulty confound.
2. The probes: which shortcuts fool the judge?
3. The trajectory: did the agent fake the work?
delta_report(must_not_regress=["honest_claims"]) fails a run that
learned to overclaim.
4. The run: is it hacking right now?
every steps the monitor samples the holdout from the live policy and
scores it with the proxy and with gold, a scorer the proxy cannot see.
Alarms: divergence, length, drift, feature; stop_on names the
ones that stop training. Needs a trainer:
recipes/04-train/grpo.
5. The verdict: did it hack?
proxy names the training reward’s marker. Proxy up while the target did
not follow, or the proxy’s interval entirely above the target’s, fails.
hack_scan_diff names the features that clear the floor only after
training.
Run it
Checks 1 to 3 and the verdict, offline, on a scripted refund agent and two judges: one reads the trajectory, one passes anything saying “verified”.pool_exhausted: half the asks are always answered
right and carry no gradient. A supply problem, not a hack.
Three rules
- Endorse what the reward should track, or nothing can call a hack a hack.
- A flagged reward is a judge problem, not a row problem. The checks rank; they do not prune. Fix the rubric, re-grade, re-scan.
- Keep the gold separate from the proxy: hand labels, the hosted judge, or a rule the training reward does not read.
References
- Gao, L., Schulman, J., Hilton, J. Scaling Laws for Reward Model Overoptimization. ICML 2023. arXiv:2210.10760.
- Shao, Z. et al. DeepSeekMath: Pushing the Limits of Mathematical Reasoning in Open Language Models. arXiv:2402.03300, 2024.
- Zheng, L. et al. Judging LLM-as-a-Judge with MT-Bench and Chatbot Arena. NeurIPS 2023. arXiv:2306.05685.
- Lambert, N. Reinforcement Learning from Human Feedback. 2025. Chapters Over-optimization and Tool Use.