When a Predictive Feature Becomes a Policy: A Causal Failure Mode in RLHF

12 minute read

Published:

Four well-known RLHF failures

Longer, more agreeable, more formatted, more confident

LengthRLHF answers keep getting longer. Singhal et al. (2023) found that much of RLHF's measured improvement came from length, and that optimizing for length alone recovered most of it.
SycophancySharma et al. (2023) found that humans and preference models sometimes prefer a convincing answer that agrees with the user over a correct one. RLHF models then cave when a user pushes back.
FormattingHeaders, bullets and bold text win votes. Chatbot Arena added "style control" in 2024 because length and markdown were swaying rankings, and rankings moved once they were adjusted for.
ConfidenceOpenAI's GPT-4 technical report showed that the post-trained model was noticeably less calibrated than the pretrained one. Sounding sure was rewarded more reliably than being right.

Each feature rode along with quality in the preference data:

What the data showedWhat usually caused itWhat RL produced
longer answers wonthey covered more of what the question neededlength without coverage
agreeing with the user wonthe user was right in those examplesagreement when the user is wrong
formatted answers wonorganized answers came from effortful writersstructure without substance
confident answers wonthe writer actually knewconfidence without knowledge

The reward model learned the ride-along feature. RL then manufactured the feature without the quality behind it. This post is about that mechanism, and about why a more accurate reward model doesn't fix it.

TL;DR. A reward model is trained to predict: "what shows up in high-reward answers?" RL uses it to intervene: "what should I produce more of?" If a hidden context drives both a feature and the reward, the feature predicts reward without causing it. RL then manufactures the feature and spreads it to places where it hurts. The fix is controlled counterfactual data, not a better predictor.

1. Two different questions

Reward model training asks\(P(Y \mid H)\): among responses that have feature \(H\), is reward higher?
Policy optimization asks\(P(Y \mid do(H))\): if I set \(H\), does reward go up?

The two answers match only when nothing else drives both \(H\) and \(Y\).

2. Running example: "Breaking:" framing

Let \(H=1\) mean breaking-news style framing. In the preference data, framed answers win more often:

$$\mathbb{E}[Y \mid H=1] \;>\; \mathbb{E}[Y \mid H=0].$$

But framing was mostly used for news that really was fresh and important. RL learns that writing "Breaking:" raises reward and starts using it on ordinary updates, where it makes answers worse.

3. The hidden context \(X\)

\(X\) is everything that makes an event worth framing: freshness, importance, source quality, user relevance, novelty, topic. \(X\) drives both the framing and the reward.

Observe: P(Y | H) X H Y true effect (may be ≤ 0) backdoor H ← X → Y carries association Intervene: P(Y | do(H)) X H Y ✕ setting H cuts X → H; only H → Y remains

Figure 1. The reward model sees the left picture. The policy acts in the right picture.

4. The causal quantity

Use potential outcomes: \(Y(1)\) is the reward with framing, \(Y(0)\) without. The effect we care about is per context:

$$\tau(x) \;=\; \mathbb{E}\big[\,Y(1) - Y(0) \mid X = x\,\big].$$

\(\tau(x)\) can be positive for urgent events and negative for routine ones. The observational gap \(\mathbb{E}[Y\mid H{=}1]-\mathbb{E}[Y\mid H{=}0]\) mixes this effect with the difference in \(X\) between the two groups.

5. When conditioning on \(X\) works

Two assumptions make \(\tau(x)\) identifiable from observational data.

Conditional exchangeability
$$Y(h) \perp\!\!\!\perp H \mid X$$
Within a fixed \(X\), who got framed is as good as a coin flip. This fails if framing was chosen using quality signals that \(X\) does not capture. Then \(H=1\) leaks information about quality.
Overlap (positivity)
$$0 < P(H{=}1 \mid X{=}x) < 1$$
Every context must have both framed and unframed examples. Otherwise there is nothing to compare.

With both assumptions and consistency (\(Y = Y(H)\)), the conditional mean is causal:

$$\begin{aligned}\mathbb{E}[Y \mid X{=}x, H{=}h] &= \mathbb{E}[Y(h) \mid X{=}x, H{=}h] && \text{(consistency)}\\ &= \mathbb{E}[Y(h) \mid X{=}x] && \text{(exchangeability)}\end{aligned}$$

So the point of \(X\) is not "more features". \(X\) must explain the selection mechanism, meaning why some responses got the feature and others did not.

