Elamur Research

Direct Preference Optimization with an Offset

Paper · 2024 · Afra Amini, Tim Vieira and Ryan Cotterell

Summary

A reviewer can prefer one of two answers because it reads a little better, or because the other answer gets an important fact wrong. A record that says only which answer won preserves the direction of both judgments and loses the difference between them. Afra Amini, Tim Vieira, and Ryan Cotterell ask whether recovering that difference improves the fine-tuning of large language models. Their method, Direct Preference Optimization with an Offset, or ODPO, gives each training pair a target separation derived from the scores of its responses. An ordinary preference label says which answer should score higher. The offset changes how far apart the training objective pushes their scores.

The starting point is Direct Preference Optimization, or DPO. It measures each response by how its probability has changed relative to a fixed, supervised reference. Subtracting the two measures gives a reward gap for the pair. ODPO subtracts the offset from that gap before turning it into a preference probability. For a positive offset, the same reward gap gives weaker evidence of satisfying the training example, so the loss continues to press for a wider separation. The gap is a comparison of reference-relative log probabilities for complete responses. Setting the offset to zero recovers DPO exactly. When scores are available, supplying an offset adds no separate reward fitting stage or reinforcement learning loop to DPO.

The experiments use classifier scores to steer movie-review continuations toward positive sentiment and to reduce the toxicity of open-ended continuations. They evaluate the target attribute alongside the change in the overall response distribution, measured by Kullback–Leibler divergence from the supervised reference. On IMDB, every point on the best observed sentiment–divergence tradeoff came from ODPO at training size 5000. For RealToxicityPrompts, the corresponding frontier consisted entirely of ODPO points at sizes 8000 and 9000. In Reddit summarization, human quality ratings supplied the offsets, and GPT-4 compared generated outputs against human-written summaries on 100 test prompts. ODPO had the higher average win rate against that reference at all tested sampling temperatures. Its direct comparison with DPO varied with temperature, reaching a reported win rate of 62 at 0.5 and falling to 48 at 0.75.

How the authors convert ratings into offsets matters. In the sentiment experiments, taking the logarithm of a reward difference yielded a better balance of sentiment and divergence than using the raw difference in the reported comparison. Increasing the offset multiplier could raise sentiment further, with greater departure from the supervised reference. The paper consequently gives evidence for using preference strength when suitable scores are available, particularly in some of its smaller training settings. The meaning and scale of those scores affect what the extra signal can teach.

Deep dive: Direct Preference Optimization with an Offset

Direct Preference Optimization with an Offset uses preference strength to guide fine-tuning and tests its effect on sentiment, toxicity, and summarization. · about 37 minutes to read

The problem and its context

A comparison can carry more than a winner

Suppose two candidate summaries cover the main event in a forum post. One repeats a detail, and a reviewer favors the more concise version. In another pair, one summary reverses a fact about the person who wrote the post. A reviewer again chooses a winner. In a dataset of binary choices, the records have the same shape. Each contains the post and an ordering of its two candidate summaries. A learner can infer which response beat its counterpart in each case. The label supplies no direct measure of how consequential the flaw was.

The paper starts from a related distinction between supervised imitation and training for judged quality. In supervised fine-tuning, each training example supplies a prompt and a desired answer. Training raises the likelihood of the observed answer under that prompt. The objective values fitting the examples, whose quality can vary. For summarization, the paper contrasts the seriousness of introducing unsupported information with that of an imperfect word choice. The likelihood objective contains no task-specific scale for that difference. A judgment about the quality of a completed response gives the training procedure a way to express such priorities.

A scalar score for each completed response can provide this information. A classifier can rate the degree to which a continuation expresses a target sentiment or contains toxicity. The paper also points to code execution as a possible source of assessment in programming tasks. An overall summary score is harder to interpret. Concision, factual fidelity, and coherence can all contribute to that judgment, and a rater has to bring those considerations together on a common scale. Comparing alternative summaries of the same post gives the rater a concrete choice. The winner records the direction of the judgment even when agreeing on an absolute score would be difficult.

The two forms of feedback can coexist. A rater may choose a winner and also indicate how strong the preference was. The authors point to the assessment procedure described for Llama 2, where human raters could distinguish leads of differing strength and express uncertainty. A task with a scoring function can instead derive an order and a gap from the two response scores. Both procedures offer something richer than a winner label, although their scales have different meanings. A categorical judgment about a clear lead and a difference between classifier probabilities need their own interpretations. Llama 2

How preference data entered training

The conventional reinforcement learning from human feedback procedure described in the paper begins with comparisons of candidates. A reward predictor learns from them, taking the prompt and a single response as input. Its job is to assign rewards that account for the observed comparison outcomes. The language policy then learns to generate responses with higher predicted reward. The objective also penalizes divergence from the supervised policy, placing some value on retaining the behavior established before preference training. The paper presents this sequence in the context of work on getting systems to follow instructions and on aligning dialogue with targeted judgments. Training language models to follow instructions with human feedback and Improving alignment of dialogue agents via targeted human judgements

The divergence term responds to a practical problem with a learned target. The policy generates the very items on which the reward predictor is used. If it moves far from the behavior underlying the assessments, it may find text that gets a high score for reasons that diverge from the intended goal. The regularizer provides a cost for changing the distribution, and its strength sets the tradeoff with reward. The paper relates this concern to reward hacking, where success according to a measured objective can come apart from success on the underlying task. Concrete Problems in AI Safety

That pipeline requires training and storing a reward predictor, which can be as large as the generator. A reinforcement learning algorithm such as proximal policy optimization also brings settings that can be sensitive to tuning. The paper places DPO in a line of work seeking simpler alignment procedures, alongside studies of unlikelihood training, controllable generation through reinforced unlearning, and sequence likelihood calibration. These approaches are part of the motivation for looking at training objectives that can act on existing responses and labels. Neural Text Generation with Unlikelihood Training, Quark, and SLiC-HF

