A Joint Learning Model with Variational Interaction for Multilingual Program Translation
Open Access
- 27 October 2024
- conference paper
- Published by Association for Computing Machinery (ACM)
- p. 1907-1918
Abstract
Programs implemented in various programming languages form the foundation of software applications. To alleviate the burden of program migration and facilitate the development of software systems, automated program translation across languages has garnered significant attention. Previous approaches primarily focus on pairwise translation paradigms, learning translation between pairs of languages using bilingual parallel data. However, parallel data is difficult to collect for some language pairs, and the distribution of program semantics across languages can shift, posing challenges for pairwise program translation. In this paper, we argue that jointly learning a unified model to translate code across multiple programming languages is superior to separately learning from bilingual parallel data. We propose Variational Interaction for Multilingual Program Translation (VIM-PT), a disentanglement-based generative approach that jointly trains a unified model for multilingual program translation across multiple languages. VIM-PT disentangles code into language-shared and language-specific features, using variational inference and interaction information with a novel lower bound, then achieves program translation through conditional generation. VIM-PT demonstrates four advantages: 1) captures language-shared information more accurately from various implementations and improves the quality of multilingual program translation, 2) mines and leverages the capability of non-parallel data, 3) addresses the distribution shift of program semantics across languages, 4) and serves as a unified model, reducing deployment complexity.Keywords
All Related Versions
Funding Information
- NSFC (62076121, 61921006)
- Major Program (JD) of Hubei Province (2023BAA024)
- Postgraduate Research & Practice Innovation Program of Jiangsu Province (KYCX24_0301)
This publication has 16 references indexed in Scilit:
- Exploring and Unleashing the Power of Large Language Models in Automated Code TranslationProceedings of the ACM on Software Engineering, 2024
- Code search based on context-aware code translation2022
- Better Together? An Evaluation of AI-Supported Code Translation2022
- A Tool for Translating Sequential Source Code to Parallel Code Written in C++ and OpenACC2019
- A Survey of Machine Learning for Big Code and NaturalnessACM Computing Surveys, 2018
- Automatic inference of Java-to-swift translation rules for porting mobile applications2018
- Exploring translation of OpenMP to OpenACC 2.5: lessons learned2017
- Learning to Generate Pseudo-Code from Source Code Using Statistical Machine Translation2015
- Program translation via abstraction and reimplementationIEEE Transactions on Software Engineering, 1988
- Automatic-programming-language translation through syntactical analysisCommunications of the ACM, 1962