神经代码搜索的多模态表示
Multimodal Representation for Neural Code Search
摘要:
语义代码搜索是关于为给定的自然语言查询查找语义相关的代码段。在最先进的方法中,代码和查询之间的语义相似性被量化为它们在共享向量空间中的表示的距离。在本文中,为了改善向量空间,我们引入了树序列化方法的AST的简化形式,并建立多模态表示的代码数据。我们进行了广泛的实验,使用一个单一的语料库,是大规模和多语言:CodeSearchNet。我们的研究结果表明,我们的树序列化表示和多模态学习模型提高了代码搜索的性能。最后,我们定义了直观的量化指标,面向代码数据的语义和语法信息的完整性,以帮助理解实验结果。
英文摘要:
Semantic code search is about finding semantically relevant code snippets for a given natural language query. In the state-of-the-art approaches, the semantic similarity between code and query is quantified as the distance of their representation in the shared vector space. In this paper, to improve the vector space, we introduce tree-serialization methods on a simplified form of AST and build the multimodal representation for the code data. We conduct extensive experiments using a single corpus that is large-scale and multi-language: CodeSearchNet. Our results show that both our tree-serialized representations and multimodal learning model improve the performance of code search. Last, we define intuitive quantification metrics oriented to the completeness of semantic and syntactic information of the code data, to help understand the experimental findings.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。