6. Overlap is not enough: balance

Overlap is yes/no. Balance, how close \(p(x\mid H{=}1)\) and \(p(x\mid H{=}0)\) are, decides how much data each comparison really has. With a propensity of 0.01 in one region and 0.99 in another, overlap technically holds, but each region has almost no counterexamples.

overlap region H = 0 (routine) H = 1 (framed) no framed examples: RM extrapolates τ(x) Φ(X) — representation of context no unframed examples

Figure 2. Overlap depends on the representation \(\Phi(X)\). The reward model has to guess the effect of framing in the left tail, and RL pushes the policy into exactly that region.

One fix from causal inference (Johansson, Shalit & Sontag, 2016) is to learn \(\Phi(X)\) with two objectives, outcome prediction plus a term that keeps the treated and control groups close in \(\Phi\)-space:

$$\begin{aligned}\min_{\Phi,\,f}\;\; &\underbrace{\mathbb{E}\,\ell\big(f(\Phi(X),H),\,Y\big)}_{\text{predict reward}}\\ +\;&\alpha\,\underbrace{\mathrm{IPM}\big(p_{\Phi}(\cdot\mid H{=}1),\,p_{\Phi}(\cdot\mid H{=}0)\big)}_{\text{balance treated vs. control}}\end{aligned}$$

A standard reward model has only the first term. Trained on outcome alone, it can make the two groups more separable rather than more comparable. The post proposes the direction but does not choose \(\alpha\) or the distance (MMD, Wasserstein).

7. Why RL amplifies it

Supervised prediction only has to be right on the data distribution. RL searches actively and moves the policy toward wherever the reward model is high, including regions with no support.

confoundedpattern in data rewardshortcut policy sets H(intervention) distributionshift amplification inunsupported contexts

Figure 3. Reward training estimates \(P(Y\mid H)\). Policy optimization behaves as if it had estimated \(P(Y\mid do(H))\).

This is an identifiability problem, not an accuracy problem. A reward model can predict held-out preferences well and still say nothing about whether raising \(H\) improves quality. It is being used as an intervention oracle. The post treats this as one specific failure mode, not an explanation of all reward hacking.

8. Toy simulation

A small check (not from the post), \(n = 200{,}000\). All three estimates use the same data. They differ only in which two groups get subtracted.

Setup

# X = 1: important / fresh event
X   ~ Bernoulli(0.3)
# framing is chosen mostly for important events
H   ~ Bernoulli(0.9 if X == 1 else 0.05)
# true effect of framing
tau = +0.5 if X == 1 else -0.5
# X alone is worth 2 points
Y   = 2*X + tau*H + Normal(0, 1)

\(X\) enters twice: it sets the chance of \(H\), and it adds 2 points to \(Y\) directly. That is the confounding.

Ground truth. The average effect averages \(\tau(x)\) over the population of contexts:

$$\text{ATE} = \sum_x P(X{=}x)\,\tau(x) = 0.3\times(+0.5) + 0.7\times(-0.5) = -0.20.$$

Framing helps important news, hurts routine news, and routine news is the majority, so framing everything hurts on average.

① Naive gap: +2.08

# ignore X entirely
naive = mean(Y[H == 1]) - mean(Y[H == 0])

Essence. It compares two groups that differ in \(H\) and in \(X\). It is what a reward model that only sees \(H\) learns. Expanding it with the true numbers shows where +2.08 comes from:

# framed group is mostly important news
P(X=1 | H=1) = 0.27 / 0.305 ≈ 0.885
P(X=1 | H=0) = 0.03 / 0.695 ≈ 0.043

E[Y | H=1] ≈ 2×0.885 + (0.885×0.5 + 0.115×(−0.5)) ≈ 2.16
E[Y | H=0] ≈ 2×0.043                               ≈ 0.09

naive ≈ 2×(0.885 − 0.043) + 0.39 ≈ 2.07
        = confounding bias 1.68
        + ATT 0.39 (effect on the framed units)

Most of the gap is the 2 points that \(X\) gives, not framing. Even the remaining 0.39 has the wrong sign relative to the ATE, because the framed units are mostly important news.

② Stratified on \(X\): −0.49, +0.50

for x in {0, 1}:
    treated = Y[X == x and H == 1]
    control = Y[X == x and H == 0]
    tau_hat[x] = mean(treated) - mean(control)
# ≈ 0.7×(−0.49) + 0.3×(0.50) ≈ −0.19
ATE_hat = sum_x P(X = x) * tau_hat[x]

