Concepts / Reward Models in RLHF

Reward Models in RLHF

Preference finetuning aims to get AI models to behave according to human preference, which the source calls an ambitious, if not impossible, goal.

  • Programming

The Same Skill Cuts Both Ways

A language model that can help people accomplish useful things can, with the same skill, help people accomplish harmful things. This two-sided quality is the starting point for preference finetuning. Capability alone does not decide what a model should do with it. Once a model is good at producing fluent, helpful text, the open question becomes which kinds of responses it should produce and which it should decline.

This article follows a path that many beginners find useful. We start with a belief that seems reasonable at first glance, test it against a concrete question, and see where it breaks down. Along the way you will meet RLHF, short for Reinforcement Learning from Human Feedback, which the source identifies as the earliest successful preference finetuning algorithm and one that remains popular today, and you will meet the reward model that is one of its two parts.

Before reading on, pause and ask yourself a question: if a model is trained on many examples of good conversations, will it know when it should refuse a request? Keep your answer in mind, because the next section tests it.

What Demonstration Data Teaches

Definition

Demonstration data is a collection of examples of the model doing a task well, such as conversations written the way a model should write them. Training on this data teaches the model how to hold a conversation.

The key point is what demonstration data does not do. It does not, by itself, teach the model which conversations it should hold. The skill and the judgment are different things, and demonstrations supply only the skill. A model shown many polished examples learns how polished conversations are built. Nothing in those examples, by itself, tells the model whether a particular kind of conversation is one it should take part in.

Exampleconversationwritten as a model shouldwrite itHuman preferencewhich conversations aregood to holdTeaches how toconversethe skillTeaches whichconversations to holdthe judgmentsupplieswould need to supply
What each kind of signal teaches the model: demonstrations supply the skill of conversing, while the preference goal concerns which conversations the model should hold.

The Tempting Belief About Human Agreement

A tempting assumption goes like this: people broadly agree on what is good, so if we collect enough good behavior and teach it to a model, the model will simply behave well. Under this view, human preference is a single target that can be copied into a machine. The belief sounds sensible, which is exactly why it is worth testing against a concrete question.

Worked example

Testing the belief against one question

A model has been trained only on demonstrations of good conversations. A user asks about a sensitive topic on which reasonable people disagree. Does training on good demonstrations settle what the model should say?

  1. 1
    Identify what the demonstrations contain

    They show examples of conversations written well. They show the skill of conversing, including tone, structure, and fluency.

  2. 2
    Ask what the demonstrations do not contain

    They do not state which conversations the model should hold. A sensitive topic is a case where the right response is a judgment, not just a skill.

  3. 3
    Consider the disagreement

    The source notes that people differ across backgrounds. Whatever the model says about a controversial issue, some users will be upset, so no single demonstration can satisfy everyone.

  4. 4
    Conclude

    The belief that good demonstrations are enough breaks down here. Demonstrations teach how to converse; they leave open what kind of conversation is right.

Result

The belief fails for this question because the demonstrations supply skill but not judgment, and the judgment is where people disagree.

The Ambitious Goal Behind Preference Finetuning

The stated goal of preference finetuning is to get AI models to behave according to human preference. The source calls this an ambitious, if not impossible, goal. The phrase matters: the goal is not presented as a solved engineering task but as something that is hard to achieve at all.

The reason the goal is so difficult is that it rests on two assumptions. The first is that universal human preference exists. The second is that it is possible to embed that preference into an AI system. Each assumption can be questioned, and the source's skepticism follows from questioning them.

Where Permissive and Censored Models Diverge

A natural reaction to controversy is to make the model cautious about every sensitive subject. The source points out that this has its own cost. Whatever a model says about a controversial issue, some users will be upset. But if the model is censored too much, it may become boring and drive users away. The source also observes that fear of inappropriate responses can stop companies from releasing their applications to users at all.

