Follow preference labels into a reward model, calculate a regularized policy objective, and distinguish improved reward from improved behavior.
Preparation: probabilities, weighted averages and the instruction-tuning lesson.
Plan 25–40 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. Follow preference labels into a reward model, calculate a regularized policy objective, and distinguish improved reward from improved behavior. Preparation: probabilities, weighted averages and the instruction-tuning lesson. Move between Signal Room, Workbench and Field Notes without losing your section. Pause before each worked solution.
Sometimes people can choose the better of two answers more easily than write a perfect answer from scratch. Reinforcement learning from human feedback, or R L H F, can use those comparisons to influence a model’s behavior. A common language-model pipeline starts with supervised demonstrations, learns a reward model from comparisons, then updates a policy to seek higher predicted reward while controlling drift. The policy is the model’s distribution over responses. This is one important pipeline, not the definition of every possible use of human feedback. Preferences reflect the raters, instructions and situations that produced them.
Worked example. For a request to explain a rainbow, answer A is concise and accurate; answer B is fluent but invents a cause. A reviewer prefers A under an accuracy-and-clarity rubric. The comparison supplies a relative label for this pair, not a universal score for every possible answer.
The displayed notation records the process described in the example. Keep its assumptions and units attached to the result.
Try it yourself. Does preferring A over B tell us that A is flawless?
Pause the narration and explain your reasoning before continuing to the worked solution.
Reveal worked solution
No. Both answers may be flawed. A relative judgment says which was preferred under a particular rubric and context. An absolute quality check is still needed.
Section 02 / 07
Give the comparison a rubric and a record
A preference label is meaningful only with context. Save the prompt, both complete answers, the evaluation rubric and the decision process. One reviewer may reward concise writing while another rewards detail; disagreement can reveal a real tradeoff rather than careless annotation. Randomizing answer order helps expose position bias. Include cases where neither answer is acceptable, and decide how those cases are represented. A simple pairwise model usually expects a chosen and rejected answer, so discarding ties or forcing them into a winner can change the dataset.
Worked example. Our reward fixture assigns answer A reward one and answer B reward zero. The predicted probability that A is preferred is sigmoid of one, about 0.731. Adding ten to both rewards leaves the difference one and therefore leaves this probability unchanged.
P(A ≻ B) = sigmoid(r_A − r_B)
The displayed notation records the process described in the example. Keep its assumptions and units attached to the result.
Try it yourself. What happens to the pairwise probability if both reward scores increase by five?
Pause the narration and explain your reasoning before continuing to the worked solution.
Reveal worked solution
Nothing in this difference-based model. The common offset cancels. A reward value is not automatically a calibrated satisfaction score or a probability.
Section 03 / 07
Fit a reward signal without mistaking it for truth
A reward model predicts how comparisons tend to be labeled. It does not look directly into truth or human well-being. For a chosen answer, a common pairwise loss is the negative logarithm of its predicted preference probability. If the model gives that choice probability one half, the loss is about 0.693. Making the chosen answer’s reward larger relative to the rejected answer lowers this loss. This makes the training objective clear, but it also means biased or mistaken labels can be learned efficiently. Keep independent checks outside the reward model.
Worked example. At reward difference zero, the preferred-pair loss is 0.693. At difference one it is about 0.313. At difference minus one it is about 1.313. The same labels yield these scores regardless of whether a fact-checker would endorse the preferred answer.
L_RM = −log sigmoid(r_chosen − r_rejected)
The displayed notation records the process described in the example. Keep its assumptions and units attached to the result.
Try it yourself. Can lower reward-model training loss prove that answers became more truthful?
Pause the narration and explain your reasoning before continuing to the worked solution.
Reveal worked solution
No. It demonstrates better fit to those preference labels under that loss. Truthfulness needs appropriately designed, independent evaluation and reliable source checks.
Section 04 / 07
Balance reward with distance from a reference
Optimizing only the largest predicted reward can push a policy toward narrow or strange responses that exploit the predictor. A common objective subtracts a penalty for moving away from a fixed reference policy. Our experiment has exactly two possible responses. Set the policy’s probability of A, the reference probability of A, the reward advantage of A and a positive penalty coefficient. The expected reward is a probability-weighted average. The distance term is a full two-outcome Kullback–Leibler divergence. Both A and B must appear in that calculation.
Worked example. Let policy A probability be 0.8, reference A probability 0.5, reward difference one and beta one. Expected reward is 0.8. The full KL is about 0.193, giving an objective of about 0.607. The B term is negative, but the total KL is nonnegative.
J(p) = pΔr − β[p log(p/q)+(1−p)log((1−p)/(1−q))]
The displayed notation records the process described in the example. Keep its assumptions and units attached to the result.
Try it yourself. Why is using only the A contribution not the full KL divergence?
Pause the narration and explain your reasoning before continuing to the worked solution.
Reveal worked solution
The distribution includes B with probability 0.2 under the policy and 0.5 under the reference. Omitting its contribution changes the quantity and loses the full-distribution interpretation.
Section 05 / 07
Find the optimum in a tiny complete world
With only two possible answers and known rewards, we can solve our regularized objective exactly. This lets you see a target before worrying about a large model’s optimizer. If the reference gives each answer equal probability, reward A is one higher and beta is one, the best policy gives A about 0.731 probability. Raising beta pulls the solution closer to the reference; reducing beta lets reward differences dominate. This statement applies to our fixed reward scale and complete two-answer world. It does not promise a particular outcome in a neural training run.
Worked example. At reference one half and reward difference one, beta two gives sigmoid of 0.5, about 0.622. Beta one gives about 0.731. Beta one half gives sigmoid of two, about 0.881. Compare your chosen policy’s objective with the displayed optimum, not merely with its reward.
p* = sigmoid(logit(q) + Δr/β)
The displayed notation records the process described in the example. Keep its assumptions and units attached to the result.
Try it yourself. If both rewards are equal, what is the optimal policy when beta is positive?
Pause the narration and explain your reasoning before continuing to the worked solution.
Reveal worked solution
The reference policy. Equal rewards make expected reward constant across policies, so maximizing the objective means minimizing KL, which reaches zero at the reference.
Section 06 / 07
Why a policy update needs more machinery
A real language model has vastly more than two responses, so the training system cannot enumerate them all. It generates samples, scores them, estimates which actions were better than expected and updates probabilities. Proximal policy optimization, or P P O, uses a surrogate objective that discourages some excessively large changes from the policy that generated the samples. Its clipping rule is not a guarantee that every probability or the full policy distance stays inside a hard boundary. Our exact two-answer optimum illustrates the goal; it does not implement PPO or a value network.
Worked example. With positive advantage two, ratio 1.4 and clip width 0.2, the two surrogate terms are 2.8 and 2.4, so the minimum is 2.4. With negative advantage minus two and ratio 0.6, the terms are minus 1.2 and minus 1.6, so the minimum is minus 1.6.
L_clip = min(ρA, clip(ρ,1−ε,1+ε)A)
The displayed notation records the process described in the example. Keep its assumptions and units attached to the result.
Try it yourself. Does PPO clipping by itself guarantee that the new policy’s full KL distance is below 0.2?
Pause the narration and explain your reasoning before continuing to the worked solution.
Reveal worked solution
No. The clipping interval is part of a sampled surrogate objective, not a hard bound on full-distribution KL. Monitoring and other controls remain necessary.
Section 07 / 07
Audit the incentive, not only the score
A system can improve its reward score by learning superficial cues that the reward model likes. Long answers, confident wording or agreement with a user may correlate with approval without improving correctness. Test for these shortcuts directly. Compare answers at controlled lengths, verify claims and include prompts outside the training distribution. Keep reviewers independent of the optimization signal where possible. The industry benefit of feedback training is a practical route from human judgments to changed behavior; its limitation is that the chosen signal remains an imperfect proxy for the behavior people ultimately want.
Worked example. Suppose average predicted reward rises while blind reviewers find more unsupported claims. Treat that as a failed quality tradeoff, not a success hidden by picky reviewers. Investigate the examples, reward features and data coverage before continuing optimization.
The displayed notation records the process described in the example. Keep its assumptions and units attached to the result.
Try it yourself. Name two measurements you would retain alongside average predicted reward.
Pause the narration and explain your reasoning before continuing to the worked solution.
Reveal worked solution
Keep reference-policy divergence and an independent factual or task-success score. Also inspect blind preference judgments, length, uncertainty and subgroup failures. No single proxy settles all of these questions.
Final checkpoint. What does a higher learned reward establish by itself? Option 1: Guaranteed truth. Option 2: A higher score under that predictor. Option 3: Perfect human agreement.
Pause and choose an answer before continuing.
Reveal worked solution
Option 2 is correct. Independent task and factual checks remain necessary.
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.
LONGER REASONING LESSONS
Reason, verify and learn from attempts
Worked examples, local narration and connected experiments at your level.
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.