mlsanityData to 7 Oct 2026

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

arXiv 2311.07070 ↗First posted 13 Nov 2023cs.CLcited by 12

On the map: Synthetic data and self-improvement for LLMs → Code and instruction data synthesis

Abstract (arXiv)

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.

Key facts. Cited by 12 papers in the map (data through 7 Oct 2026). Placed in Code and instruction data synthesis, one of 13 directions in Synthetic data and self-improvement for LLMs. Builds on 45 of its 58 references that are in the map. First posted on arXiv 13 Nov 2023.

Builds on

45 of 58 references.

References · 45

  1. 2020Language Models are Few-Shot Learnerscited by 32,199
  2. 2022Training language models to follow instructions with human feedbackcited by 15,712
  3. 2021Evaluating Large Language Models Trained on Codecited by 8,053
  4. 2022Self-Consistency Improves Chain of Thought Reasoning in Language Modelscited by 5,601
  5. 2022PaLM: Scaling Language Modeling with Pathwayscited by 5,304
  6. 2022Large Language Models are Zero-Shot Reasonerscited by 4,323
  7. 2021Program Synthesis with Large Language Modelscited by 3,509
  8. 2019The Curious Case of Neural Text Degenerationcited by 2,881
  9. 2023Code Llama: Open Foundation Models for Codecited by 2,105
  10. 2022BLOOM: A 176B-Parameter Open-Access Multilingual Language Modelcited by 1,968
  11. 2022Challenging BIG-Bench Tasks and Whether Chain-of-Thought Can Solve Themcited by 1,767
  12. 2022Competition-Level Code Generation with AlphaCodecited by 1,427
33 more
  1. 2022Rethinking the Role of Demonstrations: What Makes In-Context Learning Work?cited by 1,413
  2. 2022Least-to-Most Prompting Enables Complex Reasoning in Large Language Modelscited by 1,397
  3. 2017Explanation in Artificial Intelligence: Insights from the Social Sciencescited by 1,201
  4. 2021Fantastically Ordered Prompts and Where to Find Them: Overcoming Few-Shot Prompt Order Sensitivitycited by 1,122
  5. 2023Language Models Don't Always Say What They Think: Unfaithful Explanations in Chain-of-Thought Promptingcited by 1,081
  6. 2023Teaching Large Language Models to Self-Debugcited by 963
  7. 2022CodeGen: An Open Large Language Model for Code with Multi-Turn Program Synthesiscited by 876
  8. 2021Show Your Work: Scratchpads for Intermediate Computation with Language Modelscited by 871
  9. 2023StarCoder: may the source be with you!cited by 790
  10. 2021CodeXGLUE: A Machine Learning Benchmark Dataset for Code Understanding and Generationcited by 732
  11. 2023Distilling Step-by-Step! Outperforming Larger Language Models with Less Training Data and Smaller Model Sizescited by 710
  12. 2017Program Induction by Rationale Generation : Learning to Solve and Explain Algebraic Word Problemscited by 642
  13. 2023Is ChatGPT a Good NLG Evaluator? A Preliminary Studycited by 420
  14. 2023Large Language Models Are State-of-the-Art Evaluators of Translation Qualitycited by 416
  15. 2021Unified Pre-training for Program Understanding and Generationcited by 361
  16. 2022A Systematic Evaluation of Large Language Models of Codecited by 360
  17. 2023Explainability for Large Language Models: A Surveycited by 331
  18. 2020Unsupervised Translation of Programming Languagescited by 262
  19. 2022Can language models learn from explanations in context?cited by 248
  20. 2023SantaCoder: don't reach for the stars!cited by 169
  21. 2021Noisy Channel Language Model Prompting for Few-Shot Text Classificationcited by 163
  22. 2020Measuring Association Between Labels and Free-Text Rationalescited by 159
  23. 2022Multi-lingual Evaluation of Code Generation Modelscited by 158
  24. 2023Hypothesis Search: Inductive Reasoning with Language Modelscited by 119
  25. 2022Coder Reviewer Reranking for Code Generationcited by 83
  26. 2021Leveraging Automated Unit Tests for Unsupervised Code Translationcited by 82
  27. 2021When Can Models Learn From Explanations? A Formal Framework for Understanding the Roles of Explanation Datacited by 75
  28. 2023Improving Code Generation by Training with Natural Language Feedbackcited by 75
  29. 2023Dictionary-based Phrase-level Prompting of Large Language Models for Machine Translationcited by 74
  30. 2021DOBF: A Deobfuscation Pre-Training Objective for Programming Languagescited by 68
  31. 2023Post Hoc Explanations of Language Models Can Improve Language Modelscited by 50
  32. 2022A survey on improving NLP models with human explanationscited by 15
  33. 2022FRAME: Evaluating Rationale-Label Consistency Metrics for Free-Text Rationalescited by 10

Built on by

Cited by year (2026 to 7 Oct)

Citing papers per year: 2023: 1; 2024: 6; 2025: 4; 2026: 1.

12 papers.

Similar, not cited

Close in wording, no citation either way

  1. 2024From Critique to Clarity: A Pathway to Faithful and Personalized Code Explanations with Large Language Models
  2. 2024Enhancing Code Translation in Language Models with Few-Shot Learning via Retrieval-Augmented Generation
  3. 2024SpecTra: Enhancing the Code Translation Ability of Language Models by Generating Multi-Modal Specifications
  4. 2024Assessing Code Generation with Intermediate Languages
  5. 2025Enabling Global, Human-Centered Explanations for LLMs:From Tokens to Interpretable Code and Test Generation
  6. 2026Are you Synthesizing or Recalling? Evaluating LLMs on Algorithmic Code Retrieval
  7. 2026Illocutionary Explanation Planning for Source-Faithful Explanations in Retrieval-Augmented Language Models
  8. 2024Semi-Instruct: Bridging Natural-Instruct and Self-Instruct for Code Large Language Models