Learning a reward nobody can write down
Helpfulness has no formula. What exists instead is the ability to say, of two answers, which one is better.
The Bradley-Terry model turns a preference into a probability, so a set of comparisons becomes a likelihood and a reward function can be fitted to it.
- : the preferred answer, the rejected one.
Only the difference appears, so the reward is defined up to an additive constant, which is fine because only differences are ever used.
The three stages
- Supervised fine-tuning, to get a model that answers in the right shape at all.
- Reward modelling, on human comparisons of that model's own outputs.
- Reinforcement learning against the reward model, with PPO.
Stage three maximises the learned reward while penalising drift from the supervised model.
Comparisons are collected on the model's own outputs rather than on written ideals, which is why this needs stage one before it can start.
Why the KL penalty is load-bearing
The reward model is a model. It is accurate near the distribution it was trained on and arbitrary outside it.
Without the penalty, the policy finds text that scores extremely well and is not language, because nothing constrains it to stay where the reward model is valid.
If is too high nothing is learned, and if it is too low the policy hacks the reward.
That single coefficient is the most consequential hyperparameter in the pipeline.
What the reward model is worth
Preference labels are noisy, since two annotators disagree about a quarter of the time, and the reward model inherits that ceiling.
Overoptimisation is when true quality falls while keeps rising.
Beyond a certain amount of optimisation, the policy is exploiting the reward model's errors rather than satisfying the preference it approximates.
Length is the best documented example. Preference data favours longer answers, so reward models learn to reward length, and policies learn to pad.
The memory bill, and what replaced it
Four models are loaded at once during stage three, which makes RLHF the most expensive part of building an assistant.
Direct preference optimisation shows the optimal policy can be written in closed form in terms of the reward, which lets the reward model be eliminated entirely.
Two models, a supervised-style loss, no sampling loop, and results close to full RLHF, which is why most open models now use it.
RLHF retains an advantage where the reward can be checked rather than preferred.
Online sampling lets the policy explore and be scored on outcomes a fixed preference set never contained.