tezvyn:

Reward models in RLHF and PPO

AI-drafted, machine-checkedSource: interviewintermediate
WHAT IT TESTS

understanding of the reward model in RLHF.

OUTLINE

it learns from human preference comparisons to score responses, then supplies the reward signal that PPO maximizes while a KL penalty keeps the policy near the reference.

WHAT THIS TESTS The question checks whether you can separate the three models in RLHF and explain how subjective human preference is converted into an optimizable reward.

A GOOD ANSWER COVERS The reward model is a separate network, usually initialized from the same base LLM, with the language head replaced by a scalar output. It is trained on comparison data: for a given prompt, humans rank two or more candidate responses, and the model learns via a pairwise loss so the preferred response receives a higher score. In the PPO loop, the policy generates a completion, the reward model assigns a scalar reward, and PPO uses that reward to compute advantages and update the policy toward higher-scoring outputs. Critically, a KL-divergence penalty against the frozen reference model is added to the reward so the policy does not drift into degenerate text that games the reward model.

COMMON WRONG ANSWERS Saying humans score each PPO rollout in real time, confusing the reward model with the policy being trained, or omitting the KL penalty. Without the KL term, PPO exploits weaknesses in the reward model and produces incoherent or repetitive reward-hacking outputs.

LIKELY FOLLOW-UPS Expect questions on reward hacking, on why DPO removes the explicit reward model, on the Bradley-Terry preference loss, and on how reward-model overoptimization is detected.

ONE CONCRETE EXAMPLE Humans see two summaries of an article and pick the better one thousands of times. The reward model learns to predict that preference as a number. During PPO, the policy writes a new summary, the reward model rates it, and the policy nudges its weights to earn higher ratings, while the KL penalty keeps the summary fluent and on-topic rather than collapsing into reward-maximizing gibberish.

Read the original → en.wikipedia.org

Get five bites like this every day.

Tezvyn delivers a daily feed of 60-second tech bites with quizzes to lock in what you learn.