AI Paper Atlas

Research map / Large language models / Agents, code and math

Explain-then-translate: an analysis on improving program translation with self-generated explanations

Zilu Tang, Mayank Agarwal, Alex Shypula, Bailin Wang, Derry Wijaya, Jie Chen, Yoon Kim

EMNLP 2023Large language models › Agents, code and mathapproach: Execution-based code verification35 citations (OpenAlex)

MIT-IBM Watson AI Lab · Monash University · Boston University

Read the paperPlace an idea next to itCheck your own paper ↗

15measured effects
5improved
4no clear effect
6hurt

AI-extracted. The measured effects below were read by AI from the paper's full text (no summary yet). Numbers and claims can be wrong or missing context, so check the paper before you cite or build on it.

Measured effects reported in the paper

What was changedWhereMeasuredEffect
add self-generated NL explanation before translating (zero-shot)GPT-3.5 · MultiPL-C2C Python-to-X (18 targets, 0-shot)pass@1: +11.5% relative on average; 6.2% high-resource, 14.5% extremely-low-resourceImproved
add explanations in four-shot settingGPT-3.5 · MultiPL-C2C Python-to-X (4-shot)pass@1: average improvement 1.1% (up to 10.1% for some pairs)No clear effect
use few-shot-style explanations (exp) vs zero-shotGPT-3.5 · MultiPL-C2C Python-to-Xpass@1Hurt
explain ExtLow source programs then translate to high-resourceGPT-3.5 · ExtLow-to-Highpass@1No clear effect
explanation selection with logprob heuristic for expGPT-3.5 · MultiPL-C2C Python-to-Xpass@1: +2.54% over random (p=0.055); +1.7% avg (p<0.001) over 18 directionsImproved
explanation selection with frag heuristic for exp-lbl-dGPT-3.5 · MultiPL-C2C Python-to-Xpass@1: +2.2% over random (p=0.033); 0.48% avg (p=0.022)Improved
use GPT-3.5-generated explanations for smaller modelCodeGen2-1B · MultiPL-C2C Python-to-Xpass@1: outperforms self-explanations in 12 of 18 directionsImproved
explain only hard problems (selective explanation via direct pass@1 oracle)exp · MultiPL-C2C all directionspass@1: better than direct and exp in 35/36 directionsImproved
shuffle sentences in explanation (swap-s) (ablation)exp · Python-to-Java / PHPpass@1 improvement: jv 6.9 -> 5.1; php 8.6 -> 7.9No clear effect
delete 50% of words in explanation (del-w-0.5) (ablation)exp · Python-to-PHPpass@1 improvement: 8.6 -> 3.3Hurt
replace explanation with empty string (no-exp) (ablation)exp · Python-to-PHPpass@1 improvement: 8.6 -> -54.1Hurt
replace explanation with random other program's explanation (rand-exp) (ablation)exp · Python-to-PHPpass@1 improvement: 8.6 -> 6.1Hurt

Closest papers by meaning

Writing a paper in this area? scime draft is a free LaTeX editor with AI included, real-time co-authors and a check of your references and venue rules before you submit. It also imports OpenAI Prism projects.

Open scime draft

Get the next scime Dispatch and a monthly field update

Free. We send a confirmation link first; every email has a one-click unsubscribe. Privacy