Skip to content

Post-Training: RLHF, DPO, and Reasoning Models

15 min reading

Interpret a preference objective without confusing label fit, truth, authority or release readiness.

Page details

GenAI · Advanced study · 5 / Depth

Sources · 15 min reading · 28 min with practice

Published · Last edited:

More
20px

Progress is saved in this browser when storage is available.

View guided paths and progress

Know first: High-throughput gateway: tiered caches, balancing, failure and GPU autoscaling. Optional help: GenAI foundations.

Optional background references

What does fitting a preference actually establish?

Hypothetical scenario. Northwind considers preference training after diagnosing a recurring answer behavior. Maya’s reviewers favor a decisive response, but Priya finds an unsupported exception in it. Dev asks what learning that preference would actually improve.

Maya: “The preferred answer reads well, but its exception is absent from the policy.”

Dev: “The label can reward confidence even when the required evidence is missing.”

Priya: “Make the rubric explicit before optimizing agreement with those comparisons.”

This optional depth chapter builds on adaptation, training-example suitability and independent evaluation. You will distinguish supervised targets, preference comparisons and verifiable rewards, then inspect the worked objective without equating improved label agreement with truth or action authority.

Post-training changes a pretrained model's behavior for a chosen task or interaction. Supervised instruction tuning learns from target responses; preference-based approaches use comparisons or rewards to influence behavior. These objectives depend on the examples and labels supplied. They do not define truth or authorization by themselves.

This lesson extends adaptation with preference data, objective interpretation and release review. It does not provide a universal alignment recipe or claim that one optimization method solves every harmful behavior.

A preference label contains a hidden rubric

When one response is marked better than another, the label may reflect factual support, completeness, politeness, length or reviewer taste. If those criteria conflict, the model receives a comparison without knowing which hidden rule mattered.

Write the rubric and preserve the evidence used for each judgment. A preference about writing style should not silently override a required source-support constraint. Include explicit limitation cases so the desired behavior is not always confident completion.

Reviewer disagreement can reveal an ambiguous policy rather than careless annotation. Resolve the criterion where possible, retain uncertainty where it is real, and avoid manufacturing consensus merely to create a convenient training row.

Keep preference optimization separate from factual authority

Hypothetical scenario. A preference pair favors a concise but unsupported answer over a cautious supported one. Optimizing that label can improve the selected preference objective while worsening the application contract. Retain rubric, annotator context and source evidence with the pair.

Keep preference optimization separate from factual authority
ArtifactConcrete evidenceDecision boundary
Preference pairchosen/rejected outputs, rubric, sourceSupervision meaning
Training configobjective, reference, data revisionOptimization intervention
Release casessupport, authority, task successIndependent acceptance
Optimize supplied signal: Labeled preferences → Post-training objective.Optimize supplied signal: Labeled preferences → Post-training objective. Labeled preferences to Post-training objective: optimize supplied signal; Post-training objective to Application evaluation: verify actual required behavior.Labeled preferencesPost-trainingobjectiveApplicationevaluationoptimize supplied signalverify actual required behavior
Optimize supplied signal: Labeled preferences → Post-training objective. Enlarge the diagram to inspect its labels; the surrounding records and explanation give the text alternative.

RLHF and DPO optimize different formulations of post-training objectives; neither makes preference labels infallible. Reasoning-oriented behavior also needs task-level verification rather than accepting a longer derivation as proof. Evaluate required evidence, refusal and authority cohorts independently from average preference. A post-training release includes data lineage, reference model/configuration and rollback compatibility.

Separate target learning from preference learning

Supervised tuning can teach examples of the desired response format and task behavior. A preference process then compares alternatives under a defined criterion. In the approach described by Training language models to follow instructions with human feedback, demonstrations and preference information play distinct roles in a particular training pipeline.

Preference optimization depends on a declared judgment processA task and rubric define labeled response pairs. A selected post-training objective creates a candidate. Held-out task and constraint evaluation decides whether the candidate should be released.Task + rubriclabeled alternativesChosen objectiveversioned candidateHeld-out behaviorconstraint review

Direct Preference Optimization derives a preference-learning objective using a policy and reference-policy relationship under its model. It avoids a separate explicit reward-model training and policy-optimization loop of the compared formulation. That methodological difference does not establish superior behavior for every application.

Keep the base, reference, tokenizer, data and optimization configuration versioned. Compare the deployed prompt-and-model combination on held-out task cases. A changed objective is a candidate intervention, not a release certificate.

Work through one preference-loss example

Hypothetical scenario. Consider one prompt with a preferred response and a rejected response. Choose policy probabilities of 0.2 and 0.1 for those complete responses, and reference probabilities of 0.1 and 0.1. These are toy sequence probabilities chosen for arithmetic, not a measured language-model output.

The policy-to-reference ratios are 0.2 ÷ 0.1 = 2 for the preferred response and 0.1 ÷ 0.1 = 1 for the rejected response. Their log-ratio difference is ln 2 −ln 1 = ln 2. Choose a scaling coefficient of one for this example.

The logistic probability of that margin is 1 ÷ (1 +exp(−ln 2)). Because exp(−ln 2) = 1/2, the result is 1 ÷ 1.5 = 2/3. The negative log loss is−ln(2/3) ≈0.4055. At a zero margin, the logistic value would be 1/2 and the loss−ln(1/2) ≈0.6931.

The smaller loss reflects fitting this preference pair under the selected objective. It does not prove that the preferred response is true. If its label rewards an invented policy exception, optimizing the pair can reinforce that invention.

For data review, choose 100 pairs:60 clear comparisons,25 ambiguous comparisons and 15 with unsupported preferred answers. If only the clear group is accepted initially, the retained count is 60 and fraction 60 ÷ 100 = 0.6. This is a constructed quality process; discarded and ambiguous groups still deserve investigation rather than silently becoming training targets.

Reward and task success can diverge

A learned reward or preference objective is a proxy for the intended task. A model can exploit superficial features associated with high labels, such as length or confident tone. Improving that proxy is insufficient if required source support, correct identity or allowed action behavior worsens.

Include adversarial and out-of-distribution cases, but distinguish their deliberate construction from estimates of real prevalence. A model that passes a selected attack collection has evidence on those cases, not a universal defense.

Post-training can also change refusal and uncertainty behavior. Excessive refusal can reduce usefulness while apparently improving a narrow failure count. Compare appropriate answers and appropriate limitations under the same written task contract.

The style rubric erases a required limitation

Hypothetical scenario. Reviewers are told to prefer decisive answers. On questions with missing evidence, they repeatedly choose an unsupported conclusion over an explicit limitation. The candidate later answers those questions more confidently and earns higher preference scores.

The optimization can be functioning as specified while the training specification is wrong. Revise the rubric, inspect existing labels and preserve evaluation cases that expose the failure. Do not describe the score gain as a product improvement until task constraints are checked.

Keep reviewer instructions and source snapshots with the data version. Otherwise a later team cannot tell whether a behavior came from the objective, the labels or a changed interpretation of the policy.

Three post-training misconceptions

“Preference optimization teaches factual truth.” It learns from the supplied comparisons and objective. Label validity and source evidence remain necessary.

“A simpler training loop means a simpler product decision.” Data suitability, regressions, deployment compatibility and review still require work.

“A lower training loss proves better alignment.” It establishes improved fit to that objective on that data, not every desired behavior.

Choose post-training from a stable behavior need

Use post-training when a stable task behavior cannot be adequately addressed by clearer instructions, appropriate evidence and application validation, and when suitable labeled data exists. Compare against a serious supervised or prompt baseline rather than assuming preference optimization is the default next stage.

Keep required authority outside the model. A preference-trained assistant still cannot grant itself tool permissions or make an uncertain external effect disappear. Evaluate trajectories and application state alongside final answers.

Reject training data whose preferred answers violate the target contract. Release only after examining held-out behavior, important slices, uncertainty handling and rollback. A documented decision to avoid training can be the stronger architectural choice.

Three post-training stages change different signals

Supervised fine-tuning, or SFT, updates a model from demonstrations of desired input-output behavior. It teaches the distribution of examples supplied: response formats, task conventions and styles of answering. For Northwind, demonstrations can show how to cite an applicable return rule and escalate an unresolved exception. They should not silently teach an obsolete deadline as a permanent company fact.

A reward model learns to score candidate responses from preference judgments. In a common RLHF arrangement, a policy then generates responses and receives reward-model feedback during optimization. The policy is the model being adjusted; the reward model is an imperfect proxy for the intended outcome. Rewarding confident explanations can select confident unsupported answers if the preference collection never checks the policy evidence.

Direct Preference Optimization, or DPO, uses preferred and rejected response pairs with a reference-policy relationship in its objective. It avoids the separate explicit reward-model and online policy-optimization loop of the compared RLHF formulation. That changes the optimization arrangement, not the need for representative labels and an independent acceptance test. A preferred answer can still be wrong under the application contract.

The Hugging Face RLHF explanation describes the demonstration, reward-model and optimization stages. Its TRL DPO documentation describes the pairwise data and objective used by that trainer. These primary resources explain distinct mechanisms. Neither supplies a reason to replace current retrieval with training when the actual failure is an absent source document.

Verifiable rewards narrow the judging problem

