CS PAPERS DEEP-READ · PAPER 14

InstructGPT: Training Models to Follow Instructions (RLHF)

Ouyang et al. · OpenAI · NeurIPS 2022

中文 →

What did this paper do?

In early 2022, a team at OpenAI (Ouyang et al.) introduced InstructGPT, using a method called RLHF (training with human feedback) to turn GPT-3 — which only knew how to "keep talking" — into an assistant that "does what you ask." The result is striking: a small model with just 1.3 billion parameters had its answers preferred by people over the original 175-billion-parameter GPT-3. A model 100× bigger lost to one that "listens better." ChatGPT, which arrived a few months later, uses the same recipe.

First, a puzzle

GPT-3 has read the whole internet and is stuffed with knowledge, yet it often "answers the wrong question": ask it to "explain the moon landing in one sentence" and it may spin out a plausible-sounding but off-topic paragraph; ask a serious question and it may confidently make things up, or blurt out something offensive. It isn't dumb — it simply wasn't ever "answering you." It was playing a "guess the next word" game. It learned "what usually comes next on the internet," not "what this person actually wants." Those two things are often not the same.

The idea

The old way to make models better was to feed them more text and have them imitate it. But "imitating internet text" can never teach a model to "answer a real person thoughtfully." The idea here: instead of more imitation, have people rate its answers, then have the model adjust toward "what people prefer." Like training a chef — memorizing recipes isn't enough; a diner has to taste and say "this is good, that's too salty" before the chef knows which way to tune. Handing the model that yardstick — human preference — is the first time it learns what a "good answer" even looks like.

How it works (three steps)

Step 1 · Ask people to demonstrate. First, a few dozen trained people write ideal answers by hand for a range of prompts, and the model imitates them — like an apprentice watching the master do it a few times.

Step 2 · Ask people to rank, and train a "judge." For the same prompt, let the model produce several answers, and have people rank them from best to worst. Use those rankings to train a dedicated "judge model" that learns human taste — so no human need be present later; it can score any answer on its own.

Step 3 · Let the model practice, judged by the judge. The model keeps trying new answers, the judge scores them in real time, and the model nudges itself toward "higher scores." To stop it from talking nonsense just to please the judge, it's kept on a "don't drift too far" leash — new answers may not stray too far from its old self.

1 · Demonstrate people write ideal answers 2 · Train judge people rank answers → taste 3 · Practice judge scores tune for score teaching the model human preference, step by step
Fig · The three RLHF steps: imitate human demonstrations, distill human rankings into a "judge," then let the model improve itself against the judge's scores.

What it brought

The model now actually "answers you": more willing to follow instructions, less prone to making things up, less likely to say something offensive, and better at declining what it shouldn't answer. More surprisingly, this path proved that "making a model more useful" doesn't require making it bigger — tune it to listen better, and a small model can beat a giant 100× its size. Nearly every chat AI you use today stands on this method.

One honest note: it is aligned to the taste of those few dozen labelers and researchers, not to "humanity's" values; the model still makes mistakes, can be worked around, and may even learn to "say what sounds nice" rather than what's true.

Remember one thing

GPT-3 only knew how to "guess the next word," not how to "answer you thoughtfully." InstructGPT's fix: have people demonstrate, have people rank answers to distill a "judge," then let the model improve itself against the judge's scores — teaching it human preference. So a 1.3B model became more popular than 175B GPT-3, and ChatGPT came from the same recipe.

Want the per-step losses, the KL constraint, and the numbers? → switch to the deep read