实现代码与文本间小粒度双向搜索,助力快速理解科研方法。
Bidirectional Small-Granularity Search between Code and Text

- 用共享编码器处理四个子任务,学习跨模态答案片段的起止位置。
- 在域内数据上表现良好,在域外数据上也取得令人鼓舞的结果。
- 适合需要快速定位论文代码或理解代码逻辑的研究者使用。
我们提出了一项新任务:在代码与文本之间进行双向小粒度搜索,查询和结果均为小片段的文本或代码。该任务建立科学论文中的文本与对应代码段之间的直接联系,以支持对科学方法的更好、更快理解。我们构建了一个大规模数据集,包含一个由GPT-4自动生成文本描述的训练集,以及三个测试集——一个域内和两个域外(OOD)测试集,其中包含人工标注数据及其它领域材料。我们还提出一种模块化方法,通过共享编码器处理四个子任务,学习双向答案片段的起始与结束位置。实验表明,该方法在域内表现优异,在域外也取得了有希望的结果,说明利用自动生成数据解决此任务是可行的,但仍存在广阔的研究空间。
原文摘要 · Abstract (English)
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.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。