Automating Code-Related Tasks Through Transformers: The Impact of Pre-training
Not on the map. Why?
Abstract (arXiv)
Transformers have gained popularity in the software engineering (SE) literature. These deep learning models are usually pre-trained through a self-supervised objective, meant to provide the model with basic knowledge about a language of interest (e.g., Java). A classic pre-training objective is the masked language model (MLM), in which a percentage of tokens from the input (e.g., a Java method) is masked, with the model in charge of predicting them. Once pre-trained, the model is then fine-tuned to support the specific downstream task of interest (e.g., code summarization). While there is evidence suggesting the boost in performance provided by pre-training, little is known about the impact of the specific pre-training objective(s) used. Indeed, MLM is just one of the possible pre-training objectives and recent work from the natural language processing field suggest that pre-training objectives tailored for the specific downstream task of interest may substantially boost the model's performance. In this study, we focus on the impact of pre-training objectives on the performance of transformers when automating code-related tasks. We start with a systematic literature review aimed at identifying the pre-training objectives used in SE. Then, we pre-train 32 transformers using both (i) generic pre-training objectives usually adopted in SE; and (ii) pre-training objectives tailored to specific code-related tasks subject of our experimentation, namely bug-fixing, code summarization, and code completion. We also compare the pre-trained models with non pre-trained ones. Our results show that: (i) pre-training helps in boosting performance only if the amount of fine-tuning data available is small; (ii) the MLM objective is usually sufficient to maximize the prediction performance of the model, even when comparing it with pre-training objectives specialized for the downstream task at hand.
Key facts. Cited by 8 papers in the map (data through 7 Oct 2026). Builds on 42 of its 81 references that are in the map. First posted on arXiv 8 Feb 2023.
Builds on
42 of 81 references.
References · 42
- 2017Attention Is All You Needcited by 59,932
- 2018BERT: Pre-training of Deep Bidirectional Transformers for Language Understandingcited by 40,204
- 2019Exploring the Limits of Transfer Learning with a Unified Text-to-Text Transformercited by 14,491
- 2020CodeBERT: A Pre-Trained Model for Programming and Natural Languagescited by 1,286
- 2019PEGASUS: Pre-training with Extracted Gap-sentences for Abstractive Summarizationcited by 1,100
- 2019CodeSearchNet Challenge: Evaluating the State of Semantic Code Searchcited by 638
- 2020GraphCodeBERT: Pre-training Code Representations with Data Flowcited by 600
- 2021Unified Pre-training for Program Understanding and Generationcited by 361
- 2020IntelliCode Compose: Code Generation Using Transformercited by 225
- 2018SequenceR: Sequence-to-Sequence Learning for End-to-End Program Repaircited by 144
- 2020Unit Test Case Generation with Transformers and Focal Contextcited by 118
- 2018An Empirical Study on Learning Bug-Fixing Patches in the Wild via Neural Machine Translationcited by 106
30 more
- 2022Automating Code Review Activities by Large-Scale Pre-trainingcited by 98
- 2016A Convolutional Attention Network for Extreme Summarization of Source Codecited by 90
- 2021CURE: Code-Aware Neural Machine Translation for Automatic Program Repaircited by 85
- 2021Studying the Usage of Text-To-Text Transfer Transformer to Support Code-Related Taskscited by 70
- 2022Using Pre-Trained Models to Boost Code Review Automationcited by 63
- 2019Code Generation as a Dual Task of Code Summarizationcited by 62
- 2020Multi-task Learning based Pre-trained Language Model for Code Completioncited by 58
- 2020Deep Learning for Source Code Modeling and Generation: Models, Applications and Challengescited by 55
- 2019Recommendations for Datasets for Source Code Summarizationcited by 46
- 2021Applying CodeBERT for Automated Program Repair of Java Simple Bugscited by 44
- 2021Multilingual training for Software Engineeringcited by 43
- 2020A Systematic Literature Review on the Use of Deep Learning in Software Engineering Researchcited by 35
- 2022On the Transferability of Pre-trained Language Models for Low-Resource Programming Languagescited by 30
- 2019Structure-Invariant Testing for Machine Translationcited by 27
- 2021On Multi-Modal Learning of Editing Source Codecited by 25
- 2021An Empirical Study on the Usage of BERT Models for Code Completioncited by 22
- 2021An Empirical Study on the Usage of Transformer Models for Code Completioncited by 22
- 2021Traceability Transformed: Generating more Accurate Links with Pre-Trained BERT Modelscited by 20
- 2021Sampling Projects in GitHub for MSR Studiescited by 20
- 2021Generating Bug-Fixes Using Pretrained Transformerscited by 18
- 2022Using Transfer Learning for Code-Related Taskscited by 18
- 2021A Multi-Modal Transformer-based Code Summarization Approach for Smart Contractscited by 16
- 2021AST-Transformer: Encoding Abstract Syntax Trees Efficiently for Code Summarizationcited by 11
- 2021Automating the Removal of Obsolete TODO Commentscited by 6
- 2021Learning to Find Usages of Library Functions in Optimized Binariescited by 5
- 2021An Empirical Study on Code Comment Completioncited by 5
- 2021Improving Stack Overflow question title generation with copying enhanced CodeBERT model and bi-modal informationcited by 5
- 2021Natural Language-Guided Programmingcited by 4
- 2020Task-Oriented API Usage Examples Prompting Powered By Programming Task Knowledge Graphcited by 3
- 2021Shipwright: A Human-in-the-Loop System for Dockerfile Repaircited by 2
Built on by
Citing papers per year: 2023: 3; 2024: 3; 2025: 1; 2026: 1.
8 papers.
- 2023Evaluating Instruction-Tuned Large Language Models on Code Comprehension and Generationcited by 49
- 2024Dataflow-Guided Retrieval Augmentation for Repository-Level Code Completioncited by 40
- 2024Beyond Code Generation: An Observational Study of ChatGPT Usage in Software Engineering Practicecited by 25
- 2023A Comprehensive Evaluation of Parameter-Efficient Fine-Tuning on Software Engineering Taskscited by 5
- 2023Towards Automatically Addressing Self-Admitted Technical Debt: How Far Are We?cited by 1
- 2024Can Neural Decompilation Assist Vulnerability Prediction on Binary Code?cited by 0
- 2025How to Select Pre-Trained Code Models for Reuse? A Learning Perspectivecited by 0
- 2026From Natural Language to Verified Code: Toward AI Assisted Problem-to-Code Generation with Dafny-Based Formal Verificationcited by 0
- 2026From Natural Language to Verified Code: Toward AI Assisted Problem-to-Code Generation with Dafny-Based Formal Verification24 Apr 2026
- 2025How to Select Pre-Trained Code Models for Reuse? A Learning Perspective7 Jan 2025
- 2024Can Neural Decompilation Assist Vulnerability Prediction on Binary Code?10 Dec 2024
- 2024Dataflow-Guided Retrieval Augmentation for Repository-Level Code Completion30 May 2024
- 2024Beyond Code Generation: An Observational Study of ChatGPT Usage in Software Engineering Practice23 Apr 2024
- 2023A Comprehensive Evaluation of Parameter-Efficient Fine-Tuning on Software Engineering Tasks25 Dec 2023
- 2023Towards Automatically Addressing Self-Admitted Technical Debt: How Far Are We?17 Aug 2023
- 2023Evaluating Instruction-Tuned Large Language Models on Code Comprehension and Generation2 Aug 2023