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

ProCQA:一个用于代码搜索的大规模社区编程问答数据集

ProCQA: A Large-scale Community-based Programming Question Answering Dataset for Code Search

Beihang University(北京航空航天大学);Sino-French Engineer School, Beihang University(北京航空航天大学中法工程师学院);School of Computer Science and Engineering, Beihang University(北京航空航天大学计算机科学与工程学院)

Zehan Li, Jianfei Zhang, Chuantao Yin, Yuanxin Ouyang, Wenge Rong

AI总结:

本文提出大规模社区编程问答数据集ProCQA,并设计模态无关对比预训练方法改进文本与代码表示对齐,在多项代码检索基准上显著超越以往模型。

摘要:

基于检索的代码问答旨在将自然语言的用户查询匹配到相关代码片段。以往方法通常依赖使用精心构建的双模态和单模态数据集预训练模型,以对齐文本和代码表示。本文引入ProCQA,一个从StackOverflow社区提取的大规模编程问答数据集,提供自然结构化的混合模态QA对。为验证其有效性,我们提出一种模态无关的对比预训练方法,以改进当前代码语言模型的文本与代码表示对齐。与主要采用从CodeSearchNet提取的双模态和单模态对进行预训练的以往模型相比,我们的模型在广泛的代码检索基准上展现出显著的性能提升。

英文摘要:

Retrieval-based code question answering seeks to match user queries in natural language to relevant code snippets. Previous approaches typically rely on pretraining models using crafted bi-modal and uni-modal datasets to align text and code representations. In this paper, we introduce ProCQA, a large-scale programming question answering dataset extracted from the StackOverflow community, offering naturally structured mixed-modal QA pairs. To validate its effectiveness, we propose a modality-agnostic contrastive pre-training approach to improve the alignment of text and code representations of current code language models. Compared to previous models that primarily employ bimodal and unimodal pairs extracted from CodeSearchNet for pre-training, our model exhibits significant performance improvements across a wide range of code retrieval benchmarks.

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

↑