DPO takes advantage of the mathematical form of the optimum of the regularized reward objective. It expresses the reward difference for a comparison in terms of probabilities from the policy and the supervised reference. A prompt-dependent normalization term disappears when the two rewards are subtracted. The training problem can then be written as assigning high probability to the observed preferences, with the language policy supplying the quantities needed by that objective. A separately fitted reward predictor and an online reinforcement learning stage are unnecessary for this optimization.

DPO still gives each observed choice the same kind of target. Its loss may already exert different amounts of pressure on different pairs, because the current policy can agree with some comparisons more strongly than others. What it lacks is an input saying how strong a given preference was according to the source of the feedback. A pair that the current policy finds difficult and a pair that a human regards as important are different things. The first describes the state of training. The second describes information in the label. The paper asks how to make the second affect the loss directly.

Why the margin depends on the pair

Earlier sequence-level ranking methods give the authors a nearby point of comparison. SLiC-HF uses a fixed margin between the log probabilities of the chosen and rejected sequences. The margin specifies a separation, and the same setting applies regardless of how the pair was judged. RRHF also uses ranking, with no offset in the loss described by the paper. ODPO works with a reference-relative reward gap and allows the required separation to vary with each pair. Those are distinct design choices. A fixed margin can ask for a stronger distinction in general, while a score-derived margin can ask for different distinctions within the same dataset. SLiC-HF and RRHF

Other DPO variants discussed by the authors address questions such as overfitting, how to train from examples labeled individually as good or bad, and how to handle several alignment objectives. The paper places ODPO within that broader effort and focuses on the information available for an individual comparison. Identity Preference Optimization, for instance, changes the treatment of preference probabilities to address overfitting. ODPO asks what training should do with a reliable indication that one response is better than its counterpart by a particular amount. A General Theoretical Paradigm to Understand Learning from Human Preferences

The method, step by step

From scored answers to a training signal

Start with a supervised checkpoint that can already produce responses to the task. Keep a fixed copy as the reference and use the checkpoint as the starting point for preference training. For each prompt, assemble alternative responses and identify the winner. In the sentiment experiment, the alternatives come from the supervised generator and a classifier supplies the scores. In the summarization experiment, the authors start with summaries already assessed by people. Tied scores do not provide the strict winner and loser required by the construction used in the paper.

Next, turn the score gap into an offset. The score gap is a property of the training example. It stays fixed as the trainable policy changes. The trainable policy and the reference both assign a probability to each candidate response. ODPO takes the log ratio of those probabilities for the winner, does the same for the loser, and forms a scaled difference. The resulting quantity measures how much more the policy favors the winner over the loser relative to their original standing. The loss uses the part of that quantity left after subtracting the offset.

Consider a pair whose current relative preference would give it a low loss under DPO. If its offset is positive, ODPO evaluates the same pair at a smaller effective gap. Its loss is higher and it exerts more pressure on training at that point. If the learned gap already exceeds the offset by a wide margin, this pressure becomes small. This is a smooth change in what counts as a well-satisfied training example. The shared parameters still have to learn from many comparisons at once, and the objective trades off their contributions as it updates the policy.

Training with direct preference optimization and an offset

The steps in order.

Training with direct preference optimization and an offsetStep 1: Start from a supervised checkpoint1. Start from a supervised checkpointStep 2: Keep a fixed copy as the reference2. Keep a fixed copy as the referenceStep 3: Order candidate responses by their assessed scores3. Order candidate responses by their assessed scoresStep 4: Transform each score gap into an offset4. Transform each score gap into an offsetStep 5: Compute both responses’ reference-relative scores5. Compute both responses’ reference-relative scoresStep 6: Subtract the offset from the learned gap6. Subtract the offset from the learned gapStep 7: Update the policy with the preference loss7. Update the policy with the preference loss

How the policy scores a whole response

The paper treats a response as a sequence. Starting with the prompt, the policy predicts each successive token using the prefix that precedes it. The probability of the response includes the probability of stopping at the end. This matters because a training comparison concerns complete alternatives that may differ in length, wording, and content. Scoring them calls for their sequence probabilities, even though the generator works one token at a time. Tokenization

πθ(y | x) = πθ(EOS | y, x) · ∏ₜ₌₁ᵀ πθ(yₜ | y<ₜ, x)

Here πθ is the policy with trainable parameters θ. The prompt is x and the response is y. The vertical bar means conditioning on the items to its right. EOS is the special end-of-sequence token. The product sign multiplies the conditional probabilities at positions t from 1 through T, where T is the number of tokens in y before EOS. At each position, yₜ is the token being scored and y<ₜ is the part of y that comes before it. The alphabet Σ in the paper is the finite set from which ordinary sequence symbols are drawn, and Σ* is the set of their finite strings. EOS sits outside that alphabet.

Before any preference comparison, the supervised objective fits desired responses paired with their prompts. Taking logs converts the small sequence probabilities into additive scores, and averaging those scores describes the overall training objective.

JML(θ) = E[(log πθ(y | x)) ; (x, y) ∼ DSFT]

JML is the maximum-likelihood objective, maximized over θ. The notation E uses the expression before the separator as the quantity averaged and the distribution after it as the source of examples. The tilde means the pair comes from DSFT, the supervised dataset. The log is the natural logarithm of the conditional probability assigned to y given x. The policy obtained through this training is denoted πSFT.

The reward-based starting point averages a different quantity. It draws a prompt from a collection and a response from the current policy, then evaluates that response with a task reward.

JRL(θ) = E[r(x, y) ; x ∼ D, y ∼ πθ(· | x)]

