Unit 2 of 9 · about 4 hours · derive

Preference triples, Bradley-Terry likelihood and reward identifiability

The reward model learns differences, not absolute quality. Misreading its scores as calibrated quality breaks every later claim about margins, scales and KL penalties.

You'll be able to

  • Derive the Bradley-Terry sigmoid form from exponential strengths and the pairwise negative log-likelihood loss.
  • Explain additive identifiability: only reward differences matter, while scale changes the preference probabilities.
  • State how margin terms, per-prompt grouping and K-wise Plackett-Luce extend the pairwise loss, and when K equal to 2 reduces to Bradley-Terry.

Covers

Pairwise preference triples and listwise comparisonsBradley-Terry preference likelihoodReward differences, additive identifiability and scale limits
1

Read

In this order, only the parts listed

0 of 4 done

  1. Bradley-Terry training and loss formsRLHF Book - Reward Models, Preferences and Evaluation

    Training a Bradley-Terry Reward Model: exponential strengths, the sigmoid form, the log-before-average derivation, the log-sigmoid and softplus losses and their equivalence by substitution

  2. Margin, per-prompt grouping and K-wise extensionsRLHF Book - Reward Models, Preferences and Evaluation

    Other Reward Model Variants: Preference Margin Loss with margin m, Balancing Multiple Comparisons Per Prompt with grouped averaging, K-Wise Loss Function with the Plackett-Luce ranking probability

  3. BT loss implementation lineRLHF Book - Reward Models, Preferences and Evaluation

    Pairwise loss loss = -F.logsigmoid(r_chosen - r_rejected).mean() inside PreferenceRewardModel in train_preference_rm.py; the chapter Implementation Example writes the same line with rewards_chosen and rewards_rejected

  4. Reward learning lecture with the preference-query readingStanford CS224R 2026 - Reward Learning

    Lecture 08: Reward Learning on the course timeline https://cs224r.stanford.edu/ (Week 4) with the Christiano et al. preference paper as its listed reading

2

Focus on

  • Preference probability depends only on the score difference. With , the model is and the per-example loss is .
  • Maximum likelihood takes the logarithm before averaging over the dataset. Maximizing expected probability is not the same objective as maximizing expected log-probability.
  • Adding one constant to every reward leaves every pairwise probability unchanged, but multiplying rewards by pushes every probability away from 0.5 and pulls it toward 0.5. Only the additive constant is unidentified; the data pin down the scale.
  • A margin demands that the difference clear a threshold, per-prompt grouping stops many-completion prompts from dominating, and the K-wise product over a full ranking collapses to the pairwise form when .
Common mistakes · 3
  • Averaging probabilities instead of log-probabilities. The book derivations keep the log inside the dataset expectation for the maximum-likelihood reason.
  • Reading a reward of 5 as good in absolute terms. Scores from two runs share no scale, so only differences within one model and data distribution order outputs.
  • Treating K-wise ranking as a different model family at K equal to 2. The product has one factor left and equals the pairwise probability.
3

Try it yourself

Closed-book, before checking anything

Closed-book, derive the sigmoid form from the exponential ratio, then compute the loss for scores 2.0 versus 0.5 as 0.2014 and for equal scores as 0.6931. Show that adding 10 to both scores changes nothing.
4

Quiz yourself

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

0 got · 0 missed

  1. 1.Show that adding a constant to every reward changes no pairwise probability.Answer

    Each numerator and denominator gains the same factor , which cancels, so only the difference enters .

  2. 2.What loss does a tied pair produce, and why?Answer

    With , and . The model is maximally uncertain.

  3. 3.Why must the logarithm come before the dataset average?Answer

    Maximum likelihood maximizes the expected log-probability of the observed choices. Averaging probabilities first defines a different, incorrect objective.

  4. 4.A margin of 3 applies to a pair whose reward difference is 1. What is the loss?Answer

    The margin loss is . The margin requires the difference to clear 3, so a difference of 1 is penalized heavily.

You're done when

You derive the loss from the exponential form without notes and predict how additive shifts, rescaling and margins move the loss before running code.

Only when you can do this without notes.

Leads to

Notes

Resources · 2 for this unit, 8 more in the section
  • RLHF Book - Reward Models, Preferences and EvaluationNathan Lambert · primary

    Study Chapter 5 (reward modeling: Bradley-Terry loss, outcome, process and generative reward models), Chapters 10 and 11 (preferences and preference data), Chapter 14 (over-optimization) and Chapter 16 (evaluation). Implement the pairwise reward loss, compare outcome, process and generative reward roles, and build an adversarial feedback audit covering preference bias, reward shift and overoptimization.

  • Stanford CS224R 2026 - Reward LearningStanford University · support

    Study Lecture 08 (reward learning, slides/08_cs224r_reward_learning_2026.pdf) with its Christiano et al. reading, and Section 1.2 of the default project guidelines for preference and verifier datasets. Use fixed chosen and rejected examples and a hidden adversarial split; write independent implementations.

Also in this section

  • RLHF Book Course - Lectures 2, 8 and 9Nathan Lambert · required

    Use Lecture 2 (instruction tuning, reward models and rejection sampling), Lecture 8 (preferences and preference data) and Lecture 9 (over-optimization). Reproduce the reward-data-to-score path and keep rejection sampling as a non-RL selection baseline for later online optimization.

  • Deep Reinforcement Learning from Human PreferencesDeepMind and OpenAI · required

    Study the preference-query, reward-learning and policy-optimization loop. Reproduce a tiny preference model or simulator and measure how label noise or policy shift changes reward accuracy and control quality.

  • Scaling Laws for Reward Model OveroptimizationGao, Schulman and Hilton (ICML 2023) · required

    Read the gold-reward setup and the proxy-versus-gold curves for best-of- and RL as the KL distance grows. Reproduce the shape at toy scale: a small proxy reward model, a known gold reward and best-of- selection.

  • Learning to Summarize from Human FeedbackStiennon et al. (NeurIPS 2020) · support

    Read the reward-model and policy-training protocol, the KL penalty and the length analysis. Use it as the first full example of a reward model trained on comparisons and then optimized against.

  • Let's Verify Step by StepLightman et al. (2023) · support

    Read how process supervision labels steps, how the process reward model scores a solution and how outcome and process supervision compare under best-of- selection. Define step boundaries for your own task before training any process scorer.

  • Constitutional AI: Harmlessness from AI FeedbackAnthropic · support

    Study supervised self-critique, AI preference feedback and RL from AI feedback. Implement a bounded rubric-conditioned comparison exercise and test judge correlation and principle ambiguity rather than reproducing the full pipeline.

  • Hands-on Modern RL - RLHF Evaluation and Process RewardsWalking Labs · support

    Use the outcome-versus-process page (its discounted ORM and PRM returns are worth recomputing by hand) and the process-reward and search chapter as an implementation map for verifier tests. Check claims against the original sources. Pin commit 9231bab of walkinglabs/hands-on-modern-rl; its code/chapterNN folders do not follow the site chapter numbers.

  • LLM Post-Training Laboratory - Reward and Adversarial EvaluationRoadmap-Final · required

    Complete the pairwise reward model, held-out and calibration analysis, deterministic verifier, judge-bias audit, reward-hacking probes and the required case where proxy reward improves while independent behavior worsens.