CONCORD: Clone-aware Contrastive Learning for Source Code
Not on the map. Why?
Abstract (arXiv)
Deep Learning (DL) models to analyze source code have shown immense promise during the past few years. More recently, self-supervised pre-training has gained traction for learning generic code representations valuable for many downstream SE tasks, such as clone and bug detection. While previous work successfully learned from different code abstractions (e.g., token, AST, graph), we argue that it is also essential to factor in how developers code day-to-day for general-purpose representation learning. On the one hand, human developers tend to write repetitive programs referencing existing code snippets from the current codebase or online resources (e.g., Stack Overflow website) rather than implementing functions from scratch; such behaviors result in a vast number of code clones. In contrast, a deviant clone by mistake might trigger malicious program behaviors. Thus, as a proxy to incorporate developers' coding behavior into the pre-training scheme, we propose to include code clones and their deviants. In particular, we propose CONCORD, a self-supervised, contrastive learning strategy to place benign clones closer in the representation space while moving deviants further apart. We show that CONCORD's clone-aware contrastive learning drastically reduces the need for expensive pre-training resources while improving the performance of downstream SE tasks. We also empirically demonstrate that CONCORD can improve existing pre-trained models to learn better representations that consequently become more efficient in both identifying semantically equivalent programs and differentiating buggy from non-buggy code.
Key facts. Cited by 5 papers in the map (data through 14 Oct 2026). First posted on arXiv 5 Jun 2023.
Builds on
No reference list yet.
Built on by
Citing papers per year: 2024: 3; 2025: 1; 2026: 1.
5 papers.
- 2024Vulnerability Detection with Code Language Models: How Far Are We?cited by 139
- 2024Top Score on the Wrong Exam: On Benchmarking in Machine Learning for Vulnerability Detectioncited by 28
- 2024CodeFort: Robust Training for Code Generation Modelscited by 4
- 2025On The Role of Pretrained Language Models in General-Purpose Text Embeddings: A Surveycited by 3
- 2026Synthetic Semantic Supervision for Contrastive Code Representation Learning in Small Transformers: An Empirical Studycited by 0
- 2026Synthetic Semantic Supervision for Contrastive Code Representation Learning in Small Transformers: An Empirical Study3 Sep 2026
- 2025On The Role of Pretrained Language Models in General-Purpose Text Embeddings: A Survey28 Jul 2025
- 2024Top Score on the Wrong Exam: On Benchmarking in Machine Learning for Vulnerability Detection23 Aug 2024
- 2024CodeFort: Robust Training for Code Generation Models11 Apr 2024
- 2024Vulnerability Detection with Code Language Models: How Far Are We?27 Mar 2024