Probing Pretrained Models of Source Code

Sergey Troshin, Nadezhda Chirkova
2/16/2022
cs.SEcs.CLcs.LG

Official code: serjtroshin/probings4code (3 stars, Python, last commit 2023-01-03).

Abstract

Deep learning models are widely used for solving challenging code processing tasks, such as code generation or code summarization. Traditionally, a specific model architecture was carefully built to solve a particular code processing task.

Show full abstract

However, recently general pretrained models such as CodeBERT or CodeT5 have been shown to outperform task-specific models in many applications. While pretrained models are known to learn complex patterns from data, they may fail to understand some properties of source code. To test diverse aspects of code understanding, we introduce a set of diagnosting probing tasks. We show that pretrained models of code indeed contain information about code syntactic structure and correctness, the notions of identifiers, data flow and namespaces, and natural language naming. We also investigate how probing results are affected by using code-specific pretraining objectives, varying the model size, or finetuning.

View on arXivView PDF

Code Implementations(1)

probings4code

32Python, ShellJan 3, 20233 years ago

Similar Papers

Cite this paper

@article{troshin2022probing,
  title  = {Probing Pretrained Models of Source Code},
  author = {Sergey Troshin and Nadezhda Chirkova},
  year   = {2022},
  eprint = {2202.08975},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/2202.08975}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2202.08975.svg)](https://codeofpaper.com/paper/2202.08975)

Discussion