Papers
Topics
Authors
Recent
Gemini 2.5 Flash
Gemini 2.5 Flash
119 tokens/sec
GPT-4o
56 tokens/sec
Gemini 2.5 Pro Pro
43 tokens/sec
o3 Pro
6 tokens/sec
GPT-4.1 Pro
47 tokens/sec
DeepSeek R1 via Azure Pro
28 tokens/sec
2000 character limit reached

Deep Graph Matching and Searching for Semantic Code Retrieval (2010.12908v2)

Published 24 Oct 2020 in cs.AI, cs.IR, and cs.SE

Abstract: Code retrieval is to find the code snippet from a large corpus of source code repositories that highly matches the query of natural language description. Recent work mainly uses natural language processing techniques to process both query texts (i.e., human natural language) and code snippets (i.e., machine programming language), however neglecting the deep structured features of query texts and source codes, both of which contain rich semantic information. In this paper, we propose an end-to-end deep graph matching and searching (DGMS) model based on graph neural networks for the task of semantic code retrieval. To this end, we first represent both natural language query texts and programming language code snippets with the unified graph-structured data, and then use the proposed graph matching and searching model to retrieve the best matching code snippet. In particular, DGMS not only captures more structural information for individual query texts or code snippets but also learns the fine-grained similarity between them by cross-attention based semantic matching operations. We evaluate the proposed DGMS model on two public code retrieval datasets with two representative programming languages (i.e., Java and Python). Experiment results demonstrate that DGMS significantly outperforms state-of-the-art baseline models by a large margin on both datasets. Moreover, our extensive ablation studies systematically investigate and illustrate the impact of each part of DGMS.

User Edit Pencil Streamline Icon: https://streamlinehq.com
Authors (9)
  1. Xiang Ling (12 papers)
  2. Lingfei Wu (135 papers)
  3. Saizhuo Wang (16 papers)
  4. Gaoning Pan (4 papers)
  5. Tengfei Ma (73 papers)
  6. Fangli Xu (17 papers)
  7. Alex X. Liu (20 papers)
  8. Chunming Wu (18 papers)
  9. Shouling Ji (136 papers)
Citations (84)

Summary

We haven't generated a summary for this paper yet.