arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2007.15813cs.LGcs.CLcs.SE
收藏

使用Transformer -XL对Source Code进行语言建模

Language Modelling for Source Code with Transformer-XL

University of Newcastle(纽卡斯尔大学)

Thomas Dowdell, Hongyu Zhang

摘要:

已经发现,软件,如自然语言文本,表现出“自然性”,这可以通过统计语言模型来捕获。近年来,已经提出了神经语言模型,以通过深度学习来表示软件的自然性。在本文中,我们进行了实验评估的国家的最先进的神经语言模型的源代码,包括基于RNN的模型和基于Transformer-XL的模型。通过在大规模Python代码语料库上的实验,我们发现Transformer-XL模型在捕捉软件自然性方面优于基于RNN的模型(包括LSTM和GRU模型),并且计算成本要低得多。

英文摘要:

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.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