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

多模态自动代码审查的对比学习

Contrastive Learning for Multi-Modal Automatic Code Review

Bingting Wu, Xiaofang Zhang

摘要:

自动代码审查(ACR)是软件工程中一项不可缺少的重要任务,其目的是减轻人工审查的成本。现有的工作仅仅利用源代码片段来预测结果,缺少对开发者注释的利用。因此,我们提出了一个多模态Apache自动代码审查数据集(MACR)的多模态ACR任务。该数据集的发布将推动该领域的研究。在此基础上,我们提出了一种基于对比学习的多模态网络(CLMN)来处理多模态ACR任务。具体地说,我们的模型包括一个代码编码模块和一个文本编码模块。对于每个模块,我们使用dropout操作作为最小的数据增强。然后,采用对比学习方法对模块参数进行预训练。最后,我们结合这两个编码器微调CLMN决定的结果多模态ACR。在MACR数据集上的实验结果表明,我们提出的模型优于最先进的方法。

英文摘要:

Automatic code review (ACR), aiming to relieve manual inspection costs, is an indispensable and essential task in software engineering. The existing works only use the source code fragments to predict the results, missing the exploitation of developer's comments. Thus, we present a Multi-Modal Apache Automatic Code Review dataset (MACR) for the Multi-Modal ACR task. The release of this dataset would push forward the research in this field. Based on it, we propose a Contrastive Learning based Multi-Modal Network (CLMN) to deal with the Multi-Modal ACR task. Concretely, our model consists of a code encoding module and a text encoding module. For each module, we use the dropout operation as minimal data augmentation. Then, the contrastive learning method is adopted to pre-train the module parameters. Finally, we combine the two encoders to fine-tune the CLMN to decide the results of Multi-Modal ACR. Experimental results on the MACR dataset illustrate that our proposed model outperforms the state-of-the-art methods.

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

↑