mlsanityData to 7 Oct 2026

CODE-MVP: Learning to Represent Source Code from Multiple Views with Contrastive Pre-Training

arXiv 2205.02029 ↗First posted 4 May 2022cs.PL cs.AI cs.CLcited by 15

Not on the map. Why?

Abstract (arXiv)

Recent years have witnessed increasing interest in code representation learning, which aims to represent the semantics of source code into distributed vectors. Currently, various works have been proposed to represent the complex semantics of source code from different views, including plain text, Abstract Syntax Tree (AST), and several kinds of code graphs (e.g., Control/Data Flow Graph). However, most of them only consider a single view of source code independently, ignoring the correspondences among different views. In this paper, we propose to integrate different views with the natural-language description of source code into a unified framework with Multi-View contrastive Pre-training, and name our model as CODE-MVP. Specifically, we first extract multiple code views using compiler tools, and learn the complementary information among them under a contrastive learning framework. Inspired by the type checking in compilation, we also design a fine-grained type inference objective in the pre-training. Experiments on three downstream tasks over five datasets demonstrate the superiority of CODE-MVP when compared with several state-of-the-art baselines. For example, we achieve 2.4/2.3/1.1 gain in terms of MRR/MAP/Accuracy metrics on natural language code retrieval, code similarity, and code defect detection tasks, respectively.

Key facts. Cited by 15 papers in the map (data through 7 Oct 2026). Builds on 38 of its 70 references that are in the map. First posted on arXiv 4 May 2022.

Builds on

38 of 70 references.

References · 38

  1. 2017Attention Is All You Needcited by 59,932
  2. 2018BERT: Pre-training of Deep Bidirectional Transformers for Language Understandingcited by 40,204
  3. 2019Exploring the Limits of Transfer Learning with a Unified Text-to-Text Transformercited by 14,491
  4. 2019RoBERTa: A Robustly Optimized BERT Pretraining Approachcited by 13,266
  5. 2020A Simple Framework for Contrastive Learning of Visual Representationscited by 11,979
  6. 2016Semi-Supervised Classification with Graph Convolutional Networkscited by 11,282
  7. 2019BART: Denoising Sequence-to-Sequence Pre-training for Natural Language Generation, Translation, and Comprehensioncited by 5,874
  8. 2013Distributed Representations of Words and Phrases and their Compositionalitycited by 3,462
  9. 2015Neural Machine Translation of Rare Words with Subword Unitscited by 2,898
  10. 2020CodeBERT: A Pre-Trained Model for Programming and Natural Languagescited by 1,286
  11. 2021CodeT5: Identifier-aware Unified Pre-trained Encoder-Decoder Models for Code Understanding and Generationcited by 890
  12. 2021CodeXGLUE: A Machine Learning Benchmark Dataset for Code Understanding and Generationcited by 732
26 more
  1. 2019CodeSearchNet Challenge: Evaluating the State of Semantic Code Searchcited by 638
  2. 2020GraphCodeBERT: Pre-training Code Representations with Data Flowcited by 600
  3. 2021Unified Pre-training for Program Understanding and Generationcited by 361
  4. 2018code2vec: Learning Distributed Representations of Codecited by 249
  5. 2020IntelliCode Compose: Code Generation Using Transformercited by 225
  6. 2017A Survey of Machine Learning for Big Code and Naturalnesscited by 220
  7. 2019Graph Matching Networks for Learning the Similarity of Graph Structured Objectscited by 202
  8. 2018Learning to Mine Aligned Code and Natural Language Pairs from Stack Overflowcited by 165
  9. 2018Improving Automatic Source Code Summarization via Deep Reinforcement Learningcited by 99
  10. 2020Contrastive Code Representation Learningcited by 76
  11. 2021CoSQA: 20,000+ Web Queries for Code Search and Question Answeringcited by 74
  12. 2020Code Prediction by Feeding Trees to Transformerscited by 70
  13. 2021SynCoBERT: Syntax-Guided Multi-Modal Contrastive Pre-Training for Code Representationcited by 63
  14. 2021CoTexT: Multi-task Learning with Code-Text Transformercited by 61
  15. 2018Neural Code Comprehension: A Learnable Representation of Code Semanticscited by 59
  16. 2022What Do They Capture? -- A Structural Analysis of Pre-Trained Language Models for Source Codecited by 50
  17. 2020Self-Supervised Contrastive Learning for Code Retrieval and Summarization via Semantic-Preserving Transformationscited by 49
  18. 2022Compilable Neural Code Generation with Compiler Feedbackcited by 46
  19. 2018Ithemal: Accurate, Portable and Fast Basic Block Throughput Estimation using Deep Neural Networkscited by 43
  20. 2019Multi-Modal Attention Network Learning for Semantic Source Code Retrievalcited by 40
  21. 2021TreeBERT: A Tree-Based Pre-Trained Model for Programming Languagecited by 40
  22. 2020ProGraML: Graph-based Deep Learning for Program Optimization and Analysiscited by 23
  23. 2020InferCode: Self-Supervised Learning of Code Representations by Predicting Subtreescited by 23
  24. 2020Deep Graph Matching and Searching for Semantic Code Retrievalcited by 20
  25. 2022Scalpel: The Python Static Analysis Frameworkcited by 9
  26. 2020Software Language Comprehension using a Program-Derived Semantics Graphcited by 2

Built on by

Cited by year (2026 to 7 Oct)

Citing papers per year: 2022: 4; 2023: 6; 2024: 3; 2025: 1; 2026: 1.

15 papers.

Sort: