CLNov 13, 2023

Explain-then-Translate: An Analysis on Improving Program Translation with Self-generated Explanations

arXiv:2311.07070v1136 citationsh-index: 21
Originality Incremental advance
AI Analysis

This addresses code translation challenges for developers, offering a method to enhance accuracy in zero-shot scenarios, though it is incremental as it builds on existing language model techniques.

The paper tackles program translation by using self-generated natural language explanations as an intermediate step with language models, finding that this approach improves zero-shot performance by 12% on average across 19 programming languages, especially for difficult programs.

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, 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.

Code Implementations1 repo
Foundations

The foundational work for this paper's niche, ranked by how specifically the neighbourhood builds on it — not by global fame.

Your Notes