InterviewsVector
Arc 6
Failure labAdvanced115 min estimateOriginal publication

Preference Optimization and Reward Failure

A preference label is an observation under an annotation policy, not a reward oracle. Audit the comparison before trusting the optimization signal.

Authorship
InterviewsVector
Published / updated
2026-09-19 / 2026-09-19
Review status
Artifact tests passing · primary sources recorded

Original InterviewsVector material. Executable illustrative contracts have focused tests and recorded primary sources. No named human reviewer or production certification is claimed.

The decision in one pass

Preference optimization changes a policy using relative judgments about candidate responses. An RLHF pipeline commonly fits a reward model from comparisons and then optimizes a policy against that proxy; DPO directly optimizes a reference-policy-relative pairwise objective. Neither route removes dependence on the prompt distribution, candidate-generation process, annotator policy, split integrity, or evaluator independence. Bind each comparison to exact prompt and response content, distinguish chosen from rejected without relying on display position, retain ties and abstentions, report decisive support and disagreement, and evaluate on held-out prompts with independent task and safety checks. A low pairwise loss is evidence about a supplied comparison objective, not proof of factuality, user utility, reward validity, or general capability.

Why this matters

Preference pipelines can reward answer length, confidence, stylistic conformity, or agreement with the question rather than correctness. Training can amplify those shortcuts while the headline preference rate rises. An evidence audit gives reviewers a way to distinguish a genuine supported comparison from duplicated prompts, silently discarded uncertainty, biased positions, stale policies, or reward-model exploitation.

You will be able to

  • Contrast a reward-model-plus-policy pipeline with direct preference optimization.
  • Derive the reference-relative DPO margin and calculate its stable logistic loss.
  • Bind prompt, pair, annotator-policy, evaluation, split, model, and policy identities.
  • Preserve tie and abstention counts without converting them into wins.
  • Gate sparse, directionally inconsistent, and bias-prone preference evidence.
  • Separate preference evidence from reward validity and capability claims.

Your Vector Loop for this lab

  1. 01

    Model

    Map prompts, candidate generation, comparison presentation, raters, annotation policy, reference policy, trained policy, and held-out evaluation.

  2. 02

    Derive

    Derive the reference-relative log-probability margin and identify which observations can legitimately enter a binary comparison loss.

  3. 03

    Build

    Capture immutable comparison records with exact content digests, versioned scope, explicit labels, and a stable pairwise-loss calculation.

  4. 04

    Stress

    Swap chosen/rejected content, duplicate prompts, erase abstentions, bias positions, inject stale versions, and attack numeric boundaries.

  5. 05

    Operate

    Track preference support, disagreement, annotator cohorts, independent task regressions, and policy lineage across releases.

  6. 06

    Defend

    Explain why an audited pairwise objective supports only a bounded preference-evidence claim and cannot certify reward or capability.

Name the observation before the optimizer

A comparison has a prompt, two exact candidate responses, a presentation order, an annotation instruction, and an observed label. Calling one response chosen records a judgment under that process; it does not make the response objectively correct. A rater may prefer a fluent hallucination, reject an appropriately cautious answer, or abstain because both candidates are defective. Preserve that ambiguity instead of forcing every record into a binary win.

StageWhat it consumesWhat can fail
supervised instruction tuningdemonstrationsdemonstrator coverage or target quality
reward modelingcomparison labelsproxy learns presentation or style shortcuts
policy optimization against rewardreward signal and reference constraintspolicy exploits proxy errors
direct preference optimizationchosen/rejected pairs and reference likelihoodsbad comparisons become direct gradient signals

The InstructGPT paper gives a concrete demonstration/comparison/reward/policy pipeline, while DPO supplies a different route from comparisons to a policy objective. Treat these as mechanisms to reason about, not interchangeable product badges. Both depend on whose preferences were collected and where the resulting model will be used.

Derive the margin without turning it into truth

m = β[(log πθ(y+|x) − log πθ(y−|x)) − (log πref(y+|x) − log πref(y−|x))]; L = log(1 + exp(−m))

The margin compares the trained policy's chosen-versus-rejected log-probability gap with the reference policy's gap. β scales that relative comparison. The reference artifact accepts bounded sequence log probabilities; it does not run either model or choose token-length normalization for you.

