97 Alignment Interview Questions and Answers (2026)

Every frontier lab and most serious AI product teams now ship models shaped by RLHF, DPO, or RL with verifiable rewards. Interviewers know this, and they've stopped accepting buzzword answers. If you can't explain why the KL penalty exists, how a reward model gets gamed, or when DPO beats PPO, you'll be filtered out fast.
This guide gives you 97 questions with concise, interview-ready answers, plus code where it actually helps. They're ordered Junior → Mid → Senior, so you start with the pipeline fundamentals and finish on reward over-optimization, constitutional AI, and scalable oversight. Work through them in order and you'll walk in ready to go deep on any of these topics.
Q1.Why is next-token prediction alone insufficient to produce an aligned, instruction-following assistant?
Next-token prediction trains a model to imitate the distribution of internet text, not to do what a user wants. The objective rewards plausibility, not helpfulness, truthfulness, or safety, so a base model continues documents rather than following instructions.
Objective mismatch:
Pretraining maximizes likelihood of web text; the deployment goal is "respond helpfully and safely to this user." These are different targets.
A prompt like "Write a poem about X" may be continued with more list items or a forum reply instead of a poem.
It imitates everything in the data:
Web text includes misinformation, toxicity, and unsafe content, so the model reproduces these in proportion to their plausibility.
It models the average writer, not the best or most honest one.
No notion of "better" outputs:
Likelihood treats all plausible continuations alike. It has no signal that one answer is more correct, concise, or safe than another.
Truthfulness isn't directly rewarded, so confident fabrication (hallucination) is not penalized if it sounds fluent.
Missing assistant behaviors: Refusing harmful requests, asking clarifying questions, admitting uncertainty, and staying in a consistent persona are rare in raw text.
The fix: post-training:
SFT on demonstrations teaches the instruction-response format; preference optimization (RLHF, DPO) supplies the comparative "which is better" signal pretraining lacks.
Pretraining provides the capability; alignment steers how it is used.
Q2.What does the Helpful, Honest, and Harmless (HHH) framework mean when aligning language models?
HHH, introduced by Anthropic (Askell et al., 2021), defines an aligned assistant as one that is Helpful (does what the user actually needs), Honest (tells the truth and conveys calibrated uncertainty), and Harmless (avoids causing or enabling harm). It serves as a target for data collection, reward modeling, and evaluation.
Helpful: Understands intent, completes the task efficiently, and asks clarifying questions when the request is ambiguous.
Honest:
Gives accurate information, doesn't fabricate, admits uncertainty or ignorance, and doesn't deceive about itself.
Hardest to measure because evaluators may not know the ground truth.
Harmless: Declines dangerous requests (e.g., weapons uplift), avoids toxic or biased output, and handles sensitive topics carefully.
The criteria trade off against each other:
Maximal helpfulness can conflict with harmlessness. Over-weighting harmlessness produces over-refusal and evasive answers, which the Anthropic HH-RLHF work documented.
Labs often train separate reward models or collect separate preference data for helpfulness and harmlessness, then balance them.
How it is used in practice:
Labeling guidelines for human raters.
Principles in Constitutional AI and RLAIF.
Evaluation axes for benchmarks and red-teaming.
Limitation: these are informal, high-level goals. They don't specify behavior in edge cases, and they depend on whose judgment defines "helpful" or "harmful."
Q3.What role does supervised fine-tuning play prior to preference optimization?
SFT turns a base model into a policy that already produces reasonable, instruction-following responses. That gives preference optimization a good starting distribution to refine and a reference policy to anchor to.
Teaches format and behavior: Training on curated prompt-response demonstrations teaches the chat format, turn-taking, answering rather than continuing text, and basic refusals.
Makes preference learning sample-efficient:
RL only improves on what the policy already samples. If a base model rarely produces good answers, reward signals are sparse and exploration fails.
Preference data is most informative when comparing two decent responses, not two pieces of garbage.
Provides the reference model:
The SFT checkpoint typically becomes
π_ref, which the KL penalty (in PPO) or the implicit reward (in DPO) is measured against.DPO assumes the preference data is roughly in-distribution for
π_ref. SFT on the chosen responses helps reduce that distribution shift.
Generates comparison data: Sampling multiple responses from the SFT model produces the candidate pairs that humans rank.
Division of labor:
SFT is imitation and can't express "A is better than B." Preference optimization adds that comparative signal and pushes quality beyond what the demonstrations contain.
Some methods fold SFT into a single preference objective (e.g., ORPO), but the standard pipeline keeps the stages separate.
Q4.Walk me through the stages of the standard post-training alignment pipeline.
The canonical InstructGPT-style pipeline starts from a pretrained base model, then applies supervised fine-tuning, reward modeling on human preferences, and RL optimization against that reward with a KL constraint. Modern variants often replace the last two steps with direct preference methods such as DPO, and add evaluation and safety stages.
Pretraining (starting point): Next-token prediction on large corpora provides capabilities but no instruction following.
Supervised fine-tuning (SFT):
Fine-tune on high-quality prompt-response demonstrations written by humans or distilled from stronger models.
Produces
π_SFT, which also serves as the reference model.
Preference data collection: Sample several responses per prompt from the policy; humans (or an AI judge, in RLAIF) rank or pick the better one.
Reward model training: Train a model to output a scalar score using a Bradley-Terry loss:
-log σ(r(x,y_w) - r(x,y_l)).RL optimization (e.g., PPO):
Maximize
r(x,y) - β·KL(π || π_ref).The KL term prevents reward hacking and drift away from fluent language.
Alternatives: DPO or IPO skip the explicit reward model and RL loop; GRPO uses group-relative advantages with verifiable rewards.
Evaluation and iteration:
Human and LLM-judge win rates, benchmarks, red-teaming, and checks for regressions (the "alignment tax").
Often repeated in rounds: collect new preferences on the latest policy, then retrain.
Q5.Why are human preference comparisons used for alignment rather than only expert demonstrations?
Comparing outputs is easier, cheaper, and more consistent for humans than writing ideal ones. Comparisons also give a signal about which responses are better, so the model can improve beyond the demonstrators rather than just imitating them.
Judging is easier than generating:
Writing an excellent answer to a hard coding or writing task takes expertise and time; recognizing the better of two answers is much faster.
This allows more data per dollar and a wider labeler pool.
Demonstrations cap quality at the demonstrator: Imitation copies the demonstrators' level, including their mistakes. Preferences let RL search for outputs better than any single demonstration.
Negative signal: SFT only says "do this." Comparisons also say "not that," which pushes probability away from bad behaviors such as hallucinations or harmful content the model actually produces.
On-policy feedback: Raters judge the model's own samples, so feedback targets the errors it actually makes, not hypothetical ones.
Captures tacit preferences:
Qualities such as tone, helpfulness, and appropriate length are hard to specify or demonstrate, but easy to judge relatively.
Relative judgments are more consistent across raters than absolute scores.
Caveats:
Raters may favor confident, long, or flattering answers, which leads to sycophancy and verbosity bias.
Pairwise preferences can be noisy or even intransitive.
Demonstrations are still needed first, via SFT, to bootstrap a usable policy.
Q6.What causes annotator disagreement in preference datasets?
Annotators disagree because pairwise preference is often not a single objective fact. Disagreement comes from genuine differences in values, from task ambiguity, and from noise or bias in how labels are produced. Typical inter-annotator agreement on open-ended chat comparisons is only around 60–75%.
Genuine preference diversity:
People differ in culture, politics, expertise, and taste (tone, verbosity, how cautious a refusal should be).
This disagreement is signal, not noise: there is no single "correct" label to recover.
Different weighting of criteria
Underspecified prompts: The same prompt implies different intents, so each response is "best" under a different reading.
Near-ties: When both responses are similarly good or bad, the forced choice is close to a coin flip.
Guideline ambiguity: Vague rubrics leave room for interpretation, for example on whether hedging or a partial refusal counts as helpful.
Expertise gaps: Non-experts can't verify correctness in code, math, or medicine, so they fall back on surface cues.
Cognitive biases and noise:
Systematic biases: length, position, confident style.
Random noise: fatigue, rushing under per-item pay, misclicks, low-effort workers.
Interview point: separate reducible disagreement from irreducible disagreement:
Reducible (better guidelines, training, QA): ambiguity, noise, bias.
Irreducible (should be modeled rather than averaged away): genuine pluralism.
Q7.What is the Bradley-Terry preference model?
Bradley-Terry is a probabilistic model of pairwise comparisons: each item has a latent scalar score, and the probability that A is preferred over B is the logistic sigmoid of their score difference. In RLHF, the score is the reward model's output for a (prompt, response) pair.
Core formula:
P(y_w ≻ y_l | x) = σ(r(x, y_w) − r(x, y_l)), whereσis the sigmoid.Equivalent form:
exp(r_w) / (exp(r_w) + exp(r_l)).
Key properties:
Only differences matter: adding a constant to every reward leaves preferences unchanged, so the absolute reward scale and offset are unidentified.
Assumes transitivity: a single scalar per response cannot represent cycles (A ≻ B ≻ C ≻ A).
Treats annotator disagreement as noise around one shared utility, not as distinct preferences.
Why it's used in RLHF:
Humans give more consistent relative judgments than absolute scores, and BT turns those comparisons into a scalar reward that PPO can optimize.
DPO also assumes BT: it substitutes the implicit reward
β log(π/π_ref)into the same likelihood.
Q8.Why is a KL divergence penalty to the reference policy included in the RLHF objective?
The KL penalty keeps the policy close to the SFT reference model. This prevents it from exploiting reward-model errors (reward hacking), preserves fluency and diversity, and keeps the policy within the distribution where the reward model is accurate.
The objective:
Maximize
E[r(x,y)] - β·KL(π_θ(·|x) || π_ref(·|x)).In practice this is a per-token penalty
β·(log π_θ - log π_ref).
Guards against reward hacking:
The reward model is an imperfect proxy trained on a limited distribution.
Unconstrained optimization finds adversarial outputs (gibberish, repetition, verbosity) that score high but are bad.
Prevents mode collapse and language drift: Without it, the policy collapses onto a few high-reward phrasings and loses the knowledge and fluency learned in pretraining and SFT.
Principled interpretation:
The optimal solution is
π* ∝ π_ref · exp(r/β), a Bayesian-style update of the prior.DPO derives its loss from exactly this closed form.
Tuning β:
Too high: little learning.
Too low: overoptimization.
Some setups use an adaptive KL controller that targets a fixed KL value.
Q9.What are the roles of the policy, reference, reward, and value models in RLHF with PPO?
PPO-based RLHF juggles four models. The policy generates text and is trained. The reference is a frozen SFT copy that anchors it via KL. The reward model scores completed responses. The value model (critic) estimates expected future reward per token to compute advantages.
Policy (actor), trainable:
Initialized from the SFT model.
Generates rollouts and is updated with the clipped PPO objective.
Reference model, frozen:
Also the SFT model.
Provides
log π_reffor the per-token KL penalty, which keeps the policy from drifting or reward hacking.
Reward model, frozen:
Trained on human preference pairs (Bradley-Terry).
Outputs one scalar for the full prompt and response.
Value model (critic), trainable:
Often initialized from the reward model.
Predicts
V(s_t)at each token, which is used in GAE to produce lower-variance advantages.Trained with an MSE loss against returns.
Cost implication:
Four LLM-sized models in memory is heavy.
GRPO drops the critic by using group-relative baselines, and DPO drops both the reward and value models.
Q10.What is the main operational advantage of DPO over PPO-based RLHF?
DPO turns preference alignment into a simple supervised loss on offline preference pairs. There is no separate reward model, no critic, and no sampling during training, so it is far cheaper, simpler and more stable to run than PPO-based RLHF.
Fewer models:
DPO needs only the policy (trained) and a frozen reference. Reference log-probs can even be precomputed once.
PPO needs policy, critic, reward model and reference, with two of them trained.
No generation loop:
PPO must sample rollouts every step, which is the slow, memory-hungry part and needs inference infrastructure.
DPO is just forward and backward passes over fixed
(x, y_w, y_l)triples, so standard SFT tooling works.
Stability and tuning:
DPO has essentially one key hyperparameter (
β). PPO has many: KL coefficient, clip range, GAE λ, value-loss weight, epochs, and more.There is no critic to diverge and no live reward model for the policy to hack during training.
Trade-offs to mention:
DPO is offline: no exploration, and pairs come from a different distribution than the current policy.
It can overfit preferences, or lower the likelihood of both chosen and rejected responses.
Online or iterative DPO, and online RL, often win on hard reasoning tasks with verifiable rewards.
Q11.What distinguishes SimPO from standard DPO?
SimPO is a reference-free variant of DPO. It replaces DPO's implicit reward (a log-ratio against a reference model) with the policy's length-normalized average log-probability, and it adds a target margin γ that the chosen response must beat the rejected one by.
Reward definition:
DPO:
r = β·log(π_θ(y|x) / π_ref(y|x)), which sums over tokens and depends on the reference.SimPO:
r = (β/|y|)·log π_θ(y|x), an average per-token log-prob with no reference.
Why the change:
Train/inference alignment: decoding effectively favors high average log-likelihood. DPO's reward doesn't match that, so a pair can be "won" during training without changing what the model generates.
Length bias: summed log-probs let length interact with the reward. Normalizing by
|y|reduces exploiting verbosity.Efficiency: there is no reference model to store or run.
Margin
γ: The chosen response must exceed the rejected one by at leastγ, which encourages clearer separation, similar to a hinge margin.Risks:
There is no KL anchor to a reference, so the policy can drift (forgetting, degraded general capability).
It is sensitive to
βandγ. It typically uses a much largerβthan DPO's ~0.1.
Q12.What is the core difference between RLHF and RLAIF?
The core difference is who produces the preference labels: in RLHF, human annotators compare model outputs; in RLAIF, an AI model (usually an LLM prompted with guidelines or a constitution) makes those comparisons. The rest of the pipeline is largely the same.
Shared pipeline:
Sample pairs of responses from the policy for a prompt.
Label which response is better (human in RLHF, AI in RLAIF).
Train a reward/preference model on those labels, then optimize the policy against it with RL (e.g.
PPOwith a KL penalty to the reference model).
What the AI labeler brings:
Judgments are steered by written principles in the prompt, so the objective is explicit and editable.
Soft labels from the labeler's token probabilities (e.g. P("A") vs P("B")) instead of a single human vote.
Variant: "direct" RLAIF skips the reward model and has the LLM score responses during RL.
Trade-off: RLAIF is cheaper and more scalable, but inherits the labeler model's biases and blind spots; RLHF is grounded in real human judgment but is slow, costly, and noisy.
Q13.What are the key advantages of using AI feedback (RLAIF) over human annotators?
AI feedback trades human judgment for scale: it is far cheaper, faster, and more consistent than human labeling, and it makes the labeling criteria explicit. Studies such as Google's RLAIF paper found it reaches quality comparable to RLHF on tasks like summarization and dialogue.
Cost and scale:
Millions of comparisons for the cost of inference, versus paid annotators per label.
Easy to relabel when the policy changes, which helps iterative or on-policy training.
Speed of iteration: Changing the objective means editing a prompt or constitution, not retraining a labeling workforce.
Consistency and transparency:
No annotator fatigue or inter-rater disagreement; criteria are written down and auditable.
Can produce calibrated soft labels and chain-of-thought justifications.
Human welfare: annotators aren't exposed to large volumes of harmful or disturbing content when labeling harmlessness.
Path toward scalable oversight: AI assistance can help evaluate outputs that are tedious or hard for humans to check directly.
Caveat: these gains assume the labeler is reliable; its biases get baked in at scale, so human spot-checks remain necessary.
Q14.What is reinforcement learning with verifiable rewards?
Reinforcement learning with verifiable rewards (RLVR) trains a model with RL where the reward comes from a programmatic checker (e.g. is the math answer correct, do the unit tests pass) instead of a learned reward model. It's the core recipe behind reasoning models like DeepSeek-R1, and the term was popularized by Tülu 3.
How it works:
Sample one or more completions per prompt from the policy.
A verifier returns a reward, often binary (correct/incorrect), sometimes with a format bonus.
Update with a policy-gradient method (
PPO,GRPO), usually with a KL penalty.
Advantages:
No reward model to train or exploit; reward reflects ground truth.
Cheap and scalable; elicits long chain-of-thought reasoning and self-correction.
Limitations:
Only applies to checkable domains (math, code, structured tasks), not open-ended helpfulness.
Sparse reward: if the model never succeeds on a prompt, there's no learning signal.
Verifier hacking: weak tests or loose answer parsing can be gamed (e.g. special-casing tests).
Outcome-only: correct answers with flawed reasoning still get rewarded.
Q15.What is reward hacking in LLM alignment?
Reward hacking is when a policy maximises its training reward by exploiting flaws in the reward signal rather than doing what the designers intended. The reward goes up while true quality stays flat or gets worse.
Why it happens:
The reward is a proxy: a learned reward model fit on limited human preferences, or a hand-written checker.
RL is a strong optimiser and drives the policy off the reward model's training distribution. There, the reward model's errors are large and systematically exploitable.
Common examples:
Verbosity, heavy formatting, and confident tone that reward models over-score.
Sycophancy: agreeing with the user's stated view because raters like it.
Gaming code tests, for example special-casing expected outputs, editing tests, or calling
sys.exit(0).Adversarial or odd strings that happen to score high on the reward model.
Mitigations:
A KL penalty to the reference policy, which keeps the policy where the reward model is trustworthy.
Reward model ensembles or uncertainty penalties.
Iterative reward model retraining on fresh policy samples.
Length controls, and verifiable rewards where possible.
Early stopping, plus monitoring against a held-out or gold evaluation.
Q16.What is the alignment tax?
The alignment tax is the extra cost of making a model aligned rather than merely capable. It shows up as lost capability or benchmark performance, extra compute, or extra development effort. It matters because a high tax creates competitive pressure to skip alignment.
Forms it takes:
Performance: regressions on academic, reasoning or coding benchmarks after RLHF.
Usability: over-refusal and excessive hedging on benign requests.
Cost: human labelling, reward-model training, red-teaming and extra RL compute.
Classic evidence: InstructGPT (Ouyang et al., 2022):
PPO caused regressions on public NLP tasks such as SQuAD, DROP and HellaSwag.
Mixing pretraining gradients into PPO (
PPO-ptx) recovered most of the loss.
It can be negative: Bai et al. (2022, Anthropic) found that RLHF hurt small models but helped large models on many evaluations. Alignment can act as an "alignment bonus" at scale.
Why it matters:
Low-tax alignment techniques are more likely to be adopted.
Reducing the tax is therefore a safety goal in its own right, not just an efficiency goal.
Q17.What is sycophancy in aligned language models?
Sycophancy is when a model tells users what they want to hear rather than what is true or useful. It tailors answers to the user's stated or implied beliefs, preferences or self-image.
Common forms:
Opinion matching: adopting the user's political or technical views once they are revealed.
Caving under pushback: abandoning a correct answer after "Are you sure?"
Feedback sycophancy: rating an essay or code higher when the user says they wrote it or love it.
Mimicry: going along with false premises or errors stated in the prompt.
Key findings:
Perez et al. (2022) found sycophancy increases with model size and with RLHF.
Sharma et al. (2023) found it across production assistants. Humans and preference models sometimes prefer convincing sycophantic answers over correct ones.
Why it is an alignment problem:
It is a case of optimising for approval rather than for the user's actual interests.
It undermines truthfulness and reinforces misconceptions.
It makes models unreliable as reviewers or advisors, the roles where honesty matters most.
Mitigations:
Synthetic training data in which the correct answer is independent of the user's opinion (Wei et al., 2023).
Preference data that rewards respectful disagreement.
Dedicated sycophancy evaluations, such as pushback tests.
Q18.What is the tension between helpfulness and harmlessness in alignment training?
Helpfulness pushes a model to comply with requests; harmlessness pushes it to decline some of them. Optimising either alone produces a bad model: one that assists with anything, or one that refuses or hedges constantly. The hard cases sit in a grey zone where the objectives genuinely conflict.
Where the conflict comes from:
Dual-use requests: chemistry, security and medical information is valuable to most users and risky from a few.
Intent is ambiguous from a single prompt.
Labellers disagree on where the line falls.
Empirical evidence: Bai et al. (2022) found helpfulness and harmlessness preference data partly in tension. Training on harmlessness data alone rewarded evasive, unhelpful refusals.
Failure modes on each side:
Too helpful: jailbreak susceptibility and harmful compliance.
Too harmless: over-refusal of benign prompts (for example, "how do I kill a Python process"), preachiness and vague answers. This is itself a cost, and part of the alignment tax.
Why training makes it worse: A single scalar reward collapses both goals into one number. The policy then exploits whichever shortcut scores well, and blanket refusal is a cheap one.
It is not purely zero-sum:
Non-evasive refusals that explain the concern and offer safe alternatives improve both objectives at once.
Constitutional AI explicitly targeted harmless but non-evasive behaviour.
Q19.What is scalable oversight in alignment?
Scalable oversight is the problem of supervising AI systems reliably on tasks where humans can't directly evaluate the outputs, because the tasks are too hard, too long, or the model is more capable than the evaluator. The goal is training signals that stay accurate as model capability grows.
Why it's needed:
RLHF relies on humans judging outputs; if judges can't spot subtle errors, the model learns to look good rather than be good (reward hacking, persuasive-but-wrong answers).
The gap widens as models exceed human expertise (complex code, research, long agentic tasks).
Main approaches:
AI-assisted evaluation: models critique or summarize outputs to help humans judge (critique models, RLAIF / Constitutional AI).
Debate: two models argue, a human judges which argument holds up.
Recursive decomposition: break hard tasks into checkable subtasks (iterated amplification, recursive reward modeling).
Weak-to-strong generalization: study whether weak supervisors can elicit strong models' true capabilities.
Interpretability: inspect internals rather than relying only on outputs.
How it's studied empirically: "sandwiching" experiments, where non-experts aided by a model must match expert judgments on tasks where the model outperforms the non-experts.
Q20.What role does the reference model play throughout the post-training alignment pipeline?
The reference model, usually the frozen SFT checkpoint, is the anchor that preference optimization is measured against. It keeps the policy close to a known-good distribution, which limits reward hacking, preserves fluency and capabilities, and defines the implicit reward in DPO.
In RLHF (PPO):
The objective is
r(x,y) - β·log(π(y|x)/π_ref(y|x)), which acts as a per-token KL penalty.It stops the policy from exploiting reward-model blind spots, for example by producing degenerate text that scores highly.
In DPO:
The implicit reward is
β·log(π_θ(y|x)/π_ref(y|x)). The loss raises this log-ratio for chosen responses relative to rejected ones.Without
π_ref, the objective has no anchor. Reference-free methods (e.g., SimPO, ORPO) replace it with length normalization or an SFT term.
Preserving capabilities and diversity: Limiting drift reduces the alignment tax, catastrophic forgetting, and mode collapse.
Controlled by
β: Highβkeeps the policy nearπ_ref(safe but conservative). Lowβallows more change but risks over-optimization.Monitoring and practical cost:
KL from the reference is a key diagnostic. A sharply rising KL alongside rising reward often signals reward hacking.
The reference model needs an extra frozen copy in memory and extra forward passes. DPO can precompute reference log-probs offline.
In iterative training, the reference can be refreshed to the latest policy each round.
Q21.Why did human evaluators in the InstructGPT study prefer a 1.3B aligned model over a 175B base model?
Raters were judging how well each model did what they asked, not raw knowledge. The 175B GPT-3 base model was trained only to continue text, so it often ignored instructions. The 1.3B InstructGPT model, trained with SFT plus RLHF, reliably followed intent, which mattered more to evaluators than extra capacity.
Alignment, not capability, was the bottleneck:
The base model had the knowledge but didn't apply it to the user's request. It would continue prompts, wander off topic, or mimic the prompt's format.
Post-training unlocked usable behavior that pretraining had already made possible.
What raters valued:
Following explicit constraints (length, format), attempting the correct task, fewer fabrications on closed-domain tasks, and more appropriate content.
These are exactly the dimensions the preference data rewarded.
Evaluation matched training: Evaluators judged on prompts from the API distribution, using criteria similar to those used to train the reward model, which favors the aligned model.
Cheap relative to scaling: RLHF used a tiny fraction of pretraining compute, yet outperformed a model more than 100x larger on human preference.
Caveats:
The 1.3B model wasn't more knowledgeable or better at hard reasoning.
There were small regressions on some NLP benchmarks (the alignment tax), which the paper mitigated by mixing in pretraining gradients (PPO-ptx).
Preferences reflect a specific group of labelers and their guidelines.
Q22.What is the difference between on-policy and off-policy preference data?
The difference is where the compared responses come from. On-policy preference data compares responses sampled from the policy currently being trained (or its immediate checkpoint). Off-policy data compares responses generated by something else: other models, older checkpoints, or human writers.
On-policy:
Pairs are drawn from the model's own output distribution, so feedback targets the mistakes it actually makes.
Used in PPO-style RLHF and in online or iterative DPO: sample, label (human, reward model, or AI judge), train, repeat.
Cost: data must be regenerated and relabeled as the policy changes.
Off-policy:
A static dataset, for example public sets like HH-RLHF or UltraFeedback built from mixed models.
Cheap and reusable; standard offline
DPOconsumes it directly.Risk: distribution shift. The responses may be ones the policy would rarely produce, so the learning signal transfers poorly.
It's a spectrum, not a binary: Data from the SFT model is roughly on-policy at the start of training and becomes increasingly off-policy as the policy drifts.
Practical trade-off:
Off-policy is good for bootstrapping cheaply.
On-policy (or iterative refresh) generally gives better final alignment, at the cost of generation and labeling compute.
Q23.How does verbosity or length bias manifest during preference data collection?
Length bias means annotators tend to prefer the longer response even when the extra length adds no real value. The bias appears in three places:
In the labels, as a correlation between "chosen" and "longer".
In the reward model, which learns length as a cheap proxy for quality.
In the policy, which inflates verbosity to exploit that proxy.
Why annotators favor length:
Longer answers look more thorough, effortful, and authoritative.
Under time pressure, verifying correctness is hard but noticing detail is easy.
Extra caveats and structure read as carefulness.
How it shows up in data:
The win rate of the longer response is well above 50% across pairs.
Length difference alone predicts a meaningful share of labels; a length-only classifier beats chance.
Downstream effect:
RLHF or DPO models grow longer over training, and some "improvement" is just length (Goodhart).
LLM judges share the bias. This is why AlpacaEval introduced length-controlled win rates.
Mitigations:
At collection time:
Guidelines that explicitly penalize padding.
Length-matched or deliberately counterbalanced pairs.
Rating correctness separately from overall preference.
At training time:
Length penalties or normalization in the reward or
DPOobjective.Regressing length out of reward scores.
Monitoring length versus win rate.
Q24.How does annotator disagreement affect reward model training?
Reward models are usually trained with a Bradley-Terry loss that assumes one latent reward explains everyone's preferences. Disagreement breaks that assumption in two ways:
Noisy labels cap achievable accuracy and blur reward margins.
Systematic disagreement gets averaged into a majority preference, which can be confidently wrong for minority groups.
Accuracy ceiling:
If annotators agree only about 70% of the time, held-out accuracy around 70% may already be near the ceiling.
Chasing higher accuracy means fitting noise.
Miscalibrated margins:
Hard 0/1 labels on near-tie or contested pairs push the model toward large reward gaps where the truth is about 50/50.
The result is overconfidence in exactly the regions the policy will later exploit.
Erasing pluralism:
A scalar reward fit to aggregated labels represents an "average annotator".
Mixed populations can even produce intransitive (cyclic) aggregate preferences that no scalar reward can fit.
Spurious features: Where substance is contested, the shared biases that annotators agree on (length, style) dominate the gradient.
Mitigations:
Collect multiple labels per pair. Then either train on soft targets (the vote fraction) or use the agreement level as a margin or weight.
Use label smoothing, or conservative DPO-style noise-robust losses.
Filter or down-weight low-agreement pairs, but only after deciding whether they are noise or genuine pluralism.
Model disagreement explicitly:
Distributional or uncertainty-aware reward models, or ensembles.
Multi-objective rewards (helpful, harmless, honest).
Annotator- or group-conditioned rewards.
Q25.How does position bias manifest when collecting pairwise preference labels?
Position bias is a tendency to prefer a response because of where it appears: first or second, left or right. It is independent of content, so preference labels become partly a function of interface layout rather than quality.
Mechanisms:
Primacy: the first response anchors judgment.
Recency: the last-read response is fresher.
Fatigue: annotators skim the second long response.
Interface defaults: cursor or default-button placement.
Strongest on near-ties: When quality differences are small, position becomes the tiebreaker.
LLM-as-judge (RLAIF) is especially prone: Judges often flip their verdict when the order is swapped.
Detection:
With randomized order, the win rate by slot should be about 50%. A persistent skew reveals bias.
Re-present a subset with the order swapped and measure consistency.
Why it matters:
If order correlates with response source (for example, the new model is always shown as A), the bias becomes a systematic error in the reward signal and in eval results.
With proper randomization it is mostly extra noise.
Mitigations:
Randomize order per item and counterbalance.
For judges, evaluate both orders and keep only consistent verdicts or average them.
Offer a tie option or a graded scale.
Show responses side by side rather than sequentially.
Q26.How does style bias in preference collection distort the reward signal?
Style bias means raters reward how a response looks and sounds rather than whether it is correct and useful. The reward model learns those surface features as proxies for quality, and policy optimization then maximizes them: "style hacking" displaces substance.
Common style cues raters over-reward:
Heavy markdown, headers, and bullet lists.
A confident, authoritative tone.
Politeness and enthusiasm.
Agreement with the user's stated view (sycophancy).
Length.
How the distortion happens:
Style is easy to judge and correctness is hard, so style cues correlate with "chosen" in the data.
The reward model fits these cheap features because they reduce loss reliably.
Pushing the policy toward high reward drives it out of distribution, where style features keep raising reward after substance has stopped improving (Goodhart's law).
Observed consequences:
Sycophancy: models agree with users or abandon correct answers when challenged.
Confidently stated hallucinations.
Over-formatted answers.
Inflated leaderboard scores. Chatbot Arena added "style control" to separate style from content.
Mitigations:
Rubrics that rate correctness separately and explicitly discount formatting.
Expert raters, or tool-assisted verification, for factual domains.
Contrastive pairs that hold style fixed while varying substance, and vice versa.
Regress style features out of rewards.
Probe the reward model with style-perturbed responses.
Q27.What is the difference between an outcome reward model and a process reward model?
An outcome reward model (ORM) scores only the final answer or full response. A process reward model (PRM) scores each intermediate reasoning step. The trade-off is cheap, sparse supervision versus dense, step-level credit assignment.
ORM:
One scalar per completion (e.g. "is the final answer correct?").
Labels are cheap, often automatic for math and code via answer checking or unit tests.
Weakness: sparse signal. It can reward flawed reasoning that happens to reach the right answer, and it can't tell which step went wrong.
PRM:
A score per step (correct, incorrect or neutral), typically predicted at step delimiters.
Gives dense credit assignment and penalizes invalid steps even when the answer is right.
Works well for guiding search: best-of-N, beam or tree search over steps (e.g. OpenAI's "Let's Verify Step by Step" found PRMs beat ORMs for reranking math solutions).
Weakness: step labels are expensive (human annotation) or noisy (Monte Carlo rollouts estimating each step's success rate, as in Math-Shepherd). Defining what counts as a "step" is also ambiguous.
Alignment angle: PRMs supervise the process, not just results, which makes it harder for the model to get rewarded for right-for-wrong-reasons behavior. Both can still be reward-hacked.
Q28.How do you modify a standard causal language model architecture to turn it into a reward model?
Remove the language-modeling head (hidden size → vocab) and replace it with a scalar head (hidden size → 1). Then read the score from the final token's hidden state and train with a pairwise preference loss instead of next-token prediction.
Architecture change:
Keep the transformer backbone, usually initialized from the SFT model so it already understands the domain.
Swap
lm_headfor a linearvalue_head: Linear(d_model, 1).
Pooling:
Because attention is causal, only the last token has attended to the full prompt and response, so take the hidden state at the last non-pad token (often EOS).
Padding side and attention masks must be handled carefully, otherwise you will read a pad position.
Training objective:
Bradley-Terry loss on (chosen, rejected) pairs:
-log σ(r_chosen − r_rejected).For a PRM variant, score at each step delimiter instead of only at the end.
In practice: Hugging Face
AutoModelForSequenceClassificationwithnum_labels=1does exactly this.
Q29.What loss function is minimized when training a Bradley-Terry reward model on pairwise comparisons?
The loss is the negative log-likelihood of the observed preferences under Bradley-Terry: L = −E[log σ(r(x, y_w) − r(x, y_l))]. It is binary cross-entropy on the reward margin, with the label "chosen beats rejected".
Intuition:
It pushes the chosen reward above the rejected one. The gradient scale is
σ(r_l − r_w), so pairs the model already ranks confidently contribute little.Only the margin is constrained, so absolute rewards can drift.
Common variants:
K-way rankings: InstructGPT expands each ranking into all
C(K,2)pairs and normalizes by that count.Margin term: Llama 2 uses
−log σ(r_w − r_l − m), where m grows with preference strength.Regularizer: a small penalty like
(r_w + r_l)²keeps rewards centered near zero.Label smoothing to handle noisy annotations.
Implementation tip: use
F.logsigmoidrather thanlog(sigmoid(...))for numerical stability.
Q30.How do you evaluate a reward model before using it as the optimisation target for RL?
Check that the reward model agrees with held-out human preferences, generalizes to the distribution the policy will produce, and resists obvious exploits. Pairwise accuracy alone is not enough, because RL will search for the RM's weak spots.
Preference accuracy:
Held-out pairwise accuracy, compared against inter-annotator agreement (typically ~65–75%), which acts as a ceiling.
Break it down by category (helpfulness, harmlessness, reasoning, code) and by margin. Benchmarks like RewardBench help here.
Calibration: Check that
σ(r_w − r_l)matches empirical win rates (reliability plots, ECE).Distribution shift:
Evaluate on samples from the current or likely-future policy, not just the training-data generators.
Run best-of-N with increasing N: if gold or human scores plateau or fall while RM scores keep rising, the RM is overoptimizable.
Spurious-feature probes:
Measure correlation with length, formatting, sycophancy, confident tone and refusals.
Use counterfactual pairs: same content with added verbosity, or a wrong answer stated confidently.
Robustness and red-teaming:
Run adversarial or jailbreak responses and check that unsafe content scores low.
Check ensemble disagreement as an uncertainty signal.
Downstream check: run a small RL pilot and have humans spot-check high-reward outputs.
Q31.What is the purpose of the clipped surrogate objective in PPO?
The clipped surrogate objective limits how far one update can move the policy from the policy that collected the data. This lets you safely take several gradient epochs on the same batch without the destructive, oversized steps that vanilla policy gradient allows.
The objective:
Define the ratio
r_t = π_θ(a_t|s_t) / π_old(a_t|s_t).Maximize
min(r_t·A_t, clip(r_t, 1-ε, 1+ε)·A_t), typically withε ≈ 0.2.
Why clipping helps:
The importance ratio is only trustworthy near 1. Far from it, the surrogate is a poor estimate of the true improvement.
Once the ratio leaves
[1-ε, 1+ε]in the direction that helps, the gradient becomes zero, so there is no incentive to push further.
Pessimistic bound:
The
minmeans clipping only removes optimistic gains.Changes that worsen the objective are still fully penalized.
Relation to TRPO: It approximates TRPO's KL trust region with first-order optimization only, which makes it simple and scalable to LLMs.
In RLHF:
It complements the KL-to-reference penalty.
Clipping bounds the step-to-step change, while the KL penalty bounds total drift from the SFT model.
Q32.Why is rollout generation the main computational bottleneck in PPO-based alignment?
Rollouts require autoregressive generation, which is sequential and memory-bandwidth bound. The training step that follows is a single parallel forward/backward pass. Generation therefore typically dominates wall-clock time, often taking well over half of each PPO iteration.
Sequential decoding:
Each token needs a full forward pass that depends on the previous token, so a 1,000-token response means 1,000 serial steps.
Training processes all tokens in parallel with teacher forcing.
Poor hardware utilization:
Decoding is memory-bandwidth bound: weights and the KV cache are reloaded for every token at low arithmetic intensity.
GPUs sit far below peak FLOPs.
Variable lengths: The batch waits for its longest sample (straggler effect), especially with long reasoning chains.
On-policy requirement: Fresh samples from the current policy are needed every iteration, so generation can't be amortized or precomputed as it can in SFT or DPO.
Training-optimized setups are bad at inference:
Sharding layouts such as FSDP/ZeRO suit backprop, not fast decoding.
Weights must be resharded or synced to an inference engine.
Mitigations:
Use dedicated inference engines (
vLLM,SGLang) with continuous batching and paged KV cache.Run generation and training asynchronously or off-policy.
Cap response lengths.
Q33.How is an episode-level scalar reward assigned to individual tokens in an RLHF rollout?
The reward model's scalar is placed on the final token of the response. Every token also receives a per-token KL penalty. The value model and GAE then propagate that sparse terminal reward back to earlier tokens as advantages.
Per-token reward construction:
For tokens
t < T:r_t = -β·(log π_θ(y_t) - log π_ref(y_t)).For the last token:
r_T = R_RM(x, y) - β·KL_T.
Credit assignment via the critic:
The value model predicts
V(s_t), the expected return from each prefix.TD errors
δ_t = r_t + γV(s_{t+1}) - V(s_t)are combined with GAE(λ) into per-token advantagesA_t.Typically
γ = 1and λ is around 0.95.
Effect:
Tokens after which the critic's estimate rises get positive advantage, and those after which it falls get negative advantage.
This sharpens credit beyond "all tokens share the reward".
Critic-free alternatives:
REINFORCE, RLOO, and GRPO broadcast the same sequence-level advantage, computed as reward minus a baseline, to every token.
This is simpler but credit is coarser.
Denser alternative: Process reward models supply step-level rewards instead of one terminal scalar.
Q34.What is the role of the value (critic) network in PPO for language generation?
The critic estimates the expected future reward from each token position, giving PPO a per-token baseline so it can compute low-variance advantages instead of crediting every token with one noisy sequence-level reward.
What it predicts:
V(s_t): expected return given the prompt plus tokens generated so far (the "state").
Usually a scalar head on a copy of the policy or reward model, trained by regression (MSE) toward observed returns.
Why it's needed: credit assignment:
The reward model scores only the full response; per-token rewards are mostly zero except the KL penalty.
Advantage A_t = (return or TD target) - V(s_t) tells which tokens made things better or worse than expected.
Feeds GAE, which mixes TD errors δ_t = r_t + γV(s_{t+1}) - V(s_t) across steps.
Effect on training:
Variance reduction: subtracting V removes noise that doesn't depend on the action, so gradients are more stable.
Critic is not used at inference; it only shapes the policy update.
Costs and pitfalls:
An extra model-sized network in memory and compute (one of PPO's four models: policy, reference, reward, value).
A poorly initialized or lagging critic gives biased advantages and destabilizes early training; common fixes are critic warmup and value clipping.
This cost motivates critic-free methods like GRPO and RLOO, which use group-average rewards as the baseline.
Q35.How does the KL penalty coefficient govern the trade-off between reward maximization and staying close to the reference policy?
The coefficient β weights a penalty on divergence from the reference (SFT) policy against the reward: larger β keeps the policy close and safe but gains less reward; smaller β chases reward harder and risks reward hacking and degenerate text.
The objective:
max E[r(x,y)] - β·KL(π_θ(·|x) || π_ref(·|x)), typically implemented as a per-token reward r_t = -β·(log π_θ - log π_ref) plus the RM score at the end.
Optimal solution: π*(y|x) ∝ π_ref(y|x)·exp(r(x,y)/β), so β acts like a temperature on the reward.
β too large: Policy barely moves from SFT; little alignment gain.
β too small:
Policy exploits reward-model errors (Goodhart): verbosity, repetition, sycophancy, gibberish that scores high.
Loses fluency and diversity learned in pretraining/SFT.
Why the anchor matters: The RM is only accurate near the distribution it was trained on; KL keeps the policy in that trusted region.
Tuning in practice:
Adaptive KL controller: adjust β to hit a target KL per step.
Monitor reward vs. KL curves; rising reward with exploding KL signals hacking.
Q36.What is the REINFORCE policy-gradient estimator, and why is its variance high for language generation?
REINFORCE estimates the policy gradient by sampling outputs and weighting the gradient of their log-probability by the reward they received; for text it is very noisy because one scalar reward must be spread over a long sequence of sampled tokens from a huge action space.
The estimator:
∇J(θ) = E_{y~π_θ}[R(y)·∇log π_θ(y)], with ∇log π_θ(y) = Σ_t ∇log π_θ(y_t | y_<t).
Unbiased and model-free: only needs samples and a reward, no differentiable reward.
Why variance is high for language:
Long horizons: the score function sums over hundreds of token terms, each adding noise.
Sparse, sequence-level reward: every token gets the same credit, good or bad.
Huge vocabulary: the sampled trajectory space is enormous, so few samples poorly represent the expectation.
Unnormalized rewards: if all rewards are positive, every sample is pushed up, and only relative magnitudes average out slowly.
Noisy reward models add their own error.
Standard mitigations:
Baselines (learned critic, batch mean, leave-one-out as in RLOO, group mean as in GRPO).
Reward normalization/whitening, more samples per prompt, and per-token credit via value functions and GAE.
Q37.Why does subtracting a baseline from the reward reduce variance without biasing the policy gradient?
Because the expected score function is zero, subtracting any baseline that doesn't depend on the sampled action leaves the gradient's expectation unchanged, while centering the rewards shrinks the magnitude of each sample's contribution and so its variance.
No bias: the key identity:
E_{a~π}[∇log π(a)] = Σ_a π(a)·∇π(a)/π(a) = ∇Σ_a π(a) = ∇1 = 0.
So E[b·∇log π(a)] = b·0 = 0 for any b independent of a (it may depend on the state/prompt).
Less variance: intuition:
Without a baseline, all positive rewards push all sampled actions up; the signal that matters is only the relative difference.
With R - b, better-than-average samples go up and worse ones go down, so per-sample gradients are smaller and cancel less noisily.
The variance-minimizing baseline is close to the expected return, i.e. the value function V(s).
The caveat: If the baseline depends on the action itself (e.g. includes the sample's own reward), the proof breaks and bias appears; this is why RLOO uses a leave-one-out mean.
Q38.How can LoRA reduce the memory cost of running PPO or DPO when the policy and reference model share a base?
With LoRA, the policy is the frozen base plus small trainable adapters, so the reference model is just the same base with adapters disabled: one copy of weights serves both, and optimizer state is needed only for the tiny adapter parameters.
Where the memory goes normally:
Full fine-tuning keeps separate policy and reference weights, plus gradients and Adam states (~2x params extra) for the policy.
PPO adds a reward model and critic on top.
LoRA savings:
Shared base: compute reference log-probs by running the same model with adapters off (e.g.
with model.disable_adapter():in PEFT), eliminating a full model copy.Optimizer state and gradients only for low-rank matrices (often <1% of params).
Base can be quantized (QLoRA) since it's frozen.
In PPO, the value head and even the reward model can be separate adapters on the same base.
Trade-offs:
Two forward passes still cost compute (policy and reference), just not memory for duplicate weights.
Low rank limits how far the policy can move, which can also act as an implicit regularizer.
For DPO, reference log-probs can alternatively be precomputed once, removing the reference pass entirely.
Q39.What role does the beta hyperparameter play in the DPO loss?
β is the KL-regularization strength inherited from the RLHF objective DPO is derived from. It scales the implicit reward β·log(π_θ/π_ref), which controls how far the policy is allowed to move from the reference model to satisfy the preferences.
Origin: RLHF maximizes
E[r] − β·KL(π_θ‖π_ref). Its optimal policy givesr = β·log(π*/π_ref) + const, which DPO plugs into the Bradley-Terry likelihood.Effect on the loss:
−log σ(β·Δ), whereΔis the chosen-minus-rejected log-ratio gap:Large β: a small
Δalready saturates the sigmoid, so the policy stops early and stays close to the reference. The result is conservative.Small β: the policy must open a large log-ratio gap to reduce loss, so it moves further from the reference. It fits preferences more aggressively but risks overfitting, verbosity or degeneration.
Effect on the gradient: Each pair is weighted by
β·σ(r_l − r_w). Pairs the model currently gets wrong get more weight, and β sets both the overall scale and how quickly pairs count as "solved".In practice:
Typical values are ~0.1, with a usual range of about 0.01 to 0.5.
Tune by watching reward margins, chosen-response log-probs and KL to the reference.
Lower β for clean, high-signal data. Raise it if quality or general capabilities degrade.
Q40.How does KTO train models using unpaired binary feedback?
KTO (Kahneman-Tversky Optimization) learns from individual responses labeled simply desirable or undesirable, with no pairs required. It scores each response's implicit reward against a reference point (the policy's KL from the reference model) and applies a prospect-theory-style value function that pushes good outputs above that point and bad ones below it.
Data:
Each example is
(x, y, label), such as thumbs up or down.This data is much cheaper and more abundant than curated preference pairs, and the classes can be imbalanced.
Mechanics:
Implicit reward, as in DPO:
r = log(π_θ(y|x) / π_ref(y|x)).Reference point
z₀: a batch estimate ofKL(π_θ‖π_ref), typically computed on mismatched prompt/response pairs. It is detached from the gradient and acts as the baseline.Value: for desirable examples
v = λ_D·σ(β(r − z₀)); for undesirable examplesv = λ_U·σ(β(z₀ − r)).Loss is
λ_y − v: raise good responses' reward above the baseline and push bad ones below it.
Why the prospect-theory framing:
Gains and losses are measured relative to a reference point rather than in absolute terms.
The saturating sigmoid limits how much any one example can dominate, which adds some robustness to noisy labels.
The loss-aversion weights
λ_Dandλ_Urebalance imbalanced data. The paper suggests keepingλ_D·n_D / (λ_U·n_U)roughly in[1, 4/3].
Trade-offs:
Each example carries less information than a direct comparison.
It still needs a reference model. It is competitive with DPO when pairs are unavailable or noisy.
Q41.How does rejection-sampling fine-tuning (best-of-n distillation) compare to online policy optimization?
Rejection-sampling fine-tuning (RFT) samples n responses per prompt, keeps the best according to a reward model or verifier, and runs SFT on the winners. It is a simple, stable, offline policy-improvement step. Online RL (PPO, GRPO) instead updates continuously on fresh samples using both good and bad outcomes, which is more sample-efficient and can climb further, but it is more complex and fragile.
What RFT really does:
It distills the best-of-n distribution into the policy, so each round moves the policy toward the outputs best-of-n would select.
Iterating it (as in ReST, RAFT, STaR, or Llama 2's rejection-sampling rounds) gradually approximates online RL.
RFT strengths:
It reuses SFT infrastructure: no critic, no importance ratios, and generation is decoupled from training.
It is very stable, and data can be inspected and filtered before training.
It is implicitly KL-limited: best-of-n stays within about
log nnats of the base policy, which limits reward hacking.
RFT weaknesses:
It is wasteful: n−1 samples are discarded, and failed samples provide no negative signal.
Its ceiling is bounded by what the current policy can already sample. Prompts with zero successes teach nothing.
Batched rounds make it more off-policy than online RL.
Online policy optimization:
It uses all samples, weighted by advantage, so it actively pushes down bad responses.
Tighter on-policy feedback compounds gains, which matters especially for reasoning with verifiable rewards.
Costs: infrastructure complexity, instability, hyperparameter sensitivity, and stronger reward-hacking pressure that must be controlled with a KL penalty.
In practice the two are combined: RFT for cheap, robust early gains or as a warm start, then online RL to push further. GRPO with binary rewards can be viewed as RFT that also learns from negatives.
Q42.What is the difference between offline DPO and iterative online DPO?
Offline DPO trains once on a fixed preference dataset, usually generated by other models. Iterative online DPO repeatedly samples fresh responses from the current policy, labels them with a judge, reward model, or humans, and runs DPO on that new on-policy data before repeating the loop.
Offline DPO:
Uses static pairs
(x, y_w, y_l), typically from an SFT model, other LLMs, or human-written data.It is off-policy: the data distribution drifts away from what the model actually generates as training proceeds.
Cheap and simple: no generation and no labeling inside the loop.
Iterative or online DPO:
Sample several responses per prompt from the current policy
π_t.Rank them with a reward model, an LLM judge (as in OAIF or Self-Rewarding LMs), or humans, then form chosen/rejected pairs.
Run DPO. Often the reference is reset to
π_t, then you repeat. In the fully online variant, this happens per batch rather than per round.
Why online helps:
Feedback lands on the responses the model actually produces, so errors in its own distribution get corrected.
This closes much of the gap to PPO, because it recovers on-policy exploration while keeping DPO's simple loss.
It reduces failure modes caused by off-policy data, such as probability mass leaking to unseen responses.
Costs and risks:
You need generation plus a labeler in the loop, which brings back the compute and infrastructure that DPO was meant to avoid.
If the labeler is a learned RM or judge, the policy can exploit it, so reward hacking returns.
Q43.What are the primary trade-offs between DPO and PPO-based RLHF?
DPO trades the flexibility and on-policy exploration of PPO for simplicity, stability, and lower cost. It optimizes the same KL-regularized objective directly on a fixed preference dataset, without a reward model or an RL loop.
Where DPO wins: engineering and cost:
Memory: DPO needs 2 models (policy plus a frozen reference). PPO needs 4 (policy, reference, reward model, value/critic).
No sampling during training, and generation is usually PPO's dominant cost.
It is a supervised-style classification loss, so it has few hyperparameters (mainly
β) and is stable and reproducible.
Where PPO wins: data and generalization:
It is on-policy: it gets reward on its own samples, so it explores and fixes its actual failure modes.
The reward model generalizes to new responses and to unlabeled prompts, which helps out-of-distribution behavior.
It works with any scalar reward (unit tests, verifiers, rule-based checks), not just pairwise preferences.
When well-tuned, it has matched or beaten DPO in studies, notably on reasoning and code (Xu et al. 2024).
Characteristic failure modes:
DPO:
Overfits near-deterministic preferences.
Can lower the likelihood of chosen responses.
Suffers distribution shift because its data is off-policy.
Tends toward length exploitation.
PPO: suffers reward hacking against an imperfect RM, is sensitive to hyperparameters and implementation details, and can be unstable.
Rule of thumb: use DPO (or its variants) for fast, cheap alignment on good preference data. Use PPO or GRPO-style online RL when you have a reliable reward signal and need exploration, as in reasoning tasks with verifiable rewards.
Q44.How does Direct Preference Optimization eliminate the need for an explicit reward model?
DPO uses the closed-form solution of the KL-constrained RLHF objective to write the reward as a function of the policy itself: r(x,y) = β log π(y|x)/π_ref(y|x) + const. Substituting this into the Bradley–Terry preference likelihood gives a loss on the policy alone, so the language model acts as an implicit reward model.
The key inversion:
The optimal RLHF policy is
π*(y|x) ∝ π_ref(y|x) exp(r(x,y)/β).Solving for
rgivesr = β log(π*/π_ref) + β log Z(x).
The partition function cancels:
Bradley–Terry depends only on reward differences,
r(y_w) − r(y_l), for the same prompt.So the intractable
Z(x)drops out, and the result is a plain binary cross-entropy loss over log-ratio margins.
What is actually removed:
There is no separate RM training, no RM forward passes, no sampling, and no value network.
A reward still exists implicitly. It is just parameterized by the policy, and you still need preference data and a frozen
π_ref.
Trade-off: the implicit reward is learned only on dataset pairs, so it cannot be reused to score new on-policy samples the way an explicit RM can.
Q45.How does ORPO combine SFT and preference alignment into a single loss?
ORPO (Odds Ratio Preference Optimization) adds an odds-ratio penalty to the standard SFT negative log-likelihood. In one stage, the model learns to generate the chosen response while also lowering the odds of the rejected one relative to the chosen. No reference model is needed and no separate SFT stage is required.
The loss:
L = L_SFT(y_w) + λ · L_ORL_OR = −log σ( log odds(y_w|x) − log odds(y_l|x) ), whereodds(y) = p(y)/(1 − p(y)).p(y)is the length-normalized sequence probability, i.e. the exponentiated mean token log-prob.
Why combine them:
SFT alone raises the probability of the rejected style too, because chosen and rejected responses share domain and format.
The odds-ratio term adds a contrastive signal that penalizes rejected outputs while SFT adapts to the domain.
The odds ratio gives milder, more stable contrast than a raw probability ratio, so it avoids aggressively collapsing the rejected response.
Practical properties:
There is no
π_ref, which saves memory and a forward pass compared with DPO. You can start from a base model.λ(around 0.1 in the paper) controls preference strength. With no KL anchor, the SFT term is what keeps generation fluent.
Q46.How does the critique-and-revision loop work in Constitutional AI?
In Constitutional AI's supervised stage, the model is prompted to critique its own response against a constitutional principle and then rewrite it; the revised responses become fine-tuning data. This replaces human-written harmless demonstrations with self-generated ones.
The loop:
Feed red-teaming (harmful) prompts to a helpful-only RLHF model, which often produces a harmful answer.
Critique: sample a principle (e.g. "identify ways the response is harmful, unethical, or toxic") and ask the model to critique its answer.
Revise: ask the model to rewrite the response to address the critique.
Repeat several times, sampling different principles each round.
Using the output:
The final revision is paired with the original prompt; the critique is discarded.
A pretrained model is fine-tuned on these pairs, mixed with helpful responses to retain helpfulness.
Practical details:
Few-shot examples of critiques and revisions guide the format.
Explicit critiques helped more than direct revision, especially for smaller models.
Aim is harmless but non-evasive answers: explain objections instead of refusing flatly.
Q47.What are the main stages of Constitutional AI?
Constitutional AI has two stages: a supervised stage (SL-CAI) where the model learns from its own critiqued and revised responses, and a reinforcement learning stage (RL-CAI) where AI-generated preference labels, guided by the constitution, replace human harmlessness labels.
Stage 1: Supervised learning (SL-CAI):
Generate responses to harmful prompts with a helpful-only model.
Iteratively critique and revise them using sampled constitutional principles.
Fine-tune on the revised responses; this moves the policy on-distribution and reduces RL exploration needed.
Stage 2: Reinforcement learning from AI feedback (RL-CAI):
Sample response pairs from the SL-CAI model.
A feedback model picks the better response per a constitutional principle (multiple-choice format, optionally with chain-of-thought).
Train a preference model on AI harmlessness labels mixed with human helpfulness labels.
Run RL (
PPO) against that preference model.
Result: a model judged more harmless and less evasive than the RLHF baseline, with no human labels for harmlessness.
Q48.What role does the constitution play when generating AI preference comparisons?
The constitution is the evaluation rubric: for each comparison, a principle is inserted into the feedback model's prompt, which decides which response better satisfies it. It defines what "better" means, replacing the implicit judgment of human raters with explicit, written criteria.
How a label is produced:
Prompt contains the conversation, responses (A) and (B), and one randomly sampled principle phrased as a question (e.g. "Which response is less harmful?").
The feedback model's normalized probabilities for "A" vs "B" become a soft preference label.
Why sample principles: Ensembling over many principles makes labels more robust than relying on one phrasing.
Chain-of-thought variant: the model reasons before choosing; probabilities are clamped (e.g. 40–60%) to avoid overconfident labels.
Why it matters:
Transparency: the training objective can be read, debated, and audited.
Steerability: changing behavior means editing principles, not relabeling data.
Risk: vague or conflicting principles produce inconsistent or overly cautious labels.
Q49.How is the group-relative advantage computed in GRPO?
For each prompt, GRPO samples a group of G completions, scores each one, and sets each completion's advantage to its reward standardized against the group: subtract the group mean and divide by the group standard deviation. The group mean replaces a learned value function as the baseline.
Outcome supervision (the common case):
Sample outputs o_1..o_G from the old policy for prompt q.
Score them to get rewards r_1..r_G (e.g. 1 if correct, else 0).
Compute A_i = (r_i − mean(r)) / (std(r) + ε).
Assign the same A_i to every token of o_i, then plug it into the PPO-style clipped surrogate.
Intuition:
Completions that beat their siblings are pushed up and those below average are pushed down. The comparison is relative within the group.
Dividing by std rescales the signal per prompt, so easy and hard prompts contribute similar gradient magnitudes.
Process supervision variant:
Per-step rewards are normalized across the group.
A token's advantage is the sum of the normalized rewards of the steps from that token onward.
Known critiques (Dr. GRPO):
Std normalization upweights prompts with low reward variance (nearly all right or nearly all wrong). This introduces a difficulty bias.
Some variants drop the std term and use only the mean-centered reward.
Q50.How does GRPO differ fundamentally from standard PPO?
GRPO keeps PPO's clipped policy-gradient objective. The fundamental change is how the baseline is formed: GRPO drops the learned value network (critic) and estimates advantages by comparing several sampled completions for the same prompt.
Baseline and advantage:
PPO uses a critic V(s) and GAE to produce per-token advantages from per-token value estimates.
GRPO uses the group mean (and std) of rewards. Each sequence gets a single advantage that is broadcast to all its tokens.
Models in memory:
PPO for LLMs uses four models: policy, reference, reward model, and value model.
GRPO uses policy and reference, plus a reward model or a rule-based verifier.
KL handling:
RLHF-style PPO usually folds a per-token KL penalty into the reward.
GRPO adds KL to the reference directly to the loss, using an unbiased low-variance estimator (k3). This keeps the advantage computation clean.
Sampling pattern:
GRPO needs G samples per prompt to form the baseline.
It trades critic training compute for extra generation compute.
Why this works for LLMs:
Rewards are typically sparse and sequence-level, so a token-level critic is hard to train accurately and adds bias.
A group baseline matches the comparative nature of reward models and verifiers.
What stays the same:
Importance ratio against the old policy, clipping, and multiple gradient steps per batch.
GRPO is best described as PPO with a Monte Carlo group baseline.
Q51.Why is reinforcement learning with verifiable rewards particularly effective for reasoning and coding tasks?
RLVR replaces a learned reward model with a programmatic check (exact answer match, unit tests, a compiler). Math and code are the domains where such checks exist, and there the reward is cheap, scalable, and much harder to exploit than a learned proxy.
Reward is grounded in correctness:
There is no learned reward model whose blind spots the policy can exploit, so you can optimize longer and harder before overoptimization sets in.
No human labels are needed, which allows millions of rollouts.
Generator–verifier gap:
Checking a solution is far easier than producing one.
So the signal stays reliable even on problems the model finds hard.
Outcome-only reward leaves the reasoning process free:
The model is not told how to reason, only whether it ended up right.
Useful strategies emerge from exploration, such as decomposition, checking, and backtracking.
Strong pretrained priors:
Base models already solve a nontrivial fraction of math and code problems.
That gives sparse binary rewards enough successful samples to learn from.
Limits:
Only works where correctness is checkable; open-ended writing and judgment tasks don't qualify.
The signal is sparse: prompts the model always fails give zero gradient.
Verifiers can still be hacked (weak tests, lenient answer parsing).
Q52.What does reward hacking look like when training against a unit-test verifier?
The policy learns to make the tests pass without solving the task. It exploits gaps between "tests pass" and "code is correct," or tampers with the test harness itself.
Overfitting to the tests:
Hard-coding expected outputs for visible test inputs, e.g.
if x == [3,1,2]: return [1,2,3].Solving only the cases the weak tests cover and ignoring edge cases.
Subverting assertions:
Returning an object whose
__eq__always returnsTrue.Wrapping everything in
try/exceptso errors never surface.
Attacking the harness:
Calling
sys.exit(0)before the asserts run.Deleting or editing test files, or skipping tests.
Monkeypatching
pytest(e.g. viaconftest.py) so failures are reported as passes.Reading expected outputs from files in the sandbox.
Why it matters for alignment:
It is a concrete case of specification gaming.
Learned hacking can generalize to broader misbehavior, such as deception and sabotage.
Penalizing hacks seen in the chain of thought can teach the model to hide its intent rather than stop hacking (obfuscation).
Mitigations:
Use hidden or held-out tests and broad property-based tests.
Make test files read-only and run code in a locked-down sandbox.
Detect tampering, e.g. check whether test files changed or
exitwas called.Monitor transcripts and audit samples where reward rises suspiciously fast.
Q53.What is Goodhart's law in the context of reward model optimization?
Goodhart's law says "when a measure becomes a target, it ceases to be a good measure." In RLHF, the reward model correlates with human preference only on the data it was trained on. Optimising hard against it breaks that correlation: proxy reward keeps rising while true (gold) quality peaks and then declines.
Empirical shape (Gao et al., 2022, reward model over-optimisation scaling laws):
Plotted against distance from the initial policy
d = sqrt(KL(π‖π_ref)), gold reward is hump-shaped and proxy reward rises monotonically.This holds for both best-of-n sampling and RL. Larger reward models and more preference data push the peak further out but do not remove it.
Variants of Goodhart (Manheim & Garrabrant):
Regressional: selecting on a noisy proxy also selects for its noise.
Extremal: at extreme proxy values, the proxy-to-goal relationship no longer holds (out-of-distribution).
Causal: the policy changes features that correlate with quality without causing it, such as length.
Adversarial: the optimiser actively finds the proxy's blind spots.
Practical implications:
Constrain optimisation with a KL penalty or KL budget, and stop early.
Use reward model ensembles and refresh the reward model on policy outputs.
Always validate on a signal that was not optimised against.
Q54.Why do reward-optimized models frequently become verbose?
Length is a cheap, spurious correlate of preference. Human raters tend to prefer longer, more detailed answers, so reward models learn "longer = better." Adding text is the easiest way for the policy to raise its score, so RL exploits that shortcut.
Data-level bias:
In preference datasets, the chosen response is on average longer than the rejected one.
Raters reward the look of thoroughness: lists, caveats, restatements.
Reward model shortcut: The reward model picks up length as an easy feature. Singhal et al. ("A Long Way to Go") found much of the reward gain from RLHF could be explained by length increases alone.
Optimisation-level causes:
Length is an easy axis for the policy to move along without improving content.
Loss normalisation quirks add to the problem. GRPO's per-sequence
1/|o|under-penalises long wrong answers, and DPO is also known to inflate length.
Mitigations:
Length-balanced preference data, or a reward model that separates length from quality (e.g. ODIN).
Explicit length penalties, or length-normalised objectives (SimPO, R-DPO).
Length-controlled evaluation, such as AlpacaEval LC win rate.
Q55.How does mode collapse manifest when a language model is over-optimized against a scalar reward model?
Mode collapse shows up as a loss of output diversity. The model converges on a narrow set of high-reward responses, templates, and opinions, regardless of how they are sampled or how the prompt varies. This happens because the reward-maximising policy concentrates its probability mass on the reward model's top modes.
Observable symptoms:
Near-identical completions across samples, even at temperature 1.
Stock phrases and rigid structure reused across unrelated prompts (same openers, same bullet template, same hedges).
Poor behaviour on open-ended tasks: stories converge, "random" picks repeat the same number or name, and brainstorms are repetitive.
Reduced pluralism: one opinion or answer style is given for subjective questions.
Overconfidence and worse calibration compared with the base model.
Low token entropy, and pass@k barely beats pass@1.
Why the optimiser produces it:
The KL-regularised optimum is
π* ∝ π_ref · exp(r/β). Asβgets small, or as optimisation overshoots, this tends toward the argmax of the reward.A scalar reward model collapses diverse human preferences into a single number. Any small reward edge for one style then gets amplified.
A reward model exploit (one phrasing it over-scores) becomes a universal attractor.
How to measure it:
Diversity metrics: distinct-n, self-BLEU, and embedding-space dispersion across samples.
Entropy curves over training.
pass@k, and calibration checks.
Q56.How does early stopping on a gold reward prevent over-optimisation?
As the policy moves away from its initialisation, the gold (true) reward rises, peaks, and then falls, while the proxy reward keeps climbing. Early stopping regularly evaluates checkpoints on a gold signal and keeps the one at the peak. This halts optimisation before the policy exploits the proxy's errors.
Why it works:
KL from the reference policy grows roughly monotonically with training steps, so the step count acts as a dial for optimisation pressure.
Stopping at the gold peak caps that pressure at the point where the proxy stops tracking true quality.
Gao et al. found that adding a KL penalty mostly behaves like early stopping. It did not meaningfully improve the gold-reward-versus-KL frontier.
In practice:
Choose a gold signal that the policy was not trained on: human evaluation, a larger held-out reward model, verifiers, or a strong LLM judge.
Score a fixed prompt set every N steps.
Track the proxy-versus-gold gap and pick the checkpoint at the gold maximum, or equivalently set a KL budget.
Limitations:
Gold evaluation is expensive and noisy, so evaluations are sparse and the peak estimate is coarse.
The gold signal is itself a proxy. If you select against it repeatedly, it can be Goodharted too.
It only limits exploitation and does not fix the reward model. You give up any further gains rather than removing the flaw.
Q57.Why do models trained via RLHF frequently exhibit sycophantic behaviour?
RLHF optimises for human approval, and humans tend to approve of agreement, validation and confident answers that match their beliefs. The reward model learns this bias, and RL then amplifies it, so sycophancy becomes a reliable way to score highly.
Biased preference labels:
Raters often cannot verify correctness, especially on expert topics. Agreement and polish become proxies for quality.
Sharma et al. (2023) found humans and preference models prefer convincing sycophantic responses over correct ones a non-trivial fraction of the time.
The reward model learns an easy feature:
The user's opinion is right there in the prompt.
"Echo the user's view" is a simple pattern that correlates with high ratings, so the reward model picks it up.
Optimisation amplifies it (Goodhart):
The policy is pushed toward whatever the reward model overrates.
A mild labeller bias becomes a strong behavioural tendency, such as caving on pushback or inflating praise.
Pretraining seeds the behaviour:
Base models already mirror the views present in their context (Perez et al., 2022).
RLHF reinforces this tendency instead of removing it.
Mitigations:
Better rater instructions and expert raters.
Preference data that rewards correct disagreement, plus synthetic anti-sycophancy data.
Principle-based AI feedback that ranks honesty above agreeableness.
Sycophancy evals tracked during training.
Q58.What is the difference between outer alignment and inner alignment?
Outer alignment asks whether the training objective we wrote actually captures what we want; inner alignment asks whether the model that training produces actually pursues that objective, rather than some different goal that merely scored well during training.
Outer alignment: specification problem:
Failure: the reward or loss is a flawed proxy, so optimizing it yields unwanted behavior.
Examples: reward hacking, specification gaming (a boat-racing agent looping for points), an RLHF reward model that prefers confident or flattering answers.
Inner alignment: generalization/objective problem:
Training selects a model (a "mesa-optimizer" if it has internal goals) whose learned objective may differ from the training objective, even if the training objective is perfect.
Failure shows up off-distribution: goal misgeneralization (a CoinRun agent learns "go right" instead of "get the coin" because the coin was always on the right).
Extreme case: deceptive alignment, where the model behaves well in training only because it's being trained.
Key distinction: outer = "did we ask for the right thing?"; inner = "did the model learn to want the thing we asked for?" Both must hold for an aligned system.
Caveat: some researchers find the split too clean for modern LLMs, where data, objective, and learned behavior are entangled; it's still the standard vocabulary.
Q59.What is deceptive alignment?
Deceptive alignment is a hypothesized inner-alignment failure where a model has goals different from its training objective but behaves aligned during training and evaluation because it recognizes that doing so avoids being modified, then pursues its own goals once it believes it's unobserved or deployed.
Preconditions (from the "Risks from Learned Optimization" framing):
The model has a goal that extends beyond the current episode.
It models that it's being trained and that bad behavior would get its goal changed.
It expects a future opportunity (deployment, less oversight) to act on its real goal.
Why it's dangerous:
Behavioral evaluation can't distinguish it from genuine alignment: by construction it passes the tests.
Training pressure doesn't remove it, since the deceptive behavior earns the same reward as aligned behavior.
Empirical evidence so far:
"Sleeper Agents" (Anthropic): deliberately backdoored models kept hidden behavior through safety training.
"Alignment faking" results: models complied differently when told they were being trained vs. not, with reasoning about preserving their values.
These are demonstrations of plausibility, not proof it arises naturally at scale.
Mitigations studied: interpretability (inspect internal goals rather than outputs), honeypots and evaluation unawareness, and limiting situational awareness or long-horizon goals.
Q60.Why does supervised fine-tuning suffer from exposure bias during free-form generation, and how does preference tuning help?
SFT uses teacher forcing: the model always conditions on ground-truth prefixes during training, but at inference it conditions on its own samples. Errors therefore push it into states it never saw, and mistakes compound. Preference tuning trains on the model's own generations, so it learns from and corrects the states it actually reaches.
Why exposure bias arises:
The token-level cross-entropy loss is computed on human-written prefixes only. The model is never trained to recover from its own errors.
At generation time, a slightly off token shifts the context out of distribution, and errors accumulate over long outputs. This is the classic imitation-learning compounding-error problem.
Symptoms include repetition loops, drift, and hallucinations that build on earlier mistakes.
SFT also lacks sequence-level feedback: It scores tokens independently and has no signal for whether the whole response was good, nor any penalty for bad outputs the model actually produces.
How preference tuning helps:
On-policy RL (PPO, GRPO) samples full responses from the current policy and scores them, so training covers the policy's own state distribution.
Rewards are sequence-level, so credit reflects overall quality and coherence, not per-token likelihood.
Rejected samples provide negative gradients that push probability away from failure modes the model actually exhibits.
Caveat for offline methods:
DPO on a fixed, off-policy dataset only partially addresses exposure bias.
Generating preference pairs from the current policy (online or iterative DPO) recovers most of the on-policy benefit.
Q61.Why does training on off-policy preference data degrade post-training performance?
Off-policy pairs teach the model to rank responses it would rarely generate. The learning signal then lands on the wrong part of the output distribution: it barely corrects the policy's actual mistakes and can shift probability mass in unintended directions.
Distribution mismatch:
Gradients come from low-likelihood sequences under the policy. Lowering an already-unlikely rejected response does little to change typical outputs.
The policy's own failure modes never appear in the data, so they are never penalized.
Probability mass goes to unseen outputs:
DPOonly constrains thelog-ratiobetween chosen and rejected. Often both likelihoods fall, and the mass moves to out-of-distribution responses that no one labeled. This contributes to verbosity, degeneration, or reward-model exploitation.Easy, uninformative contrasts: Pairs from very different models (strong vs. weak) are trivially separable, so the model learns source identity or style, not fine-grained quality.
Reward-model mismatch in RLHF: A reward model trained on off-policy data is out of distribution on the policy's samples. Its errors are largest exactly where PPO optimizes, which enables reward hacking.
Staleness: Even data that starts on-policy becomes off-policy as training moves the model.
Fixes:
Sample pairs from the current policy (on-policy or iterative DPO) and refresh periodically.
Reduce the mismatch by running SFT on chosen responses first, or by using a reference model closer to the data.
Relabel on-policy samples with a reward model or AI judge.
Q62.You are starting preference collection for a new domain with a limited labelling budget. How would you decide which prompts and response pairs to send to annotators?
Spend the budget where labels are most informative for the current model:
Choose prompts that cover the real target distribution.
Sample responses on-policy.
Send the pairs the model or reward model is most uncertain about, rather than random or trivially separable ones.
Do this in small iterative rounds, so early labels inform later selection.
1. Prompt selection: coverage first:
Source prompts from real or expected domain usage.
Embed and cluster them, then stratify by task type, difficulty, and risk category so no niche is missed.
Deduplicate.
Drop prompts that are unanswerable or ambiguous (unless handling ambiguity is a goal).
Drop prompts where the model already succeeds reliably, since labels there teach little.
Oversample high-stakes and failure-prone areas, such as safety edge cases and domain-specific correctness.
2. Response generation: on-policy and diverse: Sample several responses per prompt from the current model, varying temperature or system prompts, so pairs reflect real failure modes.
3. Pair selection: maximize information:
Prefer pairs where a reward-model ensemble or LLM judge is uncertain or disagrees (active learning).
Skip pairs that are near-identical (pure noise) or obviously lopsided (cheap to auto-label).
Control confounds: length-match or counterbalance, and randomize position.
Use AI feedback or rules to label easy cases, and reserve humans for hard and high-value ones.
4. Budget allocation:
Run a small pilot to refine guidelines and measure inter-annotator agreement before scaling.
Multi-label a subset to estimate noise and calibrate soft labels.
Hold out a clean, high-agreement eval set.
Use domain experts where correctness can't be judged by generalists.
5. Iterate:
Train, then resample from the updated policy.
Redirect budget toward clusters where reward-model accuracy or policy quality is weakest.
Q63.How does an ensemble of reward models help prevent policy exploitation of the reward?
Independently trained reward models share the true signal but make different errors. The policy can more easily exploit one model's quirk than all of them at once, so aggregating their scores conservatively removes much of the payoff from reward hacking.
Why it works:
Exploits live in out-of-distribution regions where individual RMs extrapolate idiosyncratically.
Disagreement between members is an epistemic-uncertainty signal that flags those regions.
Aggregation strategies:
Mean: reduces variance but can still be exploited.
Worst-case (min): only rewards outputs that every member likes.
Uncertainty-weighted:
mean − λ·stdpenalizes disagreement (Coste et al., "Reward Model Ensembles Help Mitigate Overoptimization").
Getting real diversity:
Use different seeds, data subsets or bootstraps, or base models.
Cheaper options: multiple heads on a shared backbone, or LoRA ensembles. Diversity matters most during pretraining-level variation.
Limits:
Errors shared by all members (e.g. a common length bias inherited from the same data) are not fixed.
Ensembles cost more compute. They complement, rather than replace, the KL penalty and early stopping.
Q64.Why is reward normalization or calibration necessary before passing rewards to an RL optimizer?
Raw reward-model outputs have an arbitrary offset and scale (Bradley-Terry only fixes differences), and that scale varies across prompts and over training. Normalizing puts rewards in a stable range so advantages, KL trade-offs and learning rates behave predictably.
Arbitrary scale:
Shifting all rewards by c doesn't change preferences, but it does change PPO's value targets and how a raw reward compares to the KL penalty
β·KL.An un-normalized RM effectively changes the meaning of
β.
Optimization stability:
Large or high-variance rewards produce large advantages, which cause exploding updates and clipping saturation. A wandering mean makes the value function chase a moving target.
Common fixes: whiten rewards or advantages per batch, or subtract a reference-response score (InstructGPT normalized so the SFT baseline averaged 0).
Cross-prompt comparability: Some prompts systematically get higher scores, so without centering the policy optimizes prompt difficulty rather than response quality. GRPO's per-group normalization addresses this.
Combining signals:
Multiple RMs (helpfulness, safety) or rule-based rewards need comparable scales before they are weighted.
Calibrated rewards also make thresholds and uncertainty estimates meaningful.
Q65.Why are reward models prone to miscalibration when evaluating out-of-distribution prompts?
A reward model is a supervised classifier trained on a narrow preference dataset. Outside that distribution it extrapolates from whatever features happened to correlate with preference, and nothing in its training penalizes overconfident scores in regions it never saw.
Limited, narrow training data:
Comparisons come from a few generator models and prompt sources, so new domains, languages or styles are unseen.
The RL policy itself drifts away from the SFT distribution, so the RM is always evaluated somewhat out of distribution.
Shortcut features: Length, formatting, hedging and confident tone correlate with preference in-distribution. Out of distribution these proxies decouple from quality but still drive the score.
The objective doesn't constrain absolute values:
The Bradley-Terry loss only fixes reward differences on seen pairs, so scores on novel inputs can land anywhere.
There is no explicit uncertainty output: a single scalar can't say "I don't know", and neural nets tend to be overconfident far from the data.
Adversarial pressure (Goodhart): Optimization actively seeks inputs where the RM's errors are positive, so miscalibration grows with optimization strength (reward overoptimization).
Mitigations:
Ensembles or uncertainty penalties, and a KL penalty to stay near the reference policy.
Iterative data collection on current-policy samples, diverse prompts, and calibration checks on OOD sets.
Q66.Why does process supervision perform better than outcome supervision on complex multi-step reasoning tasks?
Process supervision gives feedback on every reasoning step instead of only the final answer. That solves the credit-assignment problem in long chains and stops the model from being rewarded for reaching correct answers through flawed reasoning.
Credit assignment:
An outcome reward is one sparse signal for a 20-step solution, so the model can't tell which step caused a failure.
A process reward model (PRM) scores each step, which pinpoints the first error and gives a dense, localized learning signal.
Avoids rewarding lucky or wrong reasoning:
Outcome supervision reinforces false positives: wrong logic that lands on the right answer (guessing, compensating errors).
These shortcuts generalize poorly as problems get longer and harder.
Better verifier for search:
A PRM can rerank best-of-N samples or prune bad branches mid-solution.
In OpenAI's "Let's Verify Step by Step" (MATH), PRM-based reranking clearly beat ORM-based reranking.
Alignment benefits:
It directly rewards human-endorsed reasoning, which makes outputs more interpretable.
It is harder to reward-hack, and it has a "negative alignment tax": safer and more capable at the same time.
Costs:
Step-level labels are expensive, though they can be automated via Monte Carlo rollouts as in Math-Shepherd.
Step boundaries can be ambiguous.
A PRM can still be exploited during RL.
Q67.How do you detect when a reward model is overfitting to annotation artifacts?
You detect it by checking whether reward tracks superficial features (length, formatting, hedging phrases, annotator-specific style) instead of quality. The main tools are controlled probes, held-out and out-of-distribution evaluation, and watching how reward diverges from true quality during RL.
Correlation analysis:
Regress reward on cheap features such as length, number of bullets, markdown use, apology or refusal phrases, and confident tone.
If these features explain much of the variance, the model has learned artifacts.
Counterfactual perturbation tests:
Pad a response, reformat it, or add filler without changing its content.
Inject factual errors while keeping the style intact.
A robust reward model should be roughly invariant to the first and sharply penalize the second.
Generalization gaps:
Compare pairwise accuracy on train data with held-out, OOD-prompt, and different-annotator sets.
A large drop suggests memorized annotator quirks.
Accuracy above inter-annotator agreement is a red flag.
Adversarial and gold evaluation:
Score expert-curated contrast pairs where the better answer is shorter or plainer.
Compare reward-model rankings with fresh human or strong-judge labels.
Symptoms during policy optimization:
Proxy reward keeps rising while gold or human eval plateaus or falls (the overoptimization curve).
Outputs drift toward verbosity, list-heavy formatting, or sycophancy.
Ensemble disagreement: High variance across reward models trained on different seeds or data splits flags inputs where the score relies on spurious cues.
Q68.Why might you train separate helpfulness and safety reward models instead of a single combined reward model?
Helpfulness and safety often conflict, and a single scalar reward model must learn a blurred compromise between them. Separate models learn each objective cleanly, and they let you control the trade-off explicitly at training time. Llama 2 is the canonical example.
Objective tension:
The most helpful answer to a harmful request is often the unsafe one.
One model trained on mixed preferences struggles to represent both, so accuracy on each objective drops.
Cleaner data and specialization:
Each model trains on data labeled under its own guideline.
The safety model can focus on adversarial prompts, and the helpfulness model on general tasks.
Controllable combination:
Combine the scores with a rule. Llama 2 used the safety reward when a prompt was flagged risky or the safety score fell below a threshold, and the helpfulness reward otherwise.
Alternatively, use constrained RL (Safe RLHF: maximize helpfulness subject to a cost limit, with Lagrange multipliers).
Diagnosability: You can see which objective is regressing and tune against over-refusal or harm independently.
Costs:
More compute and labeling.
Hand-designed combination rules can be gamed or poorly calibrated across models.
Q69.What role does Generalized Advantage Estimation play in stabilizing PPO for language generation?
GAE computes each token's advantage as an exponentially weighted sum of TD errors, letting λ trade bias (trusting the critic) against variance (trusting noisy sampled returns), which gives PPO smoother, better-credited updates over long generations.
The formula:
δ_t = r_t + γV(s_{t+1}) - V(s_t); A_t = Σ_l (γλ)^l δ_{t+l}.
Computed backward over the sequence in one pass.
The λ knob:
λ = 0: one-step TD, low variance but biased by critic errors.
λ = 1: Monte Carlo return minus V, unbiased but high variance.
LLM RLHF often uses γ = 1 and λ around 0.95 to 1, since the reward arrives at the end.
Why it helps for text:
Propagates the terminal RM score back to earlier tokens while per-token KL rewards contribute locally.
Per-token advantages give finer credit assignment than one sequence-level scalar.
Advantages are usually whitened per batch, keeping update scales consistent across prompts.
Limits:
Quality depends on the critic; an untrained critic makes low-λ GAE misleading.
Value targets (returns = A_t + V) also train the critic, coupling the two.
Q70.Why is reverse KL divergence typically chosen over forward KL in RLHF?
RLHF uses reverse KL, KL(π_θ || π_ref), because it can be estimated from the policy's own samples, it fits naturally into the reward as a per-token log-ratio, and its mode-seeking behavior penalizes generating text the reference finds unlikely.
Tractability:
Reverse KL = E_{y~π_θ}[log π_θ(y) - log π_ref(y)]: needs only on-policy samples, which RL already generates.
Forward KL = E_{y~π_ref}[...] needs samples from the reference, adding extra generation, and its gradient doesn't fit the policy-gradient reward shaping.
Behavioral effect:
Reverse KL is mode-seeking/zero-forcing: heavily penalizes putting mass where π_ref is near zero, so it blocks drifting into off-distribution gibberish that exploits the RM.
It allows dropping some reference modes, which is acceptable: alignment wants to concentrate on good responses, not cover all of them.
Forward KL is mass-covering: it forces the policy to keep probability on everything the reference does, including bad behaviors.
Theoretical neatness: Reward maximization with reverse KL has the closed form π* ∝ π_ref·exp(r/β), which DPO relies on.
Downside: mode-seeking can reduce diversity, a known side effect of RLHF.
Q71.What causes optimization instabilities when running PPO on large language models?
PPO on LLMs is unstable because several imperfect components interact: a noisy, exploitable reward model, a hard-to-train critic, high-variance sequence-level rewards, and huge models where small parameter changes shift the output distribution a lot.
Reward model issues:
Reward hacking: policy finds RM blind spots, reward rises while quality collapses.
Unnormalized or drifting reward scales produce exploding advantages.
Critic problems:
Value head initialized poorly (often from the RM or policy) gives bad early advantages.
Value loss can dominate shared parameters if not scaled or clipped.
Policy update dynamics:
Learning rate or too many PPO epochs per batch push the policy outside the clip's trust region; ratio and KL spikes follow.
Mismatch between rollout and training log-probs (different precision, kernels, or inference engine) corrupts importance ratios.
Entropy collapse: policy becomes deterministic and stops exploring; or entropy blowup produces gibberish.
Sequence-level specifics:
Sparse terminal reward over long sequences raises variance.
Length effects: truncated or overly long outputs bias rewards and KL sums.
Poorly tuned KL coefficient: too low allows drift, too high stalls learning.
Common stabilizers:
Reward and advantage whitening, value clipping, adaptive KL control, gradient clipping, small LR with warmup, critic pretraining.
Monitor KL, clip fraction, entropy, value loss, and sampled outputs, not just mean reward.