ODIN: Disentangled Reward Mitigates Hacking in RLHF
TL;DR. Give the reward model two linear heads on a shared representation: one meant to capture length and one meant to capture quality. Train them so that the length head explains length and the quality head is uncorrelated with it, then use only the quality head in RL. The policy gets a better GPT-4 score at the same response length than with tuned RL tricks.
Key idea
Section titled “Key idea”The reward is , trained with the Bradley–Terry ranking loss plus two regularisers:
where ρ is the Pearson correlation within the global minibatch and is the response length in tokens. The heads are weight-normalised, and . Evaluation is the Pareto front of GPT-4 win score against average length. A method is only better if it scores higher at the same length.
The setup uses OpenAssistant (22,065 RM training examples, 7,494 RL prompts) with Vicuna-7B as SFT model, RM and policy. Evaluation uses GPT-4 and human judgments on LIMA’s 300 prompts. Smaller PPO clipping (ε) alone gives about 2.5 points on the Pareto front, and a length penalty helps less than ODIN. In human and GPT-4 comparisons at matched lengths, ODIN policies beat policies trained with the vanilla RM and a length penalty. The authors’ summary is that ODIN “almost eliminates the reward correlation with length, and improves the obtained policy by a significant margin” (Chen et al., abstract).
Connections
Section titled “Connections”- The length problem ODIN targets: Length correlations in RLHF.
- Why averaging RMs cannot remove a shared length bias: WARM, Helping or Herding.
- Filtering all preference-irrelevant features, not only length: InfoRM.
- The PPO clipping and KL knobs that the paper tunes: PPO.
Questions to think through
These questions have no single right answer. Write or say your answer before you open the hints. Mark a question once you could defend your answer in a reading group.
- Derive / compute
ODIN's length loss is |ρ(r^Q, L)| − ρ(r^L, L), with Pearson ρ computed inside the minibatch. For lengths L = (100, 200, 300, 400), compute the loss when r^L = (1, 2, 3, 4) and r^Q = (1, 2, 1, 2). Then compute ρ(r^Q, L) for r^Q = (1, 2, 2, 1) and explain what this second case shows about the loss.
What a strong answer covers
- Case 1: deviations of r^Q are (−0.5, 0.5, −0.5, 0.5) and of L are (−150, −50, 50, 150). The sum of products is 75 − 25 − 25 + 75 = 100.
- The norms are 1 and √50,000 ≈ 223.6, so ρ(r^Q, L) ≈ 0.447. ρ(r^L, L) = 1. Loss ≈ 0.447 − 1 = −0.553. The minimum, −1, needs ρ(r^Q, L) = 0.
- Case 2: the products are 75 − 25 + 25 − 75 = 0, so ρ = 0 and the loss is happy. But r^Q clearly depends on length: it prefers medium lengths.
- Pearson only removes the linear part of the length dependence. A non-monotonic length preference, or dependence on a correlate of length such as list count, passes the loss.
- The estimate also uses one global minibatch. Small batches give noisy ρ, and the RL policy can produce lengths outside the training range, where decorrelation was never enforced.
- Mechanism
Why does training a separate length head and then throwing it away work better than simply penalising length in the RL reward (r − α·L)? Explain using the ranking loss, the two regularisers, and what the policy sees during RL.
What a strong answer covers
- The preference data really does reward length (the chosen response is longer 66% of the time in the test set). A single head must use length to fit it.
- With two heads, r = r^Q + r^L fits the preferences. The length loss sends the length-explained part to r^L, and the orthogonality loss |W_Q·W_Lᵀ| keeps the two projections in separate directions of the shared representation. Weight normalisation stops the trivial solution W_Q = 0.
- r^Q then ranks pairs on content. Validation accuracy stays at 69.2% versus 70.1% for the baseline, while Pearson ρ with length drops from 0.451 to −0.03.
- In RL the policy sees only r^Q, so making responses longer gives no reward. The penalty approach still rewards length through the RM and then subtracts a hand-tuned α·L, which needs tuning and does well only on part of the Pareto front.
- On test pairs split by which side is longer, ODIN's accuracy is more balanced (82.4% when the chosen answer is longer, 45.4% when the rejected one is) than the baseline's (86.8% and 39.3%).
- Design
You evaluate RAG answers with a learned reward model and suspect it rewards both length and the number of citations, independent of answer quality. Extend ODIN to two spurious factors and say how you would check that the extension works.
What a strong answer covers
- Add one head per spurious factor (r^L for length, r^C for citation count) next to r^Q. Each gets a correlation loss tying it to its factor, and r^Q gets |ρ| penalties against both factors.
- Orthogonality between every pair of head weights, with weight normalisation on all heads. Use only r^Q in RL.
- Watch for factors that are correlated with each other (longer answers tend to have more citations). The heads can trade off, so check each factor's correlation with r^Q separately.
- Check with pairs where the factor is controlled (same quality, different citation count) and with accuracy split by which side has more citations. During RL, plot judge score against length and against citation count on the Pareto front, as the paper does with length.