ODIN
📌 核心贡献
提出 ODIN 方法,通过在共享特征上训练两个解耦的线性头(长度相关 vs 长度无关),在 RL 阶段丢弃长度头来消除奖励模型的长度 hacking 问题。
📖 摘要
In this work, we study the issue of reward hacking on the response length, a challenge emerging in Reinforcement Learning from Human Feedback (RLHF) on LLMs. A well-formatted, verbose but less helpful response from the LLMs can often deceive LLMs or even human evaluators to achieve high scores. The same issue also holds for some reward models in RL. To address the challenges in both training and evaluation, we establish a more reliable evaluation protocol for comparing different training configurations, which inspects the trade-off between LLM evaluation score and response length obtained by varying training hyperparameters. Based on this evaluation, we conduct large-scale studies, where the results shed insights into the efficacy of hyperparameters and tricks used in RL on mitigating length bias. We further propose to improve the reward model by jointly training two linear heads on shared feature representations to predict the rewards, one trained to correlate with length, and the other trained to decorrelate with length and therefore focus more on the actual content. We then discard the length head in RL to prevent reward hacking on length. Experiments demonstrate that our approach almost eliminates the reward correlation with length, and improves the obtained policy by a significant margin.
🔍 关键信息
| 字段 | 内容 |
|---|---|
| 机构 | University of Maryland, NVIDIA |
| 发表 | 2024-02-11 |
| 分类 | cs.LG, cs.AI, cs.CL |
| 链接 | arXiv |
📝 我的笔记
动机与问题
RLHF 中的长度偏差(length bias)是一个严重的 reward hacking 问题:格式化良好但冗长且无用的回复可以欺骗奖励模型获得高分。这导致 RL 训练后的模型倾向于生成不必要的冗长回复。
现有缓解方法(如 KL 惩罚调整、长度惩罚)效果有限,且需要大量超参搜索。
核心方法
解耦奖励头设计:
在共享的 LLM 特征表示上训练两个线性头:
- 长度头(Length Head):训练使其预测与响应长度正相关的奖励分量
- 内容头(Content Head):训练使其预测与响应长度去相关(decorrelated)的奖励分量,专注于实际内容质量
训练时两个头联合优化,共享底层特征表示。RL 阶段只使用内容头输出的奖励信号,丢弃长度头。
评估协议改进:
建立了更可靠的评估方案:通过变化训练超参数,检查 LLM 评估分数与响应长度之间的 trade-off 曲线,而非单一指标。
关键结果
- ODIN 几乎完全消除了奖励与长度之间的相关性
- 在固定评估分数下,ODIN 生成的响应显著更短且信息更密集
- 大规模实验涵盖了多种 RL 超参数和技巧的对比,提供了系统性的 length bias 缓解指南
- 改进后的策略在评估-长度 trade-off 曲线上显著优于基线
总结
ODIN 提供了一个简洁优雅的方案来解决 RLHF 中的长度 hacking 问题。通过双头解耦设计,无需额外的长度惩罚项或复杂的训练技巧,即可在不损失内容质量的情况下控制输出长度。该方法的可靠评估协议也为后续研究提供了有价值的方法论贡献。
🔗 相关论文
基于/改进自: RewardOveropt
同方向: AccuracyParadox, ArmoRM