Papers › Leveraging pre-trained language models for code generation
Leveraging pre-trained language models for code generation
Ahmed Soliman, Samir Shaheen, Mayada Hadhoud
Code assistance refers to the utilization of various tools, techniques, and models to help developers in the process of software development. As coding tasks become increasingly complex, code assistant plays a pivotal role in enhancing developer productivity, reducing errors, and facilitating a more efficient coding workflow. This assistance can manifest in various forms, including code autocompletion, error detection and correction, code generation, documentation support, and context-aware suggestions. Language models have emerged as integral components of code assistance, offering developers the capability to receive intelligent suggestions, generate code snippets, and enhance overall coding proficiency. In this paper, we propose new hybrid models for code generation by leveraging pre-trained language models BERT, RoBERTa, ELECTRA, and LUKE with the Marian Causal Language Model. Selecting these models based on their strong performance in various natural language processing tasks. We evaluate the performance of these models on two datasets CoNaLa and DJANGO and compare them to existing state-of-the-art models. We aim to investigate the potential of pre-trained transformer language models to revolutionize code generation, offering improved precision and efficiency in navigating complex coding scenarios. Additionally, conducting error analysis and refining the generated code. Our results show that these models, when combined with the Marian Decoder, significantly improve code generation accuracy and efficiency. Notably, the RoBERTaMarian model achieved a maximum BLEU score of 35.74 and an exact match accuracy of 13.8% on CoNaLa, while LUKE-Marian attained a BLEU score of 89.34 and an exact match accuracy of 78.50% on DJANGO. Implementation of this work is available at https://github.com/AhmedSSoliman/Leveraging-Pretrained-Language-Models-for-Code-Generation.
Code
Repository list and official/mentioned flags are the archive's, frozen 2025-07-28. Reachability, where shown, is from one Syntology probe window (2026-09-16 to 2026-09-18); repositories not probed show nothing. GitHub stars are not tracked.
Code Syntology ran Syntology
Not run by Syntology. Nothing on this page verifies that the listed code works.
Tasks
Results from the paper archive 2025-07-28
| Task | Dataset | Model | Metric | Value | Rank at snapshot | Leaderboard | Report |
|---|---|---|---|---|---|---|---|
| Code Generation | CoNaLa | RoBERTaMarian | BLEU | 35.74 | #2 of 14 | Archive leaderboard | report |
| Code Generation | CoNaLa | RoBERTaMarian | Exact Match Accuracy | 13.8 | #2 of 14 | Archive leaderboard | report |
| Code Generation | CoNaLa | BERTMarian | BLEU | 32.46 | #6 of 14 | Archive leaderboard | report |
| Code Generation | CoNaLa | BERTMarian | Exact Match Accuracy | 12.40 | #6 of 14 | Archive leaderboard | report |
| Code Generation | CoNaLa | ELECTRAMarian | BLEU | 30.18 | #10 of 14 | Archive leaderboard | report |
| Code Generation | CoNaLa | ELECTRAMarian | Exact Match Accuracy | 10.0 | #10 of 14 | Archive leaderboard | report |
| Code Generation | CoNaLa | LUKEMarian | BLEU | 29.83 | #12 of 14 | Archive leaderboard | report |
| Code Generation | CoNaLa | LUKEMarian | Exact Match Accuracy | 7.6 | #12 of 14 | Archive leaderboard | report |
| Code Generation | Django | LUKEMarian | Accuracy | 78.50 | #5 of 11 | Archive leaderboard | report |
| Code Generation | Django | LUKEMarian | BLEU Score | 89.34 | #5 of 11 | Archive leaderboard | report |
| Code Generation | Django | RoBERTaMarian | Accuracy | 77.95 | #6 of 11 | Archive leaderboard | report |
| Code Generation | Django | RoBERTaMarian | BLEU Score | 88.91 | #6 of 11 | Archive leaderboard | report |
| Code Generation | Django | BERTMarian | Accuracy | 76.68 | #7 of 11 | Archive leaderboard | report |
| Code Generation | Django | BERTMarian | BLEU Score | 56.55 | #7 of 11 | Archive leaderboard | report |
| Code Generation | Django | ELECTRAMarian | Accuracy | 65.32 | #9 of 11 | Archive leaderboard | report |
| Code Generation | Django | ELECTRAMarian | BLEU Score | 53.02 | #9 of 11 | Archive leaderboard | report |
Ranks are positions in the archive's leaderboards as they stood at the 2025-07-28 snapshot. Results published since then are not among these rows, so a rank here is not a current standing.
Methods
Report a problem or propose a change · a person checks every report against the paper or source before anything changes; decisions are listed on /corrections