arXivDaily arXiv每日学术速递 周一至周五更新
感恩节,周五至周末无更新,大家顺遂。周一再来吧
arXiv 2406.14867cs.LGcs.AIcs.CL
收藏

探究低资源编程语言代码修复的可迁移性

Investigating the Transferability of Code Repair for Low-Resource Programming Languages

University of California, Santa Barbara(加利福尼亚大学圣巴巴拉分校);University of Arizona(亚利桑那大学)

Kyle Wong, Alfonso Amayuelas, Liangming Pan, William Yang Wang

AI总结:

本文研究了代码修复蒸馏技术在高资源与低资源编程语言间的可迁移性,发现其效果具有语言依赖性,并揭示了推理能力与代码纠正能力间存在弱相关性。

摘要:

大型语言模型(LLMs)在代码生成任务上表现出色。最近的一个用例是迭代代码修复,即LLM通过分析错误并生成新代码来修复不正确的程序。近期的研究通过整合思维链推理或蒸馏等现代技术来增强代码修复过程,但仅研究了它们在Python等高资源语言上的效果,而忽略了Perl等低资源语言。为了填补这一知识空白,我们研究了将代码修复蒸馏技术应用于高资源和低资源语言的效果,以确定在高资源环境中有效的技术是否同样适用于低资源环境。我们的评估表明,蒸馏代码修复能力的效果具有语言依赖性。为了解释这一现象,我们进行了进一步分析,发现与现有观点相反,推理能力与代码纠正能力之间的相关性较弱。我们假设这种弱相关性在低资源环境中被放大,因为基础模型缺乏对编程语言的深入知识,导致代码修复的效果不稳定。

英文摘要:

Large language models (LLMs) have shown remarkable performance on code generation tasks. A recent use case is iterative code repair, where an LLM fixes an incorrect program by rationalizing about errors and generating new code. Recent works augment the code repair process by integrating modern techniques such as chain-of-thought reasoning or distillation, but only study their benefits on high-resource languages like Python, and ignore low-resource languages like Perl. To address this gap of knowledge, we investigate the benefits of distilling code repair for both high and low resource languages to determine if the techniques that are effective in a high resource setting are also applicable in a low resource setting. Our evaluation shows that distilling the ability to repair code has language dependent benefits. To explain this behavior, we perform a further analysis and find that contrary to preexisting beliefs, the correlation between reasoning ability and code correction ability is weak. We hypothesize this weak correlation is magnified in low-resource settings where base models lack deep knowledge of a programming language, leading to wavering benefits of code repair.

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

↑