GO TO A SECTION

↑ ↓ to navigate · Enter to openExplore all sections →
FDEInterviews logo
arXiv preprint

Fine-Tuning Language Models from Human Preferences

The first RLHF recipe for language models: learn a reward model from human 4-way choices, then optimize GPT-2 with PPO under a KL penalty. Its summarizers learned to copy, which labelers rewarded.

Breakdown by FDE Interviews · 11 min read · Updated

About the original · 2019
AUTHORS
Ziegler, Stiennon, Wu, Brown, Radford, Amodei, Christiano, Irving
FROM
OpenAI
PUBLISHED
Sep 2019 · arXiv preprint
CITED BY
2,846Semantic Scholar · Nov 2026
IN THIS BREAKDOWN · 10 SECTIONS

You can read 26% of this breakdown.

01

The paper in one minute

This OpenAI paper brought reward learning from human preferences, previously shown on simulated tasks, to pretrained language models. It is the direct ancestor of the RLHF recipe used in InstructGPT and later assistants.

The method has two models. A reward model is a copy of GPT-2 (774M parameters) with a new output layer, trained on human choices: labelers see a context and four sampled continuations and pick the best, and the reward model learns to give the chosen one the highest score. A policy, also initialized from GPT-2, is trained with PPO to maximize the reward model's score minus beta times the KL divergence from the original model. The KL penalty keeps the policy writing fluent text the reward model can judge, and acts as an entropy bonus. Beta can be fixed or adjusted automatically to reach a target KL. Labels can be collected once from the original model (offline) or continually from the current policy (online), retraining the reward model as the policy drifts.

Four tasks were tested: continuing book excerpts with positive sentiment, continuing them with vivid physical description, and summarizing TL;DR Reddit posts and CNN/Daily Mail articles. The style tasks needed little data: with 5,000 comparisons, labelers preferred the tuned model's continuations to the original's 86% of the time, and to a model optimized against a sentiment classifier 77% of the time.

Summarization was harder. With 60,000 labels, the policies learned to copy whole sentences from the input while skipping irrelevant openings. Labelers preferred them to supervised baselines and even to human-written references, but not to the simple baseline of copying the first three sentences. The authors suspect labelers rewarded copying as a quick check of accuracy, and they warn that evaluating with the same labelers who supplied training labels shows the model fits those labelers, not that it does what we want.

THE IDEA, VISUALLY
THE RECIPE (FIGURE 1) context x 4 samples from the model labeler picks the best reward model r PPO on r - beta KL(pi, rho) beta tuned to a KL target online: label new samples 5,000 comparisons sufficed for style tasks (86% preferred to the original model). Summarizers trained on 60,000 learned to copy sentences, which labelers rewarded; copying the first three sentences still beat them. Authors agreed with hired labelers 38-46% on 4-way choices (25% by chance). WHY THE KL PENALTY (OUR TOY) -2 0 4 8 0 2 4 6 8 KL from the original model (nats) learned reward true reward The policy chases the shortcut the reward model over-values. True quality peaks below 1 nat of KL. A KL target is a judgment about how far to trust r. arXiv 1909.08593, OpenAI; toy rewards are ours
Left: the recipe. Humans pick the best of four continuations, a reward model learns from those choices, and the policy is trained with PPO on the reward minus beta times the KL divergence from the original model, with beta adjusted to hit a KL target. Right: our toy of why the KL term matters. The learned reward over-rewards a shortcut, such as copying the input, that the true reward likes a little but not a lot. As beta shrinks, the learned reward keeps rising from 0.7 to 7.6 while the true reward peaks near 0.17 at a KL below 1 nat and then falls below zero.
Research notes: the problem, approach and results
5,000

human 4-way comparisons enough for the style tasks; 86% preference over the original model (Section 1)

38% / 46%

authors' agreement with hired labelers on sentiment and TL;DR 4-way choices, against 25% by chance (Section 2.4)

60,000

comparisons for summarization, where the policy learned to copy (Section 1)

THE PROBLEM

Many language tasks are defined by human judgment, such as a good summary or a vivid continuation, and automatic metrics like ROUGE are poor proxies. Reward learning from human comparisons had worked in simulated games, but not on natural language with large pretrained models.

THE IDEA

Start from pretrained GPT-2, ask labelers to pick the best of four samples, train a reward model on those choices, and fine-tune the policy with PPO against the reward model minus a KL penalty that keeps it close to the original model. Collect labels offline, or online as the policy changes.

THE RESULT

For stylistic continuation, 5,000 comparisons sufficed: labelers preferred the tuned model to the original 86% of the time. Summarizers trained on 60,000 comparisons became smart copiers, lifting whole sentences while skipping preamble; labelers liked them more than human references, but not more than copying the first three sentences.

02

Why it matters to an FDE

A reward model learns your labelers, quirks included. The summarizers learned to copy because copying was what labelers could verify quickly. Any customer preference-tuning or model-judge project will learn the shortcuts of whoever labels. Write instructions that name the shortcuts you do not want, and sample outputs for them.

Measure label agreement before training. On 4-way choices, the authors agreed with each other about 60% of the time and with the hired labelers only 38% (sentiment) and 46% (TL;DR). Under a simple model of labeler behavior, the hired labelers applied the authors' notion of best on only a quarter to two fifths of items and effectively guessed on the rest. If the people defining quality and the people labeling disagree that much, fix instructions before collecting more data.

Keep the policy near the base model. The KL penalty is what stops optimization from drifting into text the reward model scores well but people would not want. Our toy shows true quality peaking at small KL and falling as the penalty weakens.

Compare with the trivial baseline. Copying the first three sentences beat the RL summarizers in human preference. For a customer's generation task, include the dumbest reasonable baseline in every evaluation.

Re-collect labels as the model changes. For summarization, online collection beat offline collection 71% of the time. When a tuned model's outputs move away from what the reward model was trained on, its judgments become unreliable.

THE FULL BREAKDOWN

Understand the mechanism. Try it on a real problem.

Unlock this breakdown and 290 more papers.

Premium opens every paper in full, plus every answer, concept, course and guide on the site. One payment for six months of access.

6 months · One payment · No auto-renewal

Get Premium · ₹2,000 / $25
  • ◇1 architecture diagram
  • </>1 runnable code experiment
  • ▦2 results tables
  • ?5 interview questions with answers
  1. 03Key takeaways

    The reward model, the KL objective, PPO, data budgets, results by task, labeler issues

    Free account
  2. 04How it works

    The reward model loss, the KL objective and controller, PPO, tasks, and online collection

    Premium
  3. 05The numbers that matter

    Data needs, preference results, labeler agreement, summarization, and the mock study

    Premium
  4. 06Try it yourself

    Solve the KL-penalized optimum, run the beta controller, and decode agreement rates

    Premium
  5. 07Where it breaks

    Labeler shortcuts, low agreement, same-labeler evaluation, small models, and a sign slip

    Premium
  6. 08Using it on a deployment

    Preference data collection, label agreement, KL limits, online refresh and trivial baselines

    Premium
  7. 09Interview angles

    Five questions this paper prepares you for, with answer hints

    Premium
Back to the paper library →