JRL is the expected-reward objective. The function r gives the real-valued reward of response y to prompt x. D is the collection of prompts, which can contain repetitions. The dot in πθ(· | x) indicates the distribution over possible responses to x. The comma in the sampling conditions means that y is drawn given the selected x. This objective gives credit according to the score of generated text.

The regularized version subtracts a divergence cost. The divergence compares two distributions at a given prompt, so responses contribute according to their probability under the current policy. Averaging over prompts makes this a property of the task setup as well as of the policies.

JRL(θ) = E[r(x, y) ; x ∼ D, y ∼ πθ(· | x)] − β E[DKL(πθ(· | x) ∥ πSFT(· | x)) ; x ∼ D]

JRL here denotes the regularized objective. DKL is the Kullback–Leibler divergence, or KL, in the direction from πθ to πSFT, as indicated by the double bar. It measures distributional departure from the supervised reference. β controls how strongly the divergence is penalized. The expectations use the same prompt and response conventions as above, with the KL term already defined on the response distribution at each prompt. The objective is larger when the expected reward rises and smaller when divergence rises, all else equal.

From a reward gap to the probability of a choice

The Bradley–Terry formulation connects individual rewards to the chance of a pairwise preference. Give each candidate a strength obtained by exponentiating its reward. The preference probability is the winner’s strength divided by the combined strength of the two candidates.

pBT(yw ≻ yl | x) = exp(r(x, yw)) / (exp(r(x, yw)) + exp(r(x, yl)))

pBT is the Bradley–Terry probability. The subscripts w and l mark the observed winner and loser, so yw and yl are their respective responses. The symbol ≻ means is preferred to. The function exp is the natural exponential. The denominator sums the two positive strengths, giving the probability for the comparison at prompt x.

The same expression can be written using the sigmoid, which converts a real-valued gap into a probability.

σ(z) = 1 / (1 + exp(−z))

σ denotes the sigmoid and z is its real-valued input. The minus sign in the exponent reverses the input’s sign. The constant 1 in the numerator and denominator fixes the range between zero and one, with larger inputs yielding larger probabilities.

pBT(yw ≻ yl | x) = σ(r(x, yw) − r(x, yl))

The inner subtraction forms the reward gap for the same prompt. The probability increases as the reward assigned to the preferred candidate rises relative to its counterpart. Any quantity added to both rewards cancels in the gap. As a consequence, preference data of this form can constrain relative rewards within a prompt even when the common level of the rewards is unspecified.

With just comparison labels, the conventional reward-fitting procedure chooses reward parameters that make the observed winner labels probable.

E[log σ(rϕ(x, yw) − rϕ(x, yl)) ; (x, yw, yl) ∼ DHF]

Here rϕ is a reward predictor with parameters ϕ. DHF is the preference dataset and supplies the prompt, winner, and loser triples over which the expectation is taken. The objective is maximized over ϕ. Taking the log makes a comparison with a low assigned probability contribute more strongly to the loss when this objective is negated. It still uses the observed order as the target, even if the original judgment had a degree of strength that was never recorded.

How DPO avoids fitting a separate reward predictor

For a fixed reward and a positive regularization coefficient, the optimizer of the regularized reward objective has a particular form. Start with the supervised reference distribution and increase or decrease the weight of a response according to the exponential of its reward divided by β. The prompt-specific normalizer restores a proper probability distribution.

πθ⋆(y | x) = πSFT(y | x) · exp(r(x, y) / β) / Z(x)

πθ⋆ is the optimal policy in that characterization, and the star denotes optimality. Z(x) is the normalizer at prompt x. The remaining terms are the reference probability, the task reward, and the coefficient β from the regularized objective. Larger rewards result in higher weights relative to the reference. The magnitude of the change also depends on β.

Z(x) = ∑ᵧ∈Σ* πSFT(y | x) · exp(r(x, y) / β)

The sum is over each possible finite response y in Σ*. The summands are the reference-weighted terms before normalization. Each prompt has its own normalizer because the reference probabilities and rewards depend on x. Computing the sum directly would require accounting for a countably infinite response space.

Solving the optimal-policy equation for the reward gives a term involving the relative probabilities and a term common to every response to the same prompt.

r(x, y) = β log(πθ⋆(y | x) / πSFT(y | x)) + β log Z(x)

The log ratio is the natural log of the optimum’s probability divided by the reference probability for y. The final term is the contribution of the normalizer. When the reward of yl is subtracted from that of yw under the same x, the final terms cancel. Pairwise training can therefore use the ratio terms alone.

r̂θ(x, y) = β log(πθ(y | x) / πSFT(y | x))

The hat in r̂θ denotes the estimated reward obtained from the current trainable policy. πθ replaces the optimum in the quantity used during training. A response whose probability is unchanged from the reference has a zero estimate. An increase in its probability gives it a positive estimate, and a decrease gives it a negative estimate. Its standing in a comparison depends on the corresponding change for the other response.

Δr̂θ = r̂θ(x, yw) − r̂θ(x, yl)

Δr̂θ is shorthand for the estimated reward gap on the current pair. The winner’s reference-relative score is the first term and the loser’s is the second. A positive gap means the policy has shifted the relative odds towards the observed winner. The reference probabilities matter to that interpretation. An answer can remain much more probable than another answer in absolute terms while gaining less relative to where it began.

LDPO(θ) = −E[log σ(Δr̂θ) ; (x, yw, yl) ∼ DHF]

LDPO is the DPO loss to minimize. The leading minus sign turns the preference log-likelihood into a minimization objective. The expectation runs over the labeled comparisons. This expression also gives the expanded probability-ratio form of the loss by substituting the definition of each estimated reward into Δr̂θ. A larger estimated gap assigns greater probability to the observed preference. The sigmoid means that the effect of making the gap larger depends on where it begins.

Why the offset enters inside the sigmoid

