EUVIMEDEUVIMED entdecken
Crossref

GraphSearchNet: Enhancing GNNs via Capturing Global Dependencies for Semantic Code Search

Shangqing Liu, Xiaofei Xie, Jingkai Siow, Lei Ma, Guozhu Meng, Yang Liu

IEEE Transactions on Software Engineering · 01.04.2023 · 49 (4) · 2839-2855

DOI: 10.1109/tse.2022.3233901 ↗

Kurz gefasst

Fachartikel in der Zeitschrift IEEE Transactions on Software Engineering, erschienen am 01.04.2023. Verfasst von Shangqing Liu und 5 weiteren Autor:innen. Die Arbeit wurde bisher 51-mal zitiert (Crossref) und nennt 81 Literaturangaben. Gefördert von: National Research Foundation Singapore, NRF Investigatorship, National Satellite of Excellence in Trustworthy Software Systems, National University of Singapore.

AbstractBibliografische AngabenZitierenVerwandte Studien

Abstract (Originalsprache)

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 by a significant margin.

Förderung

  • National Research Foundation Singapore
  • NRF Investigatorship
  • National Satellite of Excellence in Trustworthy Software Systems, National University of Singapore
  • National Cybersecurity R&D
  • Ministry of Education - Singapore
  • Academic Research Tier 3
  • National Natural Science Foundation of China
  • Beijing Nova Program

Zitieren

APA

Liu, S., Xie, X., Siow, J., Ma, L., Meng, G., & Liu, Y. (2023). GraphSearchNet: Enhancing GNNs via Capturing Global Dependencies for Semantic Code Search. IEEE Transactions on Software Engineering, 49(4), 2839-2855. https://doi.org/10.1109/tse.2022.3233901

Vancouver

Liu S, Xie X, Siow J, Ma L, Meng G, Liu Y. GraphSearchNet: Enhancing GNNs via Capturing Global Dependencies for Semantic Code Search. IEEE Transactions on Software Engineering. 2023;49(4):2839-2855. doi:10.1109/tse.2022.3233901

BibTeX
@article{Liu2023,
  author = {Liu, Shangqing and Xie, Xiaofei and Siow, Jingkai and Ma, Lei and Meng, Guozhu and Liu, Yang},
  title = {GraphSearchNet: Enhancing GNNs via Capturing Global Dependencies for Semantic Code Search},
  journal = {IEEE Transactions on Software Engineering},
  year = {2023},
  volume = {49},
  number = {4},
  pages = {2839--2855},
  doi = {10.1109/tse.2022.3233901}
}
Kostenlos starten →