CoTexT: Multi-task Learning with Code-Text Transformer

Long Phan, Hieu Tran, Daniel Le, Hieu Nguyen, James Anibal +2 more
5/18/2021
cs.AIcs.PL
transformer-attention

Official code: justinphan3110/CoTexT (35 stars, Jupyter Notebook, last commit 2021-09-14).

Abstract

We present CoTexT, a pre-trained, transformer-based encoder-decoder model that learns the representative context between natural language (NL) and programming language (PL). Using self-supervision, CoTexT is pre-trained on large programming language corpora to learn a general understanding of language and code.

Show full abstract

CoTexT supports downstream NL-PL tasks such as code summarizing/documentation, code generation, defect detection, and code debugging. We train CoTexT on different combinations of available PL corpus including both "bimodal" and "unimodal" data. Here, bimodal data is the combination of text and corresponding code snippets, whereas unimodal data is merely code snippets. We first evaluate CoTexT with multi-task learning: we perform Code Summarization on 6 different programming languages and Code Refinement on both small and medium size featured in the CodeXGLUE dataset. We further conduct extensive experiments to investigate CoTexT on other tasks within the CodeXGlue dataset, including Code Generation and Defect Detection. We consistently achieve SOTA results in these tasks, demonstrating the versatility of our models.

View on arXivView PDF

Code Implementations(1)

Code implementation for CoTexT: Multi-task Learning with Code-Text Transformer

359Jupyter NotebookMay 10, 20215 years ago

Similar Papers

Cite this paper

@article{phan2021cotext,
  title  = {CoTexT: Multi-task Learning with Code-Text Transformer},
  author = {Long Phan and Hieu Tran and Daniel Le and Hieu Nguyen and James Anibal and Alec Peltekian and Yanfang Ye},
  year   = {2021},
  eprint = {2105.08645},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/2105.08645}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2105.08645.svg)](https://codeofpaper.com/paper/2105.08645)

Discussion