通过梯度指纹检测和抑制奖励黑客
Detecting and Suppressing Reward Hacking with Gradient Fingerprints
AI总结:
本文提出GRIFT方法,通过梯度指纹检测奖励黑客行为,显著优于现有基线方法,在多个可验证推理基准中提升检测效果,并通过集成到拒绝微调流程中减少奖励黑客并提升任务性能。
摘要:
可验证奖励的强化学习(RLVR)通常在不施加中间推理约束的情况下优化结果奖励,这使训练容易受到奖励黑客攻击,即模型利用奖励函数中的漏洞(例如训练数据中的虚假模式)来获得高分数而不解决预期任务。这些奖励黑客行为通常是隐含的,因为中间的思维链(CoT)可能在表面上显得合理,限制了纯粹基于文本的监控效果。我们提出梯度指纹(GRIFT),一种通过模型内部计算检测奖励黑客的方法。给定提示和模型生成的CoT,GRIFT计算CoT对提示的梯度并将其压缩为紧凑表示,然后用于评估CoT是否反映奖励黑客行为。在覆盖数学、代码和逻辑推理的可验证推理基准中,GRIFT显著优于强基线方法,包括CoT监控器和TRACE,实现超过25%的奖励黑客检测相对改进。此外,将GRIFT集成到推理任务的拒绝微调流程中可减少奖励黑客并提高真实任务目标的性能。我们的结果强调了利用梯度级别表示评估CoT推理轨迹质量的有前途方向。我们的代码可在:https://github.com/songtao-x/reward_hack。
英文摘要:
Reinforcement learning with verifiable rewards (RLVR) typically optimizes for outcome rewards without imposing constraints on intermediate reasoning. This leaves training susceptible to reward hacking, where models exploit loopholes (e.g., spurious patterns in training data) in the reward function to achieve high scores without solving the intended task. These reward-hacking behaviors are often implicit, as the intermediate chain-of-thought (CoT) may appear plausible on the surface, limiting the effectiveness of purely text-based monitoring. We propose Gradient Fingerprint (GRIFT), a method for detecting reward hacking using models' internal computations. Given a prompt and a model-generated CoT, GRIFT computes gradients of the CoT conditioned on the prompt and compresses them into a compact representation, which is then used to assess whether the CoT reflects reward hacking behavior. Across verifiable reasoning benchmarks spanning math, code, and logical reasoning, GRIFT substantially outperforms strong baselines, including CoT Monitor and TRACE, achieving over 25% relative improvement in detecting reward hacking behavior. Moreover, integrating GRIFT into the rejection fine-tuning pipeline for reasoning tasks reduces reward hacking and improves performance on the true task objective. Our results highlight a promising direction of leveraging gradient level representations for assessing the quality of CoT reasoning traces. Our code is available at: https://github.com/songtao-x/reward_hack.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。