For illustrative values policy=(-2,-4), reference=(-3,-3), and β=0.1, the margin is 0.2 and the loss is approximately 0.598139. Compute softplus as max(0,-m) + log1p(exp(-abs(m))) so extreme valid margins do not overflow. This arithmetic can be perfectly correct while the pair label is wrong. Numerics and supervision validity are separate obligations.

Bind content and preserve uncertainty

The artifact binds contract, model, reference, policy, data, annotator-policy, evaluation, held-out split, and source revisions in a fixed scope. Each pair adds pair and prompt IDs, exact prompt text, distinct chosen/rejected text, presentation position, rater labels, and four supplied log probabilities. The pair digest covers every field. Changing an answer while retaining its old digest is rejected; changing the digest creates different evidence that must be evaluated again.

  • Chosen/rejected labels describe content identity, while left/right records presentation position; never conflate the two.
  • A tie means neither candidate was preferred under the rubric. Abstention means the rater withheld a judgment. Neither is a decisive win.
  • Duplicate annotator IDs within a pair inflate support; duplicate prompts across pairs can overweight a narrow task even with different pair IDs.
  • A held-out split label is a declared contract, not evidence that no training contamination exists. Join source lineage and perform contamination checks separately.

The frozen records copy nested sequences at construction. The public audit reconstructs and rechecks concrete records so constructor bypass, stale digests, malformed numbers, and noncanonical values do not receive a report. Hashes make content changes visible; they do not authenticate raters or establish that upstream log probabilities were measured correctly.

Run the evidence audit before interpreting loss

preference_evidence_audit.py
1def audit_preferences(contract: PreferenceContract, pairs: tuple) -> PreferenceReport:
2 """Revalidate identities, support, bias indicators, and stable pairwise loss."""
3 validate_record(contract, PreferenceContract)
4 if type(pairs) not in (tuple, list):
5 raise ValueError("pair sequence required")
6 count(len(pairs), 1, 1000)
7 pairs = tuple(pairs)
8 for pair in pairs:
9 validate_record(pair, PreferencePair)
10 if pair.scope != contract.scope:
11 raise ValueError("model/data/policy/evaluation scope mismatch")

Expected output

example=illustrative_only
status=SUPPORTED
decisive=4;ties=2;abstentions=2
mean_dpo_loss=0.598139
claim=PREFERENCE_EVIDENCE_NOT_REWARD_OR_CAPABILITY

Verify: python3 -m unittest discover courses/ai-engineering/reference-impl/preference_optimization

The fixture contains two prompts, opposite chosen positions, four decisive votes, two ties, and two abstentions. The audit first checks shape, scope, identity, and content integrity. It then blocks insufficient pair or decisive support, requires every pair to have a decisive judgment, rejects a chosen label without a chosen-vote majority, and flags excessive rejection disagreement or a one-sided presentation layout. The thresholds are deliberately small teaching values, not a sampling recommendation.

Investigate rising reward with independent evidence

Suppose a policy's proxy reward rises while users report more persuasive incorrect answers. Start by preserving the old checkpoint, reward version, prompt cohort, and annotation rubric. Replay both policies on the same held-out prompts, blind the presentation, and collect factuality or task-outcome judgments independently of the reward score. Split by answer length, refusal behavior, difficult prompts, and rater cohort. A shift in the mix can make a global preference rate look better without improving any important slice.

  1. 01Check the comparison processConfirm exact candidate content, randomized presentation, tie handling, and annotation instructions before blaming an optimizer.
  2. 02Separate evaluator from targetDo not use the reward model being optimized as the only release judge. Preserve independent task, safety, and user-outcome evidence.
  3. 03Bound the conclusionDescribe which paired cohort and rubric improved, which regressed, and how much support each conclusion has. Do not extrapolate a local result to all users.

The reward-overoptimization paper studies how optimizing an imperfect proxy can hurt a separate target in a controlled synthetic setting. The transferable engineering lesson is to preserve independent outcomes and watch optimization pressure; its fitted relations should not be transplanted as universal production thresholds.

Stress the evidence boundary and retain a rollback path

