Efficient Deep Learning based Code Retrieval using Unified Graph Structure and Semantic Graph Matching Encoder
preprint
OA: closed
Abstract
Computer programmers frequently use code retrieval systems to reuse existing code snippets from open-source repositories. These systems search a large collection of code snippets to retrieve the most relevant ones based on a text query. However, capturing semantic information between user queries and code snippets presents a key challenge in this task. Previous works have primarily used natural language processing (NLP) approaches to calculate relevance, but these approaches cannot capture deep structural and semantic dependencies between queries and snippets. In this study, we proposed a novel approach called Deep Graph-Based Semantic Representation and Matching (DeepGSR) for code retrieval. Our approach transforms queries and code snippets into a unified graph-structure representation and then retrieves relevant code snippets using a novel graph matching and retrieval approach. DeepGSR learns fine-grained relevance between queries and code snippets using cross-attention-based semantic matching operators, in addition to extracting structural information. We evaluated our approach using two publicly available code retrieval datasets, and the experiments demonstrate that DeepGSR efficiently retrieves relevant code snippets for a given query and significantly outperforms existing code retrieval approaches.
My notes (saved in your browser only)
Citation neighborhood (no data yet)
We don't have any in-corpus citations linked to this paper yet. The paper's references may be in our DB but unresolved to ``paper_id`` (resolution happens at ingest when the cited DOI matches a row we already have). Run the cross-source citation reconcile pass to retry.
Source provenance
- europepmc
- last seen: 2026-05-19T01:45:01.086888+00:00