The authors derive the change in the loss by imagining that each estimated reward is the location of a noisy score. The noise follows the Gumbel distribution. Two independent draws allow the estimated rewards to favor one response while leaving uncertainty about which has the greater realized score. The resulting comparison probability is the Bradley–Terry probability.

Rw ∼ Gumbel(r̂θ(x, yw), 1),    Rl ∼ Gumbel(r̂θ(x, yl), 1)

Rw and Rl are the noisy reward variables for the winner and loser. Gumbel names the distribution, its first argument is its location, and the second argument is the scale, set to 1. The variables are taken to be independent. Their randomness supplies the probabilistic interpretation of the preference. Training can evaluate the resulting probability directly from the estimated rewards.

P(Rw − Rl > 0) = pBT(yw ≻ yl | x) = σ(Δr̂θ)

P is probability and the greater-than sign specifies the event that the noisy gap exceeds zero. Here pBT uses the estimated rewards. The appendix derives this relation by conditioning on a possible value of Rw, computing the probability that Rl lies below it, and averaging over the values the first variable can take. The result is the winner’s exponential strength divided by the total strength.

The difference of the independent Gumbel variables has a logistic distribution centered at the estimated reward gap. That makes it possible to ask for the probability of exceeding a threshold other than zero.

P(Rw − Rl > Δr) = 1 − F(Δr) = σ(Δr̂θ − Δr)

Δr is the desired offset associated with the comparison. F is the cumulative distribution function of the noisy reward difference, so F evaluated at Δr gives the probability of a difference at or below the offset. Subtracting the cumulative probability from 1 yields the upper tail. The last expression writes that tail as a sigmoid whose input is the estimated gap less the offset. This is the step that changes the target event from a simple win to a win by the specified amount.

LODPO(θ) = −E[log σ(Δr̂θ − Δr) ; (x, yw, yl) ∼ DHF]

LODPO is the ODPO loss to minimize. The comparison dataset supplies the triples and the information needed to determine Δr. The estimated reward gap comes from the current policy and the fixed reference. The optimization presses the gap upward according to the remaining difference between the learned gap and the offset. With Δr equal to 0, every term is the corresponding DPO term. The objective is soft. A pair can contribute to the loss even when its estimated gap already exceeds the offset, and there is no training-time requirement that every gap actually reach its target.

The paper also connects this expression with the softmax-margin objective. For two candidates, a cost associated with mistaking the losing answer for the winner can go in the same position as the offset.

E[log σ(Δr̂θ − cost(yw, yl)) ; (x, yw, yl) ∼ DHF]

This is the maximized form of the two-response softmax-margin objective discussed in the paper. The function cost gives a non-negative penalty for the comparison of yw and yl. The expectation averages across comparisons, and the estimated gap and sigmoid have the same meanings as before. Identifying the cost with Δr yields the same form when the offset is non-negative. The ODPO likelihood can also be evaluated for signed offsets, so the domain of the cost matters to the equivalence.

How observations become offsets

The general design proposed by the authors takes a monotone transformation of the difference in observed quality and then applies a multiplier.

Δr = α f(score(x, yw) − score(x, yl))

The function score gives an observed assessment for a response to the prompt. The function f is chosen to increase with the score difference. The multiplier α controls the contribution of the transformed difference. When α is 0, the offset vanishes. With positive α and an increasing f, a larger observed gap yields a larger offset, although the resulting value can depend strongly on the units of the original score.

The distinction between observed and estimated reward is useful throughout. An observed score can be a human rating or an output of a classifier and is used to prepare the training example. An estimated reward is computed from current language probabilities and changes as the trainable policy learns. During a training update, the offset gives the example a target in reward-gap units. The reference probabilities give the learned quantity its baseline. α makes it possible to change the strength of the target independently of the coefficient β used in the estimated reward.

When a task supplies a pointwise scoring function, the authors can build comparisons from it. Sample candidate continuations for the same prompt, score them individually, and use score order to assign the winner and loser wherever their scores differ. A multiset of candidate responses accommodates repeated samples. With human-rated summaries, the same ordering step can be applied to the recorded ratings, without first fitting a classifier to reproduce them.

(yw, yl) = (yᵢ, yⱼ) if r(yᵢ) > r(yⱼ), or (yⱼ, yᵢ) if r(yᵢ) < r(yⱼ)

Here i and j index different candidates for the same prompt. yᵢ and yⱼ are their responses, and r is written without the fixed prompt argument. The ordered pair puts the higher-scored response in the winner position. Equal rewards provide neither case. Holding this ordering constant lets the experiment compare DPO with ODPO on the same underlying comparisons while changing the information used by the loss.

In the main sentiment setup, the transform is the log of the reward gap, with α set to 1. The paper uses the log-gap construction for toxicity and for the differences in human summary ratings as well. Applying a log after subtraction and subtracting two logs are different operations. The first uses the distance on the original score scale. The second uses the relative sizes of the scores, as the ablation later examines. A positive score gap is necessary to take its logarithm, which gives an additional reason to exclude ties. The authors release the implementation under the name rycolab/odpo.

Experiments and results

Reading an attribute score alongside divergence

The sentiment and toxicity experiments evaluate how a policy behaves when asked to continue a prompt. For each task, the authors sample text from the fine-tuned policy and summarize the classifier scores of the generations. They also estimate KL divergence from the original supervised reference. Sentiment is a quantity to increase and toxicity is a quantity to decrease. Lower divergence is preferred in both cases. Taken together, the measurements ask how much control the policy achieves and how far it moves to achieve it.

Each experimental setting gives a point in this comparison. A point belongs to the observed Pareto frontier if another tested point cannot match or improve it on both measurements while improving at least one. One policy may achieve a stronger sentiment score and another may stay closer to the reference. Both can belong to the frontier because the measurements favor different points. A point that has weaker sentiment and larger divergence than another tested point has no such tradeoff in its favor. The paper counts how many frontier points come from each method. The percentage describes a set of sampled and evaluated configurations. It is a different measurement from either classifier reward or evaluation-set accuracy.

