An extensive study on pre-trained models for program understanding and generation
Zhengran Zeng, Hanzhuo Tan, Haotian Zhang, Jing Li, Yuqun Zhang, Lingming Zhang
摘要
Automatic program understanding and generation techniques could significantly advance the productivity of programmers and have been widely studied by academia and industry. Recently, the advent of pre-trained paradigm enlightens researchers to develop general-purpose pre-trained models which can be applied for a broad range of program understanding and generation tasks. Such pre-trained models, derived by self-supervised objectives on large unlabelled corpora, can be fine-tuned in downstream tasks (such as code search and code generation) with minimal adaptations. Although these pre-trained models claim superiority over the prior techniques, they seldom follow equivalent evaluation protocols, e.g., they are hardly evaluated on the identical benchmarks, tasks, or settings. Consequently, there is a pressing need for a comprehensive study of the pre-trained models on their effectiveness, versatility as well as the limitations to provide implications and guidance for the future development in this area. To this end, we first perform an extensive study of eight open-access pre-trained models over a large benchmark on seven representative code tasks to assess their reproducibility. We further compare the pre-trained models and domain-specific state-of-the-art techniques for validating pre-trained effectiveness. At last, we investigate the robustness of the pre-trained models by inspecting their performance variations under adversarial attacks. Through the study, we find that while we can in general replicate the original performance of the pre-trained models on their evaluated tasks and adopted benchmarks, subtle performance fluctuations can refute the findings in their original papers. Moreover, none of the existing pre-trained models can dominate over all other models. We also find that the pre-trained models can significantly outperform non-pre-trained state-of-the-art techniques in program understanding tasks. Furthermore, we perform the first study for natural language-programming language pre-trained model robustness via adversarial attacks and find that a simple random attack approach can easily fool the state-of-the-art pre-trained models and thus incur security issues. At last, we also provide multiple practical guidelines for advancing future research on pre-trained models for program understanding and generation.
问 Lune
几分钟读透这篇 Paper,不用再花一下午。
Lune 能读完全文,也能读引用它的顶会 Paper,讲清它的结论、证据和局限,每一点都注明出自哪篇 Paper。不用硬啃,也不靠猜。
已有 39 篇顶会 Paper 引用了它。别等审稿人问起,先弄清它们发现了什么。
脉络
- CodeBERT: A Pre-Trained Model for Programming and Natural Languages 引用了 VideoBERT: A Joint Model for Video and Language Representation Learning
- What Makes Good In-Context Demonstrations for Code Intelligence Tasks with LLMs? 引用了 CodeBERT: A Pre-Trained Model for Programming and Natural Languages
- An Empirical Study on Fine-Tuning Large Language Models of Code for Automated Program Repair 引用了 CodeBERT: A Pre-Trained Model for Programming and Natural Languages
- An Empirical Study on Fine-Tuning Large Language Models of Code for Automated Program Repair 引用了 GraphCodeBERT: Pre-training Code Representations with Data Flow
引用它的顶会 Paper39
- PandaLM: An Automatic Evaluation Benchmark for LLM Instruction Tuning OptimizationYidong Wang, Zhuohao Yu, Wenjin Yao, Zhengran Zeng 等ICLR 2024 · 368 次引用
- Evaluating Large Language Models in Class-Level Code GenerationXueying Du, Mingwei Liu, Kaixin Wang, Hanlin Wang 等ICSE 2024 · 118 次引用
- An Empirical Study on Fine-Tuning Large Language Models of Code for Automated Program RepairKai Huang, Xiangxin Meng, Jian Zhang, Yang Liu 等ASE 2023 · 91 次引用
- Fuzzing deep-learning libraries via automated relational API inferenceYinlin Deng, Chenyuan Yang, Anjiang Wei, Lingming ZhangFSE 2022 · 83 次引用
- What Makes Good In-Context Demonstrations for Code Intelligence Tasks with LLMs?Shuzheng Gao, Xin-Cheng Wen, Cuiyun Gao, Wenxuan Wang 等ASE 2023 · 80 次引用
它引用的 Paper30
- CodeBERT: A Pre-Trained Model for Programming and Natural LanguagesZhangyin Feng, Daya Guo, Duyu Tang, Nan Duan 等EMNLP Findings 2020 · 2,828 次引用
- GraphCodeBERT: Pre-training Code Representations with Data FlowDaya Guo, Shuo Ren, Shuai Lu, Zhangyin Feng 等ICLR 2021 · 1,644 次引用
- VideoBERT: A Joint Model for Video and Language Representation LearningChen Sun, Austin Myers, Carl Vondrick, Kevin Murphy 等ICCV 2019 · 1,396 次引用
- Is BERT Really Robust? A Strong Baseline for Natural Language Attack on Text Classification and EntailmentDi Jin, Zhijing Jin, Joey Tianyi Zhou, Peter SzolovitsAAAI 2020 · 1,333 次引用
- BART: Denoising Sequence-to-Sequence Pre-training for Natural Language Generation, Translation, and ComprehensionMike Lewis, Yinhan Liu, Naman Goyal, Marjan Ghazvininejad 等ACL 2020 · 1,224 次引用
相关 Paper
- Evaluating and Enhancing the Robustness of Code Pre-trained Models through Structure-Aware Adversarial Samples GenerationNuo Chen, Qiushi Sun, Jianing Wang, Ming Gao 等EMNLP Findings 2023 · 3 次引用
- Benchmarking Language Models for Code Syntax UnderstandingDa Shen, Xinyun Chen, Chenguang Wang, Koushik Sen 等EMNLP Findings 2022 · 16 次引用
- Understanding Programs by Exploiting (Fuzzing) Test CasesJianyu Zhao, Yuyang Rong, Yiwen Guo, Yifeng He 等ACL Findings 2023 · 13 次引用
- DOBF: A Deobfuscation Pre-Training Objective for Programming LanguagesMarie-Anne Lachaux, Baptiste Rozière, Marc Szafraniec, Guillaume LampleNeurIPS 2021 · 174 次引用
- Bridging Pre-trained Models and Downstream Tasks for Source Code UnderstandingDeze Wang, Zhouyang Jia, Shanshan Li, Yue Yu 等ICSE 2022 · 68 次引用