Attack the audit with reversed content, duplicate prompt IDs, repeated prompt text under new IDs, duplicated raters, stale annotation policies, zero decisive support, and constructor-bypassed records. Numeric tests include booleans, NaN, infinities, subnormal values, positive sequence log probabilities, oversized magnitudes, and extreme valid margins. A non-finite loss should not be the first indication that evidence was malformed.

At operation time, associate the comparison dataset and its policy with the adapter or full checkpoint it produced. Keep the reference policy revision, objective settings, evaluation cohort, and release decision together. When a rubric changes, version it and decide whether old labels remain usable; silently mixing incompatible rubrics destroys the meaning of a preference rate. Rollback must recover both the prior serving policy and the evaluation contract used to approve it.

Operate at three altitudes

Production lens

  • Track decisive support, ties, abstentions, disagreement, presentation balance, task outcomes, and safety regressions beside the aggregate preference rate.
  • Keep evaluation independent of both training comparisons and the reward proxy being optimized; bind all releases to exact policy and cohort revisions.
  • Quarantine malformed evidence and require human review for sparse or bias-prone cohorts instead of treating missing support as a win.

Staff lens

  • Assign ownership for annotation policy changes, evaluator independence, cohort selection, and rollback approval rather than leaving these decisions inside a training script.
  • Require a decision record stating which stakeholder preferences are represented, which populations are absent, and which tradeoffs cannot be resolved by a single scalar reward.

Interview defense

A DPO run lowers pairwise loss and raises a reward score, but factuality complaints increase. What do you inspect before approving it?

Separate arithmetic validity, comparison validity, and deployment utility. Reproduce the reference-relative objective with exact policy and pair identities; audit prompt leakage, chosen/rejected content, ties, abstentions, rater policy, and support; then compare checkpoints on blinded held-out task and safety slices using an evaluator independent of the optimized proxy. Block release if that evidence is sparse or shows regression, regardless of lower training loss.

Expect the interviewer to press on

  • Why is display position not a chosen label?
  • When would a tie be different from abstention?
  • Which evidence must be invalidated when the annotation rubric changes?

Misconceptions to remove

DPO avoids rewards, so it avoids reward-related failure.

It changes the optimization route, but preference labels can still encode proxies, biases, inconsistencies, and distribution limits.

Discarding ties and abstentions produces a cleaner win rate.

It hides uncertainty and selection effects. Keep their counts and explain the decisive denominator.

Lower pairwise loss proves the new model is more capable.

It only describes fit to the chosen comparison objective; capability and safety need independent, task-specific evidence.

Check your model

1. Why do exact chosen/rejected texts belong in the evidence digest?

Pair IDs alone can be reused after a response edit or swap. A digest binds the labels and probabilities to the actual candidate content.

2. What denominator should a decisive preference rate use?

Chosen plus rejected judgments; report ties and abstentions separately instead of silently treating them as wins or failures.

3. Does one left and one right chosen position prove unbiased evaluation?

No. It catches a narrow presentation imbalance but does not establish rater, task, language, demographic, or candidate-generation coverage.

Prove the mechanism

Add a declared rater-cohort slice requirement without changing tie or abstention semantics. Create a fixture with a strong aggregate preference rate and one unsupported cohort, and make the evidence gate block it.

Add a production constraint

Design an independent paired evaluation of two policy checkpoints with task-outcome labels, confidence intervals, source-level split checks, and a rollback rule. Explain what cannot be inferred from the illustrative audit alone.

Artifact: Preference evidence audit

courses/ai-engineering/reference-impl/preference_optimization/preference_evidence_audit.py

Download reference implementation

Primary references and next links

References

  1. 1. Direct Preference Optimization: Your Language Model is Secretly a Reward Model

    Rafailov et al.. Primary derivation of the reference-policy-relative pairwise objective; not a guarantee of preference-data validity.

  2. 2. Training language models to follow instructions with human feedback

    Ouyang et al.. Primary account of demonstration, comparison, reward-model, and policy-optimization stages.

  3. 3. Scaling Laws for Reward Model Overoptimization

    Gao, Schulman, and Hilton. Primary controlled study of proxy-reward overoptimization; its synthetic setting does not establish a universal deployment law.

Continue through the graph

Glossary: direct preference optimization · RLHF · reference policy · reward hacking · preference pair · abstention · annotator policy