English

Language Modelling for Source Code with Transformer-XL

Machine Learning 2020-08-03 v1 Computation and Language Software Engineering

Abstract

It has been found that software, like natural language texts, exhibits "naturalness", which can be captured by statistical language models. In recent years, neural language models have been proposed to represent the naturalness of software through deep learning. In this paper, we conduct an experimental evaluation of state-of-the-art neural language models for source code, including RNN-based models and Transformer-XL based models. Through experiments on a large-scale Python code corpus, we find that the Transformer-XL model outperforms RNN-based models (including LSTM and GRU models) in capturing the naturalness of software, with far less computational cost.

Keywords

Cite

@article{arxiv.2007.15813,
  title  = {Language Modelling for Source Code with Transformer-XL},
  author = {Thomas Dowdell and Hongyu Zhang},
  journal= {arXiv preprint arXiv:2007.15813},
  year   = {2020}
}
R2 v1 2026-06-23T17:32:43.280Z