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

先解释后翻译:自生成解释提升程序翻译效果的分析

Explain-then-Translate: An Analysis on Improving Program Translation with Self-generated Explanations

Boston University(波士顿大学);MIT-IBM Watson AI Lab(MIT-IBM沃森人工智能实验室);IBM Research(IBM研究院);UPenn(宾夕法尼亚大学);MIT(麻省理工学院);Monash University Indonesia(蒙纳士大学印度尼西亚校区)

Zilu Tang, Mayank Agarwal, Alex Shypula, Bailin Wang, Derry Wijaya, Jie Chen, Yoon Kim

AI总结:

本研究提出以自生成自然语言解释为中间步骤的代码翻译方法,在零样本场景下平均提升12%,尤其对困难程序效果显著,并发布了多语言数据集与代码。

摘要:

本研究探讨了将自生成的自然语言解释作为语言模型进行代码到代码翻译的中间步骤。基于MultiPL-E数据集构建的三种解释类型和19种编程语言,我们发现解释在零样本情况下尤为有效,平均性能提升12%。自然语言解释带来的改进在困难程序上尤为显著。我们发布了包含所有19种语言的数据集、代码和规范解决方案。

英文摘要:

This work explores the use of self-generated natural language explanations as an intermediate step for code-to-code translation with language models. Across three types of explanations and 19 programming languages constructed from the MultiPL-E dataset, we find the explanations to be particularly effective in the zero-shot case, improving performance by 12% on average. Improvements with natural language explanations are particularly pronounced on difficult programs. We release our dataset, code, and canonical solutions in all 19 languages.

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

↑