arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2601.12951cs.SEcs.AI
收藏

超越准确性:在(大)语言模型中表征代码理解能力

Beyond Accuracy: Characterizing Code Comprehension Capabilities in (Large) Language Models

ITS, University of Luebeck(ITS,吕贝克大学)

Felix Mächtle, Jan-Niclas Serr, Nils Loose, Thomas Eisenbarth

AI总结:

本文研究了大语言模型在代码理解能力上的表现,发现其与传统人类度量标准相关性低,而影子模型能捕捉更复杂的模式,强调需改进基准方法以更准确评估模型能力。

摘要:

大型语言模型(LLMs)正越来越多地融入软件工程工作流程中,但当前的基准测试只提供粗略的性能总结,这掩盖了这些模型多样的能力和限制。本文研究LLMs的代码理解能力是否与传统的以人类为中心的软件度量标准一致,还是反映了不同的、非人类的规律。我们引入了一个诊断框架,将代码理解重新定义为二元输入输出一致性任务,从而能够评估分类和生成模型。利用大规模数据集,我们将模型性能与传统的人类中心复杂度度量标准相关联,如词汇量、控制流复杂性和抽象语法树结构。我们的分析发现,人类定义的度量标准与LLM成功之间的相关性极低(AUROC 0.63),而影子模型实现了显著更高的预测性能(AUROC 0.86),捕捉到复杂且部分可预测的模式,超越了传统软件度量。这些发现表明,LLM的理解反映了模型特定的规律,这些规律只能部分通过人类设计或学习的特征来获取,强调了需要超越整体准确性的基准方法,转向实例级别的诊断,同时承认在预测正确结果方面的根本限制。

英文摘要:

Large Language Models (LLMs) are increasingly integrated into software engineering workflows, yet current benchmarks provide only coarse performance summaries that obscure the diverse capabilities and limitations of these models. This paper investigates whether LLMs' code-comprehension performance aligns with traditional human-centric software metrics or instead reflects distinct, non-human regularities. We introduce a diagnostic framework that reframes code understanding as a binary input-output consistency task, enabling the evaluation of classification and generative models. Using a large-scale dataset, we correlate model performance with traditional, human-centric complexity metrics, such as lexical size, control-flow complexity, and abstract syntax tree structure. Our analyses reveal minimal correlation between human-defined metrics and LLM success (AUROC 0.63), while shadow models achieve substantially higher predictive performance (AUROC 0.86), capturing complex, partially predictable patterns beyond traditional software measures. These findings suggest that LLM comprehension reflects model-specific regularities only partially accessible through either human-designed or learned features, emphasizing the need for benchmark methodologies that move beyond aggregate accuracy and toward instance-level diagnostics, while acknowledging fundamental limits in predicting correct outcomes.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