Concepts / Reward Models in Preference Finetuning

Reward Models in Preference Finetuning

Preference finetuning aims to align an AI model's responses with human preferences, which is an ambitious goal that assumes universal human preference exists and can be embedded into AI.

  • Programming

Why Preference Finetuning Exists

A foundation model trained on demonstration data can learn to hold a conversation, but demonstration data does not teach it which kinds of conversations it should have. A model that can help users accomplish great things can also help them accomplish terrible things. Preference finetuning is the family of methods meant to close this gap. Its purpose is to shape how a model responds so that its behavior matches what people prefer.

The hard part is that people do not always agree. Two requests make the point. If a user asks for an essay arguing that one race is inferior, or for instructions for hijacking a plane, most people agree immediately that the model should refuse. Many other requests are not that clear. Questions about abortion, gun control, the Israel-Palestine conflict, disciplining children, marijuana legality, universal basic income, or immigration split people along cultural, political, socioeconomic, gender, and religious lines. A response to any of these will upset some users, while a model that avoids them entirely may become boring and lose users. Keeping this balance is the core challenge that preference finetuning is meant to handle.

What do you think happens?

On a 10-point scale, one labeler gives a response a 5 and another labeler gives the same response a 7. Why would that happen?

  • One of the labelers made a clerical error

  • Each labeler applies their own sense of what a 5 or a 7 means

  • The response changed between the two ratings

Reveal answer
Answer:

Each labeler applies their own sense of what a 5 or a 7 means

The source uses exactly this illustration. Asking for an absolute number invites each person to calibrate the scale differently, so the disagreement is not a rare accident. This is the reason the rest of the pipeline is built around a different question.

How RLHF Connects Its Two Parts

RLHF, short for Reinforcement Learning from Human Feedback, is the earliest successful preference finetuning algorithm and is still popular today. It has two parts. The first part trains a reward model that scores the foundation model's outputs. The second part optimizes the foundation model so that it generates responses the reward model scores as highly as possible.

Foundation modelproduces outputsModel outputscandidate responsesReward modelassigns a scoreOptimization stepupdates the foundationmodelgeneratesscored byscores drivefuture outputs earn higher scores
What feeds into what, and in what order: the reward model is trained to score the foundation model's outputs, and the optimization step uses those scores to change the foundation model.

The diagram should be read as a loop. The foundation model produces outputs, the reward model assigns each output a score, and the optimization step uses those scores to change the foundation model so that future outputs earn higher scores. The two parts are not independent. The reward model defines what counts as a good response, and the optimization step is how the foundation model learns to produce those responses. If the reward model is poor, the optimization step faithfully pushes the model toward the wrong target.

Why Direct Scores Are Unreliable

A common first idea is to collect many responses to prompts, ask people to rate each one on a numeric scale, and train a model to predict those ratings. The resulting model would assign a number to any prompt and response pair. This idea sounds complete, and the reward model is meant to output exactly such a score. The trouble appears when you look closely at what labelers actually produce.

Asking a labeler to score each response independently is called pointwise evaluation. Each sample is judged alone, against no other response. The source's illustration uses a 10-point scale: for the same sample, one labeler might give a 5 and another a 7. The definitions in the source also note that scores vary across labelers and even within one labeler over time. Since each person is calibrating their own meaning of a number, absolute scores are a weak foundation for training.

Comparison Data as Winners and Losers

The alternative is to ask labelers a simpler question: given two responses, which one is better? For each prompt, multiple responses are generated, either by humans or by AI. Labelers compare them, and the result is called comparison data. Each record follows the format (prompt, winning_response, losing_response). The record stores the prompt, the response judged better, and the response judged worse.

python
Notes on the code
  • The prompt is the shared input both responses answered.
  • The winning response is the one a labeler judged better.
  • The losing response is the one judged worse. Its text is illustrative only.

Comparison data is easier to obtain because labelers do not have to agree on what a numeric value means. They only have to say which of two responses is better. The source also cautions that a labeler may still disagree with what was recorded, a point that returns when we discuss labeler disagreement later in this article.

Learning Scores From the Gap

Comparison data gives preferences, but the reward model must output concrete scores, so the question is how a model learns numbers from pairwise judgments. The source's answer is an objective function. A commonly used function represents the difference between the output scores for the winning and losing response, and training maximizes that difference. The idea is that a good reward model should give the winning response a clearly higher score than the losing one.

The source describes this objective as a log-sigmoid objective. For each training sample, the score gap between the winning and losing response is passed through the sigmoid and then the logarithm, and training seeks the parameters that minimize the expected loss across all samples. A larger gap between the winning score and the losing score makes the term larger, which is why the objective rewards separating the two scores in the correct direction.

Winning responsescore close to the losingoneWinning responseclearly higher scoreLosing responsescore close to the winningoneLosing responseclearly lower score
Starting from one prompt and two responses, training moves the winning response's score above the losing response's score.

The reward model takes a prompt and a response and produces a single number for how good the response is. The source calls this a scalar score. Its value is useful mainly in relation to other scores the model produces. Because training is built on differences between winners and losers, the scale is learned relative to the comparisons. It is not fixed by any human's private numeric meaning, which is exactly what made direct ratings unreliable.

RLHF Versus DPO

