Trace a preference model and a clipped policy objective without confusing reward with truth.
Preparation: Probabilities, averages and basic gradients.
Plan 20–35 minutes with the activities; this is a study estimate, not a timed requirement. Both paths have complete narration. Your notes and progress are kept separately for each level.
FULL LOCAL NARRATION
Follow the complete explanation.
Narration includes worked solutions. Pause at each practice prompt before continuing. Formula notation has a spoken explanation; all teaching text remains readable.
High-school path. Trace a preference model and a clipped policy objective without confusing reward with truth.
Preparation: Probabilities, averages and basic gradients. Work through one section at a time. Predict the experiment result before changing its controls, then explain what the example leaves out.
A common RLHF pipeline first trains useful responses, then learns from preferences, then optimizes a policy against a reward signal. Implementations differ, so name the stages actually present. A judge’s ratings and a contestant’s strategy are two different parts of the process.
Worked step 1. Collect a prompt and two answers.
Worked step 2. Record a preference.
Worked step 3. Keep reward-model training separate from policy updates.
Try it yourself. Is a preference label a verified factual truth label?
Pause the recording and write your reasoning before continuing. The worked solution follows.
Reveal worked solution
Worked solution. No. It records a judgment under a collection protocol and may reflect style, omissions or mistakes.
Section 02 / 07
Fit a pairwise preference
A simple reward model turns the reward difference into a preference probability with a sigmoid. Only differences matter for this pairwise likelihood. Giving both contestants ten extra points does not change who is ahead.
Worked step 1. Rewards 3 and 1 give gap 2.
Worked step 2. Sigmoid of 2 is about 0.881.
Worked step 3. Rewards 13 and 11 produce the same probability.
Try it yourself. Does 0.881 mean the chosen answer is 88.1 percent factually true?
Pause the recording and write your reasoning before continuing. The worked solution follows.
Reveal worked solution
Worked solution. No. It is a model probability for the observed preference event under this formulation.
Section 03 / 07
Use advantages, not raw praise alone
Policy updates often compare an outcome with a baseline to form an advantage. A positive advantage favors that sampled action; a negative advantage discourages it. A result can be good in absolute terms but below the expectation for an easy task.
Worked step 1. Toy reward is 5 and baseline is 3.
Worked step 2. Toy advantage is 2.
Worked step 3. If baseline is 6, advantage becomes -1.
Try it yourself. Does subtracting a baseline change the raw reward?
Pause the recording and write your reasoning before continuing. The worked solution follows.
Reveal worked solution
Worked solution. No. It changes the comparison used by this update estimator.
Section 04 / 07
Clip the surrogate incentive
PPO compares new and old action probabilities through a ratio. Its clipped surrogate limits part of the incentive for large ratio changes; it is not a hard bound on every parameter or policy change. A capped bonus can reduce an incentive without physically preventing a contestant from moving farther.
Lclip = min(rA, clip(r,1−ε,1+ε)A)
Worked step 1. Ratio 1.4, advantage 2, clip width 0.2.
Worked step 2. Unclipped term is 2.8; clipped term is 2.4.
Worked step 3. The minimum is 2.4.
Try it yourself. For advantage -2 and ratio 0.6, what is the minimum?
Pause the recording and write your reasoning before continuing. The worked solution follows.
Reveal worked solution
Worked solution. Unclipped is -1.2 and clipped is -1.6. The minimum is -1.6, so sign matters.
Section 05 / 07
Keep a reference comparison explicit
A reference-policy penalty can discourage drifting too far from a starting behavior. The reference policy and the previous rollout policy play different roles and need not be the same object. One comparison asks how far you moved this round; another asks how far you moved from your original route.
Worked step 1. Label policies current, rollout-old and reference.
Worked step 2. Write which pair appears in each term.
Worked step 3. Avoid calling all three the baseline.
Try it yourself. Does a small PPO clip guarantee small reference KL?
Pause the recording and write your reasoning before continuing. The worked solution follows.
Reveal worked solution
Worked solution. No. They are different comparisons. Monitor the actual divergence and behavior.
Section 06 / 07
Look for reward exploitation
A policy can learn to satisfy the scoring system without satisfying the intended goal. Evaluate factual support, task success and failures separately from average reward. A student who writes impressive-looking pages without answering the question may please a weak grading rubric.
Worked step 1. Construct an answer that sounds polished but omits a critical fact.
Worked step 2. Compare reward and human task assessment.
Worked step 3. Record disagreements.
Try it yourself. What should happen when reward rises but task success falls?
Pause the recording and write your reasoning before continuing. The worked solution follows.
Reveal worked solution
Worked solution. Treat it as a failure of the proxy or optimization setup, not as an unqualified improvement.
Section 07 / 07
Mastery and transfer
Bring the pieces together. First answer the checkpoint without the worked solutions. Then explain the mechanism in your own words, using one numerical example from this lesson.
A learned reward score represents… Option 1: Guaranteed truth. Option 2: A learned proxy shaped by its data and objective. Option 3: A universal human preference.
Pause here and choose an answer before continuing. The checkpoint explanation follows.
Reveal worked solution
The correct choice is option 2: A learned proxy shaped by its data and objective. A proxy must be evaluated against the intended task and may be exploited.
Transfer task. Change one assumption in the worked example. State your prediction, calculate or test it in Workbench, then explain whether the result supports your prediction.
Reveal worked solution
Self-check rubric. Name the changed assumption, keep the other inputs fixed, show at least one intermediate calculation, and distinguish what the toy example guarantees from what would require a trained model or a real measurement.
WORKBENCH / PREDICT → TEST → EXPLAIN
Inspect exact numerical data
These are computed teaching fixtures. No remote AI model or GPU is called by the experiment.
CHECK YOUR UNDERSTANDING
Commit to an explanation.
Keep your learning record.
MODERN MODEL CASE STUDY
DeepSeek V4.1 Flash: where this idea goes next
Distinguish established algorithms from changes in data synthesis and environments. Follow the worked examples, then evaluate the reported gains and their limits.
Original worked examples and teaching text, grounded in these primary references. Numerical fixtures explain mechanisms; model quality and hardware performance require separate measurements. Both levels share key examples, with different explanations and checkpoints.