NS3: Neuro-Symbolic Semantic Code Search

05/21/2022
by   Shushan Arakelyan, et al.
3

Semantic code search is the task of retrieving a code snippet given a textual description of its functionality. Recent work has been focused on using similarity metrics between neural embeddings of text and code. However, current language models are known to struggle with longer, compositional text, and multi-step reasoning. To overcome this limitation, we propose supplementing the query sentence with a layout of its semantic structure. The semantic layout is used to break down the final reasoning decision into a series of lower-level decisions. We use a Neural Module Network architecture to implement this idea. We compare our model - NS3 (Neuro-Symbolic Semantic Search) - to a number of baselines, including state-of-the-art semantic code retrieval methods, and evaluate on two datasets - CodeSearchNet and Code Search and Question Answering. We demonstrate that our approach results in more precise code retrieval, and we study the effectiveness of our modular design when handling compositional queries.

READ FULL TEXT

page 2

page 8

page 9

page 17

research
03/01/2022

Semantic Sentence Composition Reasoning for Multi-Hop Question Answering

Due to the lack of insufficient data, existing multi-hop open domain que...
research
09/03/2020

CoNCRA: A Convolutional Neural Network Code Retrieval Approach

Software developers routinely search for code using general-purpose sear...
research
09/18/2023

LayoutNUWA: Revealing the Hidden Layout Expertise of Large Language Models

Graphic layout generation, a growing research field, plays a significant...
research
09/17/2022

Learning to Answer Semantic Queries over Code

During software development, developers need answers to queries about se...
research
05/14/2023

Semantic-aware Dynamic Retrospective-Prospective Reasoning for Event-level Video Question Answering

Event-Level Video Question Answering (EVQA) requires complex reasoning a...
research
05/08/2023

Retriever and Ranker Framework with Probabilistic Hard Negative Sampling for Code Search

Pretrained Language Models (PLMs) have emerged as the state-of-the-art p...
research
07/10/2021

Is a Single Model Enough? MuCoS: A Multi-Model Ensemble Learning for Semantic Code Search

Recently, deep learning methods have become mainstream in code search si...

Please sign up or login with your details

Forgot password? Click here to reset