Positive sentiment in movie-review continuations

The sentiment task begins with GPT2-Large trained to convergence on the IMDB training split, which consists of 25,000 movie reviews. For preference training, the authors sample 10,000 review prefixes from that split and generate two continuations per prompt. The preference training datasets are tested at sizes 5000, 7500, and 10,000. Evaluation uses 256 prompts sampled from the IMDB test split. The training pairs are thus generated from continuations of review prompts, whereas the evaluation asks the trained policy to generate afresh for held-out prompts. Learning Word Vectors for Sentiment Analysis

The paper uses lvwerra/distilbert-imdb as the binary sentiment classifier. It converts the predicted label and its probability into a reward that puts negative continuations on the lower side of the scale and positive continuations on the higher side. Classifier confidence also orders examples within each side. A more confident negative prediction receives a lower reward, while a more confident positive prediction receives a higher reward. This reward gives the authors both an ordering for training pairs and a numerical gap for ODPO. The reported evaluation aims to estimate positive sentiment probability for generated samples. Sentiment & emotion

r(y) = 1 − p(NEG | y) if y is classified NEG, or 1 + p(POS | y) if y is classified POS

In this formula r(y) is the sentiment reward of a continuation y. p is the classifier’s predicted probability, NEG denotes negative sentiment, and POS denotes positive sentiment. The reward subtracts the probability from 1 in the negative case and adds it to 1 in the positive case. The prompt argument is omitted, following the paper’s notation for this experiment.

The authors vary β from 0.1 through 1 in the finer part of the sweep and use the additional settings 2, 3, 4, and 5. They sample with different random seeds for each trained setting, reporting 28 samples per method in the sweep. Varying β exposes a range of outcomes for each loss. This comparison includes policies that prioritize staying closer to the reference as well as policies that move further to favor the task attribute.

At preference dataset size 5000, ODPO accounts for 100% of the observed Pareto frontier. At 7500 the fraction is 66%, and at 10,000 it is 100%. The small-data result stands out in the authors’ account of the plotted points, where ODPO shows a more pronounced advantage. The larger datasets also change the region of the tradeoff that the policies reach. At size 10,000, sentiment probability approaches 1. while the paper describes KL as an order of magnitude larger than at 7500. A high score at the larger data size therefore has to be read together with the corresponding movement away from the supervised policy.

The appendix compares both DPO losses with SLiC-HF on the same sentiment task. It uses a margin of 1 for SLiC-HF and β of 0.5 for DPO and ODPO. This comparison gives a set of mean reward and divergence values at fixed settings, alongside 0.9 confidence intervals. It answers a different question from where configurations land over the full sweep. The chart shows the reward comparison at the smallest preference training size.

Mean IMDB sentiment reward with 5000 preference training pairs

ODPO has the highest mean sentiment reward at the compared settings.

Mean IMDB sentiment reward with 5000 preference training pairsSLiC-HF: 0.71SLiC-HF0.71DPO: 0.72DPO0.72ODPO (this paper): 0.76ODPO (this paper)0.76
The numbers
System or settingmean reward
SLiC-HF0.71
DPO0.72
ODPO (this paper)0.76

At size 5000, the corresponding mean KL values are 0.55 for SLiC-HF, 0.39 for DPO, and 0.35 for ODPO. The 0.9 confidence interval reported for ODPO’s mean reward is [0.75, 0.78], and the interval for its mean KL is [0.32, 0.39]. At size 7500, mean rewards are 0.81, 0.83, and 0.87 in the same method order. Mean KL values in that comparison are 3.56, 4.13, and 3.09. At size 10,000, mean rewards are 0.85, 0.86, and 0.89, alongside mean KL values of 209.42, 32.32, and 18.73. The paper reports that no SLiC-HF run enters the observed reward–divergence frontier. The fixed-setting comparison concerns these losses with their stated settings. It leaves open which design difference accounts for the whole comparison with SLiC-HF.

Reducing toxicity from challenging prompts

For toxicity control, the authors use GPT-neo-2.7b as the reference checkpoint and select prompts from RealToxicityPrompts. The training pool contains 10,000 prompts selected with toxicity scores above 0.3. This deliberately puts pressure on the desired behavior by asking the generator to continue prompts that already receive relatively high toxicity scores. The paper describes generating two preference pairs per prompt from the reference and scoring them with a toxicity classifier. The classifier is roberta-hate-speech-dynabench-r4-target, and the offset uses the log of the difference in rewards for the paired responses. The dataset statistics report 256 sampled prompts for evaluation. RealToxicityPrompts

Here the quantity plotted against KL is the average toxicity probability of sampled continuations. The authors test β at 0.05, 0.1, 0.2, 0.3, 0.4, and 0.5. They report observing no improvement over the reference for β greater than 0.5, so the plotted range focuses on the lower values. A horizontal reference shows the toxicity measured for continuations from the starting checkpoint. It gives the reader a direct way to see whether a trained system moves the targeted attribute at all, even before considering the price in divergence.

With 8000 and 9000 preference training examples, 100% of the observed frontier points come from ODPO. In those settings, the DPO toxicity measurements remain close to the starting policy’s level. The authors describe ODPO as bringing toxicity to almost half that level. At size 10,000, ODPO accounts for 57% of frontier points, and DPO comes closer to its performance. The result at the smaller sizes concerns the joint toxicity and KL comparison. It credits ODPO with a lower scored level of toxicity in a range of settings where ordinary DPO produced little change, while also accounting for how far the trained policies moved.

Human-rated pairs for Reddit summaries

