大型代码模型理解编程概念吗?代码谓词的反事实分析
Do Large Code Models Understand Programming Concepts? Counterfactual Analysis for Code Predicates
AI总结:
针对大型代码模型在代码任务中性能卓越但原因不明的问题,提出编程概念谓词反事实分析(CACP)框架,通过黑盒测试10个模型后发现其缺乏对数据流、控制流等编程概念的理解,为探究模型能力本质提供了方法与依据。
摘要:
大型语言模型在文本生成上的成功也使其在代码生成和编码任务上表现更优。尽管大量研究展示了它们在代码补全和编辑等任务中的卓越性能,但背后的原因仍不明确。为弥合这一差距,我们探索自回归模型对底层程序逻辑结构的理解程度。我们提出编程概念谓词反事实分析(CACP)这一反事实测试框架,以评估大型代码模型是否理解编程概念。仅通过黑盒访问模型,我们使用CACP对10个流行的大型代码模型针对4种不同编程概念进行评估。研究结果表明,当前模型缺乏对数据流和控制流等概念的理解。
英文摘要:
Large Language Models' success on text generation has also made them better at code generation and coding tasks. While a lot of work has demonstrated their remarkable performance on tasks such as code completion and editing, it is still unclear as to why. We help bridge this gap by exploring to what degree auto-regressive models understand the logical constructs of the underlying programs. We propose Counterfactual Analysis for Programming Concept Predicates (CACP) as a counterfactual testing framework to evaluate whether Large Code Models understand programming concepts. With only black-box access to the model, we use CACP to evaluate ten popular Large Code Models for four different programming concepts. Our findings suggest that current models lack understanding of concepts such as data flow and control flow.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。