Bradley-Terry Model › Connection to Reward Modeling

Michael BrenndoerferDecember 23, 20256 min read
Language AI HandbookAll chapters
Part 37 of 67Alignment and RLHF
Chapter 274Bradley-Terry Model › Connection to Reward Modeling
Reading section 9 of 12 · Connection to Reward Modeling · 6 minSection 9 of 12 · 6 min

Book contents

Section 9 of 12 · 6 min read

Bradley-Terry Model › Connection to Reward ModelingOne section · Sections in this chapter9 / 12 ↓
Reading tools Definitions & inline links

Choose your expertise level to adjust how many terms are explained. Beginners see more tooltips, experts see fewer to maintain reading flow. Hover over underlined terms for instant definitions.

Article links

Make inline references clickable

The Bradley-Terry model is the foundation of reward model training in RLHF. Understanding this connection reveals why reward models are trained the way they are and illuminates the mathematical underpinnings of alignment techniques. This is perhaps the most important section of this chapter for practitioners building LLM alignment pipelines: the reward model training objective is not arbitrary; it is a direct instantiation of the Bradley-Terry likelihood.

Recall from the previous chapter that preference data consists of pairs (yw,yl)(y_w, y_l) where ywy_w is the preferred response and yly_l is the dispreferred response to the same prompt xx. A reward model rθ(x,y)r_\theta(x, y) assigns a scalar score to each prompt-response pair. This score represents the model's estimate of how good the response is for that particular prompt. The key insight is that we can interpret this reward as a Bradley-Terry strength parameter. Rather than having one fixed strength per item, we have a neural network that maps any (prompt, response) pair to a strength. This generalization is what allows the model to transfer from training prompts to novel prompts encountered at inference time.

Concretely, the probability that response ywy_w is preferred over yly_l should follow the Bradley-Terry formula:

P(yw≻yl∣x)=σ(rθ(x,yw)−rθ(x,yl))P(y_w \succ y_l \mid x) = \sigma(r_\theta(x, y_w) - r_\theta(x, y_l))

where:

  • yw,yly_w, y_l: the preferred (winning) and dispreferred (losing) responses
  • xx: the prompt or context
  • rθ(x,y)r_\theta(x, y): the reward model parameterized by weights θ\theta
  • σ(⋅)\sigma(\cdot): the sigmoid function converting the reward difference into a probability

This formulation says that the probability of preferring one response over another depends on the difference in their reward scores, passed through a sigmoid. Responses with higher rewards are more likely to be preferred, but the relationship is probabilistic, letting for noise in human judgments. Training the reward model to maximize this probability is equivalent to Bradley-Terry maximum likelihood estimation, except now the strength parameters are neural network outputs rather than fixed scalars. Instead of learning one number per item, we learn a function that can assign rewards to any prompt-response pair.

The loss function for reward model training is:

L(θ)=−E(x,yw,yl)∼D[log⁡σ(rθ(x,yw)−rθ(x,yl))]\mathcal{L}(\theta) = -\mathbb{E}_{(x, y_w, y_l) \sim \mathcal{D}} \left[ \log \sigma(r_\theta(x, y_w) - r_\theta(x, y_l)) \right]

where:

  • L(θ)\mathcal{L}(\theta): the loss function to minimize (negative log-likelihood)
  • D\mathcal{D}: the dataset of preference pairs
  • E\mathbb{E}: the expectation over samples drawn from the dataset
  • σ(⋅)\sigma(\cdot): the sigmoid function
  • rθ(x,y)r_\theta(x, y): the reward model output for input xx and response yy
  • yw,yly_w, y_l: the preferred and dispreferred responses

This is exactly the Bradley-Terry negative log-likelihood, with the expectation taken over the preference dataset. The connection is direct: minimizing this loss trains the neural network to produce reward scores that best explain the observed human preferences according to the Bradley-Terry model. We'll explore the full details of reward model architecture and training in the next chapter, but understanding Bradley-Terry makes the training objective transparent: we're fitting a neural network to predict comparison outcomes, using the same statistical framework that has been used to rank chess players since the 1950s.

The neural reward model generalizes the classical Bradley-Terry model in one important way: it can handle items that have never been directly compared. In the classical setting with nn fixed items, we could only make predictions about pairs that were directly represented in the parameter space. The neural reward model can evaluate any response to any prompt, because it learns a general function rather than a lookup table. This generalization is what makes reward models practical for training language models, where the "items" being compared are generated text sequences from an enormous combinatorial space.

Out[27]:
Visualization
Horizontal bar chart showing fixed log-strength parameters for items A (2.0), B (1.2), C (0.5), and D (-0.3), illustrating the classical Bradley-Terry one-parameter-per-item setup.
Classical Bradley-Terry parameterization with one fixed scalar parameter per item. Each item maps to a static log-strength value, letting consistent pairwise ranking but giving no mechanism to generalize to unseen inputs.
Out[28]:
Visualization
Schematic diagram of a small neural network with an input layer labeled (x, y), a hidden layer, and a single output node labeled r_theta, representing the reward model that replaces fixed Bradley-Terry strength parameters.
Neural reward model architecture as the generalized Bradley-Terry strength function. A neural network $r_\theta(x, y)$ maps any context-response pair to a scalar reward, preserving the Bradley-Terry probabilistic interpretation while letting generalization to novel inputs never seen during training.