Which Syntactic Capabilities Are Statistically Learned by Masked Language Models for Code?
Not on the map. Why?
Abstract (arXiv)
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.
Key facts. Cited by 6 papers in the map (data through 14 Oct 2026). First posted on arXiv 3 Jan 2024.
Builds on
No reference list yet.
Built on by
Citing papers per year: 2024: 1; 2025: 5.
6 papers.
- 2024How Propense Are Large Language Models at Producing Code Smells? A Benchmarking Studycited by 6
- 2025ObscuraCoder: Powering Efficient Code LM Pre-Training Via Obfuscation Groundingcited by 4
- 2025SnipGen: A Mining Repository Framework for Evaluating LLMs for Codecited by 1
- 2025Bringing Structure to Naturalness: On the Naturalness of ASTscited by 1
- 2025Toward Neurosymbolic Program Comprehensioncited by 0
- 2025How Do Semantically Equivalent Code Transformations Impact Membership Inference on LLMs for Code?cited by 0
- 2025How Do Semantically Equivalent Code Transformations Impact Membership Inference on LLMs for Code?17 Dec 2025
- 2025Bringing Structure to Naturalness: On the Naturalness of ASTs11 Apr 2025
- 2025ObscuraCoder: Powering Efficient Code LM Pre-Training Via Obfuscation Grounding27 Mar 2025
- 2025SnipGen: A Mining Repository Framework for Evaluating LLMs for Code10 Feb 2025
- 2025Toward Neurosymbolic Program Comprehension3 Feb 2025
- 2024How Propense Are Large Language Models at Producing Code Smells? A Benchmarking Study25 Dec 2024