Model and Inference EngineeringPost-training and alignmentStaff
How can changing beta in the sigmoid DPO loss alter which preference pairs drive learning?
By Amit Kumar3 min readWorked answer includedReviewed 28 Sept 2026
The question
Interview question
A DPO run keeps the dataset, reference, tokenization and optimizer settings fixed but raises beta. It moves sharply at first, then many already-preferred pairs contribute little gradient. Derive the margin sensitivity at zero, positive and negative margins, investigate apparent saturation, and distinguish beta from a universal learning-rate or conservatism rule.
Draft your approach first
Take a few minutes before you read the answer. Name the constraint that matters most, the failure you are designing for and how you would know it worked.
Reveal the worked answerWorked answer
Look at the margin that enters the sigmoid. For one prompt, compare the policy's log probability of chosen versus rejected against the same difference under the reference. Call that difference of differences m. The usual DPO loss is -log sigmoid(beta × m). The DPO paper derives this objective, and TRL exposes beta as a configuration parameter.
Raising beta does not simply “train harder.” At m = 0, the derivative magnitude with respect to m grows with beta. For pairs that already have a positive margin, a large beta × m pushes the sigmoid near one and their gradient toward zero. For negative margins, it can greatly increase the pressure to raise the preferred-versus-rejected margin. Which pairs still drive the update changes as training progresses. That is why a run can move aggressively at first and then stop learning from many pairs even though the dataset did not change.
The derivative of the pair loss with respect to m is -beta / (1 + exp(beta*m)). For hypothetical beta values 1 and 10, a zero margin gives derivatives -0.5 and -5. At positive margin 1, they are about -0.2689 and -0.000454. At negative margin -1, beta 10 gives about -9.9995. Thus a larger beta can strengthen poorly satisfied pairs while nearly eliminating already-positive ones. These are sensitivities to the margin, not complete parameter gradients. The input sequence gradients and optimizer also matter.
In the underlying KL-regularized reward derivation, beta also sets the penalty for changing the policy’s response probabilities away from the reference. A larger penalty favors less departure in that idealized optimization problem. In the implemented pair loss, beta changes sensitivity through the sigmoid. Stronger reference pressure and a larger gradient at a particular starting margin are therefore compatible statements. Neither predicts every finite training run from beta alone.
The reference model and the way sequence log probabilities are summed matter too. A margin of 2 means nothing by itself if one run uses different token masks, lengths or a different reference. Compare beta experiments using the unscaled margin distribution, loss per slice, fraction of saturated positive and negative pairs, policy-reference KL or another drift measure, and held-out human preference. A flat training loss can be easy pairs saturated while difficult pairs still fail.
Would I immediately lower beta? I would first verify the exact objective and preprocessing. A wrong chosen/rejected order, masked completion, or prompt included in one side can mimic a beta problem. Once those are ruled out, sweep beta with a fixed reference and comparable token budget. Watch for both under-learning and excessive movement away from the reference. There is no single beta that transfers automatically across model, data and length distribution.
The useful interview move is to reason through beta × m and its gradient, not to memorize that a bigger beta is “more conservative.” It changes which examples have leverage at each point in training.
Related questions
Keep practising model and inference engineering
Follow another question in this area, or search the complete library.
Get my essays on AI engineering and distributed systems by email. Subscribe to ArchCrux