CRScore++:结合可验证工具与AI反馈的强化学习用于代码审查
CRScore++: Reinforcement Learning with Verifiable Tool and AI Feedback for Code Review
AI总结:
提出CRScore++强化学习框架,结合LLM主观反馈与可验证工具信号作为训练奖励,通过监督微调与教师模型RL批评改进学生模型,提升代码审查评论生成并泛化至新编程语言。
摘要:
利用强化学习(RL)改进代码审查评论生成需要处理非结构化输出,这使得强化学习反馈极具挑战。两种主要的RL方法,即可验证反馈强化学习(RLVR)和AI反馈强化学习(RLAIF),各有取舍:RLVR能为代码生成等结构化任务提供可靠反馈,而RLAIF适用于非结构化输出但具主观性。我们通过CRScore++弥合了这一差距,这是一个结合基于LLM的主观反馈和可验证信号进行训练的RL框架。CRScore++扩展了CRScore(一个将LLM与linter和代码异味检测器等验证器集成的代码审查评估指标),将这些信号转化为训练奖励。我们证明,CRScore++通过监督微调和来自更强教师模型的RL批评相结合,改进了较弱的教师模型,从而实现对新型编程语言的泛化。
英文摘要:
Reinforcement learning (RL) to improve code review comment generation requires handling unstructured outputs, making reinforcement learning (RL) feedback challenging. The two main RL approaches, namely RL with Verifiable Feedback (RLVR) and RL with AI Feedback (RLAIF), offer trade-offs: RLVR provides reliable feedback for structured tasks like code generation, while RLAIF works for unstructured outputs but is subjective. We bridge this gap with CRScore++, an RL framework that leverages both LLM-based subjective feedback and verifiable signals for training. Extending CRScore, a code review evaluation metric integrating LLMs with verifiers like linters and code smell detectors, CRScore++ transforms these signals into training rewards. We show that CRScore++ improves a weaker student model through a combination of supervised fine-tuning and RL critique from a stronger teacher model, thus enabling generalization to novel programming languages.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。