Constitutional and Principle-Based Alignment › The Math of the Preference Stage
Language AI HandbookAll chapters From a Score Difference to a Choice
A preference model assigns a scalar score to a prompt and response. A Bradley–Terry model turns the score difference into the probability that response beats response . Write for their shared prompt, for the preference-model parameters, and for the difference.
Equal scores give probability . The probability rises above when the model scores higher. Adding the same constant to the two scores leaves the probability unchanged, so this comparison identifies differences rather than an absolute reward level.
Soft Labels from an AI Labeler
Let and be the feedback model's log probabilities for the two answer-option tokens at the same choice position. Normalize the two probabilities over those options. This calculation assumes both options are represented by single tokens in the chosen format.
For example, if the probabilities of the option tokens are 0.3 and 0.2, the two-option target for is . The remaining probability mass can be assigned to other tokens by the language model. A 0.6 target is a soft label, and its empirical calibration has to be measured separately.
The binary cross-entropy below penalizes the preference model when its predicted probability departs from that target. The expectation averages over the training comparisons. A chosen-first hard target leaves just the term .
Averaging repeated independent judgments can help estimate the mean of the judge's scores. It leaves systematic errors in that mean. Bai et al. studied using multiple principles across their labeling data. The authors also sampled principles in their rationale-conditioned prompts. For the main results with those prompts, they clamped the near-binary probabilities produced after the model gave a rationale.
Repeated Judgments and Shared Error
Suppose repeated scores each have a constant offset and independent zero-mean errors of variance . The average error has mean and variance . Squaring and taking the average gives mean squared error . This model treats scores as numbers with additive error. It illustrates why agreement across repeated samples can coexist with a systematic mistake.
PythonIn [5]Expand
import numpy as np
m_values = np.arange(1, 31)
sigma_ind = 0.20
bias = 0.08
independent_rmse = np.sqrt(sigma_ind**2 / m_values)
shared_bias_rmse = np.sqrt(bias**2 + sigma_ind**2 / m_values)VisualizationOut [6]Expand

The curve with the offset approaches 0.08 as the number of samples increases. Both curves use the same independent noise at each sample count.
The RL Objective
A simplified objective balances expected preference score and drift from a reference policy. is the policy being trained, is a fixed reference, and sets the strength of the penalty. The inner expectation is over responses to prompt . The KL divergence compares the two response distributions for that prompt.
This objective gives the policy a reason to pursue higher-scoring responses while limiting distributional drift. The penalty measures difference from the reference distribution. It cannot certify that a response follows a particular rule. Under the ordinary finite-KL assumption, every response with positive probability under the policy must have positive probability under the reference. For an intuitive two-response example, suppose the reference chooses each with probability one half. Putting all mass on one reply has forward KL of nats, whereas keeping the probabilities at one half gives zero KL. The higher-scoring reply can justify increasing its probability under the objective even when moving all the way to a deterministic choice incurs too large a penalty. See the earlier PPO chapter for the distinction between this objective and PPO's clipped update rule.
Comments
Add to the conversation
A question, a correction, or an example from your own work.
No comments yet. Be the first to share your thoughts!