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.- Anthology ID:
- 2024.eacl-long.72
- Volume:
- Proceedings of the 18th Conference of the European Chapter of the Association for Computational Linguistics (Volume 1: Long Papers)
- Month:
- March
- Year:
- 2024
- Address:
- St. Julian’s, Malta
- Editors:
- Yvette Graham, Matthew Purver
- Venue:
- EACL
- SIG:
- Publisher:
- Association for Computational Linguistics
- Note:
- Pages:
- 1194–1208
- Language:
- URL:
- https://aclanthology.org/2024.eacl-long.72
- DOI:
- Cite (ACL):
- Fenia Christopoulou, Guchun Zhang, and Gerasimos Lampouras. 2024. Text-to-Code Generation with Modality-relative Pre-training. In Proceedings of the 18th Conference of the European Chapter of the Association for Computational Linguistics (Volume 1: Long Papers), pages 1194–1208, St. Julian’s, Malta. Association for Computational Linguistics.
- Cite (Informal):
- Text-to-Code Generation with Modality-relative Pre-training (Christopoulou et al., EACL 2024)
- PDF:
- https://preview.aclanthology.org/proper-vol2-ingestion/2024.eacl-long.72.pdf