Reasoning-oriented post-training can reward outputs whose answers can be checked against a defined rule. An arithmetic result or executable test gives a more concrete acceptance signal than a general preference for polished prose. The reward still defines the behavior being selected. A checker with an exploitable shortcut can reward success on the checker while missing the intended task.

Northwind’s policy assistant has a different evidence problem from a mathematics benchmark. The applicable policy can change, private records have access limits, and an exception can require human authority. A longer reasoning trajectory cannot establish a missing approval. Training can improve how the assistant handles those boundaries, while retrieval and service authorization remain responsible for their current state.

Compute the preference denominator before claiming progress

Hypothetical worked example: reviewers compare 100 answer pairs under a defined policy-support rubric. They label 70 pairs with a clear preference, 20 as ties and 10 as insufficient evidence. A simple pairwise training set contains the 70 preferred/rejected pairs; it does not magically contain 100 equally informative preference labels.

Assume the held-out check contains 50 different questions. The baseline passes 36 and the candidate passes 41, so observed acceptance changes from 36 / 50 = 72% to 41 / 50 = 82%, a 10-percentage-point difference. Because the questions are paired, inspect which cases changed in each direction. Aggregate counts alone do not establish statistical confidence or reveal whether the lost cases are more consequential than the gains.

If the 10 insufficient-evidence training comparisons are actually questions without an indexed current policy, collecting stronger preferences is the wrong first repair. Restore the evidence path, then ask reviewers to compare answers using that evidence. Otherwise the training process rewards someone’s guess about a policy that neither candidate had enough information to answer.

A second illustrative budget makes the data-selection effect visible. If reviewing one pair takes a chosen 3 minutes, 100 pairs require 100 × 3 = 300 minutes, or 5 hours of review. A second independent review doubles that component to 10 hours. These are planning assumptions, not measured staffing requirements; adjudication and source preparation add separate work.

In the wild: optimization targets do not certify product behavior

The linked InstructGPT and DPO papers describe distinct training approaches within their studied settings. The documentation adds concrete implementation context. Their results do not establish that Northwind will gain ten points of acceptance or that a preference objective proves truthfulness. The local question is whether independently checked answers improve without breaking evidence, scope or spending rules.

A model release must preserve the evaluation boundary. Keep a held-out policy-support set, a format check, an unauthorized-action test and a cost-per-accepted-task ledger. Include abstention cases rather than rewarding an answer to every request. When the label process changes, version it; otherwise an apparent training improvement can be a change in what reviewers decided to accept.

Choose an intervention from the failure category

Use prompt changes when instructions are ambiguous and the model already has the needed information. Use retrieval or source maintenance when current evidence is absent. Consider SFT when stable response behavior needs demonstrations. Consider preference optimization when reviewers can reliably compare alternatives under a meaningful rubric. More elaborate optimization is justified by a demonstrated failure that simpler interventions have not repaired.

Northwind’s post-training decision is to improve supported explanations and escalation behavior while keeping policies in a versioned retrieval collection. Tool authority remains in services. The team can then distinguish a model that learned to explain a boundary from a system that actually enforces it. That distinction makes later model upgrades easier to evaluate.

Limits of a better training score

Preference datasets can contain inconsistent labels, unrepresentative tasks and inherited source errors. A reference model constrains an objective without creating an independent truth source. Evaluation can also be contaminated by repeated tuning on its questions. Preserve held-out cases, document reviewer disagreement and inspect new failures after release rather than treating one training run as a permanent certification.

Northwind decision log

  • Specify the behavior and reward being optimized.
  • Keep training signals distinct from factual evidence.
  • Test accepted tasks after each adaptation.

Go deeper into preferences and generalization

Test the preference pair boundary

The candidate wins preference judgments but invents more citations. Is the objective improvement sufficient?

Reveal the design reasoning

No. Inspect label quality and the required evidence cohort. Reject or repair the release under the declared acceptance rule rather than redefining success after observing the score.

Decision: Treat preferences as fallible supervision and verify consequential behavior independently.

Check yourself: review the labels

A preferred answer invents a fact but sounds decisive. What does fitting that pair establish?

Improved agreement with the label, not truth. Correct the rubric and data, then inspect held-out source-support cases.

Preference loss falls while appropriate limitations disappear. Is the candidate ready?

Not on that evidence. Evaluate the task's missing-evidence behavior and required constraints separately from the optimized proxy.

The model is preference-trained. Can its tool proposal bypass authorization?

No. Learned behavior does not grant external authority. Keep application enforcement and uncertain-action recovery intact.

Northwind can inspect the signal a post-training objective rewards. Page 51 follows the data behind that signal: use adaptation and evaluation prerequisites to choose independent split units, preserve lineage and keep synthetic descendants from leaking across training and evaluation.