Abstract
This work explores the use of self-generated natural language explanations as an intermediate step for code-to-code translation with language models. Across three types of explanations and 19 programming languages constructed from the MultiPL-E dataset (Cassano et al., 2022), we find the explanations to be particularly effective in the zero-shot case, improving performance by 12% on average. Improvements with natural language explanations are particularly pronounced on difficult programs. We release our dataset, code, and canonical solutions in all 19 languages.
| Original language | English |
|---|---|
| Title of host publication | EMNLP 2023 - The 2023 Conference on Empirical Methods in Natural Language Processing - Findings of the Association for Computational Linguistics: EMNLP 2023 |
| Editors | Houda Bouamor, Juan Pino, Kalika Bali |
| Place of Publication | Stroudsburg PA USA |
| Publisher | Association for Computational Linguistics (ACL) |
| Pages | 1741-1788 |
| Number of pages | 48 |
| ISBN (Electronic) | 9798891760615 |
| DOIs | |
| Publication status | Published - 2023 |
| Event | Empirical Methods in Natural Language Processing 2023 - , Singapore Duration: 6 Dec 2023 → 10 Dec 2023 https://2023.emnlp.org/ https://aclanthology.org/volumes/2023.findings-emnlp/ (Proceedings) https://aclanthology.org/volumes/2023.emnlp-demo/ (Proceedings) |
Conference
| Conference | Empirical Methods in Natural Language Processing 2023 |
|---|---|
| Abbreviated title | EMNLP 2023 |
| Country/Territory | Singapore |
| Period | 6/12/23 → 10/12/23 |
| Internet address |