Lune

EMNLP Findings2022

Benchmarking Language Models for Code Syntax Understanding

Da Shen, Xinyun Chen, Chenguang Wang, Koushik Sen, Dawn Song

摘要

Pre-trained language models have demonstrated impressive performance in both natural language processing and program understanding, which represent the input as a token sequence without explicitly modeling its structure. Some prior works show that pretrained language models can capture the syntactic rules of natural languages without finetuning on syntax understanding tasks. However, there is limited understanding of how well pre-trained models understand the code structure so far. In this work, we perform the first thorough benchmarking of the stateof-the-art pre-trained models for identifying the syntactic structures of programs. Specifically, we introduce CodeSyntax, a large-scale dataset of programs annotated with the syntactic relationships in their corresponding abstract syntax trees. Our key observation is that existing language models pretrained on code still lack the understanding of code syntax. In fact, these pre-trained programming language models fail to match the performance of simple baselines based on positional offsets and keywords. We also present a natural language benchmark to highlight the differences between natural languages and programming languages in terms of syntactic structure understanding. Our findings point out key limitations of existing pre-training methods for programming languages, and suggest the importance of modeling code syntactic structures. 1

问 Lune

尽管问,回答会引用原文。

Lune 会读完全文和相关的 Paper,每个回答都附上所依据的原文段落。

可以从这些问题问起

Lune 的依据

全文 · 引用它的 4 篇顶会 Paper · 相关的 Paper

获取答案

免费开始,无需绑卡

引用它的顶会 Paper4

  1. CodeIPPrompt: Intellectual Property Infringement Assessment of Code Language ModelsZhiyuan Yu, Yuhao Wu, Ning Zhang, Chenguang Wang 等ICML 2023 · 42 次引用
  2. Measuring Vision-Language STEM Skills of Neural ModelsJianhao Shen, Ye Yuan, Srbuhi Mirzoyan, Ming Zhang 等ICLR 2024 · 14 次引用
  3. Code Change Intention, Development Artifact, and History Vulnerability: Putting Them Together for Vulnerability Fix Detection by LLMXu Yang, Wenhan Zhu, Michael Pacheco, Jiayuan Zhou 等FSE 2025 · 5 次引用
  4. Unlocking SLM Potential for Data Analysis Code Generation via Non-Parametric Knowledge DistillationJinyang Li, Jack Williams, Nick McKenna, Arian Askari 等NeurIPS 2025

它引用的 Paper8

  1. CodeBERT: A Pre-Trained Model for Programming and Natural LanguagesZhangyin Feng, Daya Guo, Duyu Tang, Nan Duan 等EMNLP Findings 2020 · 2,828 次引用
  2. Unsupervised Translation of Programming LanguagesBaptiste Rozière, Marie-Anne Lachaux, Lowik Chanussot, Guillaume LampleNeurIPS 2020 · 606 次引用
  3. Unsupervised Cross-lingual Representation Learning at ScaleAlexis Conneau, Kartikay Khandelwal, Naman Goyal, Vishrav Chaudhary 等ACL 2020 · 539 次引用
  4. Learning and Evaluating Contextual Embedding of Source CodeAditya Kanade, Petros Maniatis, Gogul Balakrishnan, Kensen ShiICML 2020 · 438 次引用
  5. DeepStruct: Pretraining of Language Models for Structure PredictionChenguang Wang, Xiao Liu, Zui Chen, Haoyun Hong 等ACL Findings 2022 · 78 次引用

相关 Paper

  1. What Do They Capture? - A Structural Analysis of Pre-Trained Language Models for Source CodeYao Wan, Wei Zhao, Hongyu Zhang, Yulei Sui 等ICSE 2022 · 66 次引用
  2. AST-Probe: Recovering abstract syntax trees from hidden representations of pre-trained language modelsJosé Antonio Hernández López, Martin Weyssow, Jesús Sánchez Cuadrado, Houari A. SahraouiASE 2022 · 18 次引用
  3. A Critical Study of What Code-LLMs (Do Not) LearnAbhinav Anand, Shweta Verma, Krishna Narasimhan, Mira MeziniACL Findings 2024 · 2 次引用
  4. Understanding Programs by Exploiting (Fuzzing) Test CasesJianyu Zhao, Yuyang Rong, Yiwen Guo, Yifeng He 等ACL Findings 2023 · 13 次引用
  5. An extensive study on pre-trained models for program understanding and generationZhengran Zeng, Hanzhuo Tan, Haotian Zhang, Jing Li 等ISSTA 2022 · 142 次引用
黄昏的海面,两侧是细线勾勒的悬崖