AI生成代码失控,新系统三招精准揪出问题。
From Code Review to Code Critique: Intent, Drift, and Spotlight for AI-Generated Diffs at Scale

- 通过对话日志预测修改意图,理解开发者初衷
- 用回译法检测代码与意图偏差,准确率超90%
- 自动标记高风险代码区域,减少人工审查量5倍
AI编程代理生成代码的规模已超出传统同行评审能力。现有AI代码审查工具过度关注风格等低价值建议,而忽视人类最关心的正确性、安全性和性能问题。我们提出ARCTIC——一个基于人工智能的代码批判系统,围绕三大能力重构代码审查:意图预测,从对话记录和元数据推断修改原因;漂移检测,通过回译法衡量开发者意图与代理输出之间的偏离程度;代码聚焦,识别diff中最具审查价值的区域。这些能力基于18,000次代码评审提炼出的六类主题。离线评估显示,意图预测达到0.86 F1,漂移检测与人工标注者在序数一致性上近乎完美(QWK = 0.907),聚焦功能在仅消耗5倍令牌的情况下,质量评估性能优于基线AI审查器2.4倍。实验上线后,漂移得分使代码错位降低5.76分(p = 0.026),意图预测获得90.2%认可度,自审代码自上线以来未发现缺陷。
原文摘要 · Abstract (English)
AI coding agents are generating code at volumes that exceed the capacity of traditional peer review. At the same time, existing AI code review tools over-index on low-value suggestions such as style and best practices while under-indexing on the concerns human reviewers prioritize most: correctness, security, and performance. We present ARCTIC, an AI-powered Code Critique system that reframes code review around three capabilities: intent prediction, which infers why a change was made from conversation logs and metadata; drift detection, which measures divergence between the developer's intent and the agent's output via backtranslation; and code spotlight, which ranks the regions of a diff most warranting human scrutiny. We ground these capabilities in a six-theme taxonomy derived from 18,000 code reviews. Offline evaluation shows that intent prediction achieves 0.86 F1, drift detection reaches near-perfect ordinal agreement with human annotators (QWK = 0.907), and spotlight outperforms the baseline AI reviewer by 2.4x on quality estimation at 5x fewer tokens. In the experimental rollout, the drift scores reduces code misalignment by an additional 5.76 points (p = 0.026), intent prediction receives 90.2% approval, and zero defects have been attributed to self-reviewed diffs since launch.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。