Unit 3 of 10 · about 4 hours · derive

The Bradley-Terry likelihood and reward identifiability

DPO inherits its probability model from pairwise reward learning. Building on the Math Foundations unit on maximum likelihood and MAP estimation and the Classical ML unit on logistic regression and stable binary cross-entropy, the new work is to state what a preference fit does not identify.

You'll be able to

  • Derive a prompt-conditioned Bradley-Terry likelihood and its stable negative log-likelihood.
  • Identify the reward offsets that comparisons cannot recover, and distinguish them from score scale.
  • Check a repeated-vote fit and explain why ranking accuracy does not establish probability calibration.

Covers

Bradley-Terry preference likelihood and reward differencesReward identifiability, offsets, scale and calibration limits
1

Read

In this order, only the parts listed

0 of 2 done

  1. The RLHF Book: Chapter 5, Reward ModelingRLHF Book - Reward Models, Direct Alignment and Preferences

    Training a Bradley-Terry Reward Model, from positive strengths through the log-sigmoid/softplus equivalence; Other Reward Model Variants, Balancing Multiple Comparisons Per Prompt and K-Wise Loss Function

    Derive the pairwise model fully. Read the grouped and listwise variants only to explain how expanding a ranking changes the sampling weights.

  2. DPO: reward equivalenceDirect Preference Optimization

    arXiv:2305.18290v3, Section 5.1, Your Language Model Is Secretly a Reward Model: Definition 1 and Lemmas 1 and 2; Appendix A.5, Proof of Lemma 1 and 2

2

Focus on

  • For fixed prompt , . Fit the sum or declared weighted mean of log likelihoods, not the log of an average probability.
  • Adding any prompt-only offset changes neither comparison probability nor the normalized KL-regularized optimal policy. Disconnected comparison components can have additional unidentified offsets without further assumptions.
  • With a fixed sigmoid link, multiplying all score differences changes probabilities, even when rankings stay fixed. If a separate temperature is also fitted, score scale and that temperature can be confounded.
  • A scalar reward is not a standalone correctness probability. Only the linked difference gives a pairwise probability under this model, and calibration must be assessed on held-out comparisons.
Common mistakes · 3
  • Calling reward scale unidentifiable under a fixed logistic link. The free additive offset and the probability-sensitive multiplicative scale are different issues.
  • Reporting a finite unregularized optimum when all votes go one way. The logistic likelihood then favors an unbounded difference; an iteration limit can masquerade as a fitted scale.
  • Counting every expanded ranking pair as an independent annotation. Preserve prompt groups for weighting and uncertainty.
3

Try it yourself

Closed-book, before checking anything

For one prompt with two responses and ten recorded strict votes, eight favor the first and two the second. Derive the unregularized optimum score difference , predicted probability 0.8 and mean negative log-likelihood 0.5004024235381879. On CPU with PyTorch 2.14.1 and torch.float64, evaluate stable binary cross-entropy on the ten labels and check the derivative at is zero within absolute tolerance . Show that a shared offset leaves the likelihood unchanged but doubling the difference does not. This is an in-sample likelihood oracle, not a generalization score.
4

Quiz yourself

Answer first, then mark it. Missed ones go to Review.

0 got · 0 missed

  1. 1.Why can the two scores not be recovered separately from the ten votes?Answer

    The likelihood depends only on their difference. An arbitrary common offset gives the same probabilities. Fix one score or impose a centering convention to choose a representative.

  2. 2.What changes if both scores are multiplied by two?Answer

    The ranking stays the same, but the difference doubles, so the sigmoid probability changes unless the difference is zero. This generally changes likelihood and calibration.

  3. 3.Can equal rewards represent an explicit tie category in ordinary Bradley-Terry?Answer

    No. They assign equal probabilities to the two strict outcomes. An explicit tie category requires an extension or a declared soft-label encoding; indifference and uncertainty remain different observations.

You're done when

You derive and numerically check the repeated-vote optimum, distinguish offset from scale, and explain the all-one-label boundary without trusting a stopped solver.

Only when you can do this without notes.

Leads to

Notes

Resources · 2 for this unit, 18 more in the section
  • RLHF Book - Reward Models, Direct Alignment and PreferencesNathan Lambert · primary

    Read Chapter 5 (reward models), Chapter 8 (direct alignment), Chapters 10 and 11 (preferences and preference data) and Chapters 14 and 15 (over-optimization and regularization) at rlhfbook.com/c/NN-slug.html. Only Chapters 5 and 8 have Suggested Experiments; do those. Trace preference data through reward modeling or DPO and list each distribution and evaluator assumption before training.

  • Direct Preference OptimizationStanford University · required

    Read Section 4 and Appendix A: derive the objective from the KL-constrained reward formulation, implement it from policy and reference log probabilities summed over response tokens, and gradient-check , sign, masking and identical-pair cases. TRL's sigmoid_norm variant normalizes by length, which the paper does not.

Also in this section