Contrastive Prompt Learning-based Code Search based on Interaction Matrix
Yubo Zhang, Yanfang Liu, Xinxin Fan, Yunfeng Lu

TL;DR
This paper introduces CPLCS, a novel code search method that leverages contrastive prompt learning and cross-modal interaction to improve semantic understanding and matching between natural language and programming code.
Contribution
The paper proposes a contrastive prompt learning framework with a cross-modal interaction mechanism to address semantic gaps in code search.
Findings
Improves semantic representation quality in code search.
Enhances fine-grained mapping between natural language and programming language.
Demonstrates effectiveness across multiple programming languages.
Abstract
Code search aims to retrieve the code snippet that highly matches the given query described in natural language. Recently, many code pre-training approaches have demonstrated impressive performance on code search. However, existing code search methods still suffer from two performance constraints: inadequate semantic representation and the semantic gap between natural language (NL) and programming language (PL). In this paper, we propose CPLCS, a contrastive prompt learning-based code search method based on the cross-modal interaction mechanism. CPLCS comprises:(1) PL-NL contrastive learning, which learns the semantic matching relationship between PL and NL representations; (2) a prompt learning design for a dual-encoder structure that can alleviate the problem of inadequate semantic representation; (3) a cross-modal interaction mechanism to enhance the fine-grained mapping between NL…
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
TopicsMultimodal Machine Learning Applications · Topic Modeling · Domain Adaptation and Few-Shot Learning
