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

代码变更通用嵌入的无监督学习

Unsupervised Learning of General-Purpose Embeddings for Code Changes

Higher School of Economics(高等经济大学);JetBrains Research(JetBrains研究院)

Mikhail Pravilov, Egor Bogomolov, Yaroslav Golubev, Timofey Bryksin

摘要:

将机器学习应用于需要代码更改的任务需要它们的数值表示。在这项工作中,我们提出了一种在预训练期间获得这种表示的方法,并在两个不同的下游任务上对其进行评估-将更改应用于代码和提交消息生成。在预训练期间,模型学习以正确的方式应用给定的代码更改。此任务只需要代码更改本身,这使得它不受监督。在应用代码更改的任务中,我们的模型在准确性上比基线模型高出5.9个百分点。至于提交消息生成,我们的模型展示了与针对此特定任务训练的监督模型相同的结果,这表明它可以很好地编码代码更改,并且可以通过在更大的易于收集的代码更改数据集上进行预训练来改进。

英文摘要:

Applying machine learning to tasks that operate with code changes requires their numerical representation. In this work, we propose an approach for obtaining such representations during pre-training and evaluate them on two different downstream tasks - applying changes to code and commit message generation. During pre-training, the model learns to apply the given code change in a correct way. This task requires only code changes themselves, which makes it unsupervised. In the task of applying code changes, our model outperforms baseline models by 5.9 percentage points in accuracy. As for the commit message generation, our model demonstrated the same results as supervised models trained for this specific task, which indicates that it can encode code changes well and can be improved in the future by pre-training on a larger dataset of easily gathered code changes.

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

↑