mlsanityData to 7 Oct 2026

Learning and Evaluating Contextual Embedding of Source Code

arXiv 2001.00059 ↗First posted 21 Dec 2019cs.SE cs.CL cs.LGcited by 33

Not on the map. Why?

Abstract (arXiv)

Recent research has achieved impressive results on understanding and improving source code by building up on machine-learning techniques developed for natural languages. A significant advancement in natural-language understanding has come with the development of pre-trained contextual embeddings, such as BERT, which can be fine-tuned for downstream tasks with less labeled data and training budget, while achieving better accuracies. However, there is no attempt yet to obtain a high-quality contextual embedding of source code, and to evaluate it on multiple program-understanding tasks simultaneously; that is the gap that this paper aims to mitigate. Specifically, first, we curate a massive, deduplicated corpus of 7.4M Python files from GitHub, which we use to pre-train CuBERT, an open-sourced code-understanding BERT model; and, second, we create an open-sourced benchmark that comprises five classification tasks and one program-repair task, akin to code-understanding tasks proposed in the literature before. We fine-tune CuBERT on our benchmark tasks, and compare the resulting models to different variants of Word2Vec token embeddings, BiLSTM and Transformer models, as well as published state-of-the-art models, showing that CuBERT outperforms them all, even with shorter training, and with fewer labeled examples. Future work on source-code embedding can benefit from reusing our benchmark, and from comparing against CuBERT models as a strong baseline.

Key facts. Cited by 33 papers in the map (data through 7 Oct 2026). First posted on arXiv 21 Dec 2019.

Builds on

No reference list yet.

Built on by

Cited by year

Citing papers per year: 2021: 9; 2022: 14; 2023: 5; 2024: 3; 2025: 2.

33 papers.

Sort:

By area:

  1. 2022UniXcoder: Unified Cross-Modal Pre-training for Code Representationcited by 355
  2. 2022PanGu-Coder: Program Synthesis with Function-Level Language Modelingcited by 47
  3. 2021TreeBERT: A Tree-Based Pre-Trained Model for Programming Languagecited by 40
  4. 2021What do pre-trained code models know about code?cited by 36
  5. 2022On the Transferability of Pre-trained Language Models for Low-Resource Programming Languagescited by 30
  6. 2023Large Language Models of Code Fail at Completing Code with Potential Bugscited by 28
  7. 2021On Multi-Modal Learning of Editing Source Codecited by 25
  8. 2022CodeRetriever: Unimodal and Bimodal Contrastive Learning for Code Searchcited by 21
  9. 2021Understanding Neural Code Intelligence Through Program Simplificationcited by 20
  10. 2023Multi-target Backdoor Attacks for Code Pre-trained Modelscited by 19
  11. 2021Generating Bug-Fixes Using Pretrained Transformerscited by 18
  12. 2021DeepDebug: Fixing Python Bugs Using Stack Traces, Backtranslation, and Code Skeletonscited by 17
21 more
  1. 2023One Adapter for All Programming Languages? Adapter Tuning for Code Search and Summarizationcited by 16
  2. 2022Unveiling Code Pre-Trained Models: Investigating Syntax and Semantics Capacitiescited by 9
  3. 2021ProtoTransformer: A Meta-Learning Approach to Providing Student Feedbackcited by 8
  4. 2022A Simple, Yet Effective Approach to Finding Biases in Code Generationcited by 8
  5. 2021Recommending Metamodel Concepts during Modeling Activities with Pre-Trained Language Modelscited by 7
  6. 2022Soft-Labeled Contrastive Pre-training for Function-level Code Representationcited by 7
  7. 2022CommitBART: A Large Pre-trained Model for GitHub Commitscited by 6
  8. 2024Is Next Token Prediction Sufficient for GPT? Exploration on Code Logic Comprehensioncited by 6
  9. 2022Can we learn from developer mistakes? Learning to localize and repair real bugs from real bug fixescited by 4
  10. 2023Automatic Unit Test Data Generation and Actor-Critic Reinforcement Learning for Code Synthesiscited by 4
  11. 2021Unsupervised Learning of General-Purpose Embeddings for Code Changescited by 3
  12. 2025CoRet: Improved Retriever for Code Editingcited by 3
  13. 2022Semantic-Preserving Adversarial Code Comprehensioncited by 2
  14. 2023INSPECT: Intrinsic and Systematic Probing Evaluation for Code Transformerscited by 2
  15. 2025An Empirical Study of Knowledge Distillation for Code Understanding Taskscited by 2
  16. 2022AstBERT: Enabling Language Model for Financial Code Understanding with Abstract Syntax Treescited by 1
  17. 2022Exploring Representation of Horn Clauses using GNNs (Extended Technical Report)cited by 1
  18. 2024Text-to-Code Generation with Modality-relative Pre-trainingcited by 1
  19. 2022MQDD: Pre-training of Multimodal Question Duplicity Detection for Software Engineering Domaincited by 0
  20. 2022Understanding Long Programming Languages with Structure-Aware Sparse Attentioncited by 0
  21. 2024Analysing the Behaviour of Tree-Based Neural Networks in Regression Taskscited by 0