Lune

EMNLP Findings2023

Data Augmentation for Code Translation with Comparable Corpora and Multiple References

Yiqing Xie, Atharva Naik, Daniel Fried, Carolyn P. Rosé

摘要

One major challenge of translating code between programming languages is that parallel training data is often limited.To overcome this challenge, we present two data augmentation techniques, one that builds comparable corpora (i.e., code pairs with similar functionality), and another that augments existing parallel data with multiple reference translations.Specifically, we build and analyze multiple types of comparable corpora, including programs generated from natural language documentation using a code generation model.Furthermore, to reduce overfitting to a single reference translation, we automatically generate additional translation references for available parallel data and filter the translations by unit tests, which increases variation in target translations.Experiments show that our data augmentation techniques significantly improve CodeT5 for translation between Java, Python, and C++ by an average of 7.5% Computational Accuracy (CA@1), which verifies the correctness of translations by execution.1 Input Source program (Java) Ground Truth Reference Translation (Python) Correct Candidate # 1 Correct Candidate # 2 Correct Candidate # 3 Correct Candidate # 4 Correct Candidate # 7 Correct Candidate # 5 Correct Candidate # 8 Correct Candidate # 6 Correct Candidate # 9

问 Lune

几分钟读透这篇 Paper,不用再花一下午。

Lune 能读完全文,也能读引用它的顶会 Paper,讲清它的结论、证据和局限,每一点都注明出自哪篇 Paper。不用硬啃,也不靠猜。

已有 5 篇顶会 Paper 引用了它。别等审稿人问起,先弄清它们发现了什么。

可以从这些问题问起

Lune 可以查阅

全文 · 引用它的顶会 Paper · 相关的 Paper

获取答案

免费开始,无需绑卡

脉络

  • CodeRL: Mastering Code Generation through Pretrained Models and Deep Reinforcement Learning 引用了 CodeT5: Identifier-aware Unified Pre-trained Encoder-Decoder Models for Code Understanding and Generation
  • CodeRL: Mastering Code Generation through Pretrained Models and Deep Reinforcement Learning 引用了 CodeBERT: A Pre-Trained Model for Programming and Natural Languages
  • CodeT5: Identifier-aware Unified Pre-trained Encoder-Decoder Models for Code Understanding and Generation 引用了 Unsupervised Translation of Programming Languages
  • CodeT5: Identifier-aware Unified Pre-trained Encoder-Decoder Models for Code Understanding and Generation 引用了 CodeBERT: A Pre-Trained Model for Programming and Natural Languages
  • CodeT5: Identifier-aware Unified Pre-trained Encoder-Decoder Models for Code Understanding and Generation 引用了 DOBF: A Deobfuscation Pre-Training Objective for Programming Languages
  • TransAgent: Enhancing LLM-Based Code Translation via Fine-Grained Execution Alignment 引用了 Unsupervised Translation of Programming Languages
  • TransAgent: Enhancing LLM-Based Code Translation via Fine-Grained Execution Alignment 引用了 DOBF: A Deobfuscation Pre-Training Objective for Programming Languages
  • Agnostics: Learning to Synthesize Code in Any Programming Language with a Universal Reinforcement Learning Environment 引用了 Knowledge Transfer from High-Resource to Low-Resource Programming Languages for Code LLMs
  • DOBF: A Deobfuscation Pre-Training Objective for Programming Languages 引用了 Unsupervised Translation of Programming Languages
  • Function-to-Style Guidance of LLMs for Code Translation 引用了 CodeT5: Identifier-aware Unified Pre-trained Encoder-Decoder Models for Code Understanding and Generation
  • Function-to-Style Guidance of LLMs for Code Translation 引用了 Unsupervised Translation of Programming Languages
它引用的引用它的从左到右按年份排列,引用越多,位置越高。

引用它的顶会 Paper5

  1. Knowledge Transfer from High-Resource to Low-Resource Programming Languages for Code LLMsFederico Cassano, John Gouwar, Francesca Lucchetti, Claire Schlesinger 等OOPSLA 2024 · 33 次引用
  2. Data Mixture Inference Attack: BPE Tokenizers Reveal Training Data CompositionsJonathan Hayase, Alisa Liu, Yejin Choi, Sewoong Oh 等NeurIPS 2024 · 16 次引用
  3. TransAgent: Enhancing LLM-Based Code Translation via Fine-Grained Execution AlignmentZhiqiang Yuan, Weitong Chen, Hanlin Wang, Xin Peng 等FSE 2026 · 4 次引用
  4. Agnostics: Learning to Synthesize Code in Any Programming Language with a Universal Reinforcement Learning EnvironmentAleksander Boruch-Gruszecki, Yangtian Zi, Zixuan Wu, Tejas Oberoi 等ICLR 2026
  5. Function-to-Style Guidance of LLMs for Code TranslationLonghui Zhang, Bin Wang, Jiahao Wang, Xiaofeng Zhao 等ICML 2025

它引用的 Paper7

  1. CodeBERT: A Pre-Trained Model for Programming and Natural LanguagesZhangyin Feng, Daya Guo, Duyu Tang, Nan Duan 等EMNLP Findings 2020 · 2,828 次引用
  2. CodeT5: Identifier-aware Unified Pre-trained Encoder-Decoder Models for Code Understanding and GenerationYue Wang, Weishi Wang, Shafiq R. Joty, Steven C. H. HoiEMNLP 2021 · 1,224 次引用
  3. Unsupervised Translation of Programming LanguagesBaptiste Rozière, Marie-Anne Lachaux, Lowik Chanussot, Guillaume LampleNeurIPS 2020 · 606 次引用
  4. CodeRL: Mastering Code Generation through Pretrained Models and Deep Reinforcement LearningHung Le, Yue Wang, Akhilesh Deepak Gotmare, Silvio Savarese 等NeurIPS 2022 · 571 次引用
  5. DOBF: A Deobfuscation Pre-Training Objective for Programming LanguagesMarie-Anne Lachaux, Baptiste Rozière, Marc Szafraniec, Guillaume LampleNeurIPS 2021 · 174 次引用

相关 Paper

  1. Leveraging Automated Unit Tests for Unsupervised Code TranslationBaptiste Rozière, Jie Zhang, François Charton, Mark Harman 等ICLR 2022 · 161 次引用
  2. Code Needs Comments: Enhancing Code LLMs with Comment AugmentationDemin Song, Honglin Guo, Yunhua Zhou, Shuhao Xing 等ACL Findings 2024 · 9 次引用
  3. Multilingual Code Co-evolution using Large Language ModelsJiyang Zhang, Pengyu Nie, Junyi Jessy Li, Milos GligoricFSE 2023 · 34 次引用
  4. AVATAR: A Parallel Corpus for Java-Python Program TranslationWasi Uddin Ahmad, Md Golam Rahman Tushar, Saikat Chakraborty, Kai-Wei ChangACL Findings 2023 · 46 次引用
  5. PyMT5: multi-mode translation of natural language and Python code with transformersColin B. Clement, Dawn Drain, Jonathan Timcheck, Alexey Svyatkovskiy 等EMNLP 2020 · 24 次引用
黄昏的海面,两侧是细线勾勒的悬崖