Hyperbolic Code Retrieval: A Novel Approach for Efficient Code Search Using Hyperbolic Space Embeddings

08/29/2023
by   Xunzhu Tang, et al.
0

Within the realm of advanced code retrieval, existing methods have primarily relied on intricate matching and attention-based mechanisms. However, these methods often lead to computational and memory inefficiencies, posing a significant challenge to their real-world applicability. To tackle this challenge, we propose a novel approach, the Hyperbolic Code QA Matching (HyCoQA). This approach leverages the unique properties of Hyperbolic space to express connections between code fragments and their corresponding queries, thereby obviating the necessity for intricate interaction layers. The process commences with a reimagining of the code retrieval challenge, framed within a question-answering (QA) matching framework, constructing a dataset with triple matches characterized as negative code, description, positive code. These matches are subsequently processed via a static BERT embedding layer, yielding initial embeddings. Thereafter, a hyperbolic embedder transforms these representations into hyperbolic space, calculating distances between the codes and descriptions. The process concludes by implementing a scoring layer on these distances and leveraging hinge loss for model training. Especially, the design of HyCoQA inherently facilitates self-organization, allowing for the automatic detection of embedded hierarchical patterns during the learning phase. Experimentally, HyCoQA showcases remarkable effectiveness in our evaluations: an average performance improvement of 3.5% to 4% compared to state-of-the-art code retrieval techniques.

READ FULL TEXT
research
07/25/2017

Hyperbolic Representation Learning for Fast and Efficient Neural Question Answering

The dominant neural architectures in question answer retrieval are based...
research
07/27/2021

On decoding hyperbolic codes

Few decoding algorithms for hyperbolic codes are known in the literature...
research
02/12/2019

Hyperbolic Disk Embeddings for Directed Acyclic Graphs

Obtaining continuous representations of structural data such as directed...
research
05/04/2022

Hyperbolic Relevance Matching for Neural Keyphrase Extraction

Keyphrase extraction is a fundamental task in natural language processin...
research
12/02/2020

Aligning Hyperbolic Representations: an Optimal Transport-based approach

Hyperbolic-spaces are better suited to represent data with underlying hi...
research
06/09/2018

Learning Continuous Hierarchies in the Lorentz Model of Hyperbolic Geometry

We are concerned with the discovery of hierarchical relationships from l...
research
02/03/2019

Inferring Concept Hierarchies from Text Corpora via Hyperbolic Embeddings

We consider the task of inferring is-a relationships from large text cor...

Please sign up or login with your details

Forgot password? Click here to reset