<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
    <channel>
        <title>Preference Optimization on Lee</title>
        <link>/en/tags/preference-optimization/</link>
        <description>Recent content in Preference Optimization on Lee</description>
        <generator>Hugo -- gohugo.io</generator>
        <language>en</language>
        <copyright>Lee</copyright>
        <lastBuildDate>Sat, 26 Sep 2026 09:08:49 +0800</lastBuildDate><atom:link href="/en/tags/preference-optimization/index.xml" rel="self" type="application/rss+xml" /><item>
            <title>DPO: Where Did the Reward Model Go?</title>
            <link>/en/p/dpo-hidden-reward/</link>
            <pubDate>Sat, 26 Sep 2026 00:00:00 +0000</pubDate>
            <guid>/en/p/dpo-hidden-reward/</guid>
            <description>&lt;img src=&#34;/en/p/dpo-hidden-reward/cover.jpg&#34; alt=&#34;Featured image of post DPO: Where Did the Reward Model Go?&#34; /&gt;&lt;p&gt;Classical RLHF resembles a three-stage production line: collect pairwise preferences, train a scalar reward model, then use PPO to make the language model pursue that score while a KL penalty keeps it tethered. DPO says the second and third stages can be removed, leaving a loss that looks like binary classification.&lt;/p&gt;&#xA;&lt;p&gt;That claim is often compressed into the misleading phrase “DPO needs no reward model.” More precisely, &lt;strong&gt;DPO does not train a separate, callable reward network, but it still assumes that preferences arise from a latent reward. It rewrites that reward as a change in policy log-probability relative to a reference model.&lt;/strong&gt; The reward model moves from an explicit artifact into the language model&amp;rsquo;s coordinate system.&lt;/p&gt;&#xA;&lt;p&gt;Understanding why that substitution works, what a batch actually computes, and where the simplification moves the remaining risk explains most of DPO.&lt;/p&gt;&#xA;&lt;h2 id=&#34;it-removes-training-stages-not-the-preference-assumption&#34;&gt;It Removes Training Stages, Not the Preference Assumption&#xD;&#xA;&lt;/h2&gt;&lt;p&gt;For prompt $x$, an annotator prefers response $y_w$ over $y_l$. A conventional reward model often uses the Bradley–Terry assumption:&lt;/p&gt;&#xA;$$&#xA;p(y_w \succ y_l\mid x)=\sigma\big(r(x,y_w)-r(x,y_l)\big).&#xA;$$&lt;p&gt;After fitting that reward network, RLHF solves a KL-regularized policy objective:&lt;/p&gt;&#xA;$$&#xA;\max_\pi\;\mathbb E_{y\sim\pi}[r(x,y)]-&#xA;\beta D_{\mathrm{KL}}\!\left(\pi(\cdot\mid x)\,\|\,\pi_{\mathrm{ref}}(\cdot\mid x)\right).&#xA;$$&lt;p&gt;The first term favors high-reward responses. The second prevents the policy from moving too far from its reference. This is not decorative: a reward model is reliable only near the finite distribution on which it was trained, and a policy can learn to exploit it outside that region.&lt;/p&gt;&#xA;&lt;figure&gt;&lt;img src=&#34;/en/p/dpo-hidden-reward/pipeline.svg&#34;&gt;&lt;figcaption&gt;&#xA;&#x9;&#x9;&#x9;&lt;h4&gt;Figure 1: conventional RLHF fits a reward model and then runs PPO; DPO updates the policy directly from preference pairs&lt;/h4&gt;&#xA;&#x9;&#x9;&lt;/figcaption&gt;&#xA;&lt;/figure&gt;&#xA;&#xA;&lt;p&gt;DPO&amp;rsquo;s key move is to observe that the optimal policy for this objective has a closed form:&lt;/p&gt;&#xA;$$&#xA;\pi_r(y\mid x)=\frac{1}{Z(x)}\pi_{\mathrm{ref}}(y\mid x)&#xA;\exp\!\left(\frac{r(x,y)}{\beta}\right).&#xA;$$&lt;p&gt;Rearranging expresses reward through the policy:&lt;/p&gt;&#xA;$$&#xA;r(x,y)=\beta\log\frac{\pi_r(y\mid x)}{\pi_{\mathrm{ref}}(y\mid x)}+\beta\log Z(x).&#xA;$$&lt;p&gt;The inconvenient partition function $Z(x)$ depends only on the shared prompt. When the expression is substituted into Bradley–Terry, the two response rewards are subtracted and $\beta\log Z(x)$ cancels. We can fit which answer a person would choose without recovering an absolute reward first. This is a change of variables, not an approximation.&lt;/p&gt;&#xA;&lt;h2 id=&#34;one-pair-becomes-four-log-probabilities&#34;&gt;One Pair Becomes Four Log-Probabilities&#xD;&#xA;&lt;/h2&gt;&lt;p&gt;For each $(x,y_w,y_l)$, DPO computes sequence log-probabilities for the chosen and rejected responses under both the current policy and the reference. Define&lt;/p&gt;&#xA;$$&#xA;a_w=\log\pi_\theta(y_w\mid x)-\log\pi_{\mathrm{ref}}(y_w\mid x),&#xA;$$$$&#xA;a_l=\log\pi_\theta(y_l\mid x)-\log\pi_{\mathrm{ref}}(y_l\mid x).&#xA;$$&lt;p&gt;Each $a$ measures how much more support the current policy gives a response than its starting point did. DPO minimizes&lt;/p&gt;&#xA;$$&#xA;\mathcal L_{\mathrm{DPO}}=-\log\sigma\big(\beta(a_w-a_l)\big).&#xA;$$&lt;figure&gt;&lt;img src=&#34;/en/p/dpo-hidden-reward/four-logprobs.svg&#34;&gt;&lt;figcaption&gt;&#xA;&#x9;&#x9;&#x9;&lt;h4&gt;Figure 2: DPO constructs one relative advantage gap from policy/reference × chosen/rejected log-probabilities&lt;/h4&gt;&#xA;&#x9;&#x9;&lt;/figcaption&gt;&#xA;&lt;/figure&gt;&#xA;&#xA;&lt;p&gt;Three details matter.&lt;/p&gt;&#xA;&lt;p&gt;First, the isolated rule is not “the chosen probability must rise.” The chosen response&amp;rsquo;s gain over the reference must exceed the rejected response&amp;rsquo;s gain. Because parameters are shared, both absolute probabilities can even fall while the relevant margin improves.&lt;/p&gt;&#xA;&lt;p&gt;Second, the reference is not merely an old checkpoint label. It sets the zero point of the implicit reward and acts as the KL anchor. The paper initializes both policy and reference from an SFT model when one is available. If a matching SFT model is unavailable, it first maximizes likelihood on preferred completions to reduce distribution mismatch.&lt;/p&gt;&#xA;&lt;p&gt;Third, $\beta$ controls conservativeness relative to the reference, but conventions differ across implementations; its numeric value should not be copied blindly between libraries. In the authors&amp;rsquo; reference code, the core really is short: compute the policy&amp;rsquo;s chosen/rejected log-ratio, subtract the reference log-ratio, and pass the result through &lt;code&gt;logsigmoid&lt;/code&gt;. A short loss does not mean one model-sized forward pass, however. A straightforward implementation still evaluates the trainable policy and frozen reference, so memory, parallelism, and truncation remain engineering concerns.&lt;/p&gt;&#xA;&lt;h2 id=&#34;its-simplicity-comes-from-being-offlineand-so-does-its-limit&#34;&gt;Its Simplicity Comes From Being Offline—and So Does Its Limit&#xD;&#xA;&lt;/h2&gt;&lt;p&gt;DPO does not generate fresh responses inside the training loop, score them with a reward model, or maintain PPO actor, critic, and rollout machinery. A fixed dataset of $(x,y_w,y_l)$ triples can be replayed like supervised learning. That lowers system complexity and makes experiments easier to reproduce.&lt;/p&gt;&#xA;&lt;p&gt;The original paper evaluated controlled sentiment generation, Reddit TL;DR summarization, and single-turn dialogue from Anthropic Helpful and Harmless, using models up to 6B parameters. In its GPT-4-evaluated summarization setup, DPO reached a reported win rate of roughly 61%, versus about 57% for PPO, and was more robust to sampling temperature. In a direct human comparison, DPO samples were preferred over PPO samples 58% of the time.&lt;/p&gt;&#xA;&lt;p&gt;Those results support “DPO achieves competitive preference alignment with simpler optimization in these settings.” They do not establish that DPO beats online RL at every scale and on every preference distribution. A fixed dataset cannot observe new failures produced by the changing policy. If training moves the policy beyond the data&amp;rsquo;s coverage, the supervision does not follow automatically. Who generated the response pairs, which model produced them, and how consistently they were labeled all become part of the algorithm.&lt;/p&gt;&#xA;&lt;figure&gt;&lt;img src=&#34;/en/p/dpo-hidden-reward/tradeoffs.svg&#34;&gt;&lt;figcaption&gt;&#xA;&#x9;&#x9;&#x9;&lt;h4&gt;Figure 3: DPO removes the explicit reward network and online PPO loop, but retains reference computation and concentrates risk in preference data and distribution shift&lt;/h4&gt;&#xA;&#x9;&#x9;&lt;/figcaption&gt;&#xA;&lt;/figure&gt;&#xA;&#xA;&lt;p&gt;It is therefore more useful to distinguish regimes than to say one algorithm replaced another. DPO directly fits a policy on fixed preference data. Online RL is more complex, but can keep exploring the current policy and gathering feedback about its new mistakes.&lt;/p&gt;&#xA;&lt;h2 id=&#34;an-implicit-reward-can-still-be-exploited&#34;&gt;An Implicit Reward Can Still Be Exploited&#xD;&#xA;&lt;/h2&gt;&lt;p&gt;Removing the standalone reward network does not remove reward hacking. If the preference data contains a shortcut, DPO can amplify whatever feature predicts a win.&lt;/p&gt;&#xA;&lt;p&gt;Length is a clear example. Follow-up work by Rafailov and colleagues analyzed Anthropic HH and TL;DR. Preferred responses were only slightly longer in the datasets, yet unregularized DPO produced answers roughly twice as long on average and outside the length distribution of the feedback. The authors interpreted this as out-of-distribution extrapolation of a length-correlated preference and introduced a length regularizer, reporting gains of up to 20% in length-controlled win rate.&lt;/p&gt;&#xA;&lt;p&gt;The conclusion is not that long answers are bad. It is that a model may turn “more complete answers often win” into “more tokens cause winning,” while automated judges may have their own verbosity preference. Raw win rate can then mix content quality, response length, and judge bias.&lt;/p&gt;&#xA;&lt;p&gt;Binary preferences impose a deeper compression as well. DPO knows only that $y_w$ beat $y_l$—not by how much, nor whether both were poor. Annotation noise, prompt shift, and entanglement between style and factuality survive the elegant objective. Real systems still need independent evaluation: length-controlled comparisons, human audits, factuality and safety tests, and monitoring of drift from the reference.&lt;/p&gt;&#xA;&lt;h2 id=&#34;the-breakthrough-was-choosing-the-right-coordinates&#34;&gt;The Breakthrough Was Choosing the Right Coordinates&#xD;&#xA;&lt;/h2&gt;&lt;p&gt;DPO&amp;rsquo;s durable contribution is not the slogan “one loss replaces RLHF.” It is the coordinate change: under KL-regularized preference optimization, reward differences can be represented by differences in policy-to-reference log-ratios. Bradley–Terry depends only on differences, so the unknown normalization disappears.&lt;/p&gt;&#xA;&lt;p&gt;That view shortens an expensive pipeline and reveals a broader design lesson. An intermediate model can be only one parameterization of the final object. If its constraint can be written directly into that object, stages may disappear without changing the underlying assumptions.&lt;/p&gt;&#xA;&lt;p&gt;But removing a module does not remove every problem the module carried. Preferences can remain biased. The reference still defines what “not too far” means. Offline data still bounds what can be learned, and evaluation can still reward surface features. DPO makes the optimization more direct; it does not make the question “what do people actually prefer, and why?” any simpler.&lt;/p&gt;&#xA;&lt;h2 id=&#34;references&#34;&gt;References&#xD;&#xA;&lt;/h2&gt;&lt;ol&gt;&#xA;&lt;li&gt;Rafailov et al., &lt;a class=&#34;link&#34; href=&#34;https://papers.neurips.cc/paper_files/paper/2023/hash/a85b405ed65c6477a4fe8302b5e06ce7-Abstract-Conference.html&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xD;&#xA;    &gt;Direct Preference Optimization: Your Language Model Is Secretly a Reward Model&lt;/a&gt;, NeurIPS 2023.&lt;/li&gt;&#xA;&lt;li&gt;Rafailov et al., &lt;a class=&#34;link&#34; href=&#34;https://arxiv.org/abs/2305.18290&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xD;&#xA;    &gt;DPO paper and appendices&lt;/a&gt;, 2023.&lt;/li&gt;&#xA;&lt;li&gt;Mitchell et al., &lt;a class=&#34;link&#34; href=&#34;https://github.com/eric-mitchell/direct-preference-optimization&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xD;&#xA;    &gt;DPO official reference implementation&lt;/a&gt;.&lt;/li&gt;&#xA;&lt;li&gt;Park et al., &lt;a class=&#34;link&#34; href=&#34;https://aclanthology.org/2024.findings-acl.297/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xD;&#xA;    &gt;Disentangling Length from Quality in Direct Preference Optimization&lt;/a&gt;, Findings of ACL 2024.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;</description>
        </item></channel>
</rss>
