Bradley-Terry Model › The Log-Linear Form

Michael BrenndoerferDecember 23, 20255 min read
Language AI HandbookAll chapters
Part 37 of 67Alignment and RLHF
Chapter 274Bradley-Terry Model › The Log-Linear Form
Reading section 3 of 12 · The Log-Linear Form · 5 minSection 3 of 12 · 5 min

Book contents

Section 3 of 12 · 5 min read

Bradley-Terry Model › The Log-Linear FormOne section · Sections in this chapter3 / 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

While the ratio formulation is intuitive, a more convenient parameterization uses log-strengths. This transformation opens up powerful connections to logistic regression and makes optimization considerably easier. It also reveals the deep mathematical structure that links Bradley-Terry to the neural network training objectives we will use for reward models. Let βi=log⁡(πi)\beta_i = \log(\pi_i). Since strengths must be positive, the log-strength can be any real number, which is mathematically more convenient for optimization algorithms that operate over unconstrained real-valued spaces. We can now derive the equivalent expression in terms of these log-strengths:

P(i≻j)=πiπi+πj=eβieβi+eβj(substitute π=eβ)=eβi−βj1+eβi−βj(divide numerator and denominator by eβj)=σ(βi−βj)(definition of sigmoid)\begin{aligned} P(i \succ j) &= \frac{\pi_i}{\pi_i + \pi_j} \\ &= \frac{e^{\beta_i}}{e^{\beta_i} + e^{\beta_j}} && \text{(substitute } \pi = e^{\beta} \text{)} \\ &= \frac{e^{\beta_i - \beta_j}}{1 + e^{\beta_i - \beta_j}} && \text{(divide numerator and denominator by } e^{\beta_j} \text{)} \\ &= \sigma(\beta_i - \beta_j) && \text{(definition of sigmoid)} \end{aligned}

where:

  • βi,βj\beta_i, \beta_j: the log-strength parameters of items ii and jj
  • πi,πj\pi_i, \pi_j: the latent strength parameters (β=log⁡π\beta = \log \pi)
  • σ(x)\sigma(x): the sigmoid function 11+e−x\frac{1}{1 + e^{-x}}

The function σ(x)\sigma(x) is the standard sigmoid familiar from logistic regression and neural network activations (as covered in our chapter on activation functions). The key insight here is that the log transformation converts a ratio of two quantities into a difference of their logs. The win probability depends not on the absolute strengths but on how much larger one log-strength is than the other. A difference of βi−βj=1\beta_i - \beta_j = 1 means item ii is e≈2.72e \approx 2.72 times stronger than item jj, and this corresponds to a win probability of σ(1)≈0.73\sigma(1) \approx 0.73. A difference of 2 means item ii is e2≈7.39e^2 \approx 7.39 times stronger, corresponding to a win probability of σ(2)≈0.88\sigma(2) \approx 0.88.

The sigmoid function has several properties that make it ideal for representing probabilities. It maps any real number to the interval (0,1)(0, 1). This keeps valid probabilities. It is symmetric around zero, meaning σ(−x)=1−σ(x)\sigma(-x) = 1 - \sigma(x), which captures the natural symmetry of pairwise comparisons: the probability that jj beats ii equals one minus the probability that ii beats jj. The sigmoid is also smooth and differentiable everywhere, which enables gradient-based optimization. This differentiability is important when the parameters β\beta are outputs of a neural network: we can backpropagate gradients through the sigmoid to update the network weights.

Think of the log-strength parameterization as converting the strength problem into a distance problem. Each item is placed on a one-dimensional number line by its log-strength value. The probability that item ii beats item jj is a function of the signed distance βi−βj\beta_i - \beta_j: positive means ii is to the right of jj on the line and thus more likely to win, negative means jj is more likely to win. The sigmoid converts this signed distance into a probability. The further apart two items are on this line, the more predictable their comparison outcomes become. Items clustered near the same point on the line will have comparison outcomes close to 50/50.

Out[5]:
Visualization
S-shaped sigmoid curve plotted from -6 to 6, passing through 0.5 at x=0, with horizontal dashed reference lines at 0, 0.5, and 1.
Sigmoid function characteristics. The sigmoid maps real-valued inputs to the (0, 1) range, with maximum gradient at zero. The S-shape reflects the fact that moderate strength differences discriminate most clearly, while extreme differences produce nearly certain outcomes.
Two overlapping sigmoid curves, one for sigma(x) and one for sigma(-x), illustrating their mirror symmetry about the 0.5 probability level.
Symmetry property of the sigmoid in the Bradley-Terry context. The symmetry $\sigma(x) + \sigma(-x) = 1$ ensures that the probabilities of mutually exclusive comparison outcomes sum to unity, a basic consistency requirement.

This log-linear form reveals that the Bradley-Terry model is equivalent to logistic regression where the probability of ii beating jj depends on the difference in their log-strengths. The sigmoid function ensures probabilities stay between 0 and 1, with the midpoint at 0.5 when βi=βj\beta_i = \beta_j. This equivalence to logistic regression lets us use decades of research on efficient optimization algorithms, regularization techniques, and statistical theory about confidence intervals and hypothesis tests. Maximum likelihood estimation for Bradley-Terry is a well-studied convex optimization problem with guaranteed convergence to a global optimum.

Bradley-Terry Probability

The probability that item ii is preferred over item jj in the Bradley-Terry model is:

P(i≻j)=σ(βi−βj)=11+e−(βi−βj)P(i \succ j) = \sigma(\beta_i - \beta_j) = \frac{1}{1 + e^{-(\beta_i - \beta_j)}}

where:

  • βi,βj\beta_i, \beta_j: the log-strength parameters of the two items
  • σ(⋅)\sigma(\cdot): the sigmoid function mapping the difference to a probability