Text-to-Code Generation with Modality-relative Pre-training

Fenia Christopoulou, Guchun Zhang, Gerasimos Lampouras
2/8/2024
cs.CL

No confident code implementation found for this paper. 2 possible matches can be shown below.

Abstract

Large pre-trained language models have recently been expanded and applied to programming language tasks with great success, often through further pre-training of a strictly-natural language model--where training sequences typically contain both natural and (linearised) programming language. Such approaches effectively map both modalities of the sequence into the same embedding space. However, programming language keywords (e.g. "while") often have very strictly defined semantics. As such, transfer learning from their natural language usage may not necessarily be beneficial to their code application and vise versa. Assuming an already pre-trained language model, in this work we investigate how sequence tokens can be adapted and represented differently, depending on which modality they belong to, and to the ultimate benefit of the downstream task. We experiment with separating embedding spaces between modalities during further model pre-training with modality-relative training objectives. We focus on text-to-code generation and observe consistent improvements across two backbone models and two test sets, measuring pass@$k$ and a novel incremental variation.

View on arXivView PDF

Code Implementations

No confident code match yet

We couldn't find an author-owned or strongly-evidenced community implementation for this paper. 2 weaker matches are hidden by default — verify before relying on them.

No code implementations found yet.

Know of an implementation? Let us know in the comments below!

Similar Papers

Cite this paper

@article{christopoulou2024texttocode,
  title  = {Text-to-Code Generation with Modality-relative Pre-training},
  author = {Fenia Christopoulou and Guchun Zhang and Gerasimos Lampouras},
  year   = {2024},
  eprint = {2402.05783},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2402.05783v2}
}

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/2402.05783.svg)](https://codeofpaper.com/paper/2402.05783)

Discussion