SynCoBERT: Syntax-Guided Multi-Modal Contrastive Pre-Training for Code Representation
Not on the map. Why?
Abstract (arXiv)
Code representation learning, which aims to encode the semantics of source code into distributed vectors, plays an important role in recent deep-learning-based models for code intelligence. Recently, many pre-trained language models for source code (e.g., CuBERT and CodeBERT) have been proposed to model the context of code and serve as a basis for downstream code intelligence tasks such as code search, code clone detection, and program translation. Current approaches typically consider the source code as a plain sequence of tokens, or inject the structure information (e.g., AST and data-flow) into the sequential model pre-training. To further explore the properties of programming languages, this paper proposes SynCoBERT, a syntax-guided multi-modal contrastive pre-training approach for better code representations. Specially, we design two novel pre-training objectives originating from the symbolic and syntactic properties of source code, i.e., Identifier Prediction (IP) and AST Edge Prediction (TEP), which are designed to predict identifiers, and edges between two nodes of AST, respectively. Meanwhile, to exploit the complementary information in semantically equivalent modalities (i.e., code, comment, AST) of the code, we propose a multi-modal contrastive learning strategy to maximize the mutual information among different modalities. Extensive experiments on four downstream tasks related to code intelligence show that SynCoBERT advances the state-of-the-art with the same pre-training corpus and model size.
Key facts. Cited by 63 papers in the map (data through 7 Oct 2026). Builds on 39 of its 49 references that are in the map. First posted on arXiv 10 Aug 2021.
Builds on
39 of 49 references.
References · 39
- 2017Attention Is All You Needcited by 59,932
- 2018BERT: Pre-training of Deep Bidirectional Transformers for Language Understandingcited by 40,204
- 2019Exploring the Limits of Transfer Learning with a Unified Text-to-Text Transformercited by 14,491
- 2019RoBERTa: A Robustly Optimized BERT Pretraining Approachcited by 13,266
- 2020A Simple Framework for Contrastive Learning of Visual Representationscited by 11,979
- 2019Sentence-BERT: Sentence Embeddings using Siamese BERT-Networkscited by 9,049
- 2019BART: Denoising Sequence-to-Sequence Pre-training for Natural Language Generation, Translation, and Comprehensioncited by 5,874
- 2015Neural Machine Translation of Rare Words with Subword Unitscited by 2,898
- 2019ALBERT: A Lite BERT for Self-supervised Learning of Language Representationscited by 2,772
- 2014On the Properties of Neural Machine Translation: Encoder-Decoder Approachescited by 1,303
- 2020CodeBERT: A Pre-Trained Model for Programming and Natural Languagescited by 1,286
- 2014Convolutional Neural Networks for Sentence Classificationcited by 1,124
27 more
- 2015Effective Approaches to Attention-based Neural Machine Translationcited by 1,024
- 2019Self-Supervised Learning of Pretext-Invariant Representationscited by 806
- 2021CodeXGLUE: A Machine Learning Benchmark Dataset for Code Understanding and Generationcited by 732
- 2020Contrastive Multi-View Representation Learning on Graphscited by 651
- 2019CodeSearchNet Challenge: Evaluating the State of Semantic Code Searchcited by 638
- 2020GraphCodeBERT: Pre-training Code Representations with Data Flowcited by 600
- 2021Unified Pre-training for Program Understanding and Generationcited by 361
- 2019On Mutual Information Maximization for Representation Learningcited by 315
- 2015Improved Semantic Representations From Tree-Structured Long Short-Term Memory Networkscited by 305
- 2019Devign: Effective Vulnerability Identification by Learning Comprehensive Program Semantics via Graph Neural Networkscited by 266
- 2018code2vec: Learning Distributed Representations of Codecited by 249
- 2020DeCLUTR: Deep Contrastive Learning for Unsupervised Textual Representationscited by 249
- 2021ConSERT: A Contrastive Framework for Self-Supervised Sentence Representation Transfercited by 231
- 2020IntelliCode Compose: Code Generation Using Transformercited by 225
- 2020CLEAR: Contrastive Learning for Sentence Representationcited by 186
- 2020CERT: Contrastive Self-supervised Learning for Language Understandingcited by 169
- 2021Multimodal Contrastive Training for Visual Representation Learningcited by 122
- 2018Tree-to-tree Neural Networks for Program Translationcited by 93
- 2020On the Sentence Embeddings from Pre-trained Language Modelscited by 83
- 2020Contrastive Code Representation Learningcited by 76
- 2019Tree Transformer: Integrating Tree Structures into Self-Attentioncited by 68
- 2021Language-Agnostic Representation Learning of Source Code from Structure and Contextcited by 63
- 2021CoTexT: Multi-task Learning with Code-Text Transformercited by 61
- 2020Multi-task Learning based Pre-trained Language Model for Code Completioncited by 58
- 2020Self-Supervised Contrastive Learning for Code Retrieval and Summarization via Semantic-Preserving Transformationscited by 49
- 2021TreeBERT: A Tree-Based Pre-Trained Model for Programming Languagecited by 40
- 2021On using distributed representations of source code for the detection of C security vulnerabilitiescited by 10
Built on by
Citing papers per year: 2021: 1; 2022: 18; 2023: 19; 2024: 13; 2025: 6; 2026: 6.
63 papers.
Sort:
By area:
- 2023Large Language Models for Software Engineering: A Systematic Literature Reviewcited by 389
- 2022UniXcoder: Unified Cross-Modal Pre-training for Code Representationcited by 355
- 2023CodeT5+: Open Code Large Language Models for Code Understanding and Generationcited by 327
- 2022ReACC: A Retrieval-Augmented Code Completion Frameworkcited by 117
- 2023Evaluating Instruction-Tuned Large Language Models on Code Comprehension and Generationcited by 49
- 2022Compilable Neural Code Generation with Compiler Feedbackcited by 46
- 2022CoditT5: Pretraining for Source Code and Natural Language Editingcited by 45
- 2022An Empirical Study of Deep Learning Models for Vulnerability Detectioncited by 44
- 2023Code Execution with Pre-trained Language Modelscited by 33
- 2023Natural Language Generation and Understanding of Big Code for AI-Assisted Programming: A Reviewcited by 32
- 2022On the Transferability of Pre-trained Language Models for Low-Resource Programming Languagescited by 30
- 2024Code Representation Learning At Scalecited by 26
38 more
- 2023Deep Learning for Code Intelligence: Survey, Benchmark and Toolkitcited by 22
- 2022CoCoSoDa: Effective Contrastive Learning for Code Searchcited by 21
- 2022Deep Learning Meets Software Engineering: A Survey on Pre-Trained Models of Source Codecited by 20
- 2023Multi-target Backdoor Attacks for Code Pre-trained Modelscited by 19
- 2024Analyzing the Performance of Large Language Models on Code Summarizationcited by 19
- 2023Exploring the Robustness of Large Language Models for Solving Programming Problemscited by 16
- 2024Code Needs Comments: Enhancing Code LLMs with Comment Augmentationcited 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
- 2023Understanding Programs by Exploiting (Fuzzing) Test Casescited by 13
- 2024ProCQA: A Large-scale Community-based Programming Question Answering Dataset for Code Searchcited by 12
- 2024Uncovering LLM-Generated Code: A Zero-Shot Synthetic Code Detector via Code Rewritingcited by 11
- 2024Top Pass: Improve Code Generation by Pass@k-Maximized Code Rankingcited by 9
- 2022Exploring Representation-Level Augmentation for Code Searchcited by 8
- 2022Soft-Labeled Contrastive Pre-training for Function-level Code Representationcited by 7
- 2024Investigating the Efficacy of Large Language Models for Code Clone Detectioncited by 7
- 2024GALLa: Graph Aligned Large Language Models for Improved Source Code Understandingcited by 7
- 2022CommitBART: A Large Pre-trained Model for GitHub Commitscited by 6
- 2022CAT-probing: A Metric-based Approach to Interpret How Pre-trained Models for Programming Language Attend Code Structurecited by 6
- 2022MultiCoder: Multi-Programming-Lingual Pre-Training for Low-Resource Code Completioncited by 6
- 2024On the Limitations of Embedding Based Methods for Measuring Functional Correctness for Code Generationcited by 6
- 2023An Unbiased Transformer Source Code Learning with Semantic Vulnerability Graphcited by 5
- 2025Grammar-Based Code Representation: Is It a Worthy Pursuit for LLMs?cited by 5
- 2025SPENCER: Self-Adaptive Model Distillation for Efficient Code Retrievalcited by 5
- 2021Cascaded Fast and Slow Models for Efficient Semantic Code Searchcited by 4
- 2023CCT-Code: Cross-Consistency Training for Multilingual Clone Detection and Code Searchcited by 4
- 2025ObscuraCoder: Powering Efficient Code LM Pre-Training Via Obfuscation Groundingcited by 4
- 2022Finding Reusable Machine Learning Components to Build Programming Language Processing Pipelinescited by 3
- 2023Neural Machine Translation for Code Generationcited by 3
- 2024CSEPrompts: A Benchmark of Introductory Computer Science Promptscited by 3
- 2024Towards Better Code Understanding in Decoder-Only Models with Contrastive Learningcited by 3
- 2024Code LLMs: A Taxonomy-based Surveycited by 3
- 2025On The Role of Pretrained Language Models in General-Purpose Text Embeddings: A Surveycited by 3
- 2026HogVul: Black-box Adversarial Code Generation Framework Against LM-based Vulnerability Detectorscited by 3
- 2026Token Optimization Strategies for LLM-Based Oracle-to-PostgreSQL Migrationcited 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
50 most cited of 63 All 63 (JSON)
- 2026Synthetic Semantic Supervision for Contrastive Code Representation Learning in Small Transformers: An Empirical Study3 Sep 2026
- 2026Token Optimization Strategies for LLM-Based Oracle-to-PostgreSQL Migration27 May 2026
- 2026XSearch: Explainable Code Search via Concept-to-Code Alignment15 May 2026
- 2026Bidirectional Small-Granularity Search between Code and Text19 Apr 2026
- 2026SynthFix: Adaptive Neuro-Symbolic Code Vulnerability Repair19 Apr 2026
- 2026HogVul: Black-box Adversarial Code Generation Framework Against LM-based Vulnerability Detectors9 Jan 2026
- 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
- 2025LEANCODE: Understanding Models Better for Code Simplification of Pre-trained Large Language Models20 May 2025
- 2025ObscuraCoder: Powering Efficient Code LM Pre-Training Via Obfuscation Grounding27 Mar 2025
- 2025Speculative Decoding for Verilog: Speed and Quality, All in One18 Mar 2025
- 2025Grammar-Based Code Representation: Is It a Worthy Pursuit for LLMs?7 Mar 2025
38 more
- 2024Code LLMs: A Taxonomy-based Survey11 Dec 2024
- 2024GALLa: Graph Aligned Large Language Models for Improved Source Code Understanding6 Sep 2024
- 2024Top Pass: Improve Code Generation by Pass@k-Maximized Code Ranking11 Aug 2024
- 2024Towards Better Code Understanding in Decoder-Only Models with Contrastive Learning18 Jun 2024
- 2024Uncovering LLM-Generated Code: A Zero-Shot Synthetic Code Detector via Code Rewriting25 May 2024
- 2024On the Limitations of Embedding Based Methods for Measuring Functional Correctness for Code Generation26 Apr 2024
- 2024Analyzing the Performance of Large Language Models on Code Summarization10 Apr 2024
- 2024CSEPrompts: A Benchmark of Introductory Computer Science Prompts3 Apr 2024
- 2024ProCQA: A Large-scale Community-based Programming Question Answering Dataset for Code Search25 Mar 2024
- 2024Beyond Self-learned Attention: Mitigating Attention Bias in Transformer-based Models Using Attention Guidance26 Feb 2024
- 2024Code Needs Comments: Enhancing Code LLMs with Comment Augmentation20 Feb 2024
- 2024Code Representation Learning At Scale2 Feb 2024
- 2024Investigating the Efficacy of Large Language Models for Code Clone Detection24 Jan 2024
- 2023Deep Learning for Code Intelligence: Survey, Benchmark and Toolkit30 Dec 2023
- 2023Language Agnostic Code Embeddings25 Oct 2023
- 2023Rethinking Negative Pairs in Code Search12 Oct 2023
- 2023Contrastive Prompt Learning-based Code Search based on Interaction Matrix10 Oct 2023
- 2023Laminar: A New Serverless Stream-based Framework with Semantic Code Search and Code Completion1 Sep 2023
- 2023Large Language Models for Software Engineering: A Systematic Literature Review21 Aug 2023
- 2023Evaluating Instruction-Tuned Large Language Models on Code Comprehension and Generation2 Aug 2023
- 2023Contrastive Learning for API Aspect Analysis31 Jul 2023
- 2023Natural Language Generation and Understanding of Big Code for AI-Assisted Programming: A Review4 Jul 2023
- 2023Exploring the Robustness of Large Language Models for Solving Programming Problems26 Jun 2023
- 2023Multi-target Backdoor Attacks for Code Pre-trained Models14 Jun 2023
- 2023Understanding Programs by Exploiting (Fuzzing) Test Cases23 May 2023
- 2023Neural Machine Translation for Code Generation22 May 2023
- 2023CCT-Code: Cross-Consistency Training for Multilingual Clone Detection and Code Search19 May 2023
- 2023Searching by Code: a New SearchBySnippet Dataset and SnippeR Retrieval Model for Searching by Code Snippets19 May 2023
- 2023CodeT5+: Open Code Large Language Models for Code Understanding and Generation13 May 2023
- 2023Code Execution with Pre-trained Language Models8 May 2023
- 2023Neuro-symbolic Zero-Shot Code Cloning with Cross-Language Intermediate Representation26 Apr 2023
- 2023An Unbiased Transformer Source Code Learning with Semantic Vulnerability Graph17 Apr 2023
- 2022MultiCoder: Multi-Programming-Lingual Pre-Training for Low-Resource Code Completion19 Dec 2022
- 2022An Empirical Study of Deep Learning Models for Vulnerability Detection15 Dec 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
- 2022CAT-probing: A Metric-based Approach to Interpret How Pre-trained Models for Programming Language Attend Code Structure7 Oct 2022
50 newest of 63 All 63 (JSON)
- 2022ReACC: A Retrieval-Augmented Code Completion Frameworkcited by 117
- 2022ReACC: A Retrieval-Augmented Code Completion Framework15 Mar 2022
- 2023Multi-target Backdoor Attacks for Code Pre-trained Modelscited by 19
- 2023Multi-target Backdoor Attacks for Code Pre-trained Models14 Jun 2023
- 2023Large Language Models for Software Engineering: A Systematic Literature Reviewcited by 389
- 2022UniXcoder: Unified Cross-Modal Pre-training for Code Representationcited by 355
- 2023CodeT5+: Open Code Large Language Models for Code Understanding and Generationcited by 327
- 2023Evaluating Instruction-Tuned Large Language Models on Code Comprehension and Generationcited by 49
- 2022Compilable Neural Code Generation with Compiler Feedbackcited by 46
- 2022CoditT5: Pretraining for Source Code and Natural Language Editingcited by 45
- 2022An Empirical Study of Deep Learning Models for Vulnerability Detectioncited by 44
- 2023Code Execution with Pre-trained Language Modelscited by 33
- 2023Natural Language Generation and Understanding of Big Code for AI-Assisted Programming: A Reviewcited by 32
- 2022On the Transferability of Pre-trained Language Models for Low-Resource Programming Languagescited by 30
- 2024Code Representation Learning At Scalecited by 26
- 2023Deep Learning for Code Intelligence: Survey, Benchmark and Toolkitcited by 22
12 most cited of 58 All 58 (JSON)
- 2026Synthetic Semantic Supervision for Contrastive Code Representation Learning in Small Transformers: An Empirical Study3 Sep 2026
- 2026Token Optimization Strategies for LLM-Based Oracle-to-PostgreSQL Migration27 May 2026
- 2026XSearch: Explainable Code Search via Concept-to-Code Alignment15 May 2026
- 2026Bidirectional Small-Granularity Search between Code and Text19 Apr 2026
- 2026SynthFix: Adaptive Neuro-Symbolic Code Vulnerability Repair19 Apr 2026
- 2026HogVul: Black-box Adversarial Code Generation Framework Against LM-based Vulnerability Detectors9 Jan 2026
- 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
- 2025LEANCODE: Understanding Models Better for Code Simplification of Pre-trained Large Language Models20 May 2025
- 2025ObscuraCoder: Powering Efficient Code LM Pre-Training Via Obfuscation Grounding27 Mar 2025
- 2025Grammar-Based Code Representation: Is It a Worthy Pursuit for LLMs?7 Mar 2025
- 2024Code LLMs: A Taxonomy-based Survey11 Dec 2024
12 newest of 58 All 58 (JSON)