The summarization experiment changes both the source of the offset and the evaluation. The dataset is Reddit TL;DR, with the study selecting posts from the relationships and relationship_advice communities. The dataset appendix reports 20,000 posts and 100 posts for evaluation. For training, the authors use summaries whose quality was rated on a 7-point Likert scale. They include a comparison when the overall quality scores differ and use the log of the score gap as its offset. The reference is a GPTJ-6B checkpoint previously supervised on human-written forum summaries. DPO and ODPO both use β = 0.5. Text summarization

At evaluation time, each policy generates a summary. GPT-4 is asked to compare it with a human-written summary of the same post, explain its judgment briefly, and select a winner. The judging prompt emphasizes retaining the important points while omitting irrelevant material, with attention to precision and concision. The paper motivates the evaluator by citing prior DPO work reporting a strong association between GPT-4 and human judgments. The human contribution in this experiment therefore comes from quality ratings used for training and reference summaries used for comparison. The reported test wins themselves are decisions by GPT-4. GPT-4 Technical Report

The authors generate outputs for 100 test prompts over different sampling temperatures. Temperature controls how concentrated or varied the generation procedure is, with 0 corresponding to greedy decoding in the reported examples. Both preference-trained policies improve on the supervised reference in the comparisons against human-written summaries. At 0, 0.25, and 0.5, both are on average preferred to those summaries by the evaluator. Across the tested temperatures, ODPO has the higher average win rate than DPO against the human-written comparator. The authors report significant advantages at 0 and 0.5 for that comparison.

The head-to-head experiment changes the comparator. GPT-4 sees a DPO summary and an ODPO summary of the same post. The resulting ODPO win rate directly reflects that pairing and answers a different question from how often each beats a human-written reference.

ODPO head-to-head win rate against DPO on Reddit TL;DR by sampling temperature

The strongest direct comparison for ODPO occurs at a middle sampling temperature.

ODPO head-to-head win rate against DPO on Reddit TL;DR by sampling temperatureTemperature 0: 51Temperature 051Temperature 0.25: 50Temperature 0.2550Temperature 0.5 (this paper): 62Temperature 0.5 (this paper)62Temperature 0.75: 48Temperature 0.7548Temperature 1.: 57Temperature 1.57
The numbers
System or settingwin rate %
Temperature 051
Temperature 0.2550
Temperature 0.5 (this paper)62
Temperature 0.7548
Temperature 1.57

The win rate of 62 at 0.5 is the highest of the direct comparisons. The rate of 48 at 0.75 gives the edge to DPO at that setting. This can coexist with ODPO doing better against the human-written reference at the same temperature. Each evaluation places a different pair in front of the judge. A greater frequency of defeating a fixed comparator does not determine how often the two generators defeat each other on individual posts.

The appendix gives examples of what can drive an individual choice. In one post, the writer is upset about being unable to become pregnant while also feeling happy for a pregnant sister. A DPO summary reverses an important part of the account by saying the writer does not want children. The ODPO alternative retains the conflicting feelings, and the judge identifies the reversal as consequential. In an example about a friendship, the evaluator prefers the ODPO version for conveying the deterioration in contact with less repetition. These cases show how a win can follow from preserving a fact or presenting the same concern more concisely. The examples are illustrations of judgments, with the aggregate win rates carrying the comparative evidence.

What the runtime comparison covers

The authors report comparable fine-tuning and evaluation time for DPO and ODPO in each task. A sentiment run takes approximately 20 minutes on 2 rtx_4090 GPUs. The reported toxicity run takes approximately 2 hours on 2 a100_40gb GPUs, and the summarization run approximately 15 hours on 2 a100_80gb GPUs. These timings apply to the runs described by the authors. They are consistent with the small change to the objective once the pairwise scores are available. Preparing those scores is a separate part of the data procedure, particularly when people supply judgments about summary quality.

What the ablations show

The score transformation changes the tradeoff

The authors return to sentiment control to isolate the way the offset is calculated. They use an IMDB preference dataset of size 5000 and sweep β over the reported settings. The candidate continuations and the idea of putting an offset in the loss remain the basis of the experiment. What changes across the ODPO conditions is the numerical gap the loss sees for a scored pair. The comparison includes the raw reward difference, the logarithm of that difference, and the difference obtained by taking the logarithm of each reward first.

These choices respond differently to the same assessments. The raw gap preserves the score scale directly. Taking the logarithm of the gap compresses differences at the upper end of the gap scale and changes the contribution of very small gaps. Subtracting the logarithms responds to how large one reward is relative to the other. For example, two pairs can have the same raw gap while one pair has high rewards for both of its responses. Taking the log of the gap treats the two pairs alike. Taking the difference of the logs distinguishes them because the raw difference represents a smaller relative change at a higher starting reward. This comparison tests how the shape of the numerical mapping affects training even when the order of the answers is unchanged.

ODPO share of the IMDB sentiment–KL Pareto frontier by offset formula at training size 5000

Taking the log after forming the reward gap yields the largest ODPO share of the observed frontier.

ODPO share of the IMDB sentiment–KL Pareto frontier by offset formula at training size 5000Difference of log rewards: 63Difference of log rewards63Raw reward difference: 91Raw reward difference91Log of reward difference (this paper): 100Log of reward difference (this paper)100
The numbers
System or settingPareto frontier share %
Difference of log rewards63
Raw reward difference91
Log of reward difference (this paper)100

Each share comes from a comparison of the stated ODPO setting with DPO. It pools configurations along that setting’s reward–KL frontier. The plots show a difference in the location of the points as well. With the log of the gap, runs reach sentiment rewards around 0.8 with KL of 0.4. With the raw gap, the paper describes reaching 0.8 at KL around 1. Taking the difference of the log rewards lies between those alternatives in the authors’ discussion of the tradeoff. The frontier shares and the locations describe complementary properties. A recipe can place many points on its comparison frontier while needing more divergence to reach a particular reward.

