Which Syntactic Capabilities Are Statistically Learned by Masked Language Models for Code?

7Citations
Citations of this article
9Readers
Mendeley users who have this article in their library.
Get full text

Abstract

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.

Cite

CITATION STYLE

APA

Velasco, A., Palacio, D. N., Rodriguez-Cardenas, D., & Poshyvanyk, D. (2024). Which Syntactic Capabilities Are Statistically Learned by Masked Language Models for Code? In Proceedings - International Conference on Software Engineering (pp. 72–76). IEEE Computer Society. https://doi.org/10.1145/3639476.3639768

Register to see more suggestions

Mendeley helps you to discover research relevant for your work.

Already have an account?

Save time finding and organizing research with Mendeley

Sign up for free