Unit 8 of 9 · about 3 hours · implement

Multiple reward components, scalarization and version lineage

One scalar hides competing goals. Explicit weights plus version binding turn which trade-off shipped into an auditable fact rather than a memory.

You'll be able to

  • Implement a multi-component reward with explicit scalarization weights plus length and repetition penalties.
  • Bind preference, reward and verifier versions to every rollout and evaluation record with an atomic manifest.
  • State the rollback rule when any component shifts.

Covers

Multiple reward components and scalarization policyPreference, reward and verifier version lineage
1

Read

In this order, only the parts listed

0 of 3 done

  1. Hybrid rewards and experiment artifactsHands-on Modern RL - RLHF Evaluation and Process Rewards

    The Spectrum of Rewards (hybrid Rmix with format, length and correctness weights); Minimal Experiment Directory (data, models and reports layout); quality gates for the data flywheel (page read 2026-10-14)

  2. Multi-dimensional fix and bad-case flywheelHands-on Modern RL - RLHF Evaluation and Process Rewards

    Multi-dimensional reward fix (safer_reward with 0.40 helpfulness, 0.35 correctness, 0.15 format and two 0.05 penalties); The Data Flywheel (bad-case tags such as length_hack and template_hack) (page read 2026-10-14)

    Treat the printed weights as one worked choice to implement and vary, not as standard constants.

  3. Version binding and instrumentation requirementsLLM Post-Training Laboratory - Reward and Adversarial Evaluation

    Architecture constraints (every record binds prompt, template, model, reference, reward, verifier and policy versions); Milestone B (instrumentation) and Milestone C (reward and preference implementation)

2

Focus on

  • Scalarization weights are policy, so record them with the run. Helpfulness, correctness and format get positive weights while repetition and excess length get explicit penalties, and length is a penalty term, never a reward.
  • Normalize each component on a fixed calibration set. Current-batch statistics drift with the actor and hide which component moved.
  • Group pairwise updates per prompt. Prompts with 9 completions yield 36 pairs against 6 from 4 completions, so ungrouped averaging lets heavy prompts dominate.
  • A manifest publishes only complete validated artifacts: ordered paths, checksums, counts, versions and RNG state. Failed and filtered rollouts stay counted with explicit reasons, and changed configs reject resume.
Common mistakes · 3
  • Adding a component without versioning it. An unrecorded weight change is an irreproducible experiment, since no later audit can recover the trade-off.
  • Normalizing rewards on the current batch. The scale then chases the actor distribution and every debug comparison becomes meaningless.
  • Silently dropping failed rollouts. Deletion changes the estimand, so count failures with reasons in the manifest.
3

Try it yourself

Closed-book, before checking anything

Closed-book, write a hybrid reward with separate helpfulness, correctness, format, repetition and length terms plus a manifest listing data, model, tokenizer, template, reward, verifier and policy versions for one run.
4

Quiz yourself

Answer first, then mark it. Missed ones go to Review.

0 got · 0 missed

  1. 1.Why must reward normalization use a fixed calibration set?Answer

    Batch statistics move with the policy, so the same behavior scores differently across steps. A fixed set holds the scale still and exposes which component actually shifted.

  2. 2.One prompt yields 9 completions and another yields 4. What goes wrong with naive pair averaging?Answer

    The first prompt contributes 36 pairs against 6 from the second and dominates the update. Average pairs within each prompt so each prompt contributes one grouped update.

  3. 3.What must a run manifest contain to support rollback?Answer

    Data, tokenizer, template, model, reference, reward, verifier and policy versions with ordered paths, checksums, counts and RNG state, covering only complete validated artifacts.

  4. 4.A format checker ships a bug mid-run. What is the governance call?Answer

    Roll back to the last manifest whose acceptance checks passed, quarantine the affected rollouts, and require the predeclared stop rule before resuming with the fixed checker.

5

Practice

  • Hands-on Modern RL 13.6: scalarized reward with manifest

    Implement safer_reward on your own answers, vary each weight once, and record a manifest with component versions, checksums and failure counts (page read 2026-10-14)

    Runs on CPU. Show that a weight change moves the ranking, and that the manifest alone reproduces which trade-off shipped.

You're done when

Your scalarized reward plus manifest reproduces which trade-off shipped, survives a weight change and a checker bug, and rejects resume under a changed config.

Only when you can do this without notes.

Leads to

Notes

Resources · 2 for this unit, 8 more in the section
  • Hands-on Modern RL - RLHF Evaluation and Process RewardsWalking Labs · support

    Use the outcome-versus-process page (its discounted ORM and PRM returns are worth recomputing by hand) and the process-reward and search chapter as an implementation map for verifier tests. Check claims against the original sources. Pin commit 9231bab of walkinglabs/hands-on-modern-rl; its code/chapterNN folders do not follow the site chapter numbers.

  • LLM Post-Training Laboratory - Reward and Adversarial EvaluationRoadmap-Final · required

    Complete the pairwise reward model, held-out and calibration analysis, deterministic verifier, judge-bias audit, reward-hacking probes and the required case where proxy reward improves while independent behavior worsens.

Also in this section

  • RLHF Book - Reward Models, Preferences and EvaluationNathan Lambert · primary

    Study Chapter 5 (reward modeling: Bradley-Terry loss, outcome, process and generative reward models), Chapters 10 and 11 (preferences and preference data), Chapter 14 (over-optimization) and Chapter 16 (evaluation). Implement the pairwise reward loss, compare outcome, process and generative reward roles, and build an adversarial feedback audit covering preference bias, reward shift and overoptimization.

  • RLHF Book Course - Lectures 2, 8 and 9Nathan Lambert · required

    Use Lecture 2 (instruction tuning, reward models and rejection sampling), Lecture 8 (preferences and preference data) and Lecture 9 (over-optimization). Reproduce the reward-data-to-score path and keep rejection sampling as a non-RL selection baseline for later online optimization.

  • Deep Reinforcement Learning from Human PreferencesDeepMind and OpenAI · required

    Study the preference-query, reward-learning and policy-optimization loop. Reproduce a tiny preference model or simulator and measure how label noise or policy shift changes reward accuracy and control quality.

  • Scaling Laws for Reward Model OveroptimizationGao, Schulman and Hilton (ICML 2023) · required

    Read the gold-reward setup and the proxy-versus-gold curves for best-of- and RL as the KL distance grows. Reproduce the shape at toy scale: a small proxy reward model, a known gold reward and best-of- selection.

  • Learning to Summarize from Human FeedbackStiennon et al. (NeurIPS 2020) · support

    Read the reward-model and policy-training protocol, the KL penalty and the length analysis. Use it as the first full example of a reward model trained on comparisons and then optimized against.

  • Let's Verify Step by StepLightman et al. (2023) · support

    Read how process supervision labels steps, how the process reward model scores a solution and how outcome and process supervision compare under best-of- selection. Define step boundaries for your own task before training any process scorer.

  • Constitutional AI: Harmlessness from AI FeedbackAnthropic · support

    Study supervised self-critique, AI preference feedback and RL from AI feedback. Implement a bounded rubric-conditioned comparison exercise and test judge correlation and principle ambiguity rather than reproducing the full pipeline.

  • Stanford CS224R 2026 - Reward LearningStanford University · support

    Study Lecture 08 (reward learning, slides/08_cs224r_reward_learning_2026.pdf) with its Christiano et al. reading, and Section 1.2 of the default project guidelines for preference and verifier datasets. Use fixed chosen and rejected examples and a hidden adversarial split; write independent implementations.