arXiv:2502.01806cs.SEcs.AI2025-02

用神经符号方法提升代码理解,让AI更透明可靠

Toward Neurosymbolic Program Comprehension

  • 融合深度学习与符号计算,构建可解释的代码分析框架
  • 初步实验验证了该方法在识别缺陷代码上的有效性
  • 适合关注AI可信性与工程落地的研究者和开发者

近年来,大语言模型(LLMs)的发展推动了大代码模型(LCMs)的兴起,实现了代码生成、软件测试和程序理解等复杂任务的自动化。诸如GitHub Copilot和ChatGPT的工具已在开发实践中展现出显著价值。然而,将模型规模扩展至万亿参数(如GPT-4)带来了训练与部署的高算力需求,以及可信度、偏见和可解释性等问题。这些问题使许多组织难以使用基于大规模深度学习模型的AI系统,其“黑箱”特性也削弱了透明性和问责性。本文质疑了‘增加参数即最优’的普遍假设,提出应结合现有深度学习技术(如LLMs)与传统符号方法的优势——后者以可靠性、速度和确定性著称。为此,我们提出了首个神经符号程序理解(NsPC)框架的核心特征,并展示了初步结果,旨在帮助识别缺陷代码组件。

原文摘要 · Abstract (English)

Recent advancements in Large Language Models (LLMs) have paved the way for Large Code Models (LCMs), enabling automation in complex software engineering tasks, such as code generation, software testing, and program comprehension, among others. Tools like GitHub Copilot and ChatGPT have shown substantial benefits in supporting developers across various practices. However, the ambition to scale these models to trillion-parameter sizes, exemplified by GPT-4, poses significant challenges that limit the usage of Artificial Intelligence (AI)-based systems powered by large Deep Learning (DL) models. These include rising computational demands for training and deployment and issues related to trustworthiness, bias, and interpretability. Such factors can make managing these models impractical for many organizations, while their "black-box'' nature undermines key aspects, including transparency and accountability. In this paper, we question the prevailing assumption that increasing model parameters is always the optimal path forward, provided there is sufficient new data to learn additional patterns. In particular, we advocate for a Neurosymbolic research direction that combines the strengths of existing DL techniques (e.g., LLMs) with traditional symbolic methods--renowned for their reliability, speed, and determinism. To this end, we outline the core features and present preliminary results for our envisioned approach, aimed at establishing the first Neurosymbolic Program Comprehension (NsPC) framework to aid in identifying defective code components.

神经符号代码理解可解释AI

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