外推权重平均揭示代码强化学习中的正确性-效率前沿
Correctness vs Efficiency: Behavior Control with Weight-Space Extrapolation in Code RL
AI总结:
通过外推权重平均,无需额外RL训练即可扩展微调检查点间的帕累托前沿,在竞争性编程中实现正确性与效率的权衡,并提升推理时性能。
摘要:
线性插值微调检查点已被证明可以追踪竞争目标之间的帕累托前沿,但外推权重平均是否能在不进行额外RL训练的情况下,将此类前沿扩展到推理时有用的新检查点,仍不清楚。我们在竞争性编程的RL中研究这一问题,其中隐藏单元测试在时间和内存限制下同时强制执行功能正确性和计算效率。从共享初始化开始,我们在嵌套单元测试覆盖下训练检查点:低覆盖奖励要求通过较小输入的测试,而高覆盖奖励要求逐步通过更大输入的测试直至完整套件。这种扫描揭示了正确性-效率前沿的出现:在困难问题上,更高覆盖奖励减少了优化失败但增加了正确性失败,使得解决率几乎不变。低覆盖和高覆盖检查点之间的插值恢复了这一前沿,而外推则将其扩展到训练端点之外。该前沿及其外推延续出现在三种推理设置(纯推理、工具使用和智能体编码)以及两种模型规模(32B和7B)中。在问题层面,沿前沿移动会改变被解决的问题,使得外推检查点成为推理时扩展中的互补策略。具有外推权重平均的集成扩大了覆盖范围,并在相同样本预算下,将LCB/hard上的pass@250比最佳单一检查点提高了3.3%。这些结果表明,代码RL中的嵌套单元测试覆盖诱导了一个前沿,外推权重平均可以导航、扩展和利用该前沿。
英文摘要:
A model trained with an imperfect reward in RL may learn to exploit the reward with undesired behavior. We study a controlled form of this problem in competitive programming. A program may pass small tests while violating the intended efficiency requirement on larger inputs. We construct a family of rewards that progressively relax the efficiency constraint, making the reward increasingly easy to exploit, and train separate policies. This sweep reveals a correctness-efficiency frontier. Relaxing the reward leads to less efficient programs and more resource-limit failures. Stricter rewards suppress these failures but increase correctness failures near the model's capability boundary. This frontier is also reflected in weight space. Interpolating between the resulting models reproduces the same behavioral change. More surprisingly, extrapolation in both directions further amplifies or suppresses it beyond the trained checkpoints. Extensive experiments show that this pattern holds across pure reasoning, tool use, and agentic coding, and at both 32B and 7B scales. This suggests a simple intervention for this form of reward hacking: use a loose reward to amplify the undesired behavior, use the weight-space difference to a strict-reward model as its steering vector, and then extrapolate past the strict model to suppress it.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。