Contrastive Prompt Learning-based Code Search based on Interaction Matrix
Not on the map. Why?
Abstract (arXiv)
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 and PL. We conduct extensive experiments to evaluate the effectiveness of our approach on a real-world dataset across six programming languages. The experiment results demonstrate the efficacy of our approach in improving semantic representation quality and mapping ability between PL and NL.
Key facts. No citing papers in the map yet (data through 7 Oct 2026). Builds on 26 of its 37 references that are in the map. First posted on arXiv 10 Oct 2023.
Builds on
26 of 37 references.
References · 26
- 2021Prefix-Tuning: Optimizing Continuous Prompts for Generationcited by 3,878
- 2021Pre-train, Prompt, and Predict: A Systematic Survey of Prompting Methods in Natural Language Processingcited by 2,222
- 2021SimCSE: Simple Contrastive Learning of Sentence Embeddingscited by 2,168
- 2020Understanding Contrastive Representation Learning through Alignment and Uniformity on the Hyperspherecited by 1,393
- 2020CodeBERT: A Pre-Trained Model for Programming and Natural Languagescited by 1,286
- 2020ColBERT: Efficient and Effective Passage Search via Contextualized Late Interaction over BERTcited by 1,160
- 2020Exploiting Cloze Questions for Few Shot Text Classification and Natural Language Inferencecited by 934
- 2021GPT Understands, Toocited by 715
- 2021P-Tuning v2: Prompt Tuning Can Be Comparable to Fine-tuning Universally Across Scales and Taskscited by 686
- 2019CodeSearchNet Challenge: Evaluating the State of Semantic Code Searchcited by 638
- 2020GraphCodeBERT: Pre-training Code Representations with Data Flowcited by 600
- 2022UniXcoder: Unified Cross-Modal Pre-training for Code Representationcited by 355
14 more
- 2019Representation Degeneration Problem in Training Natural Language Generation Modelscited by 250
- 2021ConSERT: A Contrastive Framework for Self-Supervised Sentence Representation Transfercited by 231
- 2021Whitening Sentence Representations for Better Semantics and Faster Retrievalcited by 198
- 2022PromptBERT: Improving BERT Sentence Embeddings with Promptscited by 75
- 2021WhiteningBERT: An Easy Unsupervised Sentence Embedding Approachcited by 68
- 2019TBar: Revisiting Template-based Automated Program Repaircited by 64
- 2021SynCoBERT: Syntax-Guided Multi-Modal Contrastive Pre-Training for Code Representationcited by 63
- 2020Self-Supervised Contrastive Learning for Code Retrieval and Summarization via Semantic-Preserving Transformationscited by 49
- 2022No More Fine-Tuning? An Experimental Evaluation of Prompt Tuning in Code Intelligencecited by 41
- 2019Multi-Modal Attention Network Learning for Semantic Source Code Retrievalcited by 40
- 2022CoCoSoDa: Effective Contrastive Learning for Code Searchcited by 21
- 2022CODE-MVP: Learning to Represent Source Code from Multiple Views with Contrastive Pre-Trainingcited by 15
- 2015SWIM: Synthesizing What I Meancited by 10
- 2022Zero-Shot Program Representation Learningcited by 3
Built on by
Not cited yet.