arrow
返回

On Representation Learning-based Methods for Effective, Efficient, and Scalable Code Retrieval

delete2024-10-01
delete1
PRE
AI
C
Celso França *
R
Rennan C. Lima
C
Cláudio Moisés Valiense de Andrade
W
Washington Cunha
P
Pedro O. S. Vaz de Melo
B
Berthier Ribeiro‐Neto
L
Leonardo Rocha
R
Rodrygo L. T. Santos
A
Adriana Silvina Pagano
M
Marcos André Gonçalves
DOI:10.1016/j.neucom.2024.128172delete
delete原文链接
delete原文求助
delete分享
delete收藏
摘要

摘要

En 中文
Code retrieval consists of finding relevant code snippets regarding a programmer's query - an increasingly important task due to software ubiquity. Although significant progress has been made, there is still a need for refinement and improvement in current code retrieval solutions. Besides effective, , we argue that solutions for the code retrieval task should be efficient and scalable to ever-increasing large code repositories. This paper introduces xCoFormer, , the first representation learning-based model for the code retrieval task in the literature, which meets all these requirements. Our contributions include: (i) an interactive tag-training method that efficiently places a query closer to its relevant codes in the embedding space and (ii) use of a specialized loss function (N N-pair) better suited to the code retrieval task. To evaluate our proposal, we conducted experiments with different versions of xCoFormer against several state-of-the-art deep learning models in datasets with different properties. In our experiments, xCoFormer produced the best cost-effectiveness tradeoff - it is as effective as our closest competitor while being thousands of times faster at search time. xCoFormer's attention mechanism also (partially) meets the desirable requirement of explainability by exposing the reasoning of the model's predictions. Finally, when used as a proxy method, fine-tuned with domain-specific code language models, such as Unixcoder and CodeBERT, our proposal achieves gains of more than 33% in effectiveness when compared to the use of general purpose language models such as BERT and RoBERTa.
Keyword:
Code retrieval
Representation learning
Language models

期刊

Neurocomputing 封面图
Neurocomputing
IF:
6.5
论文数:
2.5W
被引数:
6.5W

机构

U
Universidade Federal de Minas Gerais
学者数:
2.5W
论文数: 1.5W
被引数: 1.4W
引用论文

引用论文

err分享
err收藏
err分享
err收藏
Lifestyle Modification in the Pharmacologic Treatment of Obesity: A Pilot Investigation of a Potential Primary Care Approach
err2012-09-06
err0
errOAAI
errThomas A. Wadden; Robert I. Berkowitz; Renee A. Vogt; Suzanne N. Steen; Albert J. Stunkard; Gary D. Foster
err分享
err收藏
Neural Vector Spaces for Unsupervised Information Retrieval
err2018-06-26
err49
errOAAI
errVan Gysel, Christophe; De Rijke, Maarten; Kanoulas, Evangelos
err分享
err收藏
Examining and mitigating gender bias in text emotion detection task
err2022-07-01
err2
PREAI
errOdbal; Zhang, Guanhong; Ananiadou, Sophia
err分享
err收藏
On the class separability of contextual embeddings representations-or The classifier does not matter when the (text) representation is so good!
err2023-07-01
err7
PREAI
errde Andrade, Claudio M. V.; Belem, Fabiano M.; Cunha, Washington; Franca, Celso; Viegas, Felipe; Rocha, Leonardo; Goncalves, Marcos Andre
err分享
err收藏
On the cost-effectiveness of neural and non-neural approaches and representations for text classification: A comprehensive comparative study
err2021-05-01
err40
PREAI
errCunha, Washington; Mangaravite, Vitor; Gomes, Christian; Canuto, Sergio; Resende, Elaine; Nascimento, Cecilia; Viegas, Felipe; Franca, Celso; Martins, Wellington Santos; Almeida, Jussara M.; Rosa, Thierson; Rocha, Leonardo; Goncalves, Marcos Andre
err分享
err收藏
err分享
err收藏
学者 查看更多内容