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

当前语言模型是否支持R编程语言的代码智能?

Do Current Language Models Support Code Intelligence for R Programming Language?

University of British Columbia(不列颠哥伦比亚大学)

ZiXiao Zhao, Fatemeh H. Fard

AI总结:

本研究首次探究R语言代码智能问题,开源R数据集并评估Code-PLMs在代码摘要、方法名预测任务上的表现,发现模型处理R代码时性能下降,双语法范式、项目特定上下文等因素会显著影响效果。

摘要:

面向代码的预训练语言模型(Code-PLMs)的最新进展推动了软件工程(SE)领域的诸多发展,并在多项SE任务中取得了突破性成果。尽管这些模型在Java、Python等众多主流编程语言的SE任务上已达到最优性能,但科学软件及其相关语言(如R编程语言)却很少受益于Code-PLMs,甚至鲜有相关评估。研究表明,R与其他编程语言存在诸多差异,需要专门的技术支撑。\n本研究首次针对R语言的代码智能展开探究。为此,我们收集并开源了一个R语言数据集,在代码摘要生成和方法名预测两项任务上,采用多种设置与策略评估Code-PLMs的表现,其中包括Tidyverse和Base R两种R语言编程风格的差异影响。\n实验结果显示,所研究的模型在处理R编程语言代码时均出现了不同程度的性能下降,这一结论得到了人工评估的验证。此外,即便经过多语言微调,并非所有模型都能在R语言特定任务上实现性能提升。R语言的双语法范式会显著影响模型性能,在代码摘要任务中表现尤为突出。进一步研究发现,在进行跨项目训练时,R代码库中固有的项目特定上下文会对性能产生显著影响。

英文摘要:

Recent advancements in developing Pre-trained Language Models for Code (Code-PLMs) have urged many areas of Software Engineering (SE) and brought breakthrough results for many SE tasks. Though these models have achieved the state-of-the-art performance for SE tasks for many popular programming languages, such as Java and Python, the Scientific Software and its related languages like R programming language have rarely benefited or even been evaluated with the Code-PLMs. Research has shown that R has many differences with other programming languages and requires specific techniques. In this study, we provide the first insights for code intelligence for R. For this purpose, we collect and open source an R dataset, and evaluate Code-PLMs for the two tasks of code summarization and method name prediction using several settings and strategies, including the differences in two R styles, Tidy-verse and Base R. Our results demonstrate that the studied models have experienced varying degrees of performance degradation when processing R programming language code, which is supported by human evaluation. Additionally, not all models show performance improvement in R-specific tasks even after multi-language fine-tuning. The dual syntax paradigms in R significantly impact the models' performance, particularly in code summarization tasks. Furthermore, the project-specific context inherent in R codebases significantly impacts the performance when attempting cross-project training.

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

↑