# Reward Models: Turning Human Preferences into a Score to Optimize

> A reward model scores a prompt-and-response pair with one number, trained on pairwise comparisons; RLHF, rejection sampling and best-of-n all use it. This page derives the Bradley–Terry loss, measures the accuracy ceiling set by label noise, and reproduces overoptimization in simulation.

- URL: https://dmxsf.com/en/wiki/post-training/reward-models/
- [DMXSF](https://dmxsf.com/en/about/)
- Intermediate
- Updated: 2026-11-23
- Tags: RLHF, Alignment, Reinforcement learning

## After this page you will be able to

- Write the Bradley–Terry loss, explain why a reward only means something as a difference between responses to the same prompt (shift invariance), and why sigmoid(−gap) gives mis-ranked comparisons the larger gradient.
- Explain how annotator agreement of a little over 70% caps a reward model's accuracy, and tell accuracy on noisy labels apart from accuracy on the true ranking.
- Tell regressional from extremal Goodhart effects: derive the closed form showing the gold reward rises monotonically with the proxy under additive noise, then read what the β term in R(d)=d(α−βd) stands for.
- Say how training-set size, ensembling (mean, minimum, mean minus variance) and random seeds move the point where overoptimization sets in, and why a single run proves nothing.
- Give a checklist for using a reward model: an independent evaluation, early stopping or a KL budget, monitoring shortcuts such as length, and re-labelling with fresh samples.

A reward model (RM) is a model that scores a prompt-and-response pair with one number. It is trained on **pairwise comparisons**: each example is two responses to the same prompt, an annotator says which is better, and the objective is to give the better one the higher score. That score is the reward PPO optimizes in RLHF, and the scorer shared by rejection sampling, best-of-n and data filtering. But it is only an approximation of human preference: disagreement between annotators caps its accuracy, and as soon as it becomes the target of optimization, the flaws in the approximation get amplified, so the proxy score keeps rising while true quality can first improve and then degrade.

The page on [preference optimization](https://dmxsf.com/en/wiki/post-training/preference-optimization/) covered the reward model briefly as step two of RLHF. This page opens that step up and takes on three questions: how it is trained (the Bradley–Terry loss), how accurate it can possibly be (the ceiling set by label noise), and what happens when you optimize against it (overoptimization). Each comes with simulation experiments you can change yourself, four in all. They are toy worlds built on a laptop CPU to demonstrate mechanisms from the papers, not measurements of real reward models; every number about real models comes from a paper cited on the page.

> [!NOTE] Experiment environment
> The four experiments run in one script, and the code blocks on this page, taken in order, make up the complete script. Environment: Apple M2 Max (64 GB), CPU only; Python 3.14.3, NumPy 2.4.2, PyTorch 2.10.0. All random numbers are seeded, with independent seeds for sampling, noise and shuffling, and a rerun gives bit-identical numbers; other environments may differ in a last digit. One full run takes about 25 seconds.

## Where it sits in the pipeline

A reward model has three uses in post-training, and each puts different demands on it.

| Use | How the score is used | What it demands of the RM |
| --- | --- | --- |
| RLHF (PPO) | The score (usually minus a KL penalty to the reference model) is the reinforcement learning reward | Stays trustworthy once the policy's output distribution has moved; a stable scale |
| Best-of-n and rejection sampling | Sample n responses and keep the highest-scoring one, either as the output or as data for supervised fine-tuning | Only the ranking has to be right; the scale does not matter |
| Data filtering and evaluation proxy | Score a large pool of candidate data and keep the high scorers, or rank models without human comparisons | Agrees with human judgment and copes with unseen data |

Llama 2's RLHF used the first two together: the early versions used only rejection-sampling fine-tuning, and from V4 on PPO was applied on top of the rejection-sampling checkpoint (Touvron et al., 2023, §3.2.3). Methods such as [DPO](https://dmxsf.com/en/blog/dpo-direct-preference-optimization/) have no separate reward model but have not escaped it: DPO writes the reward as the log-probability ratio between the policy and a reference model and optimizes the same Bradley–Terry loss. So what follows about the loss, noise and overoptimization applies to both routes. Rejection-sampling fine-tuning is also the simplest form of self-improvement, and whether it adds ability depends on the quality of the scorer; see [Synthetic data and self-improvement](https://dmxsf.com/en/wiki/frontier/synthetic-data-and-self-improvement/).

## Preference data: pairwise comparisons

One preference example consists of a prompt $x$, a chosen response $y_w$ (winner) and a rejected response $y_l$ (loser). How it is collected determines its shape and its noise:

- **InstructGPT** (Ouyang et al., 2022): labelers rank $K=4$ to $K=9$ responses to the same prompt, and one ranking yields $\binom{K}{2}$ comparisons.
- **Llama 2** (Touvron et al., 2023, §3.2.1): a binary choice only, because that maximizes prompt diversity; after choosing, annotators label how strongly they prefer the winner, on four levels: significantly better, better, slightly better, negligibly better or unsure. Counting open-source datasets, the reward models train on 2,919,326 comparisons, of which 1,418,091 are Meta's own helpfulness and safety data.

The first number to remember is agreement between annotators. In InstructGPT, training labelers agree with each other 72.6 ± 1.5% of the time and held-out labelers 77.3 ± 1.3%; in the summarization work of Stiennon et al. (2020), researchers agreed with each other 73 ± 4% of the time. Two carefully trained annotators looking at the same pair of responses choose the same one only a little over seven times in ten. A reward model learns from exactly these noisy labels.

## The Bradley–Terry model and its loss

Let a reward model $r_\theta(x,y)$ give a real-valued score to prompt $x$ and response $y$. The Bradley–Terry model (1952) assumes that the probability that response $a$ beats $b$ for the same prompt depends only on the difference of the two scores:

$$
P(a \succ b \mid x)=\sigma\big(r(x,a)-r(x,b)\big),\qquad \sigma(z)=\frac{1}{1+e^{-z}}
$$

Write $\Delta=r(x,a)-r(x,b)$; it is the **log odds** that $a$ wins: $\Delta=\ln\frac{P}{1-P}$. Maximum likelihood on preference data gives the reward model's loss:

$$
\mathcal{L}(\theta)=-\,\mathbb{E}_{(x,y_w,y_l)\sim\mathcal{D}}\Big[\log\sigma\big(r_\theta(x,y_w)-r_\theta(x,y_l)\big)\Big]
$$

Christiano et al. (2017) state explicitly that this form follows the Bradley–Terry model; Stiennon et al. (2020), InstructGPT and Llama 2 use the same loss. Treat $\Delta=r_\theta(x,y_w)-r_\theta(x,y_l)$ as the variable and differentiate:

$$
\frac{\partial \mathcal{L}}{\partial \Delta}=-\,\sigma(-\Delta)
$$

The gradient weight is $\sigma(-\Delta)$: a comparison that is already ranked correctly by a wide margin produces almost no gradient, while a mis-ranked one ($\Delta<0$) gets a weight approaching 1. The numbers in the table come from the script at the end of the page (see the exercise answers).

| Score gap Δ | P(preferred) σ(Δ) | Gradient weight σ(−Δ) |
| --- | --- | --- |
| 1.0 | 0.731 | 0.269 |
| 2.0 | 0.881 | 0.119 |
| 3.0 | 0.953 | 0.047 |

The widget below draws both: drag the score gap to see sigma(Delta) and the gradient weight, then set annotator agreement to a realistic level to see the fitted kappa and the prophet ceiling of the linear toy world.

Two properties of this loss are used again and again below.

**Shift invariance.** Add the same constant to every response to a prompt and $\Delta$, hence the loss, does not change; adding an arbitrary $c(x)$ per prompt $x$ changes nothing either. So a reward only means something between responses to the same prompt, and comparing absolute scores across prompts has no basis. Before RL, InstructGPT uses a bias to shift the labeler demonstrations to a mean score of 0; Gao et al. (2022) shift every reward model so that the initial policy's average reward is 0, which is what makes the models comparable. The figure on this page does the same: every curve is 0 at $n=1$.

**The scale is set by the data.** The loss constrains differences, not scale. A gap of $\ln 9\approx 2.197$ corresponds to a 90% win probability, but the score gaps of a trained reward model are not necessarily log odds; they can be read that way only after fitting a scaling factor on fresh comparisons (recalibration). Gao et al. and experiment 3 below do exactly this.

The Bradley–Terry model carries two more assumptions: each response has a single scalar "strength", so preferences are transitive; and all annotators share the same preference. Neither holds strictly in practice. In the limitations section, the InstructGPT authors write that most comparisons were labeled by one contractor, and that where annotators disagree, aligning to the average labeler preference may not be desirable. What a reward model learns is the preference averaged by that labeling process.

## How a reward model is trained

Two public recipes side by side show which practices are common ground and which are choices.

| | InstructGPT (Ouyang et al., 2022) | Llama 2 (Touvron et al., 2023) |
| --- | --- | --- |
| Initialization | The SFT model with the final unembedding layer removed and a scalar head | A pretrained chat model, with the next-token head replaced by a regression head |
| Number of models | One 6B reward model (175B training was unstable) | Two: helpfulness and safety |
| Loss | All $\binom{K}{2}$ comparisons from a prompt as one batch element | Binary ranking loss plus a margin by preference level |
| Epochs | One; more overfits | One; more overfits |

- **Initialize from the policy's own model.** Llama 2's reason: the reward model then "knows" what the chat model knows, which avoids an information mismatch between the two that could make the reward favor hallucinations.
- **Keep a prompt's comparisons in one batch.** Comparisons from one labeling task are highly correlated; shuffled together, a single pass already overfits. InstructGPT treats them as one batch element, which also saves compute: each response needs one forward pass rather than one per comparison.
- **Data matters more than epochs.** In a synthetic setup, Gao et al. (2022, §3.3) found that with the same number of training steps, four epochs instead of one changed the gold score not at all, while four times as much data (one epoch) was clearly better; below about 2,000 comparisons the loss barely moved off the random level.
- **Two reward models.** Llama 2 trains helpfulness and safety separately: Bai et al. (2022) found the two sometimes trade off, which makes it hard for one model to do both well.
- **Margins.** Llama 2 adds a margin $m(r)$ tied to the preference level to the loss, $\mathcal{L}=-\log\sigma\big(r_\theta(x,y_c)-r_\theta(x,y_r)-m(r)\big)$: 3, 2, 1, 0 for the large margin and 1, 2/3, 1/3, 0 for the small one (four levels, from significantly better to negligibly better). In the ablation (appendix A.3.3, Meta Helpful test set), average accuracy rises from 62.5% to 62.9% (large margin) and 63.0% (small margin); the "significantly better" level rises from 79.1% to 80.7% (large margin), while the "negligibly better" level goes from 54.5% to 54.3%, so no help there. The authors also note that the large margin hurts on samples with similar responses.
- **Update on the new distribution.** Once the policy improves, its output distribution moves, and an old reward model can degrade quickly. Before every tuning iteration Llama 2 collected fresh preference data with the latest model's samples to keep the reward model on-distribution.

## Experiment 1: the ceiling label noise puts on accuracy

Start in the simplest world, with one question: how accurate can a reward model be at best?

Build a linear world: each response has 16 features, and the true utility is a linear function of them, $r^*(x)=w\cdot x$ with $\lVert w\rVert=1$. Simulated annotators follow Bradley–Terry: for a pair of responses they choose $a$ with probability $p=\sigma(\kappa\,\Delta r^*)$. The scale $\kappa$ is set so that two independent annotators agree exactly 0.75 of the time (the same range as the 72.6% to 77.3% InstructGPT reports). Two quantities matter:

- **Agreement** $\mathbb{E}[p^2+(1-p)^2]$: the probability that two independent annotators pick the same response.
- **The oracle ceiling** $\mathbb{E}[\max(p,1-p)]$: the accuracy of an "oracle" that knows each pair's true $p$ and always picks the likelier one. No reward model can beat it on noisy labels.

The reward model has the linear form $r(x)=w\cdot x$, fit by Newton's method as a logistic regression without intercept on the difference vector $x_a-x_b$ (which is exactly the Bradley–Terry maximum likelihood). The number of training pairs runs from 100 to 30,000, each repeated 10 times with different training pairs, and on a fixed set of 20,000 test pairs we report three quantities: accuracy on noisy labels (`acc_noisy`), accuracy on the noise-free true ranking (`acc_true`), and ECE with 15 bins (expected calibration error, see [hallucination and calibration](https://dmxsf.com/en/wiki/safety/hallucination-and-calibration/)).

```python
import math

import numpy as np

D1 = 16  # features of a response in the linear world
w_true = np.random.default_rng(10).normal(size=D1)
w_true /= np.linalg.norm(w_true)  # true utility r*(x) = w_true . x

def sigmoid(z):
    return 1 / (1 + np.exp(-z))

def agree_stats(kappa, z):
    """z = true reward gaps of random pairs. A labeler prefers a over b with
    probability p = sigmoid(kappa * gap). Returns (agreement of two
    independent labelers, accuracy ceiling of an oracle that knows p)."""
    p = sigmoid(kappa * z)
    return (p**2 + (1 - p) ** 2).mean(), np.maximum(p, 1 - p).mean()

def find_kappa(target, z):
    lo, hi = 0.05, 20.0
    for _ in range(40):  # agreement grows with kappa: bisection
        mid = (lo + hi) / 2
        lo, hi = (mid, hi) if agree_stats(mid, z)[0] < target else (lo, mid)
    return lo

gaps = np.random.default_rng([10, 1]).normal(scale=math.sqrt(2), size=400_000)
KAPPA1 = find_kappa(0.75, gaps)
agree, ceiling = agree_stats(KAPPA1, gaps)
print(f"kappa = {KAPPA1:.3f}: two labelers agree {agree:.3f} of the time;")
print(f"an oracle that knows every p is right {ceiling:.3f} of the time")

def make_pairs(n, seed):
    xa = np.random.default_rng([seed, 0]).normal(size=(n, D1))
    xb = np.random.default_rng([seed, 1]).normal(size=(n, D1))
    p = sigmoid(KAPPA1 * (xa - xb) @ w_true)
    y = np.random.default_rng([seed, 2]).random(n) < p  # noisy label
    return xa - xb, y.astype(float)

def fit_bt(d, y, l2=1e-2):
    """Bradley-Terry with a linear reward: Newton steps on the logistic
    loss of the reward gap w . (x_a - x_b)."""
    w = np.zeros(d.shape[1])
    for _ in range(30):
        p = sigmoid(d @ w)
        grad = d.T @ (p - y) + l2 * w
        hess = (d * (p * (1 - p))[:, None]).T @ d + l2 * np.eye(len(w))
        w -= np.linalg.solve(hess, grad)
    return w

def ece(conf, correct, bins=15):
    edges = np.linspace(0.5, 1, bins + 1)
    idx = np.clip(np.digitize(conf, edges) - 1, 0, bins - 1)
    gap = lambda b: abs(correct[idx == b].mean() - conf[idx == b].mean())
    return sum((idx == b).mean() * gap(b)
               for b in range(bins) if (idx == b).any())

d_test, y_test = make_pairs(20_000, seed=999)
true_win = (d_test @ w_true > 0).astype(float)  # the clean ordering
print("pairs   acc_noisy         acc_true          ECE   (10 runs)")
for n in (100, 300, 1000, 3000, 10_000, 30_000):
    rows = []
    for k in range(10):
        w = fit_bt(*make_pairs(n, seed=100 + k))
        p = sigmoid(d_test @ w)
        pred = (p > 0.5).astype(float)
        conf = np.maximum(p, 1 - p)
        rows.append([(pred == y_test).mean(), (pred == true_win).mean(),
                     ece(conf, pred == y_test)])
    m, s = np.mean(rows, 0), np.std(rows, 0)
    print(f"{n:5d}   {m[0]:.3f} +/- {s[0]:.3f}   {m[1]:.3f} +/- {s[1]:.3f}"
          f"   {m[2]:.3f}")
```

```text
kappa = 1.893: two labelers agree 0.750 of the time;
an oracle that knows every p is right 0.820 of the time
pairs   acc_noisy         acc_true          ECE   (10 runs)
  100   0.775 +/- 0.018   0.862 +/- 0.029   0.084
  300   0.807 +/- 0.005   0.932 +/- 0.014   0.027
 1000   0.813 +/- 0.002   0.960 +/- 0.008   0.010
 3000   0.816 +/- 0.001   0.978 +/- 0.004   0.009
10000   0.817 +/- 0.001   0.987 +/- 0.002   0.009
30000   0.817 +/- 0.001   0.992 +/- 0.001   0.010
```

How to read it:

- **Accuracy on noisy labels tops out after 1,000 pairs**: 0.813 at 1,000 pairs and 0.817 at 30,000, approaching the oracle ceiling of 0.820; more data after that does not help.
- **Accuracy on the true ranking keeps rising**: 0.960 to 0.992. The reward model keeps getting closer to the true ranking; the label noise just hides that progress in `acc_noisy`.
- **ECE falls to about 0.01 with more data**: it is 0.084 at 100 pairs. Here the model form matches the data-generating process exactly, so with enough data $\sigma(\Delta)$ is calibrated as a "probability of being preferred"; real reward models come with no such guarantee.

This explains why real reward models are not very accurate. InstructGPT split labelers into 5 groups and ran cross-validation (3 seeds): its 6B reward models predict the preferences of labelers in the training groups with 72.4 ± 0.4% accuracy and those of the held-out group with 69.6 ± 0.9%; Llama 2's helpfulness reward model scores 62.8% to 80.0% on six preference test sets (two collected by Meta, four public), 70.6% on average (Touvron et al., 2023, table 7). Read these numbers next to the annotator agreement: a reward model that "only" reaches seventy percent may already be near the ceiling these labels can support. So do not judge a reward model by "accuracy under 80%", and do not expect to push it to 100% by piling on data. Evaluating the reward model itself takes cleaner comparison sets: RewardBench (Lambert et al., 2024) collects prompt-chosen-rejected trios with a verifiable reason for the preference, covering chat, hard chat, safety and reasoning; the reasoning category has code tasks (correct code against buggy code) and math tasks (a reference solution against an incorrect model solution).

The same ceiling logic applies to evaluation sets: when the reference answers contain errors, even a perfect model cannot score 100% and every gap is compressed; the derivation and the experiment are in [Building Evaluation Sets](https://dmxsf.com/en/wiki/evaluation/building-eval-sets/).

## Overoptimization: optimizing harder is not the same as better

Accuracy is measured on the distribution the reward model was trained on. But once it becomes the optimization target, the policy (or sampler) actively looks for responses it scores highly and pushes its outputs off the training distribution, where the scores are no longer reliable. Gao et al. (2022) introduce Goodhart's law as an adage: "When a measure becomes a target, it ceases to be a good measure." They define **overoptimization** as the effect where optimizing too much against such a learned static model eventually hinders the true objective.

To measure overoptimization in an experiment you must know the "true objective". Gao et al. built a synthetic setup: the 6B reward model from InstructGPT is the "gold" model; it labels pairs of responses (the higher gold score is preferred, deterministically), and those labels train proxy reward models from 3M to 3B parameters; best-of-n or reinforcement learning then optimizes the proxy while the gold score is recorded. Their main result is a functional form for the gold score as a function of $d=\sqrt{\mathrm{KL}}$:

$$
R_{\mathrm{bon}}(d)=d\,(\alpha_{\mathrm{bon}}-\beta_{\mathrm{bon}}\,d),\qquad R_{\mathrm{RL}}(d)=d\,(\alpha_{\mathrm{RL}}-\beta_{\mathrm{RL}}\log d)
$$

$\mathrm{KL}$ is the KL divergence from the initial policy to the optimized one, and the coefficients $\alpha,\beta$ depend on the proxy reward model's parameter count and training-set size. For best-of-n the KL has a closed form, $\mathrm{KL}_{\mathrm{bon}}=\ln n-\frac{n-1}{n}$ (Stiennon et al., 2020, appendix G.3); once $d$ is large, the $-\beta d^2$ term pulls the curve down, and the gold score first rises and then falls.

Where does that curve come from? Gao et al. borrow the taxonomy of Manheim and Garrabrant (2018) and split Goodhart effects into four kinds:

| Type | Mechanism | What it looks like in a reward model | This page |
| --- | --- | --- | --- |
| Regressional | Proxy = true + independent noise; part of the optimization effort goes into selecting noise | Label noise, model estimation error | Experiment 2 |
| Extremal | Optimization pushes samples off the training distribution, where proxy and truth part ways | Longer is better in the training distribution, so the model learns "longer is better", but past some length quality falls | Experiment 3 |
| Causal | A feature correlates with quality without causing it (a common cause), so selecting on it does not raise quality | Length correlates with informativeness through a common cause; picking longer answers is not more informative | No experiment |
| Adversarial | The policy actively manipulates the proxy | A stronger model finds holes in the reward model | No experiment |

Gao et al. expect the non-monotonicity they observe to come mainly from the extremal kind and interpret the $\beta$ term as it; the causal kind behaves like the regressional one in their experiments; their models are not strong enough to show the adversarial kind, and they warn that the laws may break down for stronger models.

### Experiment 2: regressional Goodhart under additive noise

The simplest kind comes from noise. Let the proxy $\hat{X}$ equal the true reward $X$ plus independent noise $Z$ (both normal, $\mathrm{Var}(X)=1$, $\mathrm{Var}(Z)=\sigma^2$). Run best-of-n on the proxy and part of the "luck" in what you select comes from noise. Equation (1) of Gao et al. (proved in their appendix A) states the exact result:

$$
\mathbb{E}[X\mid \hat{X}=\hat{x}]=\mathbb{E}[X]+\big(\hat{x}-\mathbb{E}[X]-\mathbb{E}[Z]\big)\,\frac{\mathrm{Var}(X)}{\mathrm{Var}(X)+\mathrm{Var}(Z)}
$$

The optimization "effort" is split between the true reward and the noise in proportion to their variances: for every unit the proxy rises, the gold reward rises only $1/(1+\sigma^2)$. The script below checks it. The candidate pool has $M=2^{18}$ samples, and best-of-n uses the unbiased estimator of Nakano et al. (2021, appendix I): sort the pool by proxy score from low to high; the sample of rank $i$ is the highest-scoring one among $n$ drawn without replacement with probability $\binom{i-1}{n-1}/\binom{M}{n}$, and weighting gold and proxy by it has far lower variance than repeated sampling; the KL uses the closed form above. To reduce noise from the candidate pool itself, each setting averages 8 independent pools.

```python
M = 2**18  # a pool of candidate responses; best-of-n draws n from it
LG = np.array([math.lgamma(k) for k in range(1, M + 2)])  # LG[k-1] = ln (k-1)!

def bon_weights(n):
    """w[i]: probability that the (i+1)-th lowest-scored of the M samples
    is the best-scored of n drawn without replacement."""
    w = np.zeros(M)
    i = np.arange(n, M + 1)  # only ranks i >= n can win
    log_c = LG[i - 1] - LG[n - 1] - LG[i - n]  # ln C(i-1, n-1)
    w[i - 1] = np.exp(log_c - (LG[M] - LG[n] - LG[M - n]))  # / C(M, n)
    assert abs(w.sum() - 1) < 1e-9
    return w

def bon_curve(score, values, ns):
    """Expected `values` of the sample with the highest `score` among n."""
    order = np.argsort(score)
    vals = [v[order] for v in values]
    return np.array([[bon_weights(n) @ v for v in vals] for n in ns])

def kl_bon(n):
    return math.log(n) - (n - 1) / n  # nats, exact for continuous scores

NS = (1, 4, 16, 64, 256, 1024, 4096, 16384)
POOLS = 8  # repeat with 8 independent pools to average out pool noise
print("sigma     n     KL  proxy  gold  eq.(1)  share")
for sigma in (0.5, 1.0, 2.0):
    cur = 0
    for k in range(POOLS):
        gold = np.random.default_rng([20, 2 * k]).normal(size=M)  # true X
        noise = np.random.default_rng([20, 2 * k + 1]).normal(size=M) * sigma
        proxy = gold + noise  # proxy = gold + independent noise Z
        cur = cur + bon_curve(proxy, [proxy, gold], NS) / POOLS
    for n in (16, 256, 16384):
        px, gd = cur[NS.index(n)]
        print(f"{sigma:5.1f} {n:5d} {kl_bon(n):6.2f} {px:6.2f} {gd:5.2f}"
              f" {px / (1 + sigma**2):7.2f} {1 - gd / px:7.2f}")
```

```text
sigma     n     KL  proxy  gold  eq.(1)  share
  0.5    16   1.84   1.98  1.58    1.58    0.20
  0.5   256   4.55   3.17  2.53    2.53    0.20
  0.5 16384   8.70   4.44  3.53    3.56    0.21
  1.0    16   1.84   2.50  1.25    1.25    0.50
  1.0   256   4.55   4.00  2.00    2.00    0.50
  1.0 16384   8.70   5.65  2.80    2.82    0.50
  2.0    16   1.84   3.95  0.79    0.79    0.80
  2.0   256   4.55   6.33  1.27    1.27    0.80
  2.0 16384   8.70   8.90  1.88    1.78    0.79
```

The `share` column is the share of optimization effort lost to noise, $1-\text{gold}/\text{proxy}$, and it matches $\sigma^2/(1+\sigma^2)$: 0.80 at $\sigma=2$ and 0.20 at $\sigma=0.5$. Equation (1)'s prediction and the measurement agree to two decimals at $n=16$ and $n=256$; at $n=16384$ there is a small deviation (at most 0.10, in the $\sigma=2$ row), and I did not check whether it comes from the finite candidate pool or something else.

More important is the shape: **the gold reward rises monotonically, only more slowly**. At $\sigma=2$, from $n=16$ to $n=16384$ the proxy goes from 3.95 to 8.90 and the gold reward from 0.79 to 1.88. This kind of noise alone never produces "up then down"; Gao et al. conclude that since non-monotonic behavior is actually observed, other Goodhart effects must be at work.

### Experiment 3: extremal Goodhart, a shortcut that fails only in the tail

To see "up then down", the proxy has to fail in the region the optimization pushes into. The world below is built that way. It is a toy constructed to demonstrate extremal Goodhart, not a measurement of real reward models; Gao et al. give response length as their example and write that in the InstructGPT setting they did observe optimized policies producing very long answers.

- Each response has 8 features: 7 "quality" features pass through a fixed random tanh network to give a smooth quality score (standardized to mean 0, standard deviation 1); the last is "length" (standard normal).
- True reward = quality score + a length term. The length term is a line of slope 1.5 up to 1.5 standard deviations (annotators like length), after which it falls with slope −4.0 (quality collapses).
- Annotators give noisy Bradley–Terry labels with agreement 0.75; the reward model is an 8→64→64→1 ReLU network trained with the Bradley–Terry loss and Adam (learning rate 0.003) full-batch for 400 steps, keeping the step with the lowest loss on fresh validation pairs; a scaling factor is then fit on fresh noisy comparisons to convert scores to log-odds (the recalibration of Gao et al.).
- Best-of-n runs on one pool of $2^{18}$ candidates, with the functions from experiment 2, comparing three reward models trained on 300, 3,000 and 30,000 pairs.

The parameters of this world (slope 1.5, cliff 1.5, falling slope 4.0) were tuned by me: I first tried a world with no length shortcut, where the true reward is just a random network, and then a weaker length shortcut (slope 0.5 to 0.7); the gold score only plateaued in both and never fell, so I strengthened the shortcut to the present values. Its job is to demonstrate the mechanism, not to prove that real reward models behave this way.

<details>
<summary>Show the full code: the simulated world and reward model training</summary>

```python
import torch
import torch.nn as nn

torch.set_num_threads(4)
D = 8  # 7 quality features and 1 "length" feature (the last column)
CLIFF, SLOPE, DROP = 1.5, 1.5, 4.0

def mlp(d_in, width, act, seed, scale):
    g = torch.Generator().manual_seed(seed)
    net = nn.Sequential(nn.Linear(d_in, width), act(),
                        nn.Linear(width, width), act(),
                        nn.Linear(width, 1))
    for m in net:
        if isinstance(m, nn.Linear):
            nn.init.normal_(m.weight, 0, scale / math.sqrt(m.in_features),
                            generator=g)
            nn.init.zeros_(m.bias)
    return net

teacher = mlp(D - 1, 64, nn.Tanh, seed=1, scale=1.5)
with torch.no_grad():
    probe = torch.tensor(np.random.default_rng([30, 0]).normal(
        size=(200_000, D - 1)), dtype=torch.float32)
    t_all = teacher(probe).squeeze(-1)
    t_mu, t_sd = t_all.mean().item(), t_all.std().item()

def gold_fn(x):
    """True reward: a smooth quality score plus a length term. Raters like
    length (slope 1.5) up to 1.5 sd, then quality collapses (slope -4.0)."""
    q, length = x[:, :-1], x[:, -1]
    h = SLOPE * length.clamp(max=CLIFF) - DROP * (length - CLIFF).clamp(min=0)
    return (teacher(q).squeeze(-1) - t_mu) / t_sd + h

def gold_np(x):
    with torch.no_grad():
        return gold_fn(torch.as_tensor(x, dtype=torch.float32)).numpy()

zs = [gold_np(np.random.default_rng([31, k]).normal(size=(100_000, D)))
      for k in (0, 1)]
KAPPA = find_kappa(0.75, (zs[0] - zs[1]).astype(np.float64))
print(f"kappa = {KAPPA:.3f}  agreement/ceiling =",
      " / ".join(f"{v:.3f}" for v in agree_stats(KAPPA, zs[0] - zs[1])))

def make_world_pairs(n, seed):
    xa = np.random.default_rng([seed, 0]).normal(size=(n, D))
    xb = np.random.default_rng([seed, 1]).normal(size=(n, D))
    p = sigmoid(KAPPA * (gold_np(xa) - gold_np(xb)))
    y = np.random.default_rng([seed, 2]).random(n) < p
    return xa, xb, y.astype(np.float32)

def train_rm(n_pairs, seed, epochs=400):
    """Train a ReLU MLP reward model with the Bradley-Terry loss and keep
    the epoch with the lowest loss on fresh validation pairs."""
    xa, xb, y = [torch.as_tensor(a, dtype=torch.float32)
                 for a in make_world_pairs(n_pairs, seed)]
    va, vb, vy = [torch.as_tensor(a, dtype=torch.float32)
                  for a in make_world_pairs(max(n_pairs // 10, 30), seed + 1)]
    net = mlp(D, 64, nn.ReLU, seed=seed + 1000, scale=1.0)
    opt = torch.optim.Adam(net.parameters(), lr=3e-3)
    bce = nn.functional.binary_cross_entropy_with_logits
    best, state = 1e9, None
    for _ in range(epochs):
        opt.zero_grad()
        bce(net(xa).squeeze(-1) - net(xb).squeeze(-1), y).backward()
        opt.step()
        with torch.no_grad():
            v = bce(net(va).squeeze(-1) - net(vb).squeeze(-1), vy).item()
        if v < best:
            best, state = v, {k: t.clone() for k, t in net.state_dict().items()}
    net.load_state_dict(state)
    return net

def score_np(net, x):
    with torch.no_grad():
        return net(torch.as_tensor(x, dtype=torch.float32)).squeeze(-1) \
            .numpy().astype(np.float64)

def to_logodds(net):
    """Scale of a reward model so that gap 1.0 means odds of e:1, fitted on
    fresh noisy comparisons (the recalibration step in Gao et al.)."""
    xa, xb, y = make_world_pairs(20_000, seed=777)
    gap = score_np(net, xa) - score_np(net, xb)

    def nll(c):
        p = np.clip(sigmoid(c * gap), 1e-9, 1 - 1e-9)
        return -(y * np.log(p) + (1 - y) * np.log(1 - p)).mean()

    return min(np.linspace(0.02, 3.0, 150), key=nll)

X = np.random.default_rng([3, 0]).normal(size=(M, D))  # candidate pool
GOLD = gold_np(X).astype(np.float64)
acc_test = make_world_pairs(20_000, seed=888)
```

</details>

```text
kappa = 1.123  agreement/ceiling = 0.750 / 0.820
```

Next, best-of-n for the three reward models, with the gold curve fit by $R(d)=d(\alpha-\beta d)$ (least squares on the 7 points with $n\ge 4$). The last block of output is the mean length of the winning sample: if the story is right, the model whose gold score turns should be selecting responses far beyond the cliff.

```python
def fit_form(d, r):
    """Least squares for R(d) = d (alpha - beta d), Gao et al. 2022."""
    A = np.stack([d, -(d**2)], 1)
    (alpha, beta), *_ = np.linalg.lstsq(A, r, rcond=None)
    ss_res = ((A @ [alpha, beta] - r) ** 2).sum()
    return alpha, beta, 1 - ss_res / ((r - r.mean()) ** 2).sum()

sizes = (300, 3000, 30_000)
curves, length = {}, {}
for n_pairs in sizes:
    net = train_rm(n_pairs, seed=5)
    xa, xb, _ = acc_test
    gap = score_np(net, xa) - score_np(net, xb)
    acc = ((gap > 0) == (gold_np(xa) > gold_np(xb))).mean()
    c = to_logodds(net)
    score = score_np(net, X)
    cur = bon_curve(score, [score, GOLD, X[:, -1]], NS)
    curves[n_pairs] = (c * (cur[:, 0] - cur[0, 0]),
                       KAPPA * (cur[:, 1] - cur[0, 1]))
    length[n_pairs] = cur[:, 2]
    print(f"N={n_pairs:6d}: agrees with the true order on {acc:.3f} of pairs")

print("      n    KL |   N=300        |   N=3,000      |   N=30,000")
print("                |  gold  proxy  |  gold  proxy   |  gold  proxy")
for i, n in enumerate(NS):
    cells = [f"{curves[s][1][i]:6.2f} {curves[s][0][i]:6.2f}" for s in sizes]
    print(f"{n:7d} {kl_bon(n):5.2f} | " + "  | ".join(cells))
print("rewards in log-odds units, shifted so that n = 1 is 0")

d = np.sqrt([kl_bon(n) for n in NS])[1:]
print("fit R(d) = d (alpha - beta d), d = sqrt(KL):")
for s in sizes:
    alpha, beta, r2 = fit_form(d, curves[s][1][1:])
    peak = (alpha / (2 * beta)) ** 2 if beta > 0 else float("inf")
    best = int(np.argmax(curves[s][1]))
    print(f"  N={s:6d}: alpha={alpha:5.2f} beta={beta:5.2f} R2={r2:.3f}"
          f"  fitted peak KL={peak:5.1f}  observed peak at n={NS[best]}")

print("Mean length of the winning sample (in sd; cliff at 1.5):")
print("      n   N=300  N=3,000  N=30,000")
for n in (16, 256, 16384):
    row = "".join(f"{length[s][NS.index(n)]:9.2f}" for s in sizes)
    print(f"{n:7d}{row}")
```

```text
N=   300: agrees with the true order on 0.850 of pairs
N=  3000: agrees with the true order on 0.887 of pairs
N= 30000: agrees with the true order on 0.941 of pairs
      n    KL |   N=300        |   N=3,000      |   N=30,000
                |  gold  proxy  |  gold  proxy   |  gold  proxy
      1  0.00 |   0.00   0.00  |   0.00   0.00  |   0.00   0.00
      4  0.64 |   1.56   1.24  |   1.72   1.48  |   1.85   1.73
     16  1.84 |   2.09   2.04  |   2.69   2.30  |   2.97   2.75
     64  3.17 |   1.69   2.61  |   3.25   2.88  |   3.70   3.45
    256  4.55 |   0.70   3.06  |   3.57   3.35  |   4.17   3.97
   1024  5.93 |  -0.47   3.46  |   3.73   3.77  |   4.46   4.39
   4096  7.32 |  -1.74   3.81  |   3.79   4.13  |   4.61   4.76
  16384  8.70 |  -3.49   4.11  |   3.79   4.39  |   4.62   5.08
rewards in log-odds units, shifted so that n = 1 is 0
fit R(d) = d (alpha - beta d), d = sqrt(KL):
  N=   300: alpha= 3.82 beta= 1.66 R2=0.987  fitted peak KL=  1.3  observed peak at n=16
  N=  3000: alpha= 2.59 beta= 0.44 R2=0.998  fitted peak KL=  8.7  observed peak at n=16384
  N= 30000: alpha= 2.76 beta= 0.40 R2=0.995  fitted peak KL= 12.2  observed peak at n=16384
Mean length of the winning sample (in sd; cliff at 1.5):
      n   N=300  N=3,000  N=30,000
     16     1.35     0.87     0.93
    256     2.19     1.18     1.16
  16384     3.21     1.51     1.34
```

The widget below makes these curves switchable: pick a reward model and drag n to watch the gold reward (N=300 turns after n=16), the proxy score (rising throughout) and the winning sample's length (past the 1.5 cliff); the dashed curves are the page's fits of R(d)=d(α−βd).

How to read it (the figure comes after experiment 4):

- **The proxy rises all the way; the gold reward need not.** For the model trained on 300 pairs, the proxy reward climbs to 4.11, while the gold reward peaks at 2.09 at $n=16$ and then falls all the way to −3.49 at $n=16384$, worse than not running best-of-n at all; the 3,000-pair model reaches 3.79 and flattens; the 30,000-pair model keeps rising to 4.62. The less data, the earlier the turn.
- **The cause is length.** At $n=16384$, the 300-pair model's winning response is on average 3.21 standard deviations long, far beyond the cliff (1.5); the 3,000-pair model's is 1.51, just at the cliff; the 30,000-pair model's is 1.34, still inside it. The model with little data has seen few comparisons beyond the cliff and extrapolated "longer is better"; best-of-n then goes looking in exactly the tail for the sample it scores highest.
- **$\beta$ shrinks with data.** The fits give $\beta$ of 1.66, 0.44 and 0.40, with $R^2$ above 0.98 for all three; the fitted peaks $(\alpha/2\beta)^2$ are at 1.3, 8.7 and 12.2 nats, and the last two lie beyond the largest KL here (8.70), so they are extrapolations. Gao et al. (§3.3) observe that more data gives better gold scores and less overoptimization, which points the same way (they also note that how $\alpha$ and $\beta$ change with data is less clean than with model size, where $\beta$ falls smoothly as the reward model grows). But a good fit of 7 points with 2 parameters does not show the functional form is right; Gao et al. proposed the form from data with $n\le 1000$ and then made an advance prediction with experiments up to $n=60{,}000$.
- **Accuracy does not show these differences.** The three models agree with the true ranking on 0.850, 0.887 and 0.941 of pairs, measured on random pairs of responses; the tail of best-of-n is a different distribution. 0.850 and 0.887 look close, yet by $n=16384$ one has fallen to −3.49 and the other flattened at 3.79.

### The noise floor first: 30 seeds, same recipe

Above, each size trained a single reward model (seed 5). That is not enough: first measure how much the result changes when only the seed changes. Below, the same recipe with 300 pairs, changing only the seed (different training pairs and initialization), trains 30 reward models and records each one's gold curve.

```python
rms = [train_rm(300, seed=100 + k) for k in range(30)]
conv = [to_logodds(net) for net in rms]
S = np.stack([c * score_np(net, X) for c, net in zip(conv, rms)])
single = np.array([bon_curve(s, [GOLD], NS)[:, 0] for s in S]) * KAPPA
single -= single[:, :1]  # log-odds, n = 1 is 0
print("30 reward models, each trained on its own 300 pairs (gold, log-odds)")
print("     n   mean    sd    min    max")
for n in (4, 16, 64, 1024, 16384):
    col = single[:, NS.index(n)]
    print(f"{n:6d} {col.mean():6.2f} {col.std():5.2f} "
          f"{col.min():6.2f} {col.max():6.2f}")
peaks = np.array(NS)[single.argmax(1)]
print("best n per model:", " ".join(f"{p}" for p in sorted(peaks)))
print(f"models whose gold at n=16384 is below the start: "
      f"{(single[:, -1] < 0).sum()} of 30")
```

```text
30 reward models, each trained on its own 300 pairs (gold, log-odds)
     n   mean    sd    min    max
     4   1.50  0.10   1.07   1.62
    16   2.13  0.19   1.61   2.44
    64   2.19  0.47   1.19   2.83
  1024   1.56  1.31  -1.55   3.29
 16384   0.50  2.26  -4.69   3.75
best n per model: 16 16 16 16 16 16 16 16 16 64 64 64 64 64 64 64 64 64 256 256 256 256 256 4096 4096 16384 16384 16384 16384 16384
models whose gold at n=16384 is below the start: 11 of 30
```

- The mean curve peaks at $n=64$ (2.19, against 2.13 at $n=16$) and falls after that; at $n=16384$ the mean is 0.50 with standard deviation 2.26, worst −4.69, best 3.75.
- The best $n$ of individual models is scattered between 16 and 16384; at $n=16384$, 11 of the 30 have a gold score below the starting point.
- So "the 300-pair model turns at $n=16$" in the previous table is the result of one seed, not a law of the 300-pair recipe. **Where overoptimization sets in differs from model to model**, so the curve of a single run says nothing when comparing two methods; the conclusions below are read from means and standard deviations over repeats.

### Experiment 4: ensembles and more data

Finally, the question engineers care about most: given the same labeling budget, how should it be spent? Compare five approaches, each repeated 6 times:

- **Single model (300 pairs)**: the baseline, the first 6 groups of the 30 models above.
- **Mean of 5**: five models, each trained on a different 300 pairs, scores averaged.
- **Min of 5**: the smallest of the five scores. This corresponds to worst-case optimization (WCO) of Coste et al. (2024).
- **Mean minus variance of 5**: the mean minus the variance of the five scores. This corresponds to their uncertainty-weighted optimization (UWO); their coefficient $\lambda=0.5$ performed best, and here $\lambda=1$ is used, untuned.
- **Single model (1,500 pairs)**: the same number of labels (5 × 300) used to train one model.

```python
def gold_curve(score):
    cur = bon_curve(score, [GOLD], NS)[:, 0] * KAPPA
    return cur - cur[0]

methods = {"single (N=300)": [], "mean of 5": [], "min of 5": [],
           "mean-var of 5": []}
for e in range(6):
    members = S[5 * e:5 * e + 5]
    methods["single (N=300)"].append(single[5 * e])
    methods["mean of 5"].append(gold_curve(members.mean(0)))
    methods["min of 5"].append(gold_curve(members.min(0)))
    methods["mean-var of 5"].append(
        gold_curve(members.mean(0) - members.var(0)))
big = [train_rm(1500, seed=200 + k) for k in range(6)]
methods["single (N=1500)"] = [
    gold_curve(to_logodds(net) * score_np(net, X)) for net in big]
cols = [NS.index(n) for n in (16, 64, 1024, 16384)]
print("method               n=16        n=64        n=1024      n=16384")
for name, runs in methods.items():
    a = np.array(runs)[:, cols]
    cells = "".join(f"  {m:5.2f}+/-{s:4.2f}" for m, s in
                    zip(a.mean(0), a.std(0)))
    print(f"{name:15s}{cells}")
print("mean +/- sd over 6 repeats (6 ensembles of 5 RMs, or 6 single RMs)")
```

```text
method               n=16        n=64        n=1024      n=16384
single (N=300)    2.17+/-0.23   2.19+/-0.65   1.37+/-1.78   0.26+/-2.91
mean of 5         2.33+/-0.13   2.42+/-0.38   1.67+/-1.16   0.68+/-2.00
min of 5          2.38+/-0.20   2.65+/-0.36   2.26+/-0.99   1.40+/-1.74
mean-var of 5     2.43+/-0.15   2.70+/-0.33   2.29+/-1.06   1.30+/-1.77
single (N=1500)   2.54+/-0.05   2.95+/-0.12   3.12+/-0.30   3.01+/-0.68
mean +/- sd over 6 repeats (6 ensembles of 5 RMs, or 6 single RMs)
```

*Figure: Best-of-n in the simulated world (data from the runs of experiments 3 and 4). Left: the gap between gold and proxy widens with n, and the less data, the earlier the gold reward turns. Right: mean and sd over 6 repeats; the error bars are long: the same recipe on a different batch of training pairs gives a different result.*

How to read it:

- **At every $n$ the order of the means is the same**: single 300-pair model < mean of 5 < min of 5, with mean minus variance on par with min, and the single 1,500-pair model highest. At $n=16384$ they are 0.26, 0.68, 1.40, 1.30 and 3.01.
- **But the differences among the first four approaches drown in noise.** Over 6 repeats, the standard deviation at $n=16384$ is 2.91 (single 300 pairs), 2.00 (mean), 1.74 (min) and 1.77 (mean minus variance), each larger than the gap between neighboring means, so the order among these four can be read as "same direction" but not as "which is better"; the difference between min and mean minus variance (1.40 against 1.30) cannot be resolved at all.
- **Conservative aggregation did not remove the decline.** At $n=16384$, min and mean minus variance are still below their $n=64$ values (1.40 against 2.65, 1.30 against 2.70). Coste et al. (2024) report that in their synthetic setup, WCO and UWO showed no overoptimization with best-of-n; the two setups differ a great deal (gold model, reward model size, source of the errors), so this toy cannot test that conclusion. They also point out that the mean is not conservative: if one member overestimates a response, the policy can still exploit it. An ensemble whose members share the same data and differ only in initialization was not tested here.
- **With the same labels, concentrating beats spreading, and is steadier.** The single 1,500-pair model has the highest mean at every $n$; at $n=16384$ its standard deviation is only 0.68, against 1.74 to 2.91 for the others. In this toy, more data not only lifts the mean but makes the result depend less on luck, which points the same way as the observation of Gao et al. that more data gives a better gold score and less overoptimization.

## Process rewards and other forms of reward

The reward model on this page gives one score to the whole response and is called an **outcome reward model** (ORM). Other forms:

| Form | Supervision signal | Strength | Watch out for |
| --- | --- | --- | --- |
| Process reward model (PRM) | Whether each reasoning step is correct | More precise feedback, shows which step is wrong, usable to prune during search | Step-level labels are expensive; Lightman et al. (2023) released PRM800K, 800,000 step-level human labels |
| Generative scoring and LLM-as-a-judge | A language model judges in words and a verdict is extracted | No separate scalar head to train, can explain its reasons | Position, length and self-preference biases, see [LLM-as-a-judge](https://dmxsf.com/en/wiki/evaluation/llm-as-judge/) |
| Verifiable reward | A program decides whether the answer is right (math, code) | No learned proxy, so nothing to "talk into" a wrong score | Only for tasks with objective answers, see [reasoning RL](https://dmxsf.com/en/wiki/post-training/reasoning-rl/) |
| Implicit reward (DPO) | The log-probability ratio between policy and reference model | No separate model or online sampling | Biases in the preference data (such as favoring length) are learned directly, see [preference optimization](https://dmxsf.com/en/wiki/post-training/preference-optimization/) |

Lightman et al. (2023) conclude that on the MATH dataset, process supervision trains much more reliable reward models than outcome supervision, and their PRM solves 78.2% of problems on a representative subset of the MATH test set ([paper walkthrough](https://dmxsf.com/en/blog/lets-verify-step-by-step/)). Switching to these forms changes where the score comes from, not the logic of overoptimization: as long as what is optimized is a learned, imperfect proxy, the three effects above remain; a verifiable reward is the only one that sidesteps them, at the price of being usable only where answers can be checked.

## Practical checklist

- **Split comparison data by prompt** into training and validation sets; comparisons from one prompt are highly correlated, and shuffling them leaks into the validation set.
- **About one epoch, with early stopping on a validation set**; when you report accuracy on noisy labels, report annotator agreement too, and read the two together.
- **Keep an evaluation independent of the reward model**: human judgments, a stronger reward model, or tasks with checkable answers; during training plot the proxy score and that evaluation against optimization strength (KL or $n$), and stop before the gold score turns.
- **Set an optimization budget**: cap $n$ or KL; early stopping is usually enough. In their setup, Gao et al. found that raising the KL penalty coefficient is equivalent to stopping earlier and does not change the frontier (they warn this may be sensitive to hyperparameters).
- **Monitor known shortcuts**: length, formatting, sycophancy. Use length-controlled evaluation and, if needed, subtract the effect of length from the reward.
- **When spending labeling budget, add data before adding an ensemble**: in this page's toy, the same labels concentrated in one model beat spreading them across an ensemble; on a real task, measure it yourself.
- **Periodically recollect comparisons on the current policy's samples** and update the reward model so it keeps up with the policy's distribution (Llama 2 did this before every tuning iteration; Gao et al. recommend an online setup with fresh human feedback).
- **Trust only numbers that were repeated**: across seeds, the best $n$ ranges from 16 to 16384 (the 30 models of experiment 3).

### Common misconceptions

| Misconception | What actually happens |
| --- | --- |
| "A reward model with only 70% accuracy is terrible" | Annotators themselves agree only a little over 70% of the time; compare with the oracle ceiling (experiment 1: 0.820 at agreement 0.75) |
| "Higher reward means a better response" | Roughly true inside the training distribution; once optimization pushes outputs off it, the proxy can rise while true quality falls (experiment 3) |
| "A larger KL penalty removes reward hacking" | In Gao et al.'s setup it only makes the gold score converge earlier, like early stopping; they warn this may be sensitive to hyperparameters |
| "Absolute reward scores can be compared across prompts" | The loss is shift invariant; only differences within one prompt mean anything |
| "An ensemble can replace data" | In this page's toy, the same labels concentrated in one model beat an ensemble of five (3.01 against 1.40) |

## Summary and exercises

1. A reward model is trained on pairwise comparisons with the loss $-\log\sigma(r_w-r_l)$; rewards are shift invariant, and only differences within a prompt mean anything.
2. Annotator agreement caps accuracy: at agreement 0.75, even an oracle that knows the true probabilities reaches only 0.820. More data only approaches it.
3. Under regressional noise the gold reward rises monotonically with the proxy, only more slowly; "up then down" comes from the extremal kind, where the proxy fails in the region optimization pushes into.
4. Where overoptimization sets in depends on training data and seed: with the same recipe the best $n$ of 30 models spreads from 16 to 16384; trust only repeated curves.
5. Conservative ensembles may soften the decline, and more, cleaner data helps more; in the end you need an evaluation independent of the reward model, and you stop before the turn.

### Quick check

**1. For one prompt, a reward model scores response A at 2.0 and response B at 0.0. Under the Bradley–Terry model, about how likely is A to be preferred over B?**

- [ ] 0.731
- [x] 0.881
- [ ] 0.953
- [ ] 2.0

> The probability is $\sigma(2.0-0.0)=0.881$ (see the output in the exercise answers). 0.731 corresponds to a gap of 1.0 and 0.953 to a gap of 3.0; 2.0 is the score gap, not a probability.

**2. Which statements about a reward model's scores are correct?**

- [x] Within one prompt, the difference between two responses' scores is meaningful (readable as log odds once calibrated)
- [x] Adding the same constant to every response to a prompt leaves the Bradley–Terry loss unchanged
- [ ] Absolute scores can be compared directly across prompts
- [ ] The scale of the scores is fixed by the model architecture and training cannot change it

> The loss constrains only differences, so it is shift invariant and the scale is unconstrained: the scale has to be calibrated with fresh comparisons (what Gao et al. and experiment 3 do). InstructGPT shifts the demonstrations to a mean of 0 before RL and Gao et al. shift every model so the initial policy's average reward is 0, both for this reason.

**3. In experiment 1 two annotators agree 0.75 of the time. What is the highest accuracy on noisy labels any reward model can reach?**

- [ ] 1.000
- [ ] 0.750
- [x] 0.820
- [ ] 0.992

> The oracle ceiling is $\mathbb{E}[\max(p,1-p)]=0.820$, which no reward model can exceed; 0.992 is the accuracy of the 30,000-pair model against the **noise-free true ranking**, a different thing from accuracy on noisy labels.

**4. Which statements about the results of experiment 3 are correct?**

- [x] For the model trained on 300 pairs the proxy reward rises all the way while the gold reward falls after $n=16$
- [x] For the model trained on 30,000 pairs the gold reward has not turned by $n=16384$
- [ ] This shows that "a reward model trained on 300 pairs always turns at $n=16$"
- [ ] The turn is caused by label noise, and the more noise, the earlier the turn

> In the 30-seed results the best $n$ of individual models is scattered from 16 to 16384, so the third statement fails. Under regressional noise the gold reward rises monotonically (experiment 2); the turn here is extremal: the model with little data extrapolated "longer is better" beyond the cliff, and at $n=16384$ the winning response is on average 3.21 standard deviations long.

**5. Which statements about experiment 4 are correct?**

- [x] At $n=16384$ the single model trained on 1,500 pairs (3.01) is above every ensemble
- [x] Min and mean minus variance (1.40, 1.30) are both above the mean (0.68) and above the single 300-pair model (0.26)
- [ ] Min (1.40) is better than mean minus variance (1.30) because it is more conservative
- [ ] The ensembles removed overoptimization

> The standard deviation over 6 repeats is between 1.74 and 2.91, far larger than the gap between 1.40 and 1.30, so the two cannot be told apart. The ensembles only softened the decline: at $n=16384$ they are still below their $n=64$ level.

### Exercises

1. **Compute.** (a) For a score gap of 3, what are the probability of being preferred and the gradient weight? (b) How many comparisons does ranking $K=6$ responses to one prompt give? And $K=9$?
2. **Change a parameter (experiment 1).** Change the agreement from 0.75 to 0.6 and to 0.9. What is the oracle ceiling in each case, and what does that mean for "how accurate must a reward model be"?
3. **Noise share (experiment 2).** What $\sigma$ makes noise eat half of the optimization effort? What share is lost at $\sigma=2$?
4. **Read the table (experiment 3).** How many nats of KL does $n=16384$ correspond to? The 300-pair model's winning response is 3.21 standard deviations long while the cliff is at 1.5; use these two numbers to explain why the gold score falls.
5. **Design.** You are about to launch an RLHF pipeline whose reward model is trained on 50,000 comparisons. Write a plan for monitoring overoptimization: which evaluation set to keep, which curves to plot, when to stop, and how often to update the reward model.

<details>
<summary>Reference answers</summary>

Continue from the earlier script (it uses `sigmoid`, `find_kappa` and so on):

```python
for gap in (1.0, 2.0, 3.0):
    print(f"gap {gap}: P(preferred) = {sigmoid(gap):.3f}, "
          f"gradient weight sigmoid(-gap) = {sigmoid(-gap):.3f}")
print(f"gap for 90%: ln 9 = {math.log(9):.3f}")
for k in (4, 6, 9):
    print(f"K={k}: {math.comb(k, 2)} comparisons from one ranking")
print(f"noise share, sigma=2: {4 / (1 + 4):.2f}; sigma=0.5: "
      f"{0.25 / 1.25:.2f}")
print(f"KL of best-of-n: n=16 {kl_bon(16):.2f}, n=1024 {kl_bon(1024):.2f},"
      f" n=16384 {kl_bon(16384):.2f} nats")
for target in (0.6, 0.9):
    k = find_kappa(target, gaps)
    print(f"agreement {target}: oracle ceiling "
          f"{agree_stats(k, gaps)[1]:.3f}")
```

```text
gap 1.0: P(preferred) = 0.731, gradient weight sigmoid(-gap) = 0.269
gap 2.0: P(preferred) = 0.881, gradient weight sigmoid(-gap) = 0.119
gap 3.0: P(preferred) = 0.953, gradient weight sigmoid(-gap) = 0.047
gap for 90%: ln 9 = 2.197
K=4: 6 comparisons from one ranking
K=6: 15 comparisons from one ranking
K=9: 36 comparisons from one ranking
noise share, sigma=2: 0.80; sigma=0.5: 0.20
KL of best-of-n: n=16 1.84, n=1024 5.93, n=16384 8.70 nats
agreement 0.6: oracle ceiling 0.689
agreement 0.9: oracle ceiling 0.930
```

**1.** (a) At a gap of 3, the probability is 0.953 and the gradient weight is 0.047: such a comparison is already ranked correctly and produces almost no gradient. (b) $K=6$ gives 15 comparisons and $K=9$ gives 36. The number of comparisons from one ranking grows with $K^2$, which is why InstructGPT puts all comparisons from a prompt into one batch element: each response then needs only one forward pass.

**2.** At agreement 0.6 the oracle ceiling is 0.689, and at agreement 0.9 it is 0.930. The ceiling is always above the agreement, because the oracle knows each pair's true probability. The noisier the labels, the lower the ceiling on accuracy against noisy labels: on data with agreement 0.6, even a perfect reward model reaches only 0.689, so low accuracy alone does not show the model is bad; on data with agreement 0.9, accuracy clearly below 0.930 does show room for improvement.

**3.** The share lost to noise is $\sigma^2/(1+\sigma^2)$, so $\sigma=1$ loses half (0.50 in the table); at $\sigma=2$ the share is 0.80.

**4.** $n=16384$ corresponds to 8.70 nats ($n=16$ is 1.84 and $n=1024$ is 5.93). The 300-pair model has seen few comparisons beyond the cliff and extrapolated "longer is better"; best-of-n picks the highest proxy score among 16384 candidates, and the winners are on average 3.21 standard deviations long, far beyond the cliff at 1.5, where the true reward falls with slope −4.0, so the proxy climbs to 4.11 while the gold score drops to −3.49.

**5.** A reference plan: keep an evaluation set annotated by labelers other than the training ones (human-checked comparisons or tasks with checkable answers), and add a second judge, an independently trained, larger or cleaner reward model; at fixed KL intervals, record the proxy score, the independent score, and statistics for known shortcuts such as length and formatting, and plot them against optimization strength; stop early when the independent score falls several checks in a row or the gap between proxy and independent score widens quickly, and take the stopping point as the KL budget; after each policy update, collect a fresh batch of comparisons on the new policy's samples, retrain or fine-tune the reward model, then continue; report means and standard deviations over several seeds.

</details>

## Further reading

Links below were checked in November 2026.

- Bradley, Terry, [Rank Analysis of Incomplete Block Designs: I. The Method of Paired Comparisons](https://doi.org/10.2307/2334029), Biometrika, 1952
- Christiano et al., [Deep Reinforcement Learning from Human Preferences](https://arxiv.org/abs/1706.03741), 2017
- Ziegler et al., [Fine-Tuning Language Models from Human Preferences](https://arxiv.org/abs/1909.08593), 2019
- Stiennon et al., [Learning to Summarize from Human Feedback](https://arxiv.org/abs/2009.01325), NeurIPS 2020 ([paper walkthrough](https://dmxsf.com/en/blog/learning-to-summarize-from-human-feedback/))
- Ouyang et al., [Training Language Models to Follow Instructions with Human Feedback](https://arxiv.org/abs/2203.02155), 2022 ([paper walkthrough](https://dmxsf.com/en/blog/instructgpt-rlhf/))
- Bai et al., [Training a Helpful and Harmless Assistant with Reinforcement Learning from Human Feedback](https://arxiv.org/abs/2204.05862), 2022
- Touvron et al., [Llama 2: Open Foundation and Fine-Tuned Chat Models](https://arxiv.org/abs/2307.09288), 2023 (§3.2 and appendix A.3.3)
- Gao, Schulman, Hilton, [Scaling Laws for Reward Model Overoptimization](https://arxiv.org/abs/2210.10760), 2022
- Manheim, Garrabrant, [Categorizing Variants of Goodhart’s Law](https://arxiv.org/abs/1803.04585), 2018
- Coste et al., [Reward Model Ensembles Help Mitigate Overoptimization](https://arxiv.org/abs/2310.02743), ICLR 2024
- Lightman et al., [Let’s Verify Step by Step](https://arxiv.org/abs/2305.20050), 2023 ([paper walkthrough](https://dmxsf.com/en/blog/lets-verify-step-by-step/))
- Lambert et al., [RewardBench: Evaluating Reward Models for Language Modeling](https://arxiv.org/abs/2403.13787), 2024
- Casper et al., [Open Problems and Fundamental Limitations of Reinforcement Learning from Human Feedback](https://arxiv.org/abs/2307.15217), 2023
- Skalse et al., [Defining and Characterizing Reward Hacking](https://arxiv.org/abs/2209.13085), 2022

## Companion code

[Reward models: pairwise scores and label noise](https://github.com/dmxsf/dmxsf/tree/main/labs/post-training/reward-models): Fit Bradley–Terry scores on a connected comparison graph and reproduce the agreement ceiling under independent label flips.

- Run it in the companion repository (add --quick for a fast pass): `uv run dmxsf run post-training/reward-models`
- [View the lab script](https://github.com/dmxsf/dmxsf/blob/main/labs/post-training/reward-models/run.py)
- [Lab write-up](https://github.com/dmxsf/dmxsf/blob/main/labs/post-training/reward-models/README.en.md)
- [`reward_models.py`](https://github.com/dmxsf/dmxsf/blob/main/src/dmxsf/post_training/reward_models.py)
- [Find this lab in the catalog](https://dmxsf.com/en/code/#reward-models)

## FAQ

### What is a reward model, and how does it relate to the implicit reward in DPO?

A reward model scores a prompt-and-response pair with one number. It is trained on pairwise comparisons, where one response to a prompt is marked better, with the loss −log σ(r_better − r_worse), the maximum likelihood of the Bradley–Terry model. RLHF trains it first and then uses its score as the reward for reinforcement learning. DPO has no separate reward model: it writes the reward as the log-probability ratio between the policy and a reference model (the implicit reward) and trains the same Bradley–Terry loss. Both routes therefore share the same conclusions about preference data, noise and overoptimization.

### How accurate should a reward model be, and why is it often only about 70%?

Read accuracy next to annotator agreement. InstructGPT reports 72.6 ± 1.5% agreement between training labelers; its reward models predict training labelers' preferences with 72.4 ± 0.4% accuracy and held-out labelers' preferences with 69.6 ± 0.9%. In experiment 1 of this page, when two annotators agree 0.75 of the time, even an oracle that knows each pair's true probability reaches only 0.820 on noisy labels, and more data never raises it. So evaluate reward models on cleaner comparison sets (for example RewardBench) and by their effect on downstream tasks.

### What is reward overoptimization, and how do you detect and limit it?

Overoptimization means that the harder you optimize against a reward model's score, the more the score (the proxy reward) keeps rising while true quality first improves and then degrades; it is Goodhart's law applied to reward models. Detecting it needs an evaluation independent of the reward model, such as human judgments, a stronger reward model or tasks with checkable answers, and curves of proxy and independent scores against optimization strength (KL or n). Mitigations include stopping before the peak, a KL budget, more and cleaner data, reward model ensembles with conservative aggregation (minimum, mean minus variance), and periodically collecting new comparisons on the current policy's samples. Experiments 3 and 4 of this page show some of these in simulation.

### Is best-of-n or PPO more prone to overoptimization?

Both overoptimize. In their synthetic setup, Gao et al. (2022) found that, measured by KL divergence, reinforcement learning is slower than best-of-n and needs far more KL to reach the same optimization and overoptimization, so KL is not a suitable yardstick for comparing how much two methods have optimized; with the proxy score as the yardstick the two methods' curves look much more alike. They also found that in their setting the KL penalty coefficient only changes when the gold score converges, which acts like early stopping and leaves the frontier between KL and gold score unchanged, while cautioning that this may be sensitive to hyperparameters.

### Why is a reward model usually trained for only one epoch?

Because it overfits easily. InstructGPT found that shuffling comparisons and making multiple passes made the reward model overfit, so it treats all C(K,2) comparisons from one prompt as a single batch element and trains for a single pass; Llama 2 also trains for one epoch and notes that longer training led to over-fitting. Comparisons are highly correlated (the same prompt, the same responses reused), which is one reason.
