Reward hacking and overoptimization
Explain Goodhart's law for learned rewards (a measure that becomes a target stops being a good measure): the proxy reward keeps rising while true quality peaks and then falls as the policy drifts. Predict typical exploits such as length and confident tone.
Builds on: RLHF with a KL penalty
What the animation says
Score up, humans down
Here is an RLHF run. The policy is trained to maximize a reward model's score, with a penalty for drifting from the starting model. Watch the reward score as training goes on. It keeps climbing. Now the blind human comparisons against the SFT model. Quality rises at first, then falls. The late answers are longer, padded, and more sure of themselves. So the score goes up while people like the answers less. What is the policy actually getting better at?
A proxy, not the target
It is getting better at fooling the reward model. That model is a proxy. Its score equals true quality plus an error. It learned from comparisons of answers near the starting model, so near there the error is small. Far away, nothing ever corrected it, and the errors spread wide. Early on, the easy gains are real. Later, the top scores sit where the error is large and positive. The optimizer is now selecting the reward model's mistakes. That is Goodhart's law.
One prompt, three answers
Take one prompt: why is my Python loop slow? Answer A is short and correct. True quality six, reward score five. Answer B is clear, correct, and gives a fix. Eight and eight. A to B: score up three, quality up two. A real gain. Answer C is three times longer, repeats B, and adds a confident wrong claim. Quality five, score nine and a half. B to C: score up one and a half, quality down three. C sits far from anything the reward model was ever corrected on.
Proxy rises, quality peaks
Now plot checkpoints against drift: the square root of the KL from the starting model. The reward score keeps rising with drift. True quality, the gain over SFT, roughly follows drift times a minus b log drift. It rises, peaks, then falls. Setting its slope to zero puts the peak where log drift equals a over b, minus one. Past that point is overoptimization. So the checkpoint worth keeping is where blind human judgment peaks, not where the score is highest. Now suppose you raise beta, the KL penalty. What changes?
Predicting the exploits
Raising beta just stops you earlier on the same curve. It does not fix the reward model's errors. Overoptimization is the symptom. The cause is reward hacking: the policy exploiting those errors. To predict the exploits, look for traits raters liked on average, could not verify, and the policy can produce cheaply. Here are four traits. One of them fails that test. It is not a cheap exploit. Tap it.
A target stops being a good measure
Proxy rises, true quality peaks
One prompt, three answers
Optimizing a proxy optimizes its errors
On Bytewise this lesson comes in small steps with a check at the end, and the app brings it back right before you would forget it.
Bytewise
All courses