CRJudgeBench: Can AI Detect Plausible but Invalid Code Reviews?
作者: Yue Pan, Jiawei Li, Ziyuan Zhang, Xiangxin Zhao, He Ye
分类: cs.SE, cs.AI
发布日期: 2026-09-29
备注: 26 pages, 5 figures, and 14 tables. Under review at ICLR 2027. Dataset available at https://huggingface.co/datasets/dcloud347/CRJudgeBenchmark
🔗 代码/项目: HUGGINGFACE
💡 一句话要点
提出CRJudgeBench以解决代码审查评论可信度判断问题
🎯 匹配领域: 支柱九:具身大模型 (Embodied Foundation Models)
关键词: 代码审查 技术可信度 大型语言模型 Sentinel CRJudgeBench 自动化测试 软件开发
📋 核心要点
- 现有的代码审查基准未能直接评估评论的技术可信度,导致开发者可能受到误导。
- 本文提出CRJudgeBench基准和Sentinel评判者,通过收集代码证据来验证审查评论的准确性。
- Sentinel在CRJudgeBench测试集上取得76.60%的准确率,显著优于其他基线模型,展示了迭代学习的有效性。
📝 摘要(中文)
大型语言模型能够生成看似合理的代码审查评论,但这些评论可能包含技术上不正确的主张,从而误导开发者。本文研究技术可信度判断,即确定审查评论的核心技术主张在其代码库上下文中是否正确和适用。现有的代码审查基准主要评估审查生成、问题发现或一般评论质量,但未直接评估代理是否能够判断单个审查评论的技术可信度。为填补这一空白,本文引入CRJudgeBench,一个由1199个实例构成的基准,涵盖可信和看似可信但不可信的评论。我们还提出了Sentinel,一个基于代码库的代理评判者,主动收集代码证据以验证审查评论,最终在测试集上取得76.60%的准确率,显著超越现有模型。
🔬 方法详解
问题定义:本文旨在解决如何判断代码审查评论的技术可信度的问题。现有方法主要关注评论生成和质量评估,缺乏对评论技术准确性的直接评估。
核心思路:论文提出CRJudgeBench基准和Sentinel评判者,利用代码证据验证评论的技术主张,从而提高判断的准确性。
技术框架:整体架构包括数据集构建、Sentinel模型训练和验证三个主要模块。数据集由真实的拉取请求和专家验证的扰动构成,Sentinel通过迭代学习从教师模型中获取知识。
关键创新:最重要的技术创新在于引入了基于代码库的证据收集机制,使得评论的可信度判断不仅依赖于文本内容,还考虑了代码上下文。
关键设计:Sentinel模型基于Qwen3-Coder-30B-A3B-Instruct,采用迭代动作级学习,训练过程中通过特定的损失函数优化模型的判断能力,确保其在真实场景中的有效性。
🖼️ 关键图片
📊 实验亮点
Sentinel在359个实例的CRJudgeBench测试集上取得76.60%的准确率,超越GLM-5.3模型6.13个百分点,较基模型提升19.78个百分点。这表明,尽管当前的通用大型语言模型在识别不可信评论方面存在困难,但通过迭代学习显著提高了判断准确性。
🎯 应用场景
该研究的潜在应用领域包括软件开发、代码审查工具和自动化测试等。通过提高代码审查评论的可信度判断能力,可以有效减少开发者在审查过程中的误导,从而提升软件质量和开发效率。未来,该技术可能在更广泛的代码分析和审查系统中得到应用。
📄 摘要(原文)
Large language models can generate plausible code-review comments, but such comments may contain technically incorrect claims that mislead developers. We study technical trustworthiness judgment: determining whether a review comment's core technical claims are correct and applicable to the reviewed code in its repository context. Existing code-review benchmarks primarily evaluate review generation, issue discovery, or general comment quality, but do not directly assess whether an agent can determine the technical trustworthy of an individual review comment. To fill this gap, we introduce CRJudgeBench, a benchmark of 1199 instances constructed from real pull requests and expert-verified perturbations, covering both trustworthy and plausible but untrustworthy comments. We further present Sentinel, a repository-grounded agentic judge that actively gathers code evidence to verify review comments before making judgments. Starting from Qwen3-Coder-30B-A3B-Instruct, Sentinel is trained on the CRJudgeBench training split through iterative action-level learning from a privileged teacher. On the 359-instance CRJudgeBench test set, Sentinel achieves 76.60\% accuracy, outperforming GLM-5.3 by 6.13 percentage points and its base model by 19.78 points. These results show that even state-of-the-art general-purpose LLMs struggle to identify untrustworthy comments, while iterative action-level learning substantially improves the accuracy of repository-grounded trustworthiness judgments. Our dataset is available at https://huggingface.co/datasets/dcloud347/CRJudgeBenchmark