CSSAM:Code Search via Attention Matching of Code Semantics and Structures
Yi Hu, Bo Cai, Yaoxiang Yu

TL;DR
CSSAM introduces a novel code search approach that combines semantic and structural matching mechanisms, utilizing a code representation graph to improve accuracy and semantic alignment between code snippets and queries.
Contribution
The paper proposes CSSAM, a new code search model that effectively fuses code semantics and structures using attention matching and a code semantic representation graph.
Findings
CSSAM outperforms baselines on two large datasets in SR, MRR, and NDCG metrics.
The residual interaction enhances code semantics preservation.
Ablation study confirms the effectiveness of key components.
Abstract
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…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Taxonomy
TopicsWeb Data Mining and Analysis · Software Engineering Research · Scientific Computing and Data Management
MethodsALIGN
