Leveraging Automated Unit Tests for Unsupervised Code Translation
Not on the map. Why?
Abstract (arXiv)
With little to no parallel data available for programming languages, unsupervised methods are well-suited to source code translation. However, the majority of unsupervised machine translation approaches rely on back-translation, a method developed in the context of natural language translation and one that inherently involves training on noisy inputs. Unfortunately, source code is highly sensitive to small changes; a single token can result in compilation failures or erroneous programs, unlike natural languages where small inaccuracies may not change the meaning of a sentence. To address this issue, we propose to leverage an automated unit-testing system to filter out invalid translations, thereby creating a fully tested parallel corpus. We found that fine-tuning an unsupervised model with this filtered data set significantly reduces the noise in the translations so-generated, comfortably outperforming the state-of-the-art for all language pairs studied. In particular, for Java → Python and Python → C++ we outperform the best previous methods by more than 16% and 24% respectively, reducing the error rate by more than 35%.
Key facts. Cited by 82 papers in the map (data through 7 Oct 2026). Builds on 35 of its 62 references that are in the map. First posted on arXiv 13 Oct 2021.
Builds on
35 of 62 references.
References · 35
- 2017Attention Is All You Needcited by 59,932
- 2018BERT: Pre-training of Deep Bidirectional Transformers for Language Understandingcited by 40,204
- 2021Evaluating Large Language Models Trained on Codecited by 8,053
- 2014Neural Machine Translation by Jointly Learning to Align and Translatecited by 4,530
- 2021Program Synthesis with Large Language Modelscited by 3,509
- 2020CodeBERT: A Pre-Trained Model for Programming and Natural Languagescited by 1,286
- 2021Measuring Coding Challenge Competence With APPScited by 879
- 2015Improving Neural Machine Translation Models with Monolingual Datacited by 784
- 2021CodeXGLUE: A Machine Learning Benchmark Dataset for Code Understanding and Generationcited by 732
- 2020GraphCodeBERT: Pre-training Code Representations with Data Flowcited by 600
- 2021Unified Pre-training for Program Understanding and Generationcited by 361
- 2017Synthetic and Natural Noise Both Break Neural Machine Translationcited by 304
23 more
- 2020Unsupervised Translation of Programming Languagescited by 262
- 2017Learning to Represent Programs with Graphscited by 219
- 2019Machine Learning Testing: Survey, Landscapes and Horizonscited by 213
- 2019SPoC: Search-based Pseudocode to Codecited by 176
- 2018SequenceR: Sequence-to-Sequence Learning for End-to-End Program Repaircited by 144
- 2018Phrase-Based & Neural Unsupervised Machine Translationcited by 138
- 2020Unit Test Case Generation with Transformers and Focal Contextcited by 118
- 2018An Empirical Study on Learning Bug-Fixing Patches in the Wild via Neural Machine Translationcited by 106
- 2018Tree-to-tree Neural Networks for Program Translationcited by 93
- 2020Graph-based, Self-Supervised Program Repair from Diagnostic Feedbackcited by 93
- 2018On the Impact of Various Types of Noise on Neural Machine Translationcited by 76
- 2020Code Prediction by Feeding Trees to Transformerscited by 70
- 2021DOBF: A Deobfuscation Pre-Training Objective for Programming Languagescited by 68
- 2017A parallel corpus of Python functions and documentation strings for automated code documentation and code generationcited by 56
- 2020SlimIPL: Language-Model-Free Iterative Pseudo-Labelingcited by 54
- 2017Code Completion with Neural Attention and Pointer Networkscited by 49
- 2020Fast and Memory-Efficient Neural Code Completioncited by 38
- 2019Learning to Fix Build Errors with Graph2Diff Neural Networkscited by 26
- 2017Dynamic Neural Program Embedding for Program Repaircited by 23
- 2019A Self-Attentional Neural Architecture for Code Completion with Multi-Task Learningcited by 18
- 2021DeepDebug: Fixing Python Bugs Using Stack Traces, Backtranslation, and Code Skeletonscited by 17
- 2020Industry-scale IR-based Bug Localization: A Perspective from Facebookcited by 5
- 2016Leveraging Parallel Data Processing Frameworks with Verified Liftingcited by 2
Built on by
Citing papers per year: 2022: 7; 2023: 22; 2024: 18; 2025: 23; 2026: 12.
82 papers.
Sort:
By area:
- 2023Code Llama: Open Foundation Models for Codecited by 2,105
- 2023Is Your Code Generated by ChatGPT Really Correct? Rigorous Evaluation of Large Language Models for Code Generationcited by 1,332
- 2023Teaching Large Language Models to Self-Debugcited by 963
- 2024Agentless: Demystifying LLM-based Software Engineering Agentscited by 400
- 2022CodeT: Code Generation with Generated Testscited by 369
- 2023Planning with Large Language Models for Code Generationcited by 179
- 2022Language Models Can Teach Themselves to Program Bettercited by 75
- 2024Exploring and Unleashing the Power of Large Language Models in Automated Code Translationcited by 57
- 2023CodeTransOcean: A Comprehensive Multilingual Benchmark for Code Translationcited by 55
- 2023xCodeEval: A Large Scale Multilingual Multitask Benchmark for Code Understanding, Generation, Translation and Retrievalcited by 46
- 2023Knowledge Transfer from High-Resource to Low-Resource Programming Languages for Code LLMscited by 45
- 2022Code Translation with Compiler Representationscited by 42
38 more
- 2025CodeCoR: An LLM-Based Self-Reflective Multi-Agent Framework for Code Generationcited by 33
- 2024CRUXEval-X: A Benchmark for Multilingual Code Reasoning, Understanding and Executioncited by 31
- 2025VERINA: Benchmarking Verifiable Code Generationcited by 30
- 2024AlphaTrans: A Neuro-Symbolic Compositional Approach for Repository-Level Code Translation and Validationcited by 28
- 2023Deep Learning for Code Intelligence: Survey, Benchmark and Toolkitcited by 22
- 2023CoTran: An LLM-based Code Translator using Reinforcement Learning with Feedback from Compiler and Symbolic Executioncited by 21
- 2024IRCoder: Intermediate Representations Make Language Models Robust Multilingual Code Generatorscited by 21
- 2024Rectifier: Code Translation with Corrector via LLMscited by 20
- 2023Trustworthy and Synergistic Artificial Intelligence for Software Engineering: Vision and Roadmapscited by 19
- 2024NaturalCodeBench: Examining Coding Performance Mismatch on HumanEval and Natural User Promptscited by 19
- 2024CodeRosetta: Pushing the Boundaries of Unsupervised Code Translation for Parallel Programmingcited by 19
- 2024Text Generation: A Systematic Literature Review of Tasks, Evaluation, and Challengescited by 18
- 2024LangProp: A code optimization framework using Large Language Models applied to drivingcited by 17
- 2023Exploring the Robustness of Large Language Models for Solving Programming Problemscited by 16
- 2024InterTrans: Leveraging Transitive Intermediate Translations to Enhance LLM-based Code Translationcited by 15
- 2025CSR-Bench: Benchmarking LLM Agents in Deployment of Computer Science Research Repositoriescited by 15
- 2025From Code Foundation Models to Agents and Applications: A Comprehensive Survey and Practical Guide to Code Intelligencecited by 13
- 2023Explain-then-Translate: An Analysis on Improving Program Translation with Self-generated Explanationscited by 12
- 2025Enhancing LLM Performance Through Debate: An Empirical Study on Multi-Agent Debate for Coding Taskscited by 11
- 2023Program Translation via Code Distillationcited by 10
- 2023Multilingual Code Co-Evolution Using Large Language Modelscited by 9
- 2023Data Augmentation for Code Translation with Comparable Corpora and Multiple Referencescited by 9
- 2024Output Format Biases in the Evaluation of Large Language Models for Code Translationcited by 9
- 2024B4: Towards Optimal Assessment of Plausible Code Solutions with Plausible Testscited by 9
- 2026LLMs Corrupt Your Documents When You Delegatecited by 9
- 2022Benchmarking Language Models for Code Syntax Understandingcited by 8
- 2023Syntax and Domain Aware Model for Unsupervised Program Translationcited by 7
- 2024TransAgent: Enhancing LLM-Based Code Translation via Fine-Grained Execution Alignmentcited by 7
- 2022A Theory of Unsupervised Translation Motivated by Understanding Animal Communicationcited by 6
- 2023Validating Multimedia Content Moderation Software via Semantic Fusioncited by 5
- 2025Agnostics: Learning to Code in Any Programming Language via Reinforcement with a Universal Learning Environmentcited by 5
- 2025EffiReasonTrans: RL-Optimized Reasoning for Code Translationcited by 5
- 2026RepoRepair: Leveraging Code Documentation for Repository-Level Automated Program Repaircited by 5
- 2023Configuration Validation with Large Language Modelscited by 4
- 2024A Joint Learning Model with Variational Interaction for Multilingual Program Translationcited by 4
- 2024Fortran2CPP: Automating Fortran-to-C++ Translation using LLMs via Multi-Turn Dialogue and Dual-Agent Integrationcited by 4
- 2025Automated Testing of COBOL to Java Transformationcited by 4
- 2025Function-to-Style Guidance of LLMs for Code Translationcited by 4
50 most cited of 82 All 82 (JSON)
- 2026ORCA: Evaluating LLMs on Data Science Code Translation25 Sep 2026
- 2026Test-Driven Approaches to Software Engineering with Large Language Models: A Survey of Phases, Tasks, and Agent Skills10 Sep 2026
- 2026Bootstrapping Niche Multilingual Code Translation via Reinforcement Learning with Execution-Based Verifiable Supervision14 Aug 2026
- 2026XSearch: Explainable Code Search via Concept-to-Code Alignment15 May 2026
- 2026Improving Code Translation with Syntax-Guided and Semantic-aware Preference Optimization13 May 2026
- 2026LLMs Corrupt Your Documents When You Delegate17 Apr 2026
- 2026ReCodeAgent: A Multi-agent Workflow for Language-Agnostic Translation and Validation of Large-Scale Repositories8 Apr 2026
- 2026CONCUR: Benchmarking LLMs for Concurrent Code Generation4 Mar 2026
- 2026RepoRepair: Leveraging Code Documentation for Repository-Level Automated Program Repair1 Mar 2026
- 2026A Theoretical Analysis of Test-Driven Code Generation5 Feb 2026
- 2026SWaRL: Safeguard Code Watermarking via Reinforcement Learning5 Jan 2026
- 2026The New Compiler Stack: A Survey on the Synergy of LLMs and Compilers5 Jan 2026
38 more
- 2025SoK: Understanding (New) Security Issues Across AI4Code Use Cases20 Dec 2025
- 2025Bridging Code Graphs and Large Language Models for Better Code Understanding8 Dec 2025
- 2025BabelCoder: Agentic Code Translation with Specification Alignment7 Dec 2025
- 2025From Code Foundation Models to Agents and Applications: A Comprehensive Survey and Practical Guide to Code Intelligence23 Nov 2025
- 2025What a diff makes: automating code migration with large language models31 Oct 2025
- 2025EffiReasonTrans: RL-Optimized Reasoning for Code Translation21 Oct 2025
- 2025Learning Bug Context for PyTorch-to-JAX Translation with LLMs10 Oct 2025
- 2025Agnostics: Learning to Code in Any Programming Language via Reinforcement with a Universal Learning Environment6 Aug 2025
- 2025On LLM-Assisted Generation of Smart Contracts from Business Processes30 Jul 2025
- 2025On The Role of Pretrained Language Models in General-Purpose Text Embeddings: A Survey28 Jul 2025
- 2025Function-to-Style Guidance of LLMs for Code Translation15 Jul 2025
- 2025QiMeng-MuPa: Mutual-Supervised Learning for Sequential-to-Parallel Code Translation11 Jun 2025
- 2025Deployability-Centric Infrastructure-as-Code Generation: Fail, Learn, Refine, and Succeed through LLM-Empowered DevOps Simulation5 Jun 2025
- 2025VERINA: Benchmarking Verifiable Code Generation29 May 2025
- 2025Automated Validation of COBOL to Java Transformation14 Apr 2025
- 2025Automated Testing of COBOL to Java Transformation14 Apr 2025
- 2025Program Skeletons for Automated Program Translation10 Apr 2025
- 2025Post-Incorporating Code Structural Knowledge into Pretrained Models via ICL for Code Translation28 Mar 2025
- 2025Enhancing LLM Performance Through Debate: An Empirical Study on Multi-Agent Debate for Coding Tasks15 Mar 2025
- 2025Benchmarking AI Models in Software Engineering: A Review, Search Tool, and Unified Approach for Elevating Benchmark Quality7 Mar 2025
- 2025CSR-Bench: Benchmarking LLM Agents in Deployment of Computer Science Research Repositories10 Feb 2025
- 2025Skeleton-Guided-Translation: A Benchmarking Framework for Code Repository Translation with Fine-Grained Quality Evaluation27 Jan 2025
- 2025CodeCoR: An LLM-Based Self-Reflective Multi-Agent Framework for Code Generation14 Jan 2025
- 2024Fortran2CPP: Automating Fortran-to-C++ Translation using LLMs via Multi-Turn Dialogue and Dual-Agent Integration27 Dec 2024
- 2024InterTrans: Leveraging Transitive Intermediate Translations to Enhance LLM-based Code Translation1 Nov 2024
- 2024AlphaTrans: A Neuro-Symbolic Compositional Approach for Repository-Level Code Translation and Validation31 Oct 2024
- 2024CodeRosetta: Pushing the Boundaries of Unsupervised Code Translation for Parallel Programming27 Oct 2024
- 2024TransAgent: Enhancing LLM-Based Code Translation via Fine-Grained Execution Alignment30 Sep 2024
- 2024B4: Towards Optimal Assessment of Plausible Code Solutions with Plausible Tests13 Sep 2024
- 2024A Joint Learning Model with Variational Interaction for Multilingual Program Translation25 Aug 2024
- 2024CRUXEval-X: A Benchmark for Multilingual Code Reasoning, Understanding and Execution23 Aug 2024
- 2024Rectifier: Code Translation with Corrector via LLMs10 Jul 2024
- 2024Agentless: Demystifying LLM-based Software Engineering Agents1 Jul 2024
- 2024Scaling Automatic Extraction of Pseudocode7 Jun 2024
- 2024Text Generation: A Systematic Literature Review of Tasks, Evaluation, and Challenges24 May 2024
- 2024NaturalCodeBench: Examining Coding Performance Mismatch on HumanEval and Natural User Prompts7 May 2024
- 2024Exploring and Unleashing the Power of Large Language Models in Automated Code Translation23 Apr 2024
- 2024Output Format Biases in the Evaluation of Large Language Models for Code Translation25 Mar 2024
50 newest of 82 All 82 (JSON)
- 2024Agentless: Demystifying LLM-based Software Engineering Agentscited by 400
- 2025CodeCoR: An LLM-Based Self-Reflective Multi-Agent Framework for Code Generationcited by 33
- 2025CSR-Bench: Benchmarking LLM Agents in Deployment of Computer Science Research Repositoriescited by 15
- 2025From Code Foundation Models to Agents and Applications: A Comprehensive Survey and Practical Guide to Code Intelligencecited by 13
- 2025Enhancing LLM Performance Through Debate: An Empirical Study on Multi-Agent Debate for Coding Taskscited by 11
- 2024Fortran2CPP: Automating Fortran-to-C++ Translation using LLMs via Multi-Turn Dialogue and Dual-Agent Integrationcited by 4
- 2026ReCodeAgent: A Multi-agent Workflow for Language-Agnostic Translation and Validation of Large-Scale Repositoriescited by 2
- 2025BabelCoder: Agentic Code Translation with Specification Alignmentcited by 1
- 2026Test-Driven Approaches to Software Engineering with Large Language Models: A Survey of Phases, Tasks, and Agent Skillscited by 0
- 2026Test-Driven Approaches to Software Engineering with Large Language Models: A Survey of Phases, Tasks, and Agent Skills10 Sep 2026
- 2026ReCodeAgent: A Multi-agent Workflow for Language-Agnostic Translation and Validation of Large-Scale Repositories8 Apr 2026
- 2025BabelCoder: Agentic Code Translation with Specification Alignment7 Dec 2025
- 2025From Code Foundation Models to Agents and Applications: A Comprehensive Survey and Practical Guide to Code Intelligence23 Nov 2025
- 2025Enhancing LLM Performance Through Debate: An Empirical Study on Multi-Agent Debate for Coding Tasks15 Mar 2025
- 2025CSR-Bench: Benchmarking LLM Agents in Deployment of Computer Science Research Repositories10 Feb 2025
- 2025CodeCoR: An LLM-Based Self-Reflective Multi-Agent Framework for Code Generation14 Jan 2025
- 2024Fortran2CPP: Automating Fortran-to-C++ Translation using LLMs via Multi-Turn Dialogue and Dual-Agent Integration27 Dec 2024
- 2024Agentless: Demystifying LLM-based Software Engineering Agents1 Jul 2024
- 2023Code Llama: Open Foundation Models for Codecited by 2,105
- 2023Teaching Large Language Models to Self-Debugcited by 963
- 2024CRUXEval-X: A Benchmark for Multilingual Code Reasoning, Understanding and Executioncited by 31
- 2025EffiReasonTrans: RL-Optimized Reasoning for Code Translationcited by 5
- 2025EffiReasonTrans: RL-Optimized Reasoning for Code Translation21 Oct 2025
- 2024CRUXEval-X: A Benchmark for Multilingual Code Reasoning, Understanding and Execution23 Aug 2024
- 2023Code Llama: Open Foundation Models for Code24 Aug 2023
- 2023Teaching Large Language Models to Self-Debug11 Apr 2023
- 2023Is Your Code Generated by ChatGPT Really Correct? Rigorous Evaluation of Large Language Models for Code Generationcited by 1,332
- 2022CodeT: Code Generation with Generated Testscited by 369
- 2023Planning with Large Language Models for Code Generationcited by 179
- 2022Language Models Can Teach Themselves to Program Bettercited by 75
- 2024Exploring and Unleashing the Power of Large Language Models in Automated Code Translationcited by 57
- 2023CodeTransOcean: A Comprehensive Multilingual Benchmark for Code Translationcited by 55
- 2023xCodeEval: A Large Scale Multilingual Multitask Benchmark for Code Understanding, Generation, Translation and Retrievalcited by 46
- 2023Knowledge Transfer from High-Resource to Low-Resource Programming Languages for Code LLMscited by 45
- 2022Code Translation with Compiler Representationscited by 42
- 2025VERINA: Benchmarking Verifiable Code Generationcited by 30
- 2024AlphaTrans: A Neuro-Symbolic Compositional Approach for Repository-Level Code Translation and Validationcited by 28
- 2023Deep Learning for Code Intelligence: Survey, Benchmark and Toolkitcited by 22
12 most cited of 65 All 65 (JSON)
- 2026ORCA: Evaluating LLMs on Data Science Code Translation25 Sep 2026
- 2026XSearch: Explainable Code Search via Concept-to-Code Alignment15 May 2026
- 2026LLMs Corrupt Your Documents When You Delegate17 Apr 2026
- 2026CONCUR: Benchmarking LLMs for Concurrent Code Generation4 Mar 2026
- 2026RepoRepair: Leveraging Code Documentation for Repository-Level Automated Program Repair1 Mar 2026
- 2026A Theoretical Analysis of Test-Driven Code Generation5 Feb 2026
- 2026SWaRL: Safeguard Code Watermarking via Reinforcement Learning5 Jan 2026
- 2026The New Compiler Stack: A Survey on the Synergy of LLMs and Compilers5 Jan 2026
- 2025SoK: Understanding (New) Security Issues Across AI4Code Use Cases20 Dec 2025
- 2025Bridging Code Graphs and Large Language Models for Better Code Understanding8 Dec 2025
- 2025What a diff makes: automating code migration with large language models31 Oct 2025
- 2025Learning Bug Context for PyTorch-to-JAX Translation with LLMs10 Oct 2025
12 newest of 65 All 65 (JSON)