arrow
返回

A mutual embedded self-attention network model for code search?

delete2023-04-01
delete4
PRE
AI
H
Haize Hu
J
Jianxun Liu *
X
Xiangping Zhang
B
Ben Cao
S
Siqiang Cheng
L
Long Teng
DOI:10.1016/j.jss.2022.111591delete
delete原文链接
delete原文求助
delete分享
delete收藏
摘要

摘要

En 中文
To improve the efficiency of program implementation, developers can selectively reuse the previously written code by searching the open-source codebase. To date, many code search methods have been proposed to actively push the limit of code search accuracy, where the methods designed using SelfAttention mechanism are particularly promising. However, while existing methods can improve the efficiency to capture textual semantics by attending significant words in the code component unit, they typically fail to capture the structural dependencies between the code components which may produce suboptimal search accuracy. In this paper, we propose a novel Self-Attention model termed MESN-CS which considers both word-level attention and code unit-level attention for code search. MESN-CS not only the attention weight of each word in the code component unit is calculated, but also the weight of the embedding between the code combination units is calculated. To verify the effectiveness of the proposed model, three benchmark models were compared on a large-scale code data and CodesearchNet. The experimental results show that the MESN-CS has better Recall@k, NDCG and MRR performance than baseline methods. the experiments also show that the semantic syntactic information between sequences can be effectively characterized in MESN-CS. (c) 2022 Elsevier Inc. All rights reserved.
Keyword:
Code search
Code segments
Machine learning
Self-attention
MESN-CS

期刊

Journal of Systems and Software 封面图
Journal of Systems and Software
IF:
4.1
论文数:
5.5K
被引数:
8.4K

机构

暂无机构信息
引用论文

引用论文

A Multiscale “Working Brain” Model
err2015-10-31
err0
PREAI
errP. A. Robinson; S. Postnova; R. G. Abeysuriya; J. W. Kim; J. A. Roberts; L. McKenzie-Sell; A. Karanjai; C. C. Kerr; F. Fung; R. Anderson; M. J. Breakspear; P. M. Drysdale; B. D. Fulcher; A. J. K. Phillips; C. J. Rennie; G. Yin
err分享
err收藏
Learning to rank code examples for code search engines
err2016-01-21
err56
PREAI
errNiu, Haoran; Keivanloo, Iman; Zou, Ying
err分享
err收藏
Engineered repressors are potent inhibitors of androgen receptor activity工程阻遏物是雄激素受体活性的有效抑制剂
err2014-01-21
err0
errOAAI
errGreg N. Brooke; Sue M. Powell; Derek N. Lavery; Jonathan Waxman; Laki Buluwela; Simak Ali; Charlotte L. Bevan
err分享
err收藏
err
IF0
err
err0
PREAI
err
err分享
err收藏
SHH E176/E177-Zn2+ conformation is required for signaling at endogenous sites
err2017-04-01
err0
errOAAI
errDiana S. Himmelstein; Ivelisse Cajigas; Chunming Bi; Brian S. Clark; Grant Van Der Voort; Jhumku D. Kohtz
err分享
err收藏
Bag of Shape Features with a learned pooling function for shape recognition
err2018-04-01
err24
PREAI
errShen, Wei; Du, Chenting; Jiang, Yuan; Zeng, Dan; Zhang, Zhijiang
err分享
err收藏
Vulnerable Code Clone Detection for Operating System Through Correlation-Induced Learning
err2019-12-01
err10
PREAI
errShi, Heyuan; Wang, Runzhe; Fu, Ying; Jiang, Yu; Dong, Jian; Tang, Kun; Sun, Jiaguang
err分享
err收藏
学者 查看更多内容