Lesson deck

Alignment and preference optimisation flashcards

Reviewing needs JavaScript. You can read every card in the list below.

Loading your cards...

Back to the lesson14 cards in this deck

Read all 14 cards as a list
  1. Front
    What are the three steps of the RLHF recipe in InstructGPT?
    Back
    SFT on demonstrations, a reward model trained on human rankings of outputs, then reinforcement learning (PPO) against that reward. Reported in Ouyang et al., 2022.
  2. Front
    What does the KL penalty do in RLHF, and what does it cost?
    Back
    It charges the policy for drifting from the SFT model, keeping it where the reward model's scores can be trusted and its answers varied. The cost is some of the possible gain; beta sets the balance.
  3. Front
    What does a PPO-based RLHF run need that DPO does not?
    Back
    A separately trained reward model, a value model (about the size of the policy), and sampling from the policy during training. Both need the preference data and a frozen reference.
  4. Front
    Write the DPO loss in words.
    Back
    Minus log-sigmoid of beta times [log(new/ref) for the preferred answer minus log(new/ref) for the rejected answer]. It rewards raising the preferred answer's ratio above the rejected one's.
  5. Front
    What does beta do in DPO?
    Back
    It scales the log-ratios and so controls deviation from the reference. A larger beta makes the same movement count for more, the loss saturates sooner, and the model stays closer.
  6. Front
    Why does DPO still need a reference model?
    Back
    Every log-ratio divides the trained model's probability by the reference's. The reference defines what 'moved' means. Its log-probabilities for fixed pairs can be computed once and reused.
  7. Front
    A DPO pair has beta 0.1, preferred log-ratio +1.0 and rejected -2.0. What is the loss?
    Back
    Margin = 0.1 × 3.0 = 0.3. Loss = -ln(sigmoid(0.3)) ≈ 0.554. At the start, with both log-ratios 0, the loss is ln 2 ≈ 0.693.
  8. Front
    Which DPO relative fits which data or constraint?
    Back
    IPO: pairs, bounded target gap. KTO: single answers with a binary label. ORPO: pairs, adds an odds-ratio term to SFT, no reference. SimPO: pairs, length-normalised reward plus margin, no reference.
  9. Front
    Why are reported gains for DPO-family methods not a ranking?
    Back
    Each paper uses its own models, datasets, judges and tuned baselines, and the methods are not run against each other under one setup. The KTO paper itself says no single loss wins everywhere. Test on your evaluation.
  10. Front
    How is a group-relative advantage computed in GRPO?
    Back
    Sample G answers per prompt, score them, then A_i = (r_i − group mean) ÷ group standard deviation. No value model is needed. An all-equal group gives zero advantage and no signal.
  11. Front
    GRPO versus verifiable rewards: what is the difference?
    Back
    GRPO is the optimiser. Verifiable rewards are one source of scores. DeepSeekMath scored groups with a reward model; DeepSeek-R1 used rule-based accuracy and format rewards with GRPO.
  12. Front
    What is reward hacking, and what are two defences?
    Back
    The model scores well on the proxy without doing what you wanted (for example longer or more confident answers). Defences: a KL leash or larger beta, early stopping on a held-out measure, fresh pairs on current outputs, length checks.
  13. Front
    Does having no reward model make DPO immune to over-optimisation?
    Back
    No. It removes one moving part. IPO's analysis describes overfitting to one-sided pairs, and SimPO's ablation shows length being exploited when it is not normalised.
  14. Front
    When is each approach worth its cost?
    Back
    SFT for demonstrations; DPO-style when you have pairs and a gap SFT cannot close; KTO for thumbs-only data; GRPO for checkable tasks with a sampling budget; PPO-RLHF for specialist teams. Judgment, not data.