• Home
  • Search
  • Deep Semantics-Enhanced Neural Code Search
  • Cite Icon1
  • https://doi.org/10.3390/electronics13234704Copy DOI Icon

Deep Semantics-Enhanced Neural Code Search

Show More
  • Abstract
  • Literature Map
  • References
  • Citations
  • Similar Papers
Abstract

Code search uses natural language queries to retrieve code snippets from a vast database, identifying those that are semantically similar to the query. This enables developers to reuse code and enhance software development efficiency. Most existing code search algorithms focus on capturing semantic and structural features by learning from both text and code graph structures. However, these algorithms often struggle to capture deeper semantic and structural features within these sources, leading to lower accuracy in code search results. To address this issue, this paper proposes a novel semantics-enhanced neural code search algorithm called SENCS, which employs graph serialization and a two-stage attention mechanism. First, the code program dependency graph is transformed into a unique serialized encoding, and a bidirectional long short-term memory (LSTM) model is used to learn the structural information of the code in the graph sequence to generate code vectors rich in structural features. Second, a two-stage attention mechanism enhances the embedded vectors by assigning different weight information to various code features during the code feature fusion phase, capturing significant feature information from different code feature sequences, resulting in code vectors rich in semantic and structural information. To validate the performance of the proposed code search algorithm, extensive experiments were conducted on two widely used code search datasets, CodeSearchNet and JavaNet. The experimental results show that the proposed SENCS algorithm improves the average code search accuracy metrics by 8.30 % (MRR) and 17.85% (DCG) and compared to the best baseline code search model in the literature, with an average improvement of 14.86% in the SR@1 metric. Experiments with two open-source datasets demonstrate SENCS achieves a better search effect than state of-the-art models.

Similar Papers
  • Research Article
  • Citations10

Forecasting daily PM2.5 concentrations in Wuhan with a spatial-autocorrelation-based long short-term memory model

  • May 23, 2024
  • Atmospheric Environment
  • Zhifei Liu +6
  • PDF
  • Research Article
  • Citations8

Research on Safety Prediction of Sector Traffic Operation Based on a Long Short Term Memory Model

  • Jun 01, 2021
  • Applied Sciences
  • Wenying Lyu +3
  • PDF
  • Research Article
  • Citations7

A Novel Approach for Predicting CO2 Emissions in the Building Industry Using a Hybrid Multi-Strategy Improved Particle Swarm Optimization–Long Short-Term Memory Model

  • Sep 01, 2024
  • Energies
  • Yuyi Hu +3
  • Research Article
  • Citations403

Long short-term memory - Fully connected (LSTM-FC) neural network for PM2.5 concentration prediction

  • Dec 21, 2018
  • Chemosphere
  • Jiachen Zhao +3
  • Research Article
  • Citations2

Sensitivity analysis of isoprene and aerosol emission in a suburban plantation using long short-term memory model

  • Aug 18, 2021
  • Urban Forestry & Urban Greening
  • Junyao Lyu +6
  • Research Article
  • Citations39

High-resolution prediction of the spatial distribution of PM2.5 concentrations in China using a long short-term memory model

  • Mar 05, 2021
  • Journal of Cleaner Production
  • Zhige Wang +5
  • Research Article
  • Citations1

A Real-Time Diagnostic System Using a Long Short-Term Memory Model with Signal Reshaping Technology for Ship Propellers

  • Sep 03, 2025
  • Sensors (Basel, Switzerland)
  • Sheng-Chih Shen +4
  • Research Article
  • Citations2

Adverse drug reaction signal detection via the long short-term memory model

  • Jun 23, 2025
  • Frontiers in Pharmacology
  • Mengqi Cao +5
  • Research Article
  • Citations2

Tool Wear Prediction Based on Adaptive Feature and Temporal Attention with Long Short-Term Memory Model

  • May 01, 2024
  • International Journal of Engineering and Technology Innovation
  • Wanzhen Wang +6
  • Research Article
  • Citations2

Bitcoin price prediction using optimized multiplicative long short term memory with attention mechanism using modified cuckoo search optimization

  • Oct 21, 2022
  • Concurrency and Computation: Practice and Experience
  • Aarif Ahamed Shahul Hameed +1
  • Preprint Article

Sub-seasonal daily precipitation forecasting based on Long Short-Term Memory (LSTM) models

  • May 15, 2023
  • Claudia Bertini +3
  • Research Article
  • Citations1

Hyperparameter Tuning of Long Short-Term Memory Model for Clickbait Classification in News Headlines

  • Mar 31, 2024
  • Recursive Journal of Informatics
  • Grace Yudha Satriawan +1
  • Research Article
  • Citations1

Application of Long Short-Term Memory and XGBoost Model for Carbon Emission Reduction: Sustainable Travel Route Planning

  • Dec 02, 2025
  • Sustainability
  • Sevcan Emek +2
  • Research Article

Sentiment Analysis of User Reviews on the NU Online Application Using the Long Short-Term Memory (LSTM) Model

  • Oct 02, 2025
  • Journal of Electrical Engineering and Computer (JEECOM)
  • Atik Muthmainnah +2
  • Book Chapter
  • Citations54

Deep Bi-directional Long Short-Term Memory Model for Short-Term Traffic Flow Prediction

  • Jan 01, 2017
  • Jingyuan Wang +2
Cactus Communications logo

Copyright 2026 Cactus Communications. All rights reserved.