Reward models
Bradley–Terry and what an RM really learns
Statistical foundation: Bradley & Terry, Rank Analysis of Incomplete Block Designs: I. The Method of Paired Comparisons (Biometrika, 1952)
Step 2 of the RLHF recipe asks for something that sounds almost paradoxical: turn a pile of human “this beats that” judgments into a function that can score any response with a single number, including responses no human ever ranked. That function is the reward modelreward model (RM)A model trained from human preference data to output a scalar score for how good a response is. Stands in for a human judge so RL can query reward millions of times.See in glossary →, and this chapter is about what it is, how it’s trained, and (just as important) what it secretly is and isn’t.
What a reward model is in practice
A reward model is commonly a language-model backbone with a scalar head: a final output layer which outputs a single number. The backbone may be initialized from a pre-trained or SFT checkpoint; the usual language-model vocabulary head is replaced or bypassed for scoring. A linear head maps a sequence representation (often the hidden state at the final response token) to one number, the reward for response given prompt .
Starting from a capable language model is useful because the reward model needs to interpret the prompt and response. The scalar head is normally initialized afresh, while the backbone is then fine-tuned as well; implementations differ in whether they start from a base or SFT checkpoint.
The Bradley–Terry model: from scores to preferences
Here’s the central problem. Our data is comparisons ( beat ) but we want to output a scalar score. We need a bridge that says: given two scores, what’s the probability a human prefers one over the other? The Bradley–TerryBradley–Terry modelA simple rule for turning "A beats B" comparisons into a single score per item: the bigger an item's score over another, the more likely it wins. A reward model produces exactly such a score.See in glossary → model, from 1952, is exactly that bridge.
It says the probability that the winner is preferred to the loser is the softmaxsoftmaxFunction that turns any vector into a probability distribution (positive, sums to 1) by exponentiating and normalizing.See in glossary → (here in its two-item form, the logistic sigmoidsigmoidThe logistic function σ(z)=1/(1+e⁻ᶻ), which squashes any real score into a probability between 0 and 1. Turns a linear model into a binary classifier.See in glossary → ) of the difference in their scores:
First, the notation: reads “the probability that is preferred to ”. The symbol is the standard preference-ordering symbol (a curly “greater than”: preferred to, rather than numerically bigger than), and the subscripts follow the dataset convention from above: for the winning response, for the losing one.
Read it intuitively. If the two scores are equal, the difference is zero and , a coin flip, as it should be. As the winner’s score pulls ahead, the difference grows positive and the probability climbs toward 1. The model is a smooth, probabilistic statement that bigger score means more likely to be preferred, with the gap controlling how confident the preference is.
The logistic sigmoid, up close
Since carries the whole bridge, it’s worth pausing on what this function actually is. The logistic sigmoid is
a machine that takes any real number (a score gap of , , , anything) and squashes it into a probability strictly between 0 and 1. Plotted, it’s an S-shaped curve: near-zero on the far left, climbing steeply through in the middle, then flattening out near 1 on the far right. Four of its properties do all the work in this chapter:
- It’s monotonic. A bigger input always means a bigger output, so “higher reward gap” always translates to “more likely to be preferred”, never the reverse. That is the minimum sanity requirement for a preference model.
- It’s symmetric around the midpoint: . Swap winner and loser and the probability flips to its complement, so automatically. The two possible outcomes always account for all the probability, with no extra bookkeeping.
- It saturates. Once the gap is large (around , where passes ), pushing it further barely changes the probability. A reward model that scores the winner miles above the loser gets almost no additional credit over one that scores it comfortably above: the loss cares about getting the order right with a decent margin, not about inflating the gap forever.
- Its inverse is the log-oddslogit / scoreThe raw, unbounded linear output (w·x + b) before it is squashed by a sigmoid or softmax into a probability.See in glossary →. If , then . So the score gap isn’t just some number that happens to produce a probability: it is the log-odds of the preference. A gap of means even odds, a gap of about means 9-to-1, a gap of means 99-to-1. This gives reward-model score differences concrete meaning: units of log-odds of winning a human comparison.
Training the reward model
Now training is a one-liner. We have a labeled preference : we observed the human prefer . The Bradley–Terry model gives us the probability our reward function assigns to that observation. We just maximize that probability, which is the same as minimizing its negative log, a maximum-likelihood fit. For a single example:
This is the entire reward-model objective. It is exactly a binary cross-entropycross-entropy lossA classification loss that penalizes the model according to the negative log-probability it assigned to the correct answer.See in glossary → loss on the preference label, and it does precisely what you’d want: it pushes the score of the chosen response up and the score of the rejected response down, until the gap between them is large enough that of the difference is close to 1. Average it over your whole dataset of triples, run gradient descent, and you have a reward model.
What the reward model actually learns, and a subtlety
It’s tempting to think the reward model learns “the quality” of a response in some absolute sense. It doesn’t. Look again at the loss: only the difference ever appears. If you added the same constant to every score the model produces, every difference (and therefore every preference probability and the entire loss) would be completely unchanged.
This means the reward model is only identified up to an additive function of the prompt: adding the same to every candidate response for prompt leaves every within-prompt comparison unchanged. Its absolute scale and offset are therefore not directly identified by pairwise data; relative scores for comparable candidates are what the loss constrains. Implementations may normalize or calibrate scores for optimization, but that is an additional convention rather than information recovered from Bradley–Terry labels.
And what the model has actually learned is a proxy for human judgment: a compression of thousands of human “this beats that” clicks into a function that generalizes to new responses. It is not truth, not a ground-truth quality oracle; it’s a learned approximation, and a flawed one. That flaw is not a footnote. Optimizing too hard against an imperfect proxy is reward hackingreward hackingWhen a policy finds ways to score high on the reward model without actually being better — exploiting quirks of an imperfect proxy. A central danger of RL post-training.See in glossary →, the failure mode that gets its own chapter (19), and measuring how good a reward model even is launched a benchmark, RewardBenchRewardBenchA standard benchmark for evaluating reward models across chat, safety, and reasoning, making reward-model quality measurable and comparable.See in glossary →, that we cover in chapter 31.
Try it
The widget below makes Bradley–Terry tangible. Set an underlying score for each of two responses and watch how the preference probability responds. Notice the two facts from above: equal scores give exactly 0.5, and only the gap between the scores matters. Shift both by the same amount and the probability doesn’t budge.
Where this is going
We now have a learned, automatic stand-in for human preference: a scalar reward we can query on any response. Chapter 12 asks what happens when even the comparisons feeding this model come from an AI rather than a human: the move to RLAIF and Constitutional AI. After that, Section 4 finally opens the other black box from the recipe: the reinforcement learning that turns this reward signal into an improved policy.