Self-Supervised Contrastive Learning for Code Retrieval and Summarization via Semantic-Preserving Transformations
Not on the map. Why?
Abstract (arXiv)
We propose Corder, a self-supervised contrastive learning framework for source code model. Corder is designed to alleviate the need of labeled data for code retrieval and code summarization tasks. The pre-trained model of Corder can be used in two ways: (1) it can produce vector representation of code which can be applied to code retrieval tasks that do not have labeled data; (2) it can be used in a fine-tuning process for tasks that might still require label data such as code summarization. The key innovation is that we train the source code model by asking it to recognize similar and dissimilar code snippets through a contrastive learning objective. To do so, we use a set of semantic-preserving transformation operators to generate code snippets that are syntactically diverse but semantically equivalent. Through extensive experiments, we have shown that the code models pretrained by Corder substantially outperform the other baselines for code-to-code retrieval, text-to-code retrieval, and code-to-text summarization tasks.
Key facts. Cited by 49 papers in the map (data through 7 Oct 2026). First posted on arXiv 6 Sep 2020.
Builds on
No reference list yet.
Built on by
Citing papers per year: 2021: 4; 2022: 17; 2023: 12; 2024: 4; 2025: 7; 2026: 5.
49 papers.
Sort:
By area:
- 2022ReACC: A Retrieval-Augmented Code Completion Frameworkcited by 117
- 2021SynCoBERT: Syntax-Guided Multi-Modal Contrastive Pre-Training for Code Representationcited by 63
- 2022On the Transferability of Pre-trained Language Models for Low-Resource Programming Languagescited by 30
- 2023CodeMark: Imperceptible Watermarking for Code Datasets against Neural Code Completion Modelscited by 28
- 2021Bridging Pre-trained Models and Downstream Tasks for Source Code Understandingcited by 27
- 2023Deep Learning for Code Intelligence: Survey, Benchmark and Toolkitcited by 22
- 2022CodeRetriever: Unimodal and Bimodal Contrastive Learning for Code Searchcited by 21
- 2022CoCoSoDa: Effective Contrastive Learning for Code Searchcited by 21
- 2023CodeTF: One-stop Transformer Library for State-of-the-art Code LLMscited by 21
- 2022Target-aware Abstractive Related Work Generation with Contrastive Learningcited by 20
- 2023The Vault: A Comprehensive Multilingual Dataset for Advancing Code Understanding and Generationcited by 20
- 2021Towards Learning (Dis)-Similarity of Source Code from Program Contrastscited by 17
37 more
- 2022AST-Probe: Recovering abstract syntax trees from hidden representations of pre-trained language modelscited by 16
- 2022CODE-MVP: Learning to Represent Source Code from Multiple Views with Contrastive Pre-Trainingcited by 15
- 2023Rethinking Negative Pairs in Code Searchcited by 14
- 2024ProCQA: A Large-scale Community-based Programming Question Answering Dataset for Code Searchcited by 12
- 2022Code Search based on Context-aware Code Translationcited by 11
- 2022HierarchyNet: Learning to Summarize Source Code with Heterogeneous Representationscited by 9
- 2022Detect-Localize-Repair: A Unified Framework for Learning to Debug with CodeT5cited by 9
- 2023Towards Causal Deep Learning for Vulnerability Detectioncited by 9
- 2022Exploring Representation-Level Augmentation for Code Searchcited by 8
- 2022Soft-Labeled Contrastive Pre-training for Function-level Code Representationcited by 7
- 2024VulScribeR: Exploring RAG-based Vulnerability Augmentation with LLMscited by 7
- 2023A Topic-aware Summarization Framework with Different Modal Side Informationcited by 6
- 2025SPENCER: Self-Adaptive Model Distillation for Efficient Code Retrievalcited by 5
- 2022MIXCODE: Enhancing Code Classification by Mixup-Based Data Augmentationcited by 4
- 2023TransformCode: A Contrastive Learning Framework for Code Embedding via Subtree Transformationcited by 4
- 2025ObscuraCoder: Powering Efficient Code LM Pre-Training Via Obfuscation Groundingcited by 4
- 2021Self-Supervised Learning to Prove Equivalence Between Straight-Line Programs via Rewrite Rulescited by 3
- 2022NS3: Neuro-Symbolic Semantic Code Searchcited by 3
- 2022NeuDep: Neural Binary Memory Dependence Analysiscited by 3
- 2023DocChecker: Bootstrapping Code Large Language Model for Detecting and Resolving Code-Comment Inconsistenciescited by 3
- 2025On The Role of Pretrained Language Models in General-Purpose Text Embeddings: A Surveycited by 3
- 2022Semantic-Preserving Adversarial Code Comprehensioncited by 2
- 2022CLAWSAT: Towards Both Robust and Accurate Code Modelscited by 2
- 2023Neuro-symbolic Zero-Shot Code Cloning with Cross-Language Intermediate Representationcited by 2
- 2024GenCode: A Generic Data Augmentation Framework for Boosting Deep Learning-Based Code Understandingcited by 2
- 2025Semantic-Preserving Transformations as Mutation Operators: A Study on Their Effectiveness in Defect Detectioncited by 2
- 2025Style2Code: A Style-Controllable Code Generation Framework with Dual-Modal Contrastive Representation Learningcited by 1
- 2023Contrastive Learning for API Aspect Analysiscited by 0
- 2023Contrastive Prompt Learning-based Code Search based on Interaction Matrixcited by 0
- 2024Analysing the Behaviour of Tree-Based Neural Networks in Regression Taskscited by 0
- 2025A Study on Mixup-Inspired Augmentation Methods for Software Vulnerability Detectioncited by 0
- 2025Auto-SPT: Automating Semantic Preserving Transformations for Codecited by 0
- 2026An Initial Exploration of Contrastive Prompt Tuning to Generate Energy-Efficient Codecited by 0
- 2026Learning Generalizable Multimodal Representations for Software Vulnerability Detectioncited by 0
- 2026Invariant Pretraining for Robust Code Representationscited by 0
- 2026Synthetic Semantic Supervision for Contrastive Code Representation Learning in Small Transformers: An Empirical Studycited by 0
- 2026Type-IV Code Clone Detection via Layer-Wise Non-Contrastive Representation Learningcited by 0
- 2026Type-IV Code Clone Detection via Layer-Wise Non-Contrastive Representation Learning15 Sep 2026
- 2026Synthetic Semantic Supervision for Contrastive Code Representation Learning in Small Transformers: An Empirical Study3 Sep 2026
- 2026Invariant Pretraining for Robust Code Representations15 Aug 2026
- 2026Learning Generalizable Multimodal Representations for Software Vulnerability Detection28 Apr 2026
- 2026An Initial Exploration of Contrastive Prompt Tuning to Generate Energy-Efficient Code3 Mar 2026
- 2025Auto-SPT: Automating Semantic Preserving Transformations for Code5 Dec 2025
- 2025SPENCER: Self-Adaptive Model Distillation for Efficient Code Retrieval1 Aug 2025
- 2025On The Role of Pretrained Language Models in General-Purpose Text Embeddings: A Survey28 Jul 2025
- 2025Style2Code: A Style-Controllable Code Generation Framework with Dual-Modal Contrastive Representation Learning26 May 2025
- 2025A Study on Mixup-Inspired Augmentation Methods for Software Vulnerability Detection22 Apr 2025
- 2025Semantic-Preserving Transformations as Mutation Operators: A Study on Their Effectiveness in Defect Detection30 Mar 2025
- 2025ObscuraCoder: Powering Efficient Code LM Pre-Training Via Obfuscation Grounding27 Mar 2025
37 more
- 2024VulScribeR: Exploring RAG-based Vulnerability Augmentation with LLMs7 Aug 2024
- 2024Analysing the Behaviour of Tree-Based Neural Networks in Regression Tasks17 Jun 2024
- 2024ProCQA: A Large-scale Community-based Programming Question Answering Dataset for Code Search25 Mar 2024
- 2024GenCode: A Generic Data Augmentation Framework for Boosting Deep Learning-Based Code Understanding24 Feb 2024
- 2023Deep Learning for Code Intelligence: Survey, Benchmark and Toolkit30 Dec 2023
- 2023TransformCode: A Contrastive Learning Framework for Code Embedding via Subtree Transformation10 Nov 2023
- 2023Rethinking Negative Pairs in Code Search12 Oct 2023
- 2023Towards Causal Deep Learning for Vulnerability Detection12 Oct 2023
- 2023Contrastive Prompt Learning-based Code Search based on Interaction Matrix10 Oct 2023
- 2023CodeMark: Imperceptible Watermarking for Code Datasets against Neural Code Completion Models28 Aug 2023
- 2023Contrastive Learning for API Aspect Analysis31 Jul 2023
- 2023DocChecker: Bootstrapping Code Large Language Model for Detecting and Resolving Code-Comment Inconsistencies10 Jun 2023
- 2023CodeTF: One-stop Transformer Library for State-of-the-art Code LLMs31 May 2023
- 2023A Topic-aware Summarization Framework with Different Modal Side Information19 May 2023
- 2023The Vault: A Comprehensive Multilingual Dataset for Advancing Code Understanding and Generation9 May 2023
- 2023Neuro-symbolic Zero-Shot Code Cloning with Cross-Language Intermediate Representation26 Apr 2023
- 2022Detect-Localize-Repair: A Unified Framework for Learning to Debug with CodeT527 Nov 2022
- 2022CLAWSAT: Towards Both Robust and Accurate Code Models21 Nov 2022
- 2022Exploring Representation-Level Augmentation for Code Search21 Oct 2022
- 2022Soft-Labeled Contrastive Pre-training for Function-level Code Representation18 Oct 2022
- 2022MIXCODE: Enhancing Code Classification by Mixup-Based Data Augmentation6 Oct 2022
- 2022NeuDep: Neural Binary Memory Dependence Analysis4 Oct 2022
- 2022Semantic-Preserving Adversarial Code Comprehension12 Sep 2022
- 2022AST-Probe: Recovering abstract syntax trees from hidden representations of pre-trained language models23 Jun 2022
- 2022HierarchyNet: Learning to Summarize Source Code with Heterogeneous Representations31 May 2022
- 2022Target-aware Abstractive Related Work Generation with Contrastive Learning26 May 2022
- 2022NS3: Neuro-Symbolic Semantic Code Search21 May 2022
- 2022CODE-MVP: Learning to Represent Source Code from Multiple Views with Contrastive Pre-Training4 May 2022
- 2022CoCoSoDa: Effective Contrastive Learning for Code Search7 Apr 2022
- 2022On the Transferability of Pre-trained Language Models for Low-Resource Programming Languages5 Apr 2022
- 2022ReACC: A Retrieval-Augmented Code Completion Framework15 Mar 2022
- 2022Code Search based on Context-aware Code Translation16 Feb 2022
- 2022CodeRetriever: Unimodal and Bimodal Contrastive Learning for Code Search26 Jan 2022
- 2021Bridging Pre-trained Models and Downstream Tasks for Source Code Understanding4 Dec 2021
- 2021Towards Learning (Dis)-Similarity of Source Code from Program Contrasts8 Oct 2021
- 2021Self-Supervised Learning to Prove Equivalence Between Straight-Line Programs via Rewrite Rules22 Sep 2021
- 2021SynCoBERT: Syntax-Guided Multi-Modal Contrastive Pre-Training for Code Representation10 Aug 2021
- 2022ReACC: A Retrieval-Augmented Code Completion Frameworkcited by 117
- 2022ReACC: A Retrieval-Augmented Code Completion Framework15 Mar 2022
- 2021SynCoBERT: Syntax-Guided Multi-Modal Contrastive Pre-Training for Code Representationcited by 63
- 2022On the Transferability of Pre-trained Language Models for Low-Resource Programming Languagescited by 30
- 2021Bridging Pre-trained Models and Downstream Tasks for Source Code Understandingcited by 27
- 2023Deep Learning for Code Intelligence: Survey, Benchmark and Toolkitcited by 22
- 2022CodeRetriever: Unimodal and Bimodal Contrastive Learning for Code Searchcited by 21
- 2022CoCoSoDa: Effective Contrastive Learning for Code Searchcited by 21
- 2023CodeTF: One-stop Transformer Library for State-of-the-art Code LLMscited by 21
- 2022Target-aware Abstractive Related Work Generation with Contrastive Learningcited by 20
- 2023The Vault: A Comprehensive Multilingual Dataset for Advancing Code Understanding and Generationcited by 20
- 2021Towards Learning (Dis)-Similarity of Source Code from Program Contrastscited by 17
- 2022AST-Probe: Recovering abstract syntax trees from hidden representations of pre-trained language modelscited by 16
- 2022CODE-MVP: Learning to Represent Source Code from Multiple Views with Contrastive Pre-Trainingcited by 15
12 most cited of 46 All 46 (JSON)
- 2026Type-IV Code Clone Detection via Layer-Wise Non-Contrastive Representation Learning15 Sep 2026
- 2026Synthetic Semantic Supervision for Contrastive Code Representation Learning in Small Transformers: An Empirical Study3 Sep 2026
- 2026Invariant Pretraining for Robust Code Representations15 Aug 2026
- 2026Learning Generalizable Multimodal Representations for Software Vulnerability Detection28 Apr 2026
- 2026An Initial Exploration of Contrastive Prompt Tuning to Generate Energy-Efficient Code3 Mar 2026
- 2025Auto-SPT: Automating Semantic Preserving Transformations for Code5 Dec 2025
- 2025SPENCER: Self-Adaptive Model Distillation for Efficient Code Retrieval1 Aug 2025
- 2025On The Role of Pretrained Language Models in General-Purpose Text Embeddings: A Survey28 Jul 2025
- 2025Style2Code: A Style-Controllable Code Generation Framework with Dual-Modal Contrastive Representation Learning26 May 2025
- 2025A Study on Mixup-Inspired Augmentation Methods for Software Vulnerability Detection22 Apr 2025
- 2025Semantic-Preserving Transformations as Mutation Operators: A Study on Their Effectiveness in Defect Detection30 Mar 2025
- 2025ObscuraCoder: Powering Efficient Code LM Pre-Training Via Obfuscation Grounding27 Mar 2025
12 newest of 46 All 46 (JSON)