Multilingual Code Snippets Training for Program Translation
Open accessAbstract
Program translation aims to translate source code from one programming language to another. It is particularly useful in applications such as multiple-platform adaptation and legacy code migration. Traditional rule-based program translation methods usually rely on meticulous manual rule-crafting, which is costly both in terms of time and effort. Recently, neural network based methods have been developed to address this problem. However, the absence of high-quality parallel code data is one of the main bottlenecks which impedes the development of program translation models. In this paper, we introduce CoST, a new multilingual Code Snippet Translation dataset that contains parallel data from 7 commonly used programming languages. The dataset is parallel at the level of code snippets, which provides much more fine-grained alignments between different languages than the existing translation datasets. We also propose a new program translation model that leverages multilingual snippet denoising auto-encoding and Multilingual Snippet Translation (MuST) pre-training. Extensive experiments show that the multilingual snippet training is effective in improving program translation performance, especially for low-resource languages. Moreover, our training method shows good generalizability and consistently improves the translation performance of a number of baseline models. The proposed model outperforms the baselines on both snippet-level and program-level translation, and achieves state-of-the-art performance on CodeXGLUE translation task. The code, data, and appendix for this paper can be found at https://github.com/reddy-lab-code-research/MuST-CoST.
The claims and statistics of this paper haven’t been checked yet.
Run the check — free, no account needed. It reads the open-access text and checks the sources it cites.
Integrity signals
Registry
Cites
Statistics
Claims the paper makes
The claims and statistics of this paper haven’t been checked yet.
Run the check — free, no account needed. It reads the open-access text and checks the sources it cites.
Claims other papers make about this one
Each is checked against this paper’s own text: does it say what the citing paper says it does?
Snippet-level benchmarks such as CoST and XLCost focus on evaluating translation of program segments between two consecutive code comments.
“snippetlevel code translation benchmarks, such as CoST [32], XLCost [33], typically focus on evaluating the translation of program segments located between two consecutive code comments.”
From RepoTransBench: A Real-World Multilingual Benchmark for Repository-Level Code Translation (2026) · cites this paper as [32]
The Introduction (p. 1) identifies CoST as a benchmark for snippet-level translation and says its snippets are aligned by matching code comments across languages. Data Collection and Processing (p. 3) likewise describes using comments and their corresponding code to align snippets. Neither passage specifies that the evaluated segments lie between two consecutive comments; the paper also evaluates program-level translation. XLCost has a separate citation in the citing sentence and is not judged here. (LLM, conf=0.82)
Experimental — accuracy not yet measuredExisting fine-grained code translation benchmarks cannot evaluate the performance of current techniques on real-world repository-level code translation tasks.
“Although these benchmarks can evaluate the capabilities of existing code translation techniques to some extent, they cannot evaluate the performance of current techniques on real-world repositorylevel code translation tasks.”
From RepoTransBench: A Real-World Multilingual Benchmark for Repository-Level Code Translation (2026) · cites this paper as [32]
The Dataset Comparisons and Characteristics section (p. 3) says existing translation datasets have method-level mappings, limited language coverage, or quality problems. That supports the general concern about benchmark limitations, but the paper does not establish that these benchmarks cannot evaluate techniques on real-world repository-level translation tasks. (LLM, conf=0.84)
Experimental — accuracy not yet measured
Self-check
Percentages, sums and reported differences re-computed from the paper’s own numbers.
The self-check needs the paper’s full text.
Cites
Vaswani, A., Shazeer, N., Parmar, N., Uszkoreit, J., Jones, L., Gomez, A. N., Kaiser, L., & Polosukhin, I. (2017) · arXiv · doi:10.48550/arxiv.1706.03762 · Cited by 120,404 · see citing works
Adam: A Method for Stochastic Optimization
Kingma, D. P., & Ba, J. (2014) · arXiv · doi:10.48550/arxiv.1412.6980 · Cited by 98,946 · see citing works
RoBERTa: A Robustly Optimized BERT Pretraining Approach
Liu, Y., Ott, M., Goyal, N., Du, J., Joshi, M., Chen, D., Levy, O., Lewis, M., Zettlemoyer, L., & Stoyanov, V. (2019) · arXiv · doi:10.48550/arxiv.1907.11692 · Cited by 16,515 · see citing works
Lewis, M., Liu, Y., Goyal, N., Ghazvininejad, M., Mohamed, A., Levy, O., Stoyanov, V., & Zettlemoyer, L. (2020) · Proceedings of the 58th Annual Meeting of the Association for Computational Linguistics · doi:10.18653/v1/2020.acl-main.703 · Cited by 8,821 · see citing works
Bleu: a method for automatic evaluation of machine translation
Papineni, K. (2024) · doi:10.57702/ljteqmrb · Cited by 3,682 · see citing works
CodeBERT: A Pre-Trained Model for Programming and Natural Languages
Feng, Z., Guo, D., Tang, D., Duan, N., Feng, X., Gong, M., Shou, L., Qin, B., Liu, T., Jiang, D., et al. (2020) · Findings of the Association for Computational Linguistics: EMNLP 2020 · doi:10.18653/v1/2020.findings-emnlp.139 · Cited by 2,824 · see citing works
Cross-lingual Language Model Pretraining
Lample, G., & Conneau, A. (2019) · arXiv · doi:10.48550/arxiv.1901.07291 · Cited by 1,586 · see citing works
Unified Pre-training for Program Understanding and GenerationPreprint
Ahmad, W. U., Chakraborty, S., Ray, B., & Chang, K.-W. (2021) · North American Chapter of the Association for Computational Linguistics · doi:10.48550/arxiv.2103.06333 · Cited by 1,000 · see citing works
Unified Pre-training for Program Understanding and Generation
Ahmad, W., Chakraborty, S., Ray, B., & Chang, K.-W. (2021) · Proceedings of the 2021 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies · doi:10.18653/v1/2021.naacl-main.211 · Cited by 642 · see citing works
A Syntactic Neural Model for General-Purpose Code Generation
Yin, P., & Neubig, G. (2017) · Proceedings of the 55th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers) · doi:10.18653/v1/p17-1041 · Cited by 623 · see citing works
Unsupervised Machine Translation Using Monolingual Corpora Only
Lample, G., Conneau, A., Denoyer, L., & Ranzato, M. (2017) · arXiv · doi:10.48550/arxiv.1711.00043 · Cited by 584 · see citing works
CodeXGLUE: A Machine Learning Benchmark Dataset for Code Understanding and Generation
Lu, S., Guo, D., Ren, S., Huang, J., Svyatkovskiy, A., Blanco, A., Clement, C., Drain, D., Jiang, D., Tang, D., et al. (2021) · arXiv · doi:10.48550/arxiv.2102.04664 · Cited by 536 · see citing works
GraphCodeBERT: Pre-training Code Representations with Data Flow
Guo, D., Ren, S., Lu, S., Feng, Z., Tang, D., Liu, S., Zhou, L., Duan, N., Svyatkovskiy, A., Fu, S., et al. (2020) · arXiv · doi:10.48550/arxiv.2009.08366 · Cited by 480 · see citing works
Abstract Syntax Networks for Code Generation and Semantic Parsing
Rabinovich, M., Stern, M., & Klein, D. (2017) · Annual Meeting of the Association for Computational Linguistics · doi:10.18653/v1/p17-1105 · Cited by 395 · see citing works
Phrase-Based Statistical Machine Translation
Zens, R., Och, F. J., & Ney, H. (2002) · Lecture notes in computer science · doi:10.1007/3-540-45751-8_2 · Cited by 354 · see citing works
CodeBERT: A Pre-Trained Model for Programming and Natural Languages
Feng, Z., Guo, D., Tang, D., Duan, N., Feng, X., Gong, M., Shou, L., Qin, B., Liu, T., Jiang, D., et al. (2020) · arXiv · doi:10.48550/arxiv.2002.08155 · Cited by 243 · see citing works
CodeBLEU: a Method for Automatic Evaluation of Code Synthesis
Ren, S., Guo, D., Lu, S., Zhou, L., Liu, S., Tang, D., Sundaresan, N., Zhou, M., Blanco, A., & Ma, S. (2020) · arXiv · doi:10.48550/arxiv.2009.10297 · Cited by 214 · see citing works
Generative Code Modeling with GraphsPreprint
Brockschmidt, M., Allamanis, M., Gaunt, A. L., & Polozov, O. (2018) · International Conference on Learning Representations · doi:10.48550/arxiv.1805.08490 · Cited by 199 · see citing works
Traduction Non Supervisée de Langages de Programmation
Rozière, B. (2022) · theses.fr (ABES) · Cited by 167 · see citing works
Tree-to-tree neural networks for program translation
Chen, X., Liu, C., & Song, D. (2018) · arXiv · doi:10.48550/arxiv.1802.03691 · Cited by 157 · see citing works
Lexical statistical machine translation for language migration
Nguyen, A. T., Nguyen, T. T., & Nguyen, T. N. (2013) · ACM Joint European Software Engineering Conference and Symposium on the Foundations of Software Engineering (ESEC/FSE) · doi:10.1145/2491411.2494584 · Cited by 136 · see citing works
Phrase-Based Statistical Translation of Programming Languages
Karaivanov, S., Raychev, V., & Vechev, M. (2014) · ACM SIGPLAN International Symposium on New Ideas, New Paradigms, and Reflections on Programming and Software (Onward!) · doi:10.1145/2661136.2661148 · Cited by 115 · see citing works
DOBF: A Deobfuscation Pre-Training Objective for Programming LanguagesPreprint
Rozière, B., Lachaux, M.-A., Szafraniec, M., & Lample, G. (2021) · arXiv (Cornell University) · doi:10.48550/arxiv.2102.07492 · Cited by 96 · see citing works
Divide-and-Conquer Approach for Multi-phase Statistical Migration for Source Code (T)
Nguyen, A. T., Nguyen, T. T., & Nguyen, T. N. (2015) · IEEE/ACM International Conference on Automated Software Engineering (ASE) · doi:10.1109/ase.2015.74 · Cited by 79 · see citing works
(2021) · arXiv (Cornell University) · Cited by 37 · see citing works
BERT: Pre-training of Deep Bidirectional Transformers for Language Understanding
Devlin, J., Chang, M.-W., Lee, K., & Toutanova, K. (2018) · arXiv · doi:10.48550/arxiv.1810.04805
Flagged first, then by citations
Research works printed but not linked: 3
- Karaivanov, S.; Raychev, V.; and Vechev, M. 2014. Phrasebased statistical translation of programming languages. In Proceedings of the 2014 ACM International Symposium on New Ideas, New Paradigms, and Reflections on Programming & Software , 173-184.
- Roziere, B.; Lachaux, M.-A.; Chanussot, L.; and Lample, G. 2020a. Unsupervised Translation of Programming Languages. In Larochelle, H.; Ranzato, M.; Hadsell, R.; Balcan, M. F.; and Lin, H., eds., Advances in Neural Information Processing Systems , volume 33, 20601-20611. Curran Associates, Inc.
- Roziere, B.; Lachaux, M.-A.; Chanussot, L.; and Lample, G. 2020b. Unsupervised Translation of Programming Languages. In NeurIPS .
Cited by
Sorted by citations
Automating code review activities by large-scale pre-training
Li, Z., Lu, S., Guo, D., Duan, N., Jannu, S., Jenks, G., Majumder, D., Green, J., Svyatkovskiy, A., Fu, S., et al. (2022) · ACM Joint European Software Engineering Conference and Symposium on the Foundations of Software Engineering (ESEC/FSE) · doi:10.1145/3540250.3549081 · Cited by 226 · see citing works
Large Language Models Meet NL2Code: A Survey
Zan, D., Chen, B., Zhang, F., Lu, D., Wu, B., Guan, B., Yongji, W., & Lou, J. (2023) · Proceedings of the conference - Association for Computational Linguistics. Meeting · doi:10.18653/v1/2023.acl-long.411 · Cited by 155 · see citing works
CodeScore: Evaluating Code Generation by Learning Code Execution
Dong, Y., Ding, J., Jiang, X., Li, G., Li, Z., & Jin, Z. G. (2024) · ACM Transactions on Software Engineering and Methodology · doi:10.1145/3695991 · Cited by 76 · see citing works
CodeTransOcean: A Comprehensive Multilingual Benchmark for Code Translation
Yan, W., Tian, Y., Li, Y., Chen, Q., & Wang, W. (2023) · Findings of the Association for Computational Linguistics: EMNLP 2023 · doi:10.18653/v1/2023.findings-emnlp.337 · Cited by 31 · see citing works
Ibrahimzada, A. R., Ke, K., Pawagi, M., Abid, M. S., Pan, R., Sinha, S., & Jabbarvand, R. (2025) · Proceedings of the ACM on software engineering. · doi:10.1145/3729379 · Cited by 27 · see citing works
ExeBench: an ML-scale dataset of executable C functions
Armengol-Estapé, J., Woodruff, J., Brauckmann, A., Magalhães, J. W. D. S., & O’boyle, M. F. P. (2022) · doi:10.1145/3520312.3534867 · Cited by 28 · see citing works
Survey of Code Search Based on Deep Learning
Xie, Y., Lin, J., Dong, H., Zhang, L., & Wu, Z. (2023) · ACM Transactions on Software Engineering and Methodology · doi:10.1145/3628161 · Cited by 27 · see citing works
Using model-driven engineering to automate software language translation
Lano, K., & Siala, H. A. (2024) · Automated Software Engineering · doi:10.1007/s10515-024-00419-y · Cited by 24 · see citing works
Model-Driven Approaches for Reverse Engineering—A Systematic Literature Review
Siala, H. A., Lano, K., & Alfraihi, H. (2024) · IEEE Access · doi:10.1109/access.2024.3394732 · Cited by 23 · see citing works
Macedo, M., Tian, Y., Cogo, F. R., & Adams, B. (2024) · IEEE/ACM International Conference on AI Foundation Models and Software Engineering (FORGE) · doi:10.1145/3650105.3652301 · Cited by 22 · see citing works
Transformers in source code generation: A comprehensive survey
Ghaemi, H., Alizadehsani, Z., Shahraki, A., & Corchado, J. M. (2024) · Journal of Systems Architecture · doi:10.1016/j.sysarc.2024.103193 · Cited by 23 · see citing works
On the Evaluation of Neural Code Translation: Taxonomy and Benchmark
Jiao, M., Yu, T., Li, X., Qiu, G., Gu, X., & Shen, B. (2023) · IEEE/ACM International Conference on Automated Software Engineering (ASE) · doi:10.1109/ase56229.2023.00114 · Cited by 20 · see citing works
Improving the Learning of Code Review Successive Tasks with Cross-Task Knowledge Distillation
Sghaier, O. B., & Sahraoui, H. A. (2024) · Proceedings of the ACM on software engineering. · doi:10.1145/3643775 · Cited by 18 · see citing works
RepoTransBench: A Real-World Multilingual Benchmark for Repository-Level Code Translation
Wang, Y., Wang, Y., Wang, S., Guo, D., Chen, J., Grundy, J., Liu, X., Ma, Y., Mao, M., Zhang, H., et al. (2026) · IEEE Transactions on Software Engineering · doi:10.1109/tse.2025.3645056 · Cited by 12 · see citing works
Hybrid API Migration: A Marriage of Small API Mapping Models and Large Language Models
Zhou, B., Wang, X., Xu, S., Yao, Y., Pan, M., Xu, F., & Ma, X. (2023) · Asia-Pacific Symposium on Internetware · doi:10.1145/3609437.3609466 · Cited by 10 · see citing works
Program Translation via Code Distillation
Huang, Y., Qi, M., Yao, Y., Wang, M., Gu, B., Clement, C. B., & Sundaresan, N. (2023) · Conference on Empirical Methods in Natural Language Processing (EMNLP) · doi:10.18653/v1/2023.emnlp-main.672 · Cited by 10 · see citing works
Enabling Efficient Batch Serving for LMaaS via Generation Length Prediction
Cheng, K., Hu, W., Wang, Z., Du, P., Li, J., & Zhang, S. (2024) · arXiv · doi:10.48550/arxiv.2406.04785 · Cited by 7 · see citing works
Enabling Efficient Batch Serving for LMaaS via Generation Length Prediction
Cheng, K., Hu, W., Wang, Z., Du, P., Li, J., & Zhang, S. (2024) · IEEE International Conference on Web Services (ICWS) · doi:10.1109/icws62655.2024.00104 · Cited by 9 · see citing works
A comparison of large language models and model-driven reverse engineering for reverse engineering
Siala, H. A., & Lano, K. (2025) · Frontiers in Computer Science · doi:10.3389/fcomp.2025.1516410 · Cited by 7 · see citing works
Koohestani, R., de Bekker, P., Koç, B., & Izadi, M. (2025) · IEEE Transactions on Software Engineering · doi:10.1109/tse.2025.3644183 · Cited by 5 · see citing works
EvoC2Rust: A Skeleton-guided Framework for Project-Level C-to-Rust Translation
Wang, C., Yu, T., Shen, B., Wang, J., Chen, D., Zhang, W., Shi, Y., Xie, C., & Gu, X. (2026) · IEEE/ACM International Conference on Software Engineering: Software Engineering in Practice (ICSE-SEIP) · doi:10.1145/3786583.3786856 · Cited by 4 · see citing works
XTest: A Parallel Multilingual Corpus with Test Cases for Code Translation and Its Evaluation*
Rithy, I. J., Shakil, H. H., Mondal, N., Sultana, F., & Shah, F. M. (2022) · International Conference on Computer and Information Technology (ICCIT) · doi:10.1109/iccit57492.2022.10055851 · Cited by 4 · see citing works
Ma, Y.-F., Du, Y., & Li, M. (2023) · Proceedings of the Thirty-Second International Joint Conference on Artificial Intelligence · doi:10.24963/ijcai.2023/249 · Cited by 4 · see citing works
Yang, K., Wang, J., & Song, Z. (2025) · Information and Software Technology · doi:10.1016/j.infsof.2025.107741 · Cited by 3 · see citing works
DLBench: A Comprehensive Benchmark for SQL Translation with Large Language Models
Lin, L., Chen, H., Zhu, Q., Chen, L., Tang, L., & Wu, R. (2025) · IEEE/ACM International Conference on Automated Software Engineering (ASE) · doi:10.1109/ase63991.2025.00076 · Cited by 2 · see citing works
FeedbackEval: A Benchmark for Evaluating Large Language Models in Feedback-Driven Code Repair Tasks
Dai, D., Liu, M., Li, A., Cao, J., Wang, Y., Wang, C., Peng, X., & Zheng, Z. (2025) · arXiv · doi:10.48550/arxiv.2504.06939 · Cited by 1 · see citing works
HMPT: a human–machine cooperative program translation method
Zhang, X., Yu, Z., Liu, J., Hui, W., Wang, L., & Guo, B. (2023) · Automated Software Engineering · doi:10.1007/s10515-023-00395-9 · Cited by 2 · see citing works
Beyond Lexical Consistency: Preserving Semantic Consistency for Program Translation
Du, Y., Ma, Y.-F., Xie, Z., & Li, M. (2023) · Proceedings · doi:10.1109/icdm58522.2023.00018 · Cited by 1 · see citing works
Output format biases in the evaluation of large language models for code translation
Macedo, M., Tian, Y., Cogo, F. R., & Adams, B. (2025) · Empirical Software Engineering · doi:10.1007/s10664-025-10768-1 · Cited by 2 · see citing works
Code–Test Co-translation: Towards Practical and Effective Program Migration in the Wild
Li, X., Xie, X., Wu, J., Liu, T., & Wang, H. (2026) · Proceedings of the ACM on Programming Languages · doi:10.1145/3839490 · Cited by 1 · see citing works
Bhutani, V., Toosi, F. G., & Buckley, J. (2025) · Applied Computer Systems · doi:10.2478/acss-2025-0013 · Cited by 1 · see citing works
Post-Incorporating Code Structural Knowledge Into Pretrained Models via ICL for Code Translation
Du, Y., Sun, H., & Li, M. (2025) · IEEE Transactions on Software Engineering · doi:10.1109/tse.2025.3605768
Human-Machine Cooperative Program Translation Based on Abstract Syntax TreePreprint
Zhang, F., Liu, J., Yu, Z., & Guo, B. (2023) · Research Square · doi:10.21203/rs.3.rs-3789460/v1
Enhancing Representations Based on Inherent Information
Zhuang, Z., & Zhang, P. (2024) · IEEE Annual International Computer Software and Applications Conference (COMPSAC) · doi:10.1109/compsac61105.2024.00160
Assessing Carbon Footprint: Understanding the Environmental Costs of Training Devices
Costagliola, G., Rosa, M. D., & Piscitelli, A. (2024) · Procedia Computer Science · doi:10.1016/j.procs.2024.09.685
OptCodeTrans: Boost LLMs on Low-Resource Programming Language Translation
Lin, J., Shen, Y., Li, C., Niu, C., & Luo, B. (2025) · IEEE/ACM International Conference on AI Foundation Models and Software Engineering (FORGE) · doi:10.1109/forge66646.2025.00014
Multilingual Code Snippets Training for Program Translation
Association for Artificial Intelligence 2022, K. Reddy, C., Suresh, K., & Zhu, M. (2022) · Underline Science Inc. · doi:10.48448/wrq3-e119
Self-citationHybrid Real-Time Intelligent Code Translator
Malar., T., Nitheeshwari, S., & Abirami, R. (2025) · IEEE Conference on Information and Communication Technology (CICT) · doi:10.1109/cict67193.2025.11399005
Applying Genetic Improvement Techniques for Automated Program Repair of Transpiled Code
Jadhwani, P., Hanna, C., Langdon, W. B., & Petke, J. (2026) · doi:10.1145/3786162.3793234
Proprietary Language Migration with LLMs: Syntax Learning and Knowledge-Augmented Translation
Wypych, Y., Faye, B., Azzag, H., & Lebbah, M. (2026) · Lecture notes in computer science · doi:10.1007/978-3-032-38410-2_22
SPDZCoder: Combining Expert Knowledge with LLMs for Generating Privacy-Computing Code
Dong, X., Xin, P., Huang, L., Wang, Y., Li, J., & Xu, W. (2026) · ACM Transactions on Software Engineering and Methodology · doi:10.1145/3845985
- Authors
- Zhu, M., Suresh, K., & Reddy, C. K.
- Affiliations
- Virginia Tech (US)
- Venue
- Proceedings of the AAAI Conference on Artificial Intelligence
- Published
- 2022-06-28
- Volume
- 36
- Issue
- 10
- Pages
- 11783-11790
- ISSN
- 2159-5399 (ISSN-L)
- 2374-3468
- OpenAlex
- W4283799640
- Cited by
- 39
- References
- 26
- Citations by year
- 2026: 5 · 2025: 10 · 2024: 10 · 2023: 10 · 2022: 4
- FWCI
- 7.60
- Type
- conference paper
- Language
- en
- Open access
- diamond
- doi.org
- Locations
- Proceedings of the AAAI Conference on Artificial Intelligence (publishedVersion)
- AAAI Publications (The Association for the Advancement of Artificial Intelligence (AAAI)) (submittedVersion)
- Funders
- National Science Foundation (1838730)
- Topics
- Physical Sciences › Computer Science › Information Systems › Software Engineering Research
- Physical Sciences › Computer Science › Artificial Intelligence › Natural Language Processing Techniques
- Physical Sciences › Computer Science › Artificial Intelligence › Topic Modeling
- Keywords
- program translation, code snippets, multilingual pre-training, low-resource languages, legacy code migration, CodeXGLUE
About these checks
Registry, retraction, Cites and statistics results are computed, not judged, with one exception: a printed reference that no index lists is read once by a model before it counts as a citation error. Claims are extracted by a model and kept only when their quote appears verbatim in the text; each cited source is then checked, with a model’s help, for whether it says what the claim relies on. Those verdicts can be wrong — read the claim’s quote and the cited source before relying on one.
Statistics and arithmetic are recomputed, not judged.
Confidence bands are shown only for fields calibrated on our annotated test set. None is calibrated yet, so no band is shown.
What counts as a claim ›How we measure confidence ›How we check this ›
Are you an author, or do you see a problem with this page? Request a review