CSSAM:Code Search via Attention Matching of Code Semantics and Structures
Not on the map. Why?
Abstract (arXiv)
Despite the continuous efforts in improving both the effectiveness and efficiency of code search, two issues remained unsolved. First, programming languages have inherent strong structural linkages, and feature mining of code as text form would omit the structural information contained inside it. Second, there is a potential semantic relationship between code and query, it is challenging to align code and text across sequences so that vectors are spatially consistent during similarity matching. To tackle both issues, in this paper, a code search model named CSSAM (Code Semantics and Structures Attention Matching) is proposed. By introducing semantic and structural matching mechanisms, CSSAM effectively extracts and fuses multidimensional code features. Specifically, the cross and residual layer was developed to facilitate high-latitude spatial alignment of code and query at the token level. By leveraging the residual interaction, a matching module is designed to preserve more code semantics and descriptive features, that enhances the adhesion between the code and its corresponding query text. Besides, to improve the model's comprehension of the code's inherent structure, a code representation structure named CSRG (Code Semantic Representation Graph) is proposed for jointly representing abstract syntax tree nodes and the data flow of the codes. According to the experimental results on two publicly available datasets containing 540k and 330k code segments, CSSAM significantly outperforms the baselines in terms of achieving the highest SR@1/5/10, MRR, and NDCG@50 on both datasets respectively. Moreover, the ablation study is conducted to quantitatively measure the impact of each key component of CSSAM on the efficiency and effectiveness of code search, which offers the insights into the improvement of advanced code search solutions.
Key facts. No citing papers in the map yet (data through 14 Oct 2026). Builds on 37 of its 61 references that are in the map. First posted on arXiv 8 Aug 2022.
Builds on
37 of 61 references.
References · 37
- 2014Adam: A Method for Stochastic Optimizationcited by 37,240
- 2016Semi-Supervised Classification with Graph Convolutional Networkscited by 11,361
- 2017Graph Attention Networkscited by 8,923
- 2014Neural Machine Translation by Jointly Learning to Align and Translatecited by 4,548
- 2013Efficient Estimation of Word Representations in Vector Spacecited by 4,375
- 2016Enriching Word Vectors with Subword Informationcited by 1,583
- 2014DeepWalk: Online Learning of Social Representationscited by 1,547
- 2020CodeBERT: A Pre-Trained Model for Programming and Natural Languagescited by 1,310
- 2016Geometric deep learning: going beyond Euclidean datacited by 1,048
- 2021CodeT5: Identifier-aware Unified Pre-trained Encoder-Decoder Models for Code Understanding and Generationcited by 906
- 2015Gated Graph Sequence Neural Networkscited by 796
- 2014Distributed Representations of Sentences and Documentscited by 678
25 more
- 2019CodeSearchNet Challenge: Evaluating the State of Semantic Code Searchcited by 654
- 2017Representation Learning on Graphs: Methods and Applicationscited by 457
- 2015A Neural Attention Model for Abstractive Sentence Summarizationcited by 396
- 2016FastText.zip: Compressing text classification modelscited by 335
- 2020DCN V2: Improved Deep & Cross Network and Practical Lessons for Web-scale Learning to Rank Systemscited by 327
- 2015Improved Semantic Representations From Tree-Structured Long Short-Term Memory Networkscited by 306
- 2016Image Captioning with Semantic Attentioncited by 260
- 2018code2vec: Learning Distributed Representations of Codecited by 250
- 2018Improving Automatic Source Code Summarization via Deep Reinforcement Learningcited by 100
- 2019A Neural Model for Generating Natural Language Summaries of Program Subroutinescited by 77
- 2019Ranked List Loss for Deep Metric Learningcited by 77
- 2013Probabilistic Latent Semantic Analysiscited by 63
- 2021Language-Agnostic Representation Learning of Source Code from Structure and Contextcited by 63
- 2019Multi-Modal Attention Network Learning for Semantic Source Code Retrievalcited by 41
- 2018Aroma: Code Recommendation via Structural Code Searchcited by 29
- 2021Using Prior Knowledge to Guide BERT's Attention in Semantic Textual Matching Taskscited by 22
- 2020A Multi-Perspective Architecture for Semantic Code Searchcited by 20
- 2020Rationalizing Text Matching: Learning Sparse Alignments via Optimal Transportcited by 20
- 2020Deep Graph Matching and Searching for Semantic Code Retrievalcited by 20
- 2022Code Search: A Survey of Techniques for Finding Codecited by 18
- 2021Enriching Query Semantics for Code Search with Reinforcement Learningcited by 7
- 2020Multi-level Head-wise Match and Aggregation in Transformer for Textual Sequence Matchingcited by 5
- 2020CodeMatcher: Searching Code Based on Sequential Semantics of Important Query Wordscited by 5
- 2017ROSF: Leveraging Information Retrieval and Supervised Learning for Recommending Code Snippetscited by 4
- 2018Bridging Semantic Gaps between Natural Languages and APIs with Word Embeddingcited by 1
Built on by
Not cited yet.