Program Translation via Code Distillation
Yufan Huang, Mengnan Qi, Yongqiang Yao, Maoquan Wang, Bin Gu, Colin B. Clement, Neel Sundaresan
摘要
Software version migration and program translation are an important and costly part of the lifecycle of large codebases. Traditional machine translation relies on parallel corpora for supervised translation, which is not feasible for program translation due to a dearth of aligned data. Recent unsupervised neural machine translation techniques have overcome data limitations by included techniques such as back translation and low level compiler intermediate representations (IR). These methods face significant challenges due to the noise in code snippet alignment and the diversity of IRs respectively. In this paper we propose a novel model called Code Distillation (CoDist) whereby we capture the semantic and structural equivalence of code in a language agnostic intermediate representation. Distilled code serves as a translation pivot for any programming language, leading by construction to parallel corpora which scale to all available source code by simply applying the distillation compiler. We demonstrate that our approach achieves state-of-the-art performance on CodeXGLUE and TransCoder GeeksForGeeks translation benchmarks, with an average absolute increase of 12.7% on the TransCoder GeeksforGeeks translation benchmark compare to TransCoder-ST.
问 Lune
几分钟读透这篇 Paper,不用再花一下午。
Lune 能读完全文,也能读引用它的顶会 Paper,讲清它的结论、证据和局限,每一点都注明出自哪篇 Paper。不用硬啃,也不靠猜。
已有 8 篇顶会 Paper 引用了它。别等审稿人问起,先弄清它们发现了什么。
脉络
- AI Coders Are among Us: Rethinking Programming Language Grammar towards Efficient Code Generation 引用了 CodeBERT: A Pre-Trained Model for Programming and Natural Languages
- Semi-Supervised Code Translation Overcoming the Scarcity of Parallel Code Data 引用了 BART: Denoising Sequence-to-Sequence Pre-training for Natural Language Generation, Translation, and Comprehension
- Semi-Supervised Code Translation Overcoming the Scarcity of Parallel Code Data 引用了 Unsupervised Translation of Programming Languages
- Semi-Supervised Code Translation Overcoming the Scarcity of Parallel Code Data 引用了 CodeBERT: A Pre-Trained Model for Programming and Natural Languages
- Semi-Supervised Code Translation Overcoming the Scarcity of Parallel Code Data 引用了 GraphCodeBERT: Pre-training Code Representations with Data Flow
- Semi-Supervised Code Translation Overcoming the Scarcity of Parallel Code Data 引用了 Training language models to follow instructions with human feedback
- Token Sugar: Making Source Code Sweeter for LLMs through Token-Efficient Shorthand 引用了 AI Coders Are among Us: Rethinking Programming Language Grammar towards Efficient Code Generation
引用它的顶会 Paper8
- Learning to Focus: Causal Attention Distillation via Gradient-Guided Token PruningYiju Guo, Wenkai Yang, Zexu Sun, Ning Ding 等NeurIPS 2025 · 14 次引用
- AI Coders Are among Us: Rethinking Programming Language Grammar towards Efficient Code GenerationZhensu Sun, Xiaoning Du, Zhou Yang, Li Li 等ISSTA 2024 · 8 次引用
- On-Policy Optimization with Group Equivalent Preference for Multi-Programming Language UnderstandingHaoyuan Wu, Rui Ming, Jilong Gao, Hangyu Zhao 等NeurIPS 2025 · 2 次引用
- Semi-Supervised Code Translation Overcoming the Scarcity of Parallel Code DataMing Zhu, Mohimenul Karim, Ismini Lourentzou, Daphne YaoASE 2024 · 2 次引用
- Token Sugar: Making Source Code Sweeter for LLMs through Token-Efficient ShorthandZhensu Sun, Chengran Yang, Xiaoning Du, Zhou Yang 等ASE 2025 · 2 次引用
它引用的 Paper9
- Training language models to follow instructions with human feedbackLong Ouyang, Jeffrey Wu, Xu Jiang, Diogo Almeida 等NeurIPS 2022 · 24,707 次引用
- CodeBERT: A Pre-Trained Model for Programming and Natural LanguagesZhangyin Feng, Daya Guo, Duyu Tang, Nan Duan 等EMNLP Findings 2020 · 2,828 次引用
- GraphCodeBERT: Pre-training Code Representations with Data FlowDaya Guo, Shuo Ren, Shuai Lu, Zhangyin Feng 等ICLR 2021 · 1,644 次引用
- BART: Denoising Sequence-to-Sequence Pre-training for Natural Language Generation, Translation, and ComprehensionMike Lewis, Yinhan Liu, Naman Goyal, Marjan Ghazvininejad 等ACL 2020 · 1,224 次引用
- Unsupervised Translation of Programming LanguagesBaptiste Rozière, Marie-Anne Lachaux, Lowik Chanussot, Guillaume LampleNeurIPS 2020 · 606 次引用
相关 Paper
- Code Translation with Compiler RepresentationsMarc Szafraniec, Baptiste Rozière, Hugh Leather, Patrick Labatut 等ICLR 2023 · 18 次引用
- Multilingual Code Snippets Training for Program TranslationMing Zhu, Karthik Suresh, Chandan K. ReddyAAAI 2022 · 72 次引用
- AVATAR: A Parallel Corpus for Java-Python Program TranslationWasi Uddin Ahmad, Md Golam Rahman Tushar, Saikat Chakraborty, Kai-Wei ChangACL Findings 2023 · 46 次引用
- Syntax and Domain Aware Model for Unsupervised Program TranslationFang Liu, Jia Li, Li ZhangICSE 2023 · 25 次引用
- Leveraging Automated Unit Tests for Unsupervised Code TranslationBaptiste Rozière, Jie Zhang, François Charton, Mark Harman 等ICLR 2022 · 161 次引用
