GraphSearchNet: Enhancing GNNs via Capturing Global Dependencies for Semantic Code Search
Not on the map. Why?
Abstract (arXiv)
Code search aims to retrieve accurate code snippets based on a natural language query to improve software productivity and quality. With the massive amount of available programs such as (on GitHub or Stack Overflow), identifying and localizing the precise code is critical for the software developers. In addition, Deep learning has recently been widely applied to different code-related scenarios, e.g., vulnerability detection, source code summarization. However, automated deep code search is still challenging since it requires a high-level semantic mapping between code and natural language queries. Most existing deep learning-based approaches for code search rely on the sequential text i.e., feeding the program and the query as a flat sequence of tokens to learn the program semantics while the structural information is not fully considered. Furthermore, the widely adopted Graph Neural Networks (GNNs) have proved their effectiveness in learning program semantics, however, they also suffer the problem of capturing the global dependencies in the constructed graph, which limits the model learning capacity. To address these challenges, in this paper, we design a novel neural network framework, named GraphSearchNet, to enable an effective and accurate source code search by jointly learning the rich semantics of both source code and natural language queries. Specifically, we propose to construct graphs for the source code and queries with bidirectional GGNN (BiGGNN) to capture the local structural information of the source code and queries. Furthermore, we enhance BiGGNN by utilizing the multi-head attention module to supplement the global dependencies that BiGGNN missed to improve the model learning capacity. The extensive experiments on Java and Python programming language from the public benchmark CodeSearchNet confirm that GraphSearchNet outperforms current state-of-the-art works.
Key facts. Cited by 15 papers in the map (data through 7 Oct 2026). Builds on 50 of its 93 references that are in the map. First posted on arXiv 4 Nov 2021.
Builds on
50 of 93 references.
References · 50
- 2017Attention Is All You Needcited by 59,932
- 2018BERT: Pre-training of Deep Bidirectional Transformers for Language Understandingcited by 40,204
- 2014Adam: A Method for Stochastic Optimizationcited by 36,960
- 2016Semi-Supervised Classification with Graph Convolutional Networkscited by 11,282
- 2017Inductive Representation Learning on Large Graphscited by 6,284
- 2014Neural Machine Translation by Jointly Learning to Align and Translatecited by 4,530
- 2018How Powerful are Graph Neural Networks?cited by 4,355
- 2014Learning Phrase Representations using RNN Encoder-Decoder for Statistical Machine Translationcited by 4,016
- 2014On the Properties of Neural Machine Translation: Encoder-Decoder Approachescited by 1,303
- 2020CodeBERT: A Pre-Trained Model for Programming and Natural Languagescited by 1,286
- 2018Deeper Insights into Graph Convolutional Networks for Semi-Supervised Learningcited by 1,099
- 2015Effective Approaches to Attention-based Neural Machine Translationcited by 1,024
38 more
- 2021CodeT5: Identifier-aware Unified Pre-trained Encoder-Decoder Models for Code Understanding and Generationcited by 890
- 2015Gated Graph Sequence Neural Networkscited by 792
- 2015Convolutional Networks on Graphs for Learning Molecular Fingerprintscited by 751
- 2021CodeXGLUE: A Machine Learning Benchmark Dataset for Code Understanding and Generationcited by 732
- 2019Graph Neural Networks for Social Recommendationcited by 711
- 2019CodeSearchNet Challenge: Evaluating the State of Semantic Code Searchcited by 638
- 2020On the Bottleneck of Graph Neural Networks and its Practical Implicationscited by 624
- 2020GraphCodeBERT: Pre-training Code Representations with Data Flowcited by 600
- 2019Text Summarization with Pretrained Encoderscited by 553
- 2019Devign: Effective Vulnerability Identification by Learning Comprehensive Program Semantics via Graph Neural Networkscited by 266
- 2018code2vec: Learning Distributed Representations of Codecited by 249
- 2017Learning to Represent Programs with Graphscited by 219
- 2018code2seq: Generating Sequences from Structured Representations of Codecited by 177
- 2020Retrieval-Augmented Generation for Code Summarization via Hybrid GNNcited by 89
- 2019Reinforcement Learning Based Graph-to-Sequence Model for Natural Question Generationcited by 57
- 2018Question Answering by Reasoning Across Documents with Graph Convolutional Networkscited by 56
- 2018Structured Neural Summarizationcited by 53
- 2018Learning Conditioned Graph Structures for Interpretable Visual Question Answeringcited by 45
- 2019When Deep Learning Met Code Searchcited by 45
- 2016Deep API Learningcited by 41
- 2019GraphFlow: Exploiting Conversation Flow with Graph Neural Networks for Conversational Machine Comprehensioncited by 41
- 2019Multi-Modal Attention Network Learning for Semantic Source Code Retrievalcited by 40
- 2018Graph2Seq: Graph to Sequence Learning with Attention-based Neural Networkscited by 36
- 2020Typilus: Neural Type Hintscited by 29
- 2019ATOM: Commit Message Generation Based on Abstract Syntax Tree and Hybrid Rankingcited by 25
- 2018Exploring Graph-structured Passage Representation for Multi-hop Reading Comprehension with Graph Neural Networkscited by 23
- 2019CoaCor: Code Annotation for Code Retrieval with Reinforcement Learningcited by 22
- 2020Opportunities and Challenges in Code Search Toolscited by 22
- 2020A Multi-Perspective Architecture for Semantic Code Searchcited by 20
- 2020Multi-hop Question Generation with Graph Convolutional Networkcited by 20
- 2021SPI: Automated Identification of Security Patches via Commitscited by 19
- 2018Learning beyond datasets: Knowledge Graph Augmented Neural Networks for Natural language Processingcited by 15
- 2019Neural Code Search Evaluation Datasetcited by 13
- 2018Open Vocabulary Learning on Source Code with a Graph-Structured Cachecited by 10
- 2020OCoR: An Overlapping-Aware Code Retrievercited by 9
- 2020CodeMatcher: Searching Code Based on Sequential Semantics of Important Query Wordscited by 5
- 2021BERT2Code: Can Pretrained Language Models be Leveraged for Code Search?cited by 2
- 2021Is a Single Model Enough? MuCoS: A Multi-Model Ensemble Learning for Semantic Code Searchcited by 1
Built on by
Citing papers per year: 2022: 3; 2023: 5; 2024: 4; 2025: 2; 2026: 1.
15 papers.
Sort:
By area:
- 2024Analyzing the Performance of Large Language Models on Code Summarizationcited by 19
- 2023Backdooring Neural Code Searchcited by 13
- 2022Learning Program Semantics with Code Representations: An Empirical Studycited by 6
- 2022Learning Program Representations with a Tree-Structured Transformercited by 6
- 2023Bridging Code Semantic and LLMs: Semantic Chain-of-Thought Prompting for Code Generationcited by 6
- 2023Abstract Syntax Tree for Programming Language Understanding and Representation: How Far Are We?cited by 5
- 2025SPENCER: Self-Adaptive Model Distillation for Efficient Code Retrievalcited by 5
- 2025ObscuraCoder: Powering Efficient Code LM Pre-Training Via Obfuscation Groundingcited by 4
- 2022NS3: Neuro-Symbolic Semantic Code Searchcited by 3
- 2023A Black-Box Attack on Code Models via Representation Nearest Neighbor Searchcited by 3
- 2023CodeLens: An Interactive Tool for Visualizing Code Representationscited by 0
- 2024CONCORD: Towards a DSL for Configurable Graph Code Representationcited by 0
3 more
- 2024LSem2Vec: A Simple yet Effective Two-Stage Approach for Source Code Embeddingcited by 0
- 2024DeMuVGN: Effective Software Defect Prediction Model by Learning Multi-view Software Dependency via Graph Neural Networkscited by 0
- 2026ChartWalker: Benchmarking the Cross-Chart RAG Task with Hierarchical Knowledge Graphscited by 0
- 2026ChartWalker: Benchmarking the Cross-Chart RAG Task with Hierarchical Knowledge Graphs22 Jun 2026
- 2025SPENCER: Self-Adaptive Model Distillation for Efficient Code Retrieval1 Aug 2025
- 2025ObscuraCoder: Powering Efficient Code LM Pre-Training Via Obfuscation Grounding27 Mar 2025
- 2024DeMuVGN: Effective Software Defect Prediction Model by Learning Multi-view Software Dependency via Graph Neural Networks25 Oct 2024
- 2024LSem2Vec: A Simple yet Effective Two-Stage Approach for Source Code Embedding23 Sep 2024
- 2024Analyzing the Performance of Large Language Models on Code Summarization10 Apr 2024
- 2024CONCORD: Towards a DSL for Configurable Graph Code Representation31 Jan 2024
- 2023Abstract Syntax Tree for Programming Language Understanding and Representation: How Far Are We?1 Dec 2023
- 2023Bridging Code Semantic and LLMs: Semantic Chain-of-Thought Prompting for Code Generation16 Oct 2023
- 2023CodeLens: An Interactive Tool for Visualizing Code Representations27 Jul 2023
- 2023Backdooring Neural Code Search27 May 2023
- 2023A Black-Box Attack on Code Models via Representation Nearest Neighbor Search10 May 2023
3 more
- 2022Learning Program Representations with a Tree-Structured Transformer18 Aug 2022
- 2022NS3: Neuro-Symbolic Semantic Code Search21 May 2022
- 2022Learning Program Semantics with Code Representations: An Empirical Study22 Mar 2022
- 2023Backdooring Neural Code Searchcited by 13
- 2023Backdooring Neural Code Search27 May 2023
- 2024Analyzing the Performance of Large Language Models on Code Summarizationcited by 19
- 2022Learning Program Semantics with Code Representations: An Empirical Studycited by 6
- 2022Learning Program Representations with a Tree-Structured Transformercited by 6
- 2023Abstract Syntax Tree for Programming Language Understanding and Representation: How Far Are We?cited by 5
- 2025SPENCER: Self-Adaptive Model Distillation for Efficient Code Retrievalcited by 5
- 2025ObscuraCoder: Powering Efficient Code LM Pre-Training Via Obfuscation Groundingcited by 4
- 2022NS3: Neuro-Symbolic Semantic Code Searchcited by 3
- 2023A Black-Box Attack on Code Models via Representation Nearest Neighbor Searchcited by 3
- 2023CodeLens: An Interactive Tool for Visualizing Code Representationscited by 0
- 2024CONCORD: Towards a DSL for Configurable Graph Code Representationcited by 0
- 2024LSem2Vec: A Simple yet Effective Two-Stage Approach for Source Code Embeddingcited by 0
- 2024DeMuVGN: Effective Software Defect Prediction Model by Learning Multi-view Software Dependency via Graph Neural Networkscited by 0
- 2025SPENCER: Self-Adaptive Model Distillation for Efficient Code Retrieval1 Aug 2025
- 2025ObscuraCoder: Powering Efficient Code LM Pre-Training Via Obfuscation Grounding27 Mar 2025
- 2024DeMuVGN: Effective Software Defect Prediction Model by Learning Multi-view Software Dependency via Graph Neural Networks25 Oct 2024
- 2024LSem2Vec: A Simple yet Effective Two-Stage Approach for Source Code Embedding23 Sep 2024
- 2024Analyzing the Performance of Large Language Models on Code Summarization10 Apr 2024
- 2024CONCORD: Towards a DSL for Configurable Graph Code Representation31 Jan 2024
- 2023Abstract Syntax Tree for Programming Language Understanding and Representation: How Far Are We?1 Dec 2023
- 2023CodeLens: An Interactive Tool for Visualizing Code Representations27 Jul 2023
- 2023A Black-Box Attack on Code Models via Representation Nearest Neighbor Search10 May 2023
- 2022Learning Program Representations with a Tree-Structured Transformer18 Aug 2022
- 2022NS3: Neuro-Symbolic Semantic Code Search21 May 2022
- 2022Learning Program Semantics with Code Representations: An Empirical Study22 Mar 2022