代码掩码语言模型统计学习了哪些句法能力?
Which Syntactic Capabilities Are Statistically Learned by Masked Language Models for Code?
AI总结:
本文提出SyntaxEval技术,基于抽象语法树自动掩码代码输入以评估掩码语言模型的句法能力,并通过GitHub数据案例研究发现所测MLMs在部分句法能力上预测失败。
摘要:
本文讨论了在代码补全任务中评估掩码语言模型(MLMs)的局限性。我们强调,依赖基于准确率的度量可能会因忽视编程语言的语法规则而导致对模型能力的高估。为了解决这些问题,我们引入了一种名为SyntaxEval的技术,其中句法能力被用于增强对MLMs的评估。SyntaxEval根据模型输入的抽象语法树(ASTs)自动执行元素掩码过程。我们使用来自GitHub仓库的数据对两个流行的MLMs进行了案例研究。我们的结果表明,节点类型与MLMs的准确率之间存在负向因果效应。我们得出结论,所研究的MLMs未能预测某些句法能力。
英文摘要:
This paper discusses the limitations of evaluating Masked Language Models (MLMs) in code completion tasks. We highlight that relying on accuracy-based measurements may lead to an overestimation of models' capabilities by neglecting the syntax rules of programming languages. To address these issues, we introduce a technique called SyntaxEval in which Syntactic Capabilities are used to enhance the evaluation of MLMs. SyntaxEval automates the process of masking elements in the model input based on their Abstract Syntax Trees (ASTs). We conducted a case study on two popular MLMs using data from GitHub repositories. Our results showed negative causal effects between the node types and MLMs' accuracy. We conclude that MLMs under study fail to predict some syntactic capabilities.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。