arXiv:2510.10290cs.SEcs.LG2025-10综述

用轻量模型+静态分析,让大模型高效精准地做代码审查。

Grounded AI for Code Review: Resource-Efficient Large-Model Serving in Enterprise Pipelines

  • 结合静态分析与语法树提取上下文,生成可解释的修复建议。
  • 单卡部署下首次反馈平均低于59.8秒,误报率更低。
  • 适合需要合规、低耗能的企业级代码审查场景。

自动化代码审查在合规要求高的环境中进展缓慢,因静态分析产生大量低解释性结果,而直接使用大语言模型易引发幻觉并增加成本。本文提出一个面向企业流水线的可落地系统,通过将静态分析结果与基于抽象语法树(AST)的上下文提取相结合,并采用单GPU、按需服务的轻量化架构(量化开源模型 + 多层缓存),实现简洁明了的解释和修复指导。在面向安全性的C/C++标准评估中,该方法实现了亚分钟级的首次反馈(离线p50构建+LLM为59.8秒),同时保持了与更大封闭模型相当的违规减少效果,且违规率更低。系统架构解耦,团队可独立采用“溯源提示”或“服务部署”模块。小范围内部调研(n=8)显示,用户感知到排查负担减轻,对溯源能力有中等认可,人工审核迭代次数减少。文章总结了实际运维经验与局限,强调可复现性、可审计性,以及向更广泛标准和自动补丁方向的拓展路径。

原文摘要 · Abstract (English)

Automated code review adoption lags in compliance-heavy settings, where static analyzers produce high-volume, low-rationale outputs, and naive LLM use risks hallucination and incurring cost overhead. We present a production system for grounded, PR-native review that pairs static-analysis findings with AST-guided context extraction and a single-GPU, on-demand serving stack (quantized open-weight model, multi-tier caching) to deliver concise explanations and remediation guidance. Evaluated on safety-oriented C/C++ standards, the approach achieves sub-minute median first-feedback (offline p50 build+LLM 59.8s) while maintaining competitive violation reduction and lower violation rates versus larger proprietary models. The architecture is decoupled: teams can adopt the grounding/prompting layer or the serving layer independently. A small internal survey (n=8) provides directional signals of reduced triage effort and moderate perceived grounding, with participants reporting fewer human review iterations. We outline operational lessons and limitations, emphasizing reproducibility, auditability, and pathways to broader standards and assisted patching.

代码审查大模型服务轻量化部署企业应用

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。