arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2605.28022cs.CLcs.SE
收藏

超越 pass@k:面向多样本代码生成的冗余感知 RLVR

Beyond pass@k: Redundancy-Aware RLVR for Multi-Sample Code Generation

RIKEN Center for Computational Science(日本计算科学中心)

Le Bronnec Florian, Alexandre Verine, Rio Yokota, Benjamin Negrevergne

AI总结:

针对代码生成中重复采样评估的冗余问题,提出基于 JPlag 相似度的反冗余奖励增强 RLVR,在有限预算下提升可执行正确性。

摘要:

用于代码生成的 LLM 通常使用 Pass@k 在重复采样设置中进行评估,其中多个候选程序在有限采样预算下针对单元测试执行。虽然最近基于验证器的强化学习(RLVR)方法提高了可执行正确性,但这些目标如何影响采样程序之间的冗余仍不清楚。在这项工作中,我们使用代码抄袭检测系统 JPlag 研究代码生成中的实现级冗余。跨模型和基准测试,我们表明仅正确性的 RLVR 通常使生成集中在重复实现上,而 Pass@k 感知目标保持较低冗余并提高更大预算下的性能。受这些观察的启发,我们基于 JPlag 相似度用直接反冗余奖励增强 RLVR。在 3 个模型和 3 个基准测试中,阻止近重复生成可靠地提高了有限预算下的可执行性能,通常匹配或超越专门的 Pass@k 感知目标。

英文摘要:

LLMs for code generation are commonly evaluated in repeated-sampling settings using Pass@k, where multiple candidate programs are executed against unit tests under a finite sampling budget. While recent verifier-based reinforcement learning (RLVR) methods improve executable correctness, how these objectives affect redundancy among sampled programs remains poorly understood. In this work, we study implementation-level redundancy in code generation using JPlag, a plagiarism-detection system for code. Across models and benchmarks, we show that correctness-only RLVR often concentrates generations around repeated implementations, whereas Pass@k-aware objectives maintain lower redundancy and improve larger-budget performance. Motivated by these observations, we augment RLVR with direct anti-redundancy rewards based on JPlag similarity. Across 3 models and 3 benchmarks, discouraging near-duplicate generations reliably improves finite-budget executable performance, often matching or outperforming specialized Pass@k-aware objectives.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