Answers nearlyeverythingtoo permissiveRefuses sensitivesubjectsover-censoredHarmful answers slipthroughthe costBecomes boring, usersleavethe costleads toleads to
Both extremes carry a cost. A permissive model risks harmful answers, while an over-censored model risks becoming boring and driving users away.

How RLHF Begins with a Reward Model

The preference goal is the reason preference finetuning exists; RLHF is the concrete method used to pursue it. The source says RLHF consists of two parts. This article covers only the first. The first part is to train a reward model that scores the foundation model's outputs. The passage stops before naming the second part, so it is not described here.

What the first part makes clear is the direction of information. The foundation model produces outputs, and the reward model assigns a score to each one. The reward model sits downstream of the foundation model's generation: it does not write the response, it evaluates one.

Foundation modelproduces outputsModel outputa candidate responseReward modelscores each outputScoreassigned to the outputSecond part of RLHFnot covered heregeneratesis passed toassignsfeeds
The foundation model produces an output, the reward model scores that output, and the score is the handoff to the second part of RLHF, which this article does not describe.

Mistakes Learners Make About Reward Models

  • Common mistake

    Assuming demonstration data settles what the model should do

    Why it fails

    Demonstrations teach how to hold a conversation. They do not teach which conversations the model should hold.

    Do this instead

    Treat demonstrations as supplying skill, and treat the choice of conversations as a separate question that needs its own signal.

  • Common mistake

    Believing human preference is a single, agreed-upon target

    Why it fails

    The source notes that disagreement across backgrounds makes the universal preference assumption hard to justify.

    Do this instead

    Recognize that the goal rests on assumptions that can be questioned, and that this is why the goal is called ambitious.

  • Common mistake

    Thinking that heavy censorship is the safe default

    Why it fails

    The source says over-censorship has its own cost: the model may become boring and drive users away, and fear of inappropriate responses can keep applications from reaching users at all.

    Do this instead

    Weigh harmful answers against excessive refusal rather than treating refusal as free.

  • Common mistake

    Describing the reward model as the thing that writes the response

    Why it fails

    The source describes the foundation model as producing the outputs and the reward model as scoring them.

    Do this instead

    Keep the direction in mind: generation comes first, scoring follows.

  • Common mistake

    Filling in the second part of RLHF from imagination

    Why it fails

    The source passage stops before naming the second part, so any details offered would not be grounded in it.

    Do this instead

    Say only what the source supports: RLHF has two parts, and the first trains a reward model to score outputs.

Practice: Tracing the Reasoning

What do you think happens?

A team trains a model only on demonstrations of good conversations. Will that training, by itself, tell the model which kinds of conversations it should hold?

  • Yes, because good examples define good behavior

  • No, because demonstrations teach the skill of conversing but not which conversations to hold

Reveal answer
Answer:

No, because demonstrations teach the skill of conversing but not which conversations to hold

The source states that demonstration data teaches a model how to have a conversation but not what kind of conversations it should have. The skill and the judgment are different things.

MEDIUM

A reviewer says that a model which refuses every sensitive question is the safest possible design. Using the source's account of the trade-off, explain what this reviewer is missing, and name one cost the source attaches to over-censorship.

Hints
  • Think about what the source says happens when a model is censored too much.
  • The source also mentions a consequence for companies, not only for users.
EASY

In your own words, trace the first part of RLHF from start to finish. Name what produces the output, what scores it, and what the reward model does not do.

Hints
  • Start with the foundation model.
  • Remember that the passage does not describe the second part.

Key Takeaways

  • Demonstration data teaches a model how to hold a conversation, but it does not by itself teach which conversations the model should hold.
  • The goal of preference finetuning, getting models to behave according to human preference, is called ambitious, if not impossible, because it assumes universal human preference exists and can be embedded into AI.
  • Both harmful answers and excessive censorship carry costs, so good behavior requires balancing them rather than refusing everything.
  • RLHF is the earliest successful preference finetuning algorithm; its first part trains a reward model that scores the foundation model's outputs.

More concepts starting with R