代码与文本之间的双向小粒度搜索
Bidirectional Small-Granularity Search between Code and Text
AI总结:
提出双向小粒度搜索任务,通过自动生成数据训练模型,实现科学出版物文本与代码片段间的直接链接,支持跨模态检索。
摘要:
我们引入了代码与文本之间双向小粒度搜索的新任务,其中查询是文本或代码的小片段,结果也是相反模态的小片段,即代码或文本。该任务在科学出版物中的文本与相应代码片段之间建立直接链接,以支持更好、更快地理解科学方法。我们为所提出的任务引入了一个大型数据集,其中包括使用GPT-4自动生成的代码文本描述的训练分区,以及三个测试分区:一个域内和两个域外(OOD),包含手动注释的数据以及其他领域的材料。我们还提出了一种模块化方法来解决此任务。我们的方法在四个不同的子任务之间共享一个编码器,这些子任务学习双向答案跨度的开始/结束。我们表明,我们的方法在域内取得了良好结果,在域外也取得了令人鼓舞的结果。这表明使用自动生成的数据解决此任务是可能的,但仍有令人兴奋的未来工作要做。
英文摘要:
We introduce the novel task of bidirectional small-granularity search between code and text, where the queries are small snippets of text or code and the results are also small fragments of the opposite modality, i.e., code or text. This task establishes direct links between text in scientific publications and corresponding code segments, in support of better and faster understanding of scientific methods. We introduce a large dataset for the proposed task that includes a training partition with textual descriptions of code generated automatically using GPT-4, and three testing partitions, one in-domain and two out-of-domain (OOD) that contain manually-annotated data as well as material from other domains. We also propose a modular approach to address this task. Our approach shares an encoder across four different subtasks that learn start/end of answer spans in both directions. We show that our method achieves good results in-domain, and encouraging results OOD. This suggests that addressing this task with automatically-generated data is possible, but there is exciting future work to be done.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。