arXiv:2507.18476cs.SEcs.AI2025-07综述被引 5

用符号推理增强大模型,让代码审查更准更快

Automated Code Review Using Large Language Models with Symbolic Reasoning

  • 将符号推理与大模型结合,提升逻辑分析能力
  • 在CodexGlue数据集上准确率显著优于纯语言模型
  • 适合需要高可靠性代码审查的开发团队

代码审查是软件开发生命周期中的关键环节,对保障代码质量至关重要。然而,人工审查主观性强且耗时。由于其规则性特征,代码审查非常适合自动化。近年来,人工智能技术被广泛用于此领域。尽管大语言模型(LLMs)展现出潜力,但常缺乏充分理解与评估代码所需的逻辑推理能力。为此,本研究提出一种融合符号推理与大模型的混合方法,以实现自动化代码审查。我们在CodexGlue数据集上测试了CodeT5、CodeBERT和GraphCodeBERT等多种模型,评估符号推理与提示技术结合大模型的效果。结果表明,该方法显著提升了自动化代码审查的准确率与效率。

原文摘要 · Abstract (English)

Code review is one of the key processes in the software development lifecycle and is essential to maintain code quality. However, manual code review is subjective and time consuming. Given its rule-based nature, code review is well suited for automation. In recent years, significant efforts have been made to automate this process with the help of artificial intelligence. Recent developments in Large Language Models (LLMs) have also emerged as a promising tool in this area, but these models often lack the logical reasoning capabilities needed to fully understand and evaluate code. To overcome this limitation, this study proposes a hybrid approach that integrates symbolic reasoning techniques with LLMs to automate the code review process. We tested our approach using the CodexGlue dataset, comparing several models, including CodeT5, CodeBERT, and GraphCodeBERT, to assess the effectiveness of combining symbolic reasoning and prompting techniques with LLMs. Our results show that this approach improves the accuracy and efficiency of automated code review.

代码审查大模型符号推理

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