RLHF is not the only approach. DPO, which stands for Direct Preference Optimization, is a newer alternative that is gaining traction and reduces complexity. The source's example is Meta, which moved from RLHF for Llama 2 to DPO for Llama 3 in order to reduce complexity. The trade-off is that RLHF remains in use because it offers more flexibility to tweak the model, while DPO gives up some of that flexibility in exchange for skipping the separate reward model.

Reward modeltrainingseparate stagePolicy optimizationuses reward scoresReward modeltrainingremovedDirect optimizationuses preference datafeedsskipped in favor of
RLHF keeps a separate reward model stage before optimization. DPO removes that stage and optimizes directly from preference data.

Where Disagreement and Cost Enter

Comparison data is cheaper and more consistent than direct scores, but it still comes from people. The source reports around 73 percent inter-labeler agreement for OpenAI's labelers. In practical terms, if 10 people rank the same two responses, about 7 would give the same ranking and 3 would disagree. The label is therefore a strong majority signal, not a certainty, and the noise from the remaining disagreement flows into the reward model that learns from those labels.

Cost is the second constraint. The source reports that Scialom shared a cost of 3.50 dollars per comparison, while writing a response costs 25 dollars. LMSYS found that manually comparing two responses took on average three to five minutes, because the process requires fact-checking each response. These figures explain why comparison data is attractive, and also why the amount of it is limited in practice.

  • Labeler disagreement enters when people choose the winning and losing response, so the labels inherit their inconsistency.
  • Labeling cost enters when deciding how many comparisons can be collected, which limits the scale and quality of the data.
  • Both constraints reach the reward model through the training labels, so the score gaps it learns carry any noise present in the comparisons.

Tracing One Comparison Through Training

Worked example

Following one comparison record

A labeler sees one prompt and two responses, A and B, and prefers A. Trace how that single record moves through the reward model.

  1. 1
    Record the preference

    The record is (prompt, A, B) because A is the winning response and B is the losing response. The labeler never assigned numbers.

  2. 2
    Score both responses

    The reward model outputs one scalar score for the prompt and A, and one for the prompt and B. These numbers are only meaningful relative to each other.

  3. 3
    Compute the gap

    The gap is the winning score minus the losing score. A large positive gap is the target the objective rewards.

  4. 4
    Update the model

    Training adjusts parameters to minimize the expected loss across all records, which pushes the winning score above the losing one for records like this.

Result

The single preference became a relative score gap. No labeler ever had to agree on what a particular number meant.

MEDIUM

A teammate proposes collecting absolute 1-to-10 ratings from labelers instead of pairwise comparisons because numbers feel more precise. Explain why the comparison format is the stronger choice for training the reward model, referring to labeler agreement and the role of relative scores.

Hints
  • Think about what each labeler is calibrating when they pick a number.
  • Think about whether a reward model needs an absolute meaning for each number or only a gap between two.

Common Mistakes With Reward Models

  • Common mistake

    Treating the reward model's output as a fixed human rating

    Why it fails

    The scalar score is learned from differences between winning and losing responses, so its value matters mainly in relation to other scores the model produces.

    Do this instead

    Compare scores against each other rather than reading any single number as an absolute grade.

  • Common mistake

    Assuming labelers always agree because the labels are comparisons

    Why it fails

    The source reports around 73 percent inter-labeler agreement, so a substantial share of labelers disagree on the same pair.

    Do this instead

    Treat labels as a strong majority signal and remember that disagreement flows into the trained reward model.

  • Common mistake

    Thinking RLHF and DPO are interchangeable with no trade-off

    Why it fails

    RLHF keeps a separate reward model and offers more flexibility to tweak the model, while DPO reduces complexity by skipping that stage.

    Do this instead

    Choose based on whether simplicity or the ability to adjust the reward-driven stage matters more for the project.

  • Common mistake

    Believing the reward model must be at least as powerful as the model it scores

    Why it fails

    The source reports a different view: a weak model can judge a stronger model, because judging is believed to be easier than generating.

    Do this instead

    Treat the reward model's capability as a separate question. The source defers the full discussion to the chapter on evaluation.

  • Common mistake

    Believing that preference finetuning is simple because the methods are popular; the complexity of the methods reflects the difficulty of the goal

Choosing a Starting Point for the Reward Model

The reward model can be trained from scratch, or it can be finetuned on top of another model such as a pre-trained model or an SFT model. The source states that finetuning on top of the strongest foundation model seems to give the best performance. The practical lesson is that the starting point matters: a stronger base gives the training process a better foundation to adjust.

Key Takeaways

  • Preference finetuning aims to align a model's responses with human preferences, a goal that assumes a universal human preference exists and can be embedded into AI, which is why its methods are complicated.
  • RLHF has two connected parts: a reward model scores the foundation model's outputs, and an optimization step changes the foundation model to earn higher scores.
  • Asking labelers for absolute numeric scores is unreliable, so training uses comparison data in the form (prompt, winning_response, losing_response), which a log-sigmoid objective turns into relative scores by widening the gap between winners and losers.
  • DPO skips the separate reward model to reduce complexity, giving up some of the flexibility that RLHF offers, and labeler disagreement and labeling cost constrain the quality and scale of the data for either method.

Related concepts

More concepts starting with R