Lune

ASE2023顶会

On the Evaluation of Neural Code Translation: Taxonomy and Benchmark

Mingsheng Jiao, Tingrui Yu, Xuan Li, Guanjie Qiu, Xiaodong Gu, Beijun Shen

摘要

In recent years, neural code translation has gained increasing attention. While most of the research focuses on improving model architectures and training processes, we notice that the evaluation process and benchmark for code translation models are severely limited: they primarily treat source code as natural languages and provide a holistic accuracy score while disregarding the full spectrum of model capabilities across different translation types and complexity. In this paper, we present a comprehensive investigation of four state-of-the-art models and analyze in-depth the advantages and limitations of three existing benchmarks. Based on the empirical results, we develop a taxonomy that categorizes code translation tasks into four primary types according to their complexity and knowledge dependence: token level (type 1), syntactic level (type 2), library level (type 3), and algorithm level (type 4). We then conduct a thorough analysis of how existing approaches perform across these four categories. Our findings indicate that while state-of-the-art code translation models excel in type-1 and type-2 translations, they struggle with knowledge-dependent ones such as type-3 and type-4. Existing benchmarks are biased towards trivial translations, such as keyword mapping. To overcome these limitations, we construct G-TransEval, a new benchmark by manually curating type-3 and type-4 translation pairs and unit test cases. Results on our new benchmark suggest that G-TransEval can exhibit more comprehensive and finer-grained capability of code translation models and thus provide a more rigorous evaluation. Our studies also provide more insightful findings and suggestions for future research, such as building type-3 and type-4 training data and ensembling multiple pretraining approaches.

问 Lune

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

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

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

可以从这些问题问起

Lune 可以查阅

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

获取答案

免费开始,无需绑卡

脉络

  • INTERTRANS: Leveraging Transitive Intermediate Translations to Enhance LLM-Based Code Translation 引用了 Unsupervised Translation of Programming 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 引用了 ELECTRA: Pre-training Text Encoders as Discriminators Rather Than Generators
  • TRACE: Evaluating Execution Efficiency of LLM-Based Code Translation 引用了 INTERTRANS: Leveraging Transitive Intermediate Translations to Enhance LLM-Based Code Translation
  • TRACE: Evaluating Execution Efficiency of LLM-Based Code Translation 引用了 AlphaTrans: A Neuro-Symbolic Compositional Approach for Repository-Level Code Translation and Validation
  • CodeBERT: A Pre-Trained Model for Programming and Natural Languages 引用了 ELECTRA: Pre-training Text Encoders as Discriminators Rather Than Generators
  • Scalable, Validated Code Translation of Entire Projects using Large Language Models 引用了 Unsupervised Translation of Programming Languages
  • AlphaTrans: A Neuro-Symbolic Compositional Approach for Repository-Level Code Translation and Validation 引用了 Unsupervised Translation of Programming Languages
  • AlphaTrans: A Neuro-Symbolic Compositional Approach for Repository-Level Code Translation and Validation 引用了 Scalable, Validated Code Translation of Entire Projects using Large Language Models
它引用的引用它的从左到右按年份排列,引用越多,位置越高。

引用它的顶会 Paper14

  1. Scalable, Validated Code Translation of Entire Projects using Large Language ModelsHanliang Zhang, Cristina David, Meng Wang, Brandon Paulsen 等PLDI 2025 · 15 次引用
  2. From Completion to Editing: Unlocking Context-Aware Code Infilling via Search-and-Replace Instruction TuningJiajun Zhang, Zeyu Cui, Jiaxi Yang, Lei Zhang 等ACL 2026 · 8 次引用
  3. AlphaTrans: A Neuro-Symbolic Compositional Approach for Repository-Level Code Translation and ValidationAli Reza Ibrahimzada, Kaiyao Ke, Mrigank Pawagi, Muhammad Salman Abid 等FSE 2025 · 8 次引用
  4. INTERTRANS: Leveraging Transitive Intermediate Translations to Enhance LLM-Based Code TranslationMarcos Macedo, Yuan Tian, Pengyu Nie, Filipe Roseiro Côgo 等ICSE 2025 · 7 次引用
  5. TRACE: Evaluating Execution Efficiency of LLM-Based Code TranslationZhihao Gong, Zeyu Sun, Dong Huang, Qingyuan Liang 等ACL 2026 · 5 次引用

它引用的 Paper12

  1. CodeBERT: A Pre-Trained Model for Programming and Natural LanguagesZhangyin Feng, Daya Guo, Duyu Tang, Nan Duan 等EMNLP Findings 2020 · 2,828 次引用
  2. GraphCodeBERT: Pre-training Code Representations with Data FlowDaya Guo, Shuo Ren, Shuai Lu, Zhangyin Feng 等ICLR 2021 · 1,644 次引用
  3. 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 次引用
  4. Unsupervised Translation of Programming LanguagesBaptiste Rozière, Marie-Anne Lachaux, Lowik Chanussot, Guillaume LampleNeurIPS 2020 · 606 次引用
  5. ELECTRA: Pre-training Text Encoders as Discriminators Rather Than GeneratorsKevin Clark, Minh-Thang Luong, Quoc V. Le, Christopher D. ManningICLR 2020 · 541 次引用

相关 Paper

  1. ClassEval-T: Evaluating Large Language Models in Class-Level Code TranslationPengyu Xue, Linhao Wu, Zhen Yang, Chengyi Wang 等ISSTA 2025 · 5 次引用
  2. TransLibEval: Demystify Large Language Models' Capability in Third-Party Library-Targeted Code TranslationPengyu Xue, Kunwu Zheng, Zhen Yang, Yifei Pei 等FSE 2026 · 1 次引用
  3. CodeTransOcean: A Comprehensive Multilingual Benchmark for Code TranslationWeixiang Yan, Yuchen Tian, Yunzhe Li, Qian Chen 等EMNLP Findings 2023 · 32 次引用
  4. Can Large Language Models Write Parallel Code?Daniel Nichols, Joshua Hoke Davis, Zhaojun Xie, Arjun Rajaram 等HPDC 2024 · 30 次引用
  5. ExeCoder: Empowering Large Language Models with Executability Representation for Code TranslationMinghua He, Yue Chen, Fangkai Yang, Pu Zhao 等EMNLP 2025 · 1 次引用
黄昏的海面,两侧是细线勾勒的悬崖