返回
A mutual embedded self-attention network model for code search?
DOI:10.1016/j.jss.2022.111591.png)
摘要
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
期刊
IF:
4.1
论文数:
5.5K
被引数:
8.4K
机构
暂无机构信息
引用论文
Engineered repressors are potent inhibitors of androgen receptor activity工程阻遏物是雄激素受体活性的有效抑制剂
Oncotarget
IF0
Annealing Heat Treatment of ZnO Nanoparticles Grown on Porous Si Substrate Using Spin-Coating Method旋涂法在多孔Si衬底上生长的ZnO纳米颗粒的退火热处理

