一句话:提出 VIM-PT,利用变分推断和交互信息解耦语言共享与特有特征,联合训练多语言程序翻译统一模型。
程序常以多种编程语言实现,跨语言程序翻译能降低迁移与开发成本。现有方法多采用双语句对平行数据学习两两翻译,但部分语言对平行数据稀缺,且程序语义跨语言存在分布偏移。本文提出 VIM-PT,一种基于解耦的生成式方法,联合训练面向多语言的统一翻译模型。它将代码表示解耦为语言共享特征和语言特有特征,借助变分推断与交互信息,并推导新的下界,最终通过条件生成完成程序翻译。该方法声称具有四项优势:更准确捕获跨语言共享信息并提升翻译质量,挖掘和利用非平行数据,缓解跨语言程序语义分布偏移,并以统一模型降低部署复杂度。
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.CCS CONCEPTS• Software and its engineering → Automatic programming.