Reward Models · Chapter 12
The conditional reward model: good for whom?
1. One notion of good?
A standard reward model assumes one universal ordering of answers. Real users disagree.
The scalar reward model of Chapter 01 is a function of the prompt and the answer only:
Take the prompt "Explain transformers." and two answers: \(y_1\) is a short plain-language explanation, \(y_2\) is a long mathematical one with attention equations. User A wants concise answers. User B wants the mathematics. A reward that knows who is asking would score them like this:
The answers are the same. The rewards differ because the context differs, \(c_A\neq c_B\). Equation (1) has no slot for that difference, so it must give both users the same pair of numbers. At least one of them will be served badly.
3. Definition
The fix is to make the hidden context visible. Give the reward model a third input \(c\) that describes the user, task or criterion the answer is judged against.
A conditional (or personalized) reward model is a function \(r_\theta(x,y,c)\in\mathbb R\) of a prompt \(x\), a response \(y\) and a context \(c\), trained so that for each context the Bradley-Terry probability matches that context's preferences:
The question changes from "Is this answer good?" to "Is this answer good for this user, task or condition?" If the model ignores \(c\), it collapses back to Equation (1). So the universal reward model is the special case of a constant context.
4. What the context can be
The definition says nothing about the form of \(c\). Four kinds are common.
- User profile. An identifier, a learned user embedding, or stated preferences such as "prefers short answers" or "is a beginner".
- Written rubric or system prompt. A natural-language instruction for how to judge: "Reward answers that cite sources; penalise speculation." The same model can then be reused with new rubrics.
- Task or domain. A label such as code, medical, or creative writing. A terse answer is good code review and poor storytelling.
- Attribute targets. A vector of desired levels, for example helpfulness 4, verbosity 1, on a 0 to 4 scale.
Attribute targets come from attribute-conditioned training such as SteerLM. There an attribute model rates responses on dimensions like helpfulness and verbosity, and the language model is fine-tuned to produce a response given the target values it should have. Read as a reward, one simple choice is to score how close the predicted attributes \(a_\phi(x,y)\) are to the target \(c\):
A user who asks for verbosity 1 then rewards a short answer, and a user who asks for verbosity 4 rewards a long one, with the same attribute model underneath.
5. Ways to condition
Encode the prompt and response with the Transformer as before, and the context as a vector \(e_c\):
The simplest idea is to concatenate them, \([h_T;e_c]\), and apply a linear head. This does not work, and it is worth seeing why:
If the context enters the reward only through a term that does not depend on \(y\), then \(r(x,y_2,c)-r(x,y_1,c)\) is the same for every \(c\). Every user gets the same preference probabilities, and the context is useless for ranking.
The context has to interact with the response. Three ways do this.
- A nonlinear head on the concatenation, such as a small MLP: \(r=g_\theta(h_T,e_c)\).
- A context-dependent weight, so the context decides which features of the response matter:
- Context in the text. Write \(c\) into the input before the response, \(r_\theta(c\oplus x,y)\), where \(\oplus\) joins strings. Attention then mixes context and response at every layer.
Learned context embedding
\(c\) is an ID or a short vector; \(e_c\) is learned. Compact and cheap, but each new user or attribute needs data to learn its embedding.
r = g(h_T, e_c)
Context as text
\(c\) is a written profile or rubric placed in the prompt. Works for unseen rubrics if the backbone reads them well, but costs context length.
r = f("rubric: ... prompt: ... answer: ...")
6. Training
Each preference record now carries its context: \((x,c,y_w,y_l)\). The loss is the Bradley-Terry loss of Chapter 01, evaluated with the record's own context:
The model learns "for this context, which answer is preferred?" The same pair \((y_1,y_2)\) can appear twice with opposite labels and different contexts, and that is no longer label noise. It is signal about how \(c\) changes preference.
Most of what makes an answer good is shared: correctness, clarity, safety. In practice almost all parameters are shared across contexts and only a small part (an embedding, a head, a few adapter weights) depends on \(c\). This lets users with few labels borrow strength from everyone else.
7. Latent user variables
Often we do not have a profile, only a few comparisons the user has made. We can treat the user's taste as a latent vector \(z\) and infer it from those labels. Let \(D_u=\{(x_i,y_{w,i},y_{l,i})\}_{i=1}^{n}\) be user \(u\)'s labelled pairs. An encoder maps them to a distribution over \(z\):
Encoder and reward model are trained together in the style of a variational autoencoder. The reward must explain the user's held-out comparisons, and a KL term keeps \(q_\psi\) close to a prior \(p(z)\):
This is the idea behind variational preference learning (Poddar et al.). At test time a new user supplies a handful of comparisons, the encoder infers \(z\), and the reward model is personalized with no further training. With no comparisons the posterior falls back to the prior, which acts like the average user.
8. Mixing per-preference models
A different route avoids one big conditional model. Train separate networks for a few basic preferences (concise, detailed, formal, playful), all fine-tuned from the same starting weights, and combine them per user. Two ways to combine:
The first mixes outputs, which costs one forward pass per basic model. The second mixes weights, giving a single network. Rewarded soups (Ramé et al.) interpolate the weights of networks fine-tuned on different rewards; personalized soups (Jang et al.) merge policies trained for separate preference dimensions after training. Weight interpolation works well in practice when the models share a pretrained starting point, but it is an empirical finding, not a guarantee.
Conditional RM
One model, context as input. Handles rich, free-form contexts and unseen rubrics. Needs preference data labelled with context.
r(x, y, c)
Mixture of per-preference models
A few basic models, user given by weights \(\lambda\). Simple and inspectable, but users can only be mixtures of the chosen basics.
Σ λ_i r_i(x, y)
9. Data and evaluation
- Few labels per user. Most users label a few pairs or none. A per-user model with millions of parameters overfits; the personal part must be small and the shared part large.
- Cold start. A new user has no labels. The model must fall back to a sensible default, such as the prior in Section 7 or a written profile.
- Privacy. Profiles and labelled histories are personal data. Storing them, and training on them, raises consent and leakage questions that a universal reward model does not.
Evaluation must also change. A single held-out accuracy can hide a model that serves the majority and ignores everyone else. Useful checks:
- Per-group accuracy, and the worst group's accuracy, not only the average.
- Context-swap test. Score each test pair with a wrong context. If accuracy barely drops, the model is not using \(c\).
- Accuracy against labels from new users, to measure cold-start behaviour.
10. Personalize style, not truth
Personalization rewards what a user prefers. Users often prefer hearing that they are right. A reward model conditioned on "this user believes X" can learn to reward answers that agree with X, whether or not X is true. Preference-trained models are already known to drift toward such sycophancy; conditioning on the user makes the target easier to hit.
One safeguard is to split the reward so that context only touches the parts that should vary between people:
The core term judges accuracy and safety and does not see \(c\). The preference term judges length, tone and format. Because the preference term is bounded by \(B\), it can change a pairwise margin by at most \(2B\). If one answer leads on the core term by more than \(2B\), no context can reverse that.
Length, depth, tone and format can depend on who is asking. Facts and safety limits should not.
11. Weaknesses
- Sparse personal data. Each user contributes few labels, so personal parameters are poorly estimated.
- Context must be available. At RL or inference time the right \(c\) must be known and accurate; a wrong profile gives a confidently wrong reward.
- Silent collapse. If shared signal dominates training, the model can learn to ignore \(c\) and still look accurate on average.
- Unseen contexts. A rubric or user type absent from training may be read poorly, especially with learned embeddings.
- Sycophancy and echo chambers. Rewarding what a user wants to hear can reward inaccuracy and reinforce existing views.
- Privacy cost. Personalization requires collecting and storing information about people.
12. Laboratory: one answer pair, many users
The two answers of Section 1 are fixed. Slide the user's weight on depth \(w\) from 0 (user A, concise) to 1 (user B, detailed). The reward interpolates between the two users' rewards, so \(r(y_1,w)=0.92-0.37w\) and \(r(y_2,w)=0.61+0.34w\). The second slider sets the share \(\pi\) of detail-seeking annotators in a pooled dataset, and the lab reports what a single unconditional reward model trained on that pool would say.
Conditional vs pooled reward
\(r(y,w)=(1-w)\,r(y,c_A)+w\,r(y,c_B)\)Calculation
Move \(w\) across \(w^\ast\approx0.437\) and the preferred answer flips. Then note that the single model's choice depends only on \(\pi\), not on \(w\): it gives every user the same answer. At \(\pi=0.5\) its margin is only about \(+0.04\), close to indifference, while each real user has a margin of 0.31 or 0.40.
13. Worked example, step by step
Use the rewards of Equation (2). Half the labels come from user A, half from user B, each labelling according to their own Bradley-Terry probabilities. Compare the training loss of the conditional model with that of the best single model.
- User A: margin \(0.92-0.61=0.31\), so \(P_A(y_1\succ y_2)=\sigma(0.31)\approx0.577\) and \(P_A(y_2\succ y_1)\approx0.423\).
- User B: margin \(0.95-0.55=0.40\), so \(P_B(y_2\succ y_1)=\sigma(0.40)\approx0.599\).
- Pooled 50/50: \(P_{\text{pool}}(y_2\succ y_1)=\tfrac12(0.423)+\tfrac12(0.599)\approx0.511\).
- Best single model, Equation (4): margin \(\operatorname{logit}(0.511)=\log\tfrac{0.511}{0.489}\approx+0.044\). It slightly prefers \(y_2\) for everyone.
- On a label from A (\(y_1\succ y_2\)): conditional loss \(-\log0.577\approx0.550\); single-model loss \(-\log\sigma(-0.044)=-\log0.489\approx0.715\).
- On a label from B (\(y_2\succ y_1\)): conditional loss \(-\log0.599\approx0.513\); single-model loss \(-\log0.511\approx0.672\).
- Averages: conditional \(\approx0.532\); single \(\approx0.693\approx\log 2\). Without the context, the best model is barely better than a coin flip on this pair.
14. What comes next
A conditional reward model admits that "good" depends on who is asking. The next chapter admits something else: even for a fixed context, a reward model can be unsure. An ensemble of reward models reports both a score and how far to trust it.
Universal RM: is this answer good? Conditional RM: is this answer good for this user, task or condition?
See also
- Siththaranjan et al., 2023, hidden context in preference data and distributional preference learning.
- Poddar et al., 2024, personalizing RLHF with variational preference learning.
- Dong et al., 2023, SteerLM: attribute-conditioned fine-tuning as a user-steerable alternative to RLHF.
- Ramé et al., 2023, rewarded soups: interpolating weights fine-tuned on diverse rewards.
- Jang et al., 2023, personalized soups: personalized alignment by post-hoc parameter merging.
- Sharma et al., 2023, towards understanding sycophancy in language models.
Previous
← Implicit Reward Model
Next chapter
Uncertainty-aware reward model
A score plus how far to trust it.