arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2112.02043cs.SEcs.LG
收藏

软件工程多语言培训

Multilingual training for Software Engineering

University of California, Davis(加利福尼亚大学戴维斯分校)

Toufique Ahmed, Premkumar Devanbu

摘要:

经过良好训练的机器学习模型利用了大量的开源软件数据,现在已经成为自动化许多软件工程任务的有趣方法。几个SE任务都采用了这种方法,在过去几年中,通过更好的模型和训练方法,性能逐渐提高。更多、更多样化、更干净、更有标签的数据更适合训练;但构建高质量的数据集既耗时又具有挑战性。增加干净的标记数据的数量和多样性的方法通常具有广泛的适用性。对于某些语言(例如,Ruby)标记的数据不太丰富;在其他(例如,JavaScript),可用数据可能更集中于某些应用领域,因此多样性较低。作为一种方法,围绕这样的数据瓶颈,我们提出的证据表明,人类编写的代码在不同的语言(执行相同的功能),是相当相似的,特别是保留标识符命名模式,我们进一步提出的证据表明,标识符是一个非常重要的元素,训练数据的软件工程任务。我们利用这一相当偶然的现象来寻找证据,证明可用的多语言训练数据(跨不同语言)可以用来放大性能。我们研究了3个不同的任务:代码总结,代码检索和函数命名。我们注意到,这种数据增强方法与不同的任务、语言和机器学习模型广泛兼容。

英文摘要:

Well-trained machine-learning models, which leverage large amounts of open-source software data, have now become an interesting approach to automating many software engineering tasks. Several SE tasks have all been subject to this approach, with performance gradually improving over the past several years with better models and training methods. More, and more diverse, clean, labeled data is better for training; but constructing good-quality datasets is time-consuming and challenging. Ways of augmenting the volume and diversity of clean, labeled data generally have wide applicability. For some languages (e.g., Ruby) labeled data is less abundant; in others (e.g., JavaScript) the available data maybe more focused on some application domains, and thus less diverse. As a way around such data bottlenecks, we present evidence suggesting that human-written code in different languages (which performs the same function), is rather similar, and particularly preserving of identifier naming patterns; we further present evidence suggesting that identifiers are a very important element of training data for software engineering tasks. We leverage this rather fortuitous phenomenon to find evidence that available multilingual training data (across different languages) can be used to amplify performance. We study this for 3 different tasks: code summarization, code retrieval, and function naming. We note that this data-augmenting approach is broadly compatible with different tasks, languages, and machine-learning models.

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

↑