In-Context Code-Text Learning for Bimodal Software Engineering

Fuente: arXiv
Saved in:
Bibliographic Details
Main Authors: Tang, Xunzhu, Wang, Liran, Liu, Yonghui, Chai, Linzheng, Yang, Jian, Li, Zhoujun, Tian, Haoye, Klein, Jacques, Bissyande, Tegawende F.
Format: Preprint
Published: 2024
Subjects:
Online Access:
Tags: Add Tag
No Tags, Be the first to tag this record!
_version_ 1866909361501110272
author Tang, Xunzhu
Wang, Liran
Liu, Yonghui
Chai, Linzheng
Yang, Jian
Li, Zhoujun
Tian, Haoye
Klein, Jacques
Bissyande, Tegawende F.
author_facet Tang, Xunzhu
Wang, Liran
Liu, Yonghui
Chai, Linzheng
Yang, Jian
Li, Zhoujun
Tian, Haoye
Klein, Jacques
Bissyande, Tegawende F.
contents Bimodal software analysis initially appeared to be within reach with the advent of large language models. Unfortunately, the complex interplay of natural language text and code in software engineering, presents unique challenges that prevent pretrained models to generalize to a variety of tasks. We postulate that in-context learning for the code-text bimodality is a promising avenue. This paper thus introduces a comprehensive study of in-context code-text learning, focusing on leveraging pretrained CodeLLAMA models. We consider a diverse dataset encompassing 23 software engineering tasks, which we transform in an in-context learning format. To effectively extract informative features, we propose a configurable prompt template. Our proposed pipeline, InCTRL, then unifies prompt learning across various software engineering tasks. Extensive evaluation on the study datasets demonstrates the superiority of INCTRL-models in few-shot performance, surpassing state-of-the-art models including the support model, CodeLLAMA. Typically, we observe that applied to the CodeLLAMA model, INCTRL brings improvements in terms of precision (at least about 12\%) and recall (up to 93.88\%) on various tasks. For example, on the task of program repair, INCTRL improves the BLEU score of CodeLLAMA by 85 points, while for clone detection, INCTRL achieves an improvement of 69 percentage points. Moreover, INCTRL-models offer state-of-the-art performance when using retrieval-augmented generation on individual downstream tasks. Finally, we qualitatively analyze the benefits of INCTRL over CodeLLAMA and open-source all models for broader impact. We make our code and dataset publicly available at: \begin{center} {\url{https://anonymous.4open.science/r/inctrl-B65B}} \end{center}
format Preprint
id arxiv_https___arxiv_org_abs_2410_18107
institution arXiv
publishDate 2024
record_format arxiv
spellingShingle In-Context Code-Text Learning for Bimodal Software Engineering
Tang, Xunzhu
Wang, Liran
Liu, Yonghui
Chai, Linzheng
Yang, Jian
Li, Zhoujun
Tian, Haoye
Klein, Jacques
Bissyande, Tegawende F.
Software Engineering
Artificial Intelligence
Bimodal software analysis initially appeared to be within reach with the advent of large language models. Unfortunately, the complex interplay of natural language text and code in software engineering, presents unique challenges that prevent pretrained models to generalize to a variety of tasks. We postulate that in-context learning for the code-text bimodality is a promising avenue. This paper thus introduces a comprehensive study of in-context code-text learning, focusing on leveraging pretrained CodeLLAMA models. We consider a diverse dataset encompassing 23 software engineering tasks, which we transform in an in-context learning format. To effectively extract informative features, we propose a configurable prompt template. Our proposed pipeline, InCTRL, then unifies prompt learning across various software engineering tasks. Extensive evaluation on the study datasets demonstrates the superiority of INCTRL-models in few-shot performance, surpassing state-of-the-art models including the support model, CodeLLAMA. Typically, we observe that applied to the CodeLLAMA model, INCTRL brings improvements in terms of precision (at least about 12\%) and recall (up to 93.88\%) on various tasks. For example, on the task of program repair, INCTRL improves the BLEU score of CodeLLAMA by 85 points, while for clone detection, INCTRL achieves an improvement of 69 percentage points. Moreover, INCTRL-models offer state-of-the-art performance when using retrieval-augmented generation on individual downstream tasks. Finally, we qualitatively analyze the benefits of INCTRL over CodeLLAMA and open-source all models for broader impact. We make our code and dataset publicly available at: \begin{center} {\url{https://anonymous.4open.science/r/inctrl-B65B}} \end{center}
title In-Context Code-Text Learning for Bimodal Software Engineering
topic Software Engineering
Artificial Intelligence
url https://arxiv.org/abs/2410.18107