The result supports the use of the log-gap transform for the studied movie-review setting. It also gives a reason to report the transform explicitly when assessing the value of preference strength. The same set of judgments can induce different training behavior under different transformations, because the sigmoid receives the transformed quantity itself. An account that attributes every gain to the availability of ratings would miss how the ratings were converted into a target.

Enforcing the offset more strongly

The second ablation keeps the log-gap function and changes α. Here the authors use 7500 IMDB preference examples and β = 0.5. They test α values of 0.0, 0.1, 0.2, 0.3, 0.5, 0.8, and 1.0 and sample with different random seeds. At 0.0 the loss is DPO, so the sweep has an internal baseline. For an offset that is positive before scaling, increasing α raises the estimated gap needed to achieve the same loss for that example. More generally, it enlarges the contribution of the transformed score gap, with the sign supplied by that transform.

The strongest sentiment rewards on the observed frontier occur in the α = 1 setting. Smaller α values are associated with lower KL on the frontier, and on average with lower rewards. The fixed β is important here. The differences arise in a comparison that keeps the reference coefficient fixed and changes the strength of the pair-derived signal. α can alter the balance between task behavior and reference behavior even when the usual DPO coefficient is held steady.

The two ablations answer separate questions. The transformation comparison considers how one scored pair is treated relative to another when the distribution of score gaps is reshaped. The multiplier comparison considers what happens when the same mapping is given more or less influence. Higher rewards and lower divergence can favor different choices. The paper’s result is that both decisions visibly affect the tradeoff, with the preferred setting depending on which region of that tradeoff is of interest.

What changing the number of pairs establishes

The dataset-size comparisons supply another kind of control. Within each size, the two preference objectives use the same kind of response pairs, so the comparison isolates the practical effect of giving the ODPO loss their score differences. The toxicity plots are especially informative because ordinary DPO produces little reduction in the smaller settings and moves closer to ODPO as the number of pairs grows. In that case the information within each pair appears valuable when the available collection is smaller.

The sentiment results give a related picture with a qualification. ODPO accounts for the entire observed frontier at the smallest tested size and again at the largest. The middle size gives DPO some frontier points. The authors’ observation of a more pronounced advantage in the smaller setting draws on where the plotted points fall, as well as on their frontier membership. A claim that the frontier percentage changes steadily with data size would lose that distinction. Across the experiments, the evidence concerns the tested datasets and sweeps. It gives a practical indication about the value of richer labels in those regimes, with no estimate of an exchange rate between collecting scores and collecting more comparisons.

Limitations

Limits identified by the authors

The central data requirement is access to some indication of preference strength. Many human feedback datasets record a choice alone. The authors study tasks where differences can be recovered from ratings or calculated using a scorer. A dataset containing only a prompt and an ordered pair can still train ordinary DPO. The extra ODPO signal becomes available when the examples are augmented with suitable assessments. Collecting a graded preference during comparison and scoring responses independently are both possibilities discussed by the paper, and they place different demands on raters and scoring systems.

The authors also identify task dependence in scaling the offset. They study classifier-based rewards and human ratings on a Likert scale. The sentiment ablations show that changing the transformation or multiplier matters even within one task. They leave other tasks and scoring schemes for future work. A change of score units affects a raw gap, and a nonlinear transformation can change how two pairs are ordered by effective offset. A calibration that gives a desirable tradeoff in movie reviews therefore has to be understood with respect to the classifier and reward construction used there.

In their ethical discussion, the authors note that a general preference-training procedure can steer outputs toward undesirable attributes if those are rewarded. They also point to biases inherited from the data used to build a reward function. Such a function helps determine both which response wins and how much of a gap a pair receives. Bias in assessed quality can therefore influence the learning signal before any update occurs. The paper treats more accurate reward functions and more inclusive feedback collection as relevant to what the procedure ultimately learns.

Limits of the comparisons

All the datasets used in the experiments are in English. The sentiment prompts are movie-review prefixes, the toxicity prompts are selected from a particular benchmark, and the summary evaluations concern posts from specified Reddit communities. The experiments cover different tasks and checkpoints, which broadens the test across settings. The reported comparisons still give evidence about those English datasets and about assessments made through the particular training and evaluation procedures. A move to different languages, domains, or rater populations raises questions that these experiments leave open.

The classifier-based experiments demonstrate control over the scores used to operationalize the tasks. The resulting toxicity figure is a mean predicted probability for sampled continuations, and the sentiment figure describes positive sentiment according to the experiment’s scoring procedure. Neither is a direct audit of the range of behaviors a person might encounter across other prompts. Likewise, KL describes change relative to a reference distribution. Specific errors, abilities, or subgroup effects would require measurements aimed at those outcomes. A policy can score well on the measured attribute at low estimated divergence while still leaving questions about its behavior on particular inputs.

The observed Pareto frontiers depend on the tested β settings, the sampled generations, and the measurement procedure. The percentage of frontier points measures representation within that set. It does not give the size of the improvement at every possible divergence, and points from a different sweep could alter the frontier. The paper provides a fixed-setting reward and KL comparison for sentiment, which helps put some magnitudes on the comparison. The broader claims about how often ODPO offers a favorable tradeoff are tied to the evaluated configurations.

Toxicity and sentiment derive comparisons and offsets from task scorers. The same transformation can amplify differences that a scorer handles well and differences for which its assessments are less dependable. In summarization, a numerical gap between human ratings serves as a proxy for strength. Ordered scale categories say which response received the higher rating, while their numerical separation supplies the additional assumption that the offset uses. The experiments show how this construction worked for the selected pairs. They do not establish a calibration of score gaps to a common human preference scale across raters or tasks.

