English

Which Features are Learned by CodeBert: An Empirical Study of the BERT-based Source Code Representation Learning

Computation and Language 2023-08-14 v2 Cryptography and Security Machine Learning Programming Languages

Abstract

The Bidirectional Encoder Representations from Transformers (BERT) were proposed in the natural language process (NLP) and shows promising results. Recently researchers applied the BERT to source-code representation learning and reported some good news on several downstream tasks. However, in this paper, we illustrated that current methods cannot effectively understand the logic of source codes. The representation of source code heavily relies on the programmer-defined variable and function names. We design and implement a set of experiments to demonstrate our conjecture and provide some insights for future works.

Keywords

Cite

@article{arxiv.2301.08427,
  title  = {Which Features are Learned by CodeBert: An Empirical Study of the BERT-based Source Code Representation Learning},
  author = {Lan Zhang and Chen Cao and Zhilong Wang and Peng Liu},
  journal= {arXiv preprint arXiv:2301.08427},
  year   = {2023}
}

Comments

1 table, 2 figures

R2 v1 2026-06-28T08:15:57.499Z