Multimodal Representation for Neural Code Search

Jian Gu, Zimin Chen, Martin Monperrus
7/2/2021
cs.SEcs.LG

Official code: jianguda/mrncs (23 stars, Python, MIT, last commit 2023-03-25).

Abstract

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.

Show full abstract

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.

View on arXivView PDF

Code Implementations(1)

jianguda/mrncsOfficial100%
MIT
238PythonFeb 12, 20203 years agoMIT

Similar Papers

Cite this paper

@article{gu2021multimodal,
  title  = {Multimodal Representation for Neural Code Search},
  author = {Jian Gu and Zimin Chen and Martin Monperrus},
  year   = {2021},
  eprint = {2107.00992},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/2107.00992}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2107.00992.svg)](https://codeofpaper.com/paper/2107.00992)

Discussion