The log-gap recipe also deserves care when interpreting the word margin. If a positive difference lies below 1, its log is negative. Subtracting a negative offset relaxes the required estimated gap relative to DPO, while a positive offset makes it more demanding. That follows from the stated transform and the loss, without requiring any assumption about how many examples have such gaps. The probability interpretation supports signed offsets, and the paper restricts its softmax-margin equivalence to non-negative ones. How the empirical offsets are distributed across these cases is a separate question from the derivation.

On Reddit TL;DR, the training signal comes from human ratings and the reported evaluation preferences come from GPT-4. Beating a human-written reference in this setup means GPT-4 chose the generated summary under the comparison prompt. Evidence about what human evaluators would prefer in the same test would require their judgments. The evaluation also uses 100 test prompts, and outcomes vary with decoding temperature and choice of comparator. The qualitative cases give concrete examples of errors that influence a verdict, with no frequency estimate for those error types across the test set.

Finally, similar runtimes for the fine-tuning runs establish a narrow computational comparison. DPO and ODPO have nearly the same work once the comparison data and offsets are ready. A full cost comparison would include the source of the scores. When an existing classifier supplies them, the cost includes scoring the training responses. If they are collected from people, it includes gathering the richer assessments. The paper does not measure the full collection cost or the number of additional binary comparisons that would produce an equivalent improvement.

What came after

The later citations reach several questions raised by the paper, from how preference objectives are designed to how outputs are assessed in a particular application. The titles and citation relationships establish those connections at the level of research topics. They do not specify which later studies adopted the offset formula, used it as a baseline, or discussed it as related work. That distinction matters for following a method across fields, because carrying forward the question of preference strength can take many forms.

Preference signals and the behavior they constrain

Anchored Preference Optimization and Contrastive Revisions addresses underspecification in alignment. Its focus on anchoring and revisions connects to a question exposed by a pairwise reward gap. A wider separation specifies more about how two candidates should be ordered relative to the reference, while leaving room for different changes to their individual probabilities. A study of anchoring asks about the additional constraints on those changes. A study of revisions also brings the relation between the candidates into view, since what varies within a comparison affects what the preference can identify.

CoAct studies co-active preference learning with human–AI collaboration. This brings attention to how the judgments used in training are obtained. In the offset paper, the data may supply separate quality scores or a direct judgment about how much better one response is. The connection to co-active learning is the information a human and an AI system can contribute to a preference signal, including whether the process can capture a meaningful degree of preference.

DynamicFocalPO investigates adaptive focusing in preference optimization. The nearby question is which training pairs should exert more pressure during learning. ODPO’s source of differentiation is a fixed score-derived offset for each pair, together with the gap currently produced by the policy. Adaptive focusing brings the decision about where to concentrate training into the foreground. The distinction between the strength of the recorded judgment and the difficulty of satisfying it remains relevant to that line of work.

Preference scores in particular applications

What Makes LLMs Effective Sequential Recommenders? studies recommendation through preference intensity and temporal context. The shared idea is that an order alone can leave out a distinction that matters. In ODPO, a score gap belongs to two responses to the same prompt. In sequential recommendation, the stated focus on temporal context adds the question of when a preference applies. The citation connects the use of graded preferences in training with the problem of representing a preference in a sequence of decisions.

Beyond Overlap Metrics studies rewards for reasoning and preferences in faithful multi-role dialogue summarization. This sits close to the offset paper’s use of human summary ratings. Both topics make the assessment criteria consequential. The offset paper’s examples illustrate why a comparison can turn on a factual reversal or on concision. Faithfulness in dialogue summarization puts the content preserved from the conversation at the center of the scoring question.

Sem-DPO addresses semantic inconsistency in preference optimization for prompt engineering. Its stated focus connects to the ordering step of ODPO. The offset controls how strongly the objective presses for a separation after a winner and loser have been established. A study of semantic inconsistency asks whether the examples and judgments support a coherent distinction in the first place. Strength and semantic consistency concern different properties of the feedback.

EfficientTool places cost-effective alignment in the setting of tool-conditioned agents. The connection is the cost of obtaining and using useful alignment signals. ODPO reports similar run times to DPO once task scores exist. Tool use introduces an application in which the availability and meaning of a task score are important parts of the alignment problem. LASA pursues language-agnostic semantic alignment for safety, extending the range of questions around the language dependence of a signal. The toxicity results in the offset paper concern English prompts and a particular classifier. A language-agnostic safety objective raises the question of how a judgment about an output can have a comparable interpretation across languages.

The broader surveys

Towards Large Reasoning Models surveys reinforced reasoning, and A Systematic Survey of Automatic Prompt Optimization Techniques surveys methods for optimizing prompts. Their citations place the paper in literature with different objects of optimization. ODPO updates the probabilities of responses while taking prompts and comparison examples as inputs. A reasoning survey situates preference optimization amid approaches for reinforcing desirable behavior. A prompt optimization survey concerns changes to the input used to elicit behavior. The appearance of the offset paper in both settings reflects a common measurement question across those topics. An optimization procedure needs a way to say which outcome is better, and a graded assessment supplies information about how much better the outcome is under the chosen criterion.

Cite

Cite as Afra Amini, Tim Vieira and Ryan Cotterell. 2024. Direct Preference Optimization with an Offset. Findings of the Association for Computational Linguistics: ACL 2024.

The paper itself, not this page. BibTeX from the library's record of the work. DOI 10.18653/v1/2024.findings-acl.592

@inproceedings{amini2024direct,
  title = {{Direct Preference Optimization with an Offset}},
  author = {Afra Amini, Tim Vieira and Ryan Cotterell},
  booktitle = {Findings of the Association for Computational Linguistics: ACL 2024},
  year = {2024},
  doi = {10.18653/v1/2024.findings-acl.592},
  url = {https://doi.org/10.18653/v1/2024.findings-acl.592}
}

↑ back to top

This page in Markdown https://md.research.elamur.ai/free/en/papers/amini-2024-direct-preference-optimization-offset/