arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2601.13097cs.SEcs.LG
收藏

RM-RF:无运行奖励模型用于自动单元测试评估

RM -RF: Reward Model for Run-Free Unit Test Evaluation

Elena Bruches, Daniil Grebenkin, Mikhail Klementev, Vadim Alperovich, Roman Derunets, Dari Baturova, Georgy Mkrtchyan, Oleg Sedukhin, Ivan Bondarenko, Nikolay B… 展开作者

Elena Bruches, Daniil Grebenkin, Mikhail Klementev, Vadim Alperovich, Roman Derunets, Dari Baturova, Georgy Mkrtchyan, Oleg Sedukhin, Ivan Bondarenko, Nikolay Bushkov, Stanislav Moiseev

AI总结:

RM-RF通过无需运行的奖励模型提升自动单元测试评估效率,实现低延迟和高预测精度。

摘要:

我们提出了RM-RF,一种轻量级的奖励模型,用于无需运行的自动单元测试评估。与反复编译和执行候选测试不同,RM-RF仅从源代码和测试代码预测三个衍生信号:(1)增强的测试集是否成功编译和运行,(2)生成的测试用例是否增加代码覆盖率,(3)生成的测试用例是否提高变异杀灭率。为了训练和评估RM-RF,我们收集了多语言数据集(Java、Python、Go)的焦点文件、测试文件和候选测试添加,这些数据由基于执行的流水线标记。我们发布了一个相关数据集和方法论用于比较评估。我们测试了多种模型家族和调优制度(零样本、完整微调和通过LoRA的PEFT),在三个目标上实现了平均F1为0.69。与传统编译和运行工具相比,RM-RF提供了显著更低的延迟和基础设施成本,同时提供具有竞争力的预测保真度,使大规模测试生成和基于强化学习的代码优化能够快速、可扩展地反馈。

英文摘要:

We present RM-RF, a lightweight reward model for run-free evaluation of automatically generated unit tests. Instead of repeatedly compiling and executing candidate tests, RM-RF predicts - from source and test code alone - three execution-derived signals: (1) whether the augmented test suite compiles and runs successfully, (2) whether the generated test cases increase code coverage, and (3) whether the generated test cases improve the mutation kill rate. To train and evaluate RM-RF we assemble a multilingual dataset (Java, Python, Go) of focal files, test files, and candidate test additions labeled by an execution-based pipeline, and we release an associated dataset and methodology for comparative evaluation. We tested multiple model families and tuning regimes (zero-shot, full fine-tuning, and PEFT via LoRA), achieving an average F1 of 0.69 across the three targets. Compared to conventional compile-and-run instruments, RM-RF provides substantially lower latency and infrastructure cost while delivering competitive predictive fidelity, enabling fast, scalable feedback for large-scale test generation and RL-based code optimization.

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

↑