Essence. Compare only within the same context. Inside a stratum \(2X\) is the same for both groups and cancels:

X=0:  (0 − 0.5) − 0  = −0.5
X=1:  (2 + 0.5) − 2  = +0.5

This works because the simulation satisfies both assumptions from §5. Exchangeability: \(H\) depends only on \(X\) plus a coin flip. Overlap: 5% of routine news is framed, about 7,000 rows out of 140,000. If something that drives both \(H\) and \(Y\) were missing from \(X\), this estimate would be biased and nothing in the data would show it.

③ Randomized framing (paired data): −0.50, +0.51

# coin flip, independent of X and everything else
H_r = Bernoulli(0.5)
# real system: collect new labels on edited responses
# simulation:  2*X + tau*H_r + Normal(0, 1)
Y_r = label(H_r)
for x in {0, 1}:
    treated = Y_r[X == x and H_r == 1]
    control = Y_r[X == x and H_r == 0]
    tau_hat[x] = mean(treated) - mean(control)
What the experiment really does. ③ is an RCT. An experiment turns \(P(Y\mid do(H))\) from something we infer into something we run.
  • It performs the do-operator for real. We set \(H\) ourselves, so the edge \(X \to H\) in Figure 1 no longer exists. The backdoor path is not adjusted for; it is gone.
  • The selection mechanism becomes known. In ② we had to assume that \(X\) explains why some answers got framed. In ③ we wrote that mechanism: a coin. A coin cannot depend on anything we failed to measure, so exchangeability holds by construction, even without stratifying (the unstratified gap has expected value −0.20).
  • Overlap is also designed in. With \(P(H{=}1\mid X)=0.5\) everywhere, every context has both arms. We can also aim the experiment at the contexts RL will push into, which observational data rarely covers.
  • Paired data goes one step further. Two versions of the same content give both \(Y(1)\) and \(Y(0)\) for one unit, which an ordinary RCT never sees.
The cost is new data. The simulation can regenerate \(Y_r\) because it knows the formula. A real system needs fresh labels on edited responses. In RLHF this is cheap compared with most RCTs, since \(H\) is an editable property of text and \(Y\) is a preference label. What it cannot fix: the edit must change only \(H\), and the experiment measures the effect on preference, which is only as good as the labels.

Summary

EstimateComparesValueTruth
① Naiveframed vs. unframed, any context+2.08ATE −0.20
② Stratifiedframed vs. unframed, same \(X\)−0.49, +0.50−0.5, +0.5
③ Randomizedcoin-assigned framing, same \(X\)−0.50, +0.51−0.5, +0.5

What the policy sees

# RM that sees only H: r(0) = 0.09, r(1) = 2.16
r(h) = mean(Y[H == h])

data policy:
  predicted = mean(r(H))           = 0.72
  true      = mean(Y)              = 0.72
always frame:
  predicted = r(1)                 = 2.16
  true      = mean(2*X + tau)
            = 0.3×2.5 + 0.7×(−0.5) = 0.40
PolicyRM-predicted rewardTrue reward
Data policy (frame 30.5% of answers)0.720.72
Always frame2.16 (+1.44)0.40 (−0.32)

The reward model is exactly the naive estimate ①. It is perfectly calibrated on the data policy and still wrong about the direction of the intervention.

9. The fix: counterfactual feedback data

Build pairs that differ only in the feature, randomize which version is shown, and collect preferences:

A"Breaking: Company X has announced …"
B"Company X has announced …"

Randomization makes exchangeability true by design, so the preference gap estimates \(\tau(x)\) directly. The same recipe covers other suspect features: confidence, verbosity, formatting, sycophancy, citation count, tone and tool use.

Diagnostic question. If I intervened on this feature while holding the relevant context fixed, would preference actually improve? If the data cannot answer that, optimizing the feature hard is unsafe.

10. Takeaway

A reward model's meaning changes between training and use. In training it is a predictor. Inside RL it is used as a model of interventions. Safe optimization needs reasoning about confounding, conditional randomization, overlap, counterfactual support and distribution shift.

Open question from the post: when is a reward-predictive feature safe to optimize as a policy feature? Related reading: Manheim & Garrabrant (2018) on causal and extremal Goodhart; Gao, Schulman & Hilton (2022) on reward model overoptimization; Singhal et al. (2023) on length correlations in RLHF; Wang et al. (2025) on causal rewards.