2021 · 50 citations · 46 references
ComputingComputer ScienceInformation RetrievalMachine LearningNatural Language ProcessingAbstract Syntax TreesQuery ProcessingRetrieval ModelsSearching AlgorithmsSemantic SearchAbstract Syntax Tree QueryingAttentionAttention MechanismsAttention-based QueryingCode ComprehensionCode ReuseEfficiencySemantic Matching
Searching and reusing existing code from a large scale codebase can largely improve developers’ programming efficiency. To support code reuse, early code search models leverage information retrieval (IR) techniques to index a large-scale code corpus and return relevant code according to developers’ search query. However, IR-based models fail to capture the semantics in code and query. To tackle this issue, developers applied deep learning (DL) techniques to code search models. However, these models either are too complex to determine an effective method efficiently or learning for semantic correlation between code and query inadequately.To bridge the semantic gap between code and query effectively and efficiently, we propose a code search model TabCS (Two-stage Attention-Based model for Code Search) in this study. TabCS extracts code and query information from the code textual features (i.e., method name, API sequence, and tokens), the code structural feature (i.e., abstract syntax tree), and the query feature (i.e., tokens). TabCS performs a two-stage attention net-work structure. The first stage leverages attention mechanisms to extract semantics from code and query considering their semantic gap. The second stage leverages a co-attention mechanism to capture their semantic correlation and learn better code/query representation. We evaluate the performance of TabCS on two existing large-scale datasets with 485k and 542k code snippets, respectively. Experimental results show that TabCS achieves an MRR of 0.57 on Hu et al.’s dataset, outperforming three state-of-the-art models CARLCS-CNN, DeepCS, and UNIF by 18%, 70%, 12%, respectively. Meanwhile, TabCS gains an MRR of 0.54 on Husain et al.’s, outperforming CARLCS-CNN, DeepCS, and UNIF by 32%, 76%, 29%, respectively.
46
Adam: A Method for Stochastic Optimization
Diederik P. Kingma, Jimmy Ba · UvA-DARE (University of Amsterdam) · 2014 · 84.8K citations · Full text
Individual Comparisons by Ranking Methods
Frank Wilcoxon · Biometrics Bulletin · 1945 · 14.4K citations
Business, Computer Science, Multi-criteria Decision Making +8
LSTM neural networks for language modeling
Martin Sundermeyer, Ralf Schlüter, Hermann Ney · 2012 · 2K citations
Computing, Computer Science, French +14