一种面向多语言程序翻译的带变分交互的联合学习模型
A Joint Learning Model with Variational Interaction for Multilingual Program Translation
AI总结:
针对多语言程序翻译中平行数据稀缺、语义分布偏移的问题,提出基于解耦的VIM-PT模型,通过变分交互解耦代码特征,实现多语言联合翻译,提升翻译质量并降低部署复杂度。
摘要:
用不同编程语言实现的程序是软件应用的基础。为减轻程序迁移的负担、推动软件系统开发,跨语言自动化程序翻译受到了广泛关注。现有方法主要聚焦于成对翻译范式,利用双语平行数据学习语言对之间的翻译。但部分语言对的平行数据难以收集,且程序语义在不同语言间可能存在分布偏移,给成对程序翻译带来了挑战。本文提出,联合学习一个统一模型以实现多编程语言间的代码翻译,效果优于分别从双语平行数据中学习的方式。我们提出了面向多语言程序翻译的变分交互模型(Variational Interaction for Multilingual Program Translation,VIM-PT),这是一种基于解耦的生成式方法,可联合训练一个统一模型实现多语言间的程序翻译。VIM-PT 通过变分推理和带新型下界的交互信息,将代码解耦为语言共享特征与语言特有特征,再通过条件生成实现程序翻译。VIM-PT 具备四大优势:1)能从不同实现中更准确地捕捉语言共享信息,提升多语言程序翻译的质量;2)可挖掘并利用非平行数据的价值;3)能解决程序语义跨语言分布偏移的问题;4)作为统一模型,可降低部署复杂度。
英文摘要:
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.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。