arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2105.13239cs.CLcs.SE
收藏

CoSQA:20,000多个用于代码搜索和问答的Web服务器

CoSQA: 20,000+ Web Queries for Code Search and Question Answering

Beihang University(北京航空航天大学);Microsoft Research Asia(微软亚洲研究院);Microsoft STC Asia(微软亚洲搜索技术中心)

Junjie Huang, Duyu Tang, Linjun Shou, Ming Gong, Ke Xu, Daxin Jiang, Ming Zhou, Nan Duan

摘要:

在给定自然语言查询的情况下查找代码对软件开发人员的生产力是有利的。在查询和代码之间实现更好的语义匹配的未来进展需要更丰富的监督训练资源。为了解决这个问题,我们引入了CoSQA数据集。它包括20,604个自然语言查询和代码对的标签,每个标签由至少3个人类注释者注释。我们进一步引入了一种称为Cohesive的对比学习方法来增强查询代码匹配,它可以作为数据增强器来带来更多人工生成的训练实例。我们表明,在CodeXGLUE上使用相同的CodeBERT模型进行评估,CoSQA上的训练将代码问答的准确率提高了5.1%,而结合CoSQA则进一步提高了10.5%。

英文摘要:

Finding codes given natural language query isb eneficial to the productivity of software developers. Future progress towards better semantic matching between query and code requires richer supervised training resources. To remedy this, we introduce the CoSQA dataset.It includes 20,604 labels for pairs of natural language queries and codes, each annotated by at least 3 human annotators. We further introduce a contrastive learning method dubbed CoCLR to enhance query-code matching, which works as a data augmenter to bring more artificially generated training instances. We show that evaluated on CodeXGLUE with the same CodeBERT model, training on CoSQA improves the accuracy of code question answering by 5.1%, and incorporating CoCLR brings a further improvement of 10.5%.

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

↑