arXivDaily arXiv每日学术速递 周一至周五更新
arXiv周末暂无论文更新,休息一下吧,周末愉快~~
arXiv 2507.16478cs.AIcs.SE
收藏

ACT:通过合成数据生成与自适应训练弥合代码翻译差距

ACT: Bridging the Gap in Code Translation through Synthetic Data Generation & Adaptive Training

Phi Labs;Quantiphi Analytics

Shreya Saxena, Siva Prasad, Zishan Ahmad, Vishal Vaddina

AI总结:

本文提出 ACT 框架,通过合成代码翻译数据、单元测试、执行级评估和控制器驱动的自适应微调,提升开源 LLM 的代码翻译性能。

摘要:

代码翻译是软件开发和迁移项目中的关键过程,可实现不同编程语言之间的互操作,并增强软件的适应性,从而延长软件寿命。传统的自动化翻译方法严重依赖手工编写的转换规则,这些规则往往缺乏灵活性和可扩展性。与此同时,先进的语言模型提供了有前景的替代方案,但通常受限于专有的、基于 API 的实现,这引发了对数据安全和依赖性的担忧。本文提出 Auto-Train for Code Translation(ACT),这是一个创新框架,旨在通过支持对开源大型语言模型(LLM)进行内部微调来提升代码翻译能力。ACT 的自动化流水线显著提升了这些模型的性能,缩小了开源可访问性与闭源解决方案高性能之间的差距。ACT 的核心是其合成数据生成模块,该模块从初始代码样本构建大规模、高质量数据集,并纳入单元测试以确保功能准确性和多样性。ACT 的评估框架包含执行级检查,可对翻译质量进行全面评估。ACT 的一个关键特性是其控制器模块,它通过动态调整超参数、编排迭代数据生成以及基于实时评估进行微调来管理整个流水线。这使 ACT 能够智能地优化何时继续训练、生成额外的针对性训练数据,或停止该过程。我们的结果表明,ACT 持续提升了开源模型的有效性,为企业和开发者提供了安全可靠的替代方案。此外,将我们的数据生成流水线应用于行业规模的迁移项目,已显著提升开发者加速效果。

英文摘要:

Code translation is a crucial process in software development and migration projects, enabling interoperability between different programming languages and enhancing software adaptability and thus longevity. Traditional automated translation methods rely heavily on handcrafted transformation rules, which often lack flexibility and scalability. Meanwhile, advanced language models present promising alternatives but are often limited by proprietary, API-based implementations that raise concerns over data security and reliance. In this paper, we present Auto-Train for Code Translation (ACT), an innovative framework that aims to improve code translation capabilities by enabling in-house finetuning of open-source Large Language Models (LLMs). ACT's automated pipeline significantly boosts the performance of these models, narrowing the gap between open-source accessibility and the high performance of closed-source solutions. Central to ACT is its synthetic data generation module, which builds extensive, high-quality datasets from initial code samples, incorporating unit tests to ensure functional accuracy and diversity. ACT's evaluation framework incorporates execution-level checks, offering a comprehensive assessment of translation quality. A key feature in ACT is its controller module, which manages the entire pipeline by dynamically adjusting hyperparameters, orchestrating iterative data generation, and finetuning based on real-time evaluations. This enables ACT to intelligently optimize when to continue training, generate additional targeted training data, or stop the process. Our results demonstrate that ACT consistently enhances the effectiveness of open-source models, offering businesses and developers a secure and reliable alternative. Additionally, applying our data generation pipeline to industry-scale migration projects has led to a notable increase